|  | @@ -9,6 +9,20 @@
 | 
	
		
			
				|  |  |        </div>
 | 
	
		
			
				|  |  |        <el-button
 | 
	
		
			
				|  |  |          class="el-button--small-yh add-customer-btn"
 | 
	
		
			
				|  |  | +        style="right: 245px;"
 | 
	
		
			
				|  |  | +        type="primary"
 | 
	
		
			
				|  |  | +        @click="revokeInGoods"
 | 
	
		
			
				|  |  | +        v-if="form.deliveryStatus !== '录入'"
 | 
	
		
			
				|  |  | +      >撤销收货</el-button>
 | 
	
		
			
				|  |  | +      <el-button
 | 
	
		
			
				|  |  | +        class="el-button--small-yh add-customer-btn"
 | 
	
		
			
				|  |  | +        style="right: 245px;"
 | 
	
		
			
				|  |  | +        type="primary"
 | 
	
		
			
				|  |  | +        @click="sendInGoods"
 | 
	
		
			
				|  |  | +        v-if="form.deliveryStatus == '录入'"
 | 
	
		
			
				|  |  | +      >确认收货</el-button>
 | 
	
		
			
				|  |  | +      <el-button
 | 
	
		
			
				|  |  | +        class="el-button--small-yh add-customer-btn"
 | 
	
		
			
				|  |  |          type="success" style="right: 140px;" @click="copyOrder">
 | 
	
		
			
				|  |  |          复制新单
 | 
	
		
			
				|  |  |        </el-button>
 | 
	
	
		
			
				|  | @@ -82,6 +96,15 @@
 | 
	
		
			
				|  |  |                >{{ row.$cellEdit ? '保存' : '修改' }}
 | 
	
		
			
				|  |  |                </el-button>
 | 
	
		
			
				|  |  |              </template>
 | 
	
		
			
				|  |  | +            <template slot="actualQuantity" slot-scope="{ row }">
 | 
	
		
			
				|  |  | +              <el-input
 | 
	
		
			
				|  |  | +                v-if="row.$cellEdit"
 | 
	
		
			
				|  |  | +                v-model="row.actualQuantity"
 | 
	
		
			
				|  |  | +                v-input-limit="0"
 | 
	
		
			
				|  |  | +                @change="actualQuantityChange(row)"
 | 
	
		
			
				|  |  | +              ></el-input>
 | 
	
		
			
				|  |  | +              <span v-else>{{ row.actualQuantity }}</span>
 | 
	
		
			
				|  |  | +            </template>
 | 
	
		
			
				|  |  |              <template slot="menuLeft" slot-scope="{size}">
 | 
	
		
			
				|  |  |                <el-button type="primary"
 | 
	
		
			
				|  |  |                           icon="el-icon-plus"
 | 
	
	
		
			
				|  | @@ -229,138 +252,6 @@
 | 
	
		
			
				|  |  |                       :disabled="tableDataCost.length !== 1">导入</el-button>
 | 
	
		
			
				|  |  |          </span>
 | 
	
		
			
				|  |  |      </el-dialog>
 | 
	
		
			
				|  |  | -    <!--打印-->
 | 
	
		
			
				|  |  | -    <el-dialog
 | 
	
		
			
				|  |  | -        title="打印单"
 | 
	
		
			
				|  |  | -        append-to-body
 | 
	
		
			
				|  |  | -        class="el-dialogDeep"
 | 
	
		
			
				|  |  | -        :visible.sync="printVisible"
 | 
	
		
			
				|  |  | -        width="100%"
 | 
	
		
			
				|  |  | -        fullscreen
 | 
	
		
			
				|  |  | -        :close-on-click-modal="false"
 | 
	
		
			
				|  |  | -        :close-on-press-escape="false">
 | 
	
		
			
				|  |  | -      <div class="print-div">
 | 
	
		
			
				|  |  | -        <div
 | 
	
		
			
				|  |  | -            style="
 | 
	
		
			
				|  |  | -            display: flex;
 | 
	
		
			
				|  |  | -            flex-direction: column;
 | 
	
		
			
				|  |  | -            justify-content: center;
 | 
	
		
			
				|  |  | -            align-item: center;
 | 
	
		
			
				|  |  | -            font-size: 24px;
 | 
	
		
			
				|  |  | -            margin-bottom: 5px;
 | 
	
		
			
				|  |  | -            width: 100%;
 | 
	
		
			
				|  |  | -            text-align: center;
 | 
	
		
			
				|  |  | -          "
 | 
	
		
			
				|  |  | -        >
 | 
	
		
			
				|  |  | -          <div><b>VITAL INDUSTRIAL GROUP LIMITED</b></div>
 | 
	
		
			
				|  |  | -          <div>NO.37 DONGHAI ROAD, QINGDAO, CHINA</div>
 | 
	
		
			
				|  |  | -          <div>TEL:0086-532-86019080 FAX:0086-532-86019080</div>
 | 
	
		
			
				|  |  | -          <div>
 | 
	
		
			
				|  |  | -            <b>COMMERCIAL INVOICE</b>
 | 
	
		
			
				|  |  | -            <span style="float: right">ORIGINAL</span>
 | 
	
		
			
				|  |  | -          </div>
 | 
	
		
			
				|  |  | -        </div>
 | 
	
		
			
				|  |  | -        <div class="print_table" style="display: flex">
 | 
	
		
			
				|  |  | -          <table
 | 
	
		
			
				|  |  | -              border="0"
 | 
	
		
			
				|  |  | -              cellspacing="0"
 | 
	
		
			
				|  |  | -              cellpadding="0"
 | 
	
		
			
				|  |  | -              style="width: 100%; line-height: 30px"
 | 
	
		
			
				|  |  | -          >
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="5" rowspan="3">MESSERS:</td>
 | 
	
		
			
				|  |  | -              <td colspan="2">INVOICE NO.</td>
 | 
	
		
			
				|  |  | -              <td colspan="3"></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="2">DATE</td>
 | 
	
		
			
				|  |  | -              <td colspan="3"></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="2">INCOTERM .</td>
 | 
	
		
			
				|  |  | -              <td colspan="3"></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="5">PI NO.:</td>
 | 
	
		
			
				|  |  | -              <td colspan="2">DELIVERY PORT</td>
 | 
	
		
			
				|  |  | -              <td colspan="3"></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td rowspan="2">NO.</td>
 | 
	
		
			
				|  |  | -              <td rowspan="2">DESCRIPTION</td>
 | 
	
		
			
				|  |  | -              <td>THICK</td>
 | 
	
		
			
				|  |  | -              <td>LENGTH</td>
 | 
	
		
			
				|  |  | -              <td>WIDTH</td>
 | 
	
		
			
				|  |  | -              <td rowspan="2">SHEETS</td>
 | 
	
		
			
				|  |  | -              <td rowspan="2">CRATES</td>
 | 
	
		
			
				|  |  | -              <td>UNIT PRICE</td>
 | 
	
		
			
				|  |  | -              <td>TOTAL</td>
 | 
	
		
			
				|  |  | -              <td>T. AMOUNT</td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td>mm</td>
 | 
	
		
			
				|  |  | -              <td>mm</td>
 | 
	
		
			
				|  |  | -              <td>mm</td>
 | 
	
		
			
				|  |  | -              <td>US$/M²</td>
 | 
	
		
			
				|  |  | -              <td>M²</td>
 | 
	
		
			
				|  |  | -              <td>US$</td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td>1</td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td>2</td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td>3</td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="9" style="text-align: right">FUMIGATION COST:</td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="9" style="text-align: right">INSURANCE:</td>
 | 
	
		
			
				|  |  | -              <td></td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -            <tr>
 | 
	
		
			
				|  |  | -              <td colspan="9" style="text-align: right">TOTAL:</td>
 | 
	
		
			
				|  |  | -              <td>0.00</td>
 | 
	
		
			
				|  |  | -            </tr>
 | 
	
		
			
				|  |  | -          </table>
 | 
	
		
			
				|  |  | -        </div>
 | 
	
		
			
				|  |  | -        <div class="print-footer" style="margin-top: 8px">
 | 
	
		
			
				|  |  | -          <div style="font-weight: bold">TOTAL AMOUNT: U.S. DOLLARS NINE THOUSAND FORTY SIX CENTS TWENTY FIVE ONLY.
 | 
	
		
			
				|  |  | -          </div>
 | 
	
		
			
				|  |  | -        </div>
 | 
	
		
			
				|  |  | -      </div>
 | 
	
		
			
				|  |  | -    </el-dialog>
 | 
	
		
			
				|  |  |    </div>
 | 
	
		
			
				|  |  |  </template>
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -372,7 +263,9 @@ import {
 | 
	
		
			
				|  |  |    corpsbank,
 | 
	
		
			
				|  |  |    corpsfiles,
 | 
	
		
			
				|  |  |    corpsitem,
 | 
	
		
			
				|  |  | -  getList
 | 
	
		
			
				|  |  | +  getList,
 | 
	
		
			
				|  |  | +  sendInGoods,
 | 
	
		
			
				|  |  | +  revokeInGoods
 | 
	
		
			
				|  |  |  } from "@/api/basicData/receipt"
 | 
	
		
			
				|  |  |  import customerContact from "./configuration/customerContact.json"
 | 
	
		
			
				|  |  |  import advantageProject from "./configuration/advantageProject.json"
 | 
	
	
		
			
				|  | @@ -382,6 +275,7 @@ import optionTwoCost from "./configuration/mainListCost.json"
 | 
	
		
			
				|  |  |  import {getDeptLazyTree, customerList,getDeptLazyTreeTwo} from "@/api/basicData/basicFeesDesc";
 | 
	
		
			
				|  |  |  import {customerList as wareHouseType} from "@/api/basicData/basicStorageType"
 | 
	
		
			
				|  |  |  import {customerList as selectWareHouse} from "@/api/basicData/basicStorageDesc"
 | 
	
		
			
				|  |  | +import {revokeOutGoods} from "../../../api/basicData/deliveryNotice";
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
		
			
				|  |  |    name: "detailsPage",
 | 
	
	
		
			
				|  | @@ -562,6 +456,7 @@ export default {
 | 
	
		
			
				|  |  |            },{
 | 
	
		
			
				|  |  |              label: '入库金额',
 | 
	
		
			
				|  |  |              prop: 'deliveryAmount',
 | 
	
		
			
				|  |  | +            disabled: true,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -572,6 +467,7 @@ export default {
 | 
	
		
			
				|  |  |            }, {
 | 
	
		
			
				|  |  |              label: '采购金额',
 | 
	
		
			
				|  |  |              prop: 'purchaseAmount',
 | 
	
		
			
				|  |  | +            disabled: true,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -582,6 +478,7 @@ export default {
 | 
	
		
			
				|  |  |            },{
 | 
	
		
			
				|  |  |              label: '入库数量',
 | 
	
		
			
				|  |  |              prop: 'totalQuantity',
 | 
	
		
			
				|  |  | +            disabled: true,
 | 
	
		
			
				|  |  |              rules: [
 | 
	
		
			
				|  |  |                {
 | 
	
		
			
				|  |  |                  required: true,
 | 
	
	
		
			
				|  | @@ -671,7 +568,6 @@ export default {
 | 
	
		
			
				|  |  |      if (this.detailData.id) {
 | 
	
		
			
				|  |  |        this.queryData(this.detailData.id)
 | 
	
		
			
				|  |  |      }else if (this.detailData.form){
 | 
	
		
			
				|  |  | -      console.log(this.detailData.form)
 | 
	
		
			
				|  |  |        this.form = JSON.parse(this.detailData.form);
 | 
	
		
			
				|  |  |        delete this.form.createTime
 | 
	
		
			
				|  |  |        delete this.form.id
 | 
	
	
		
			
				|  | @@ -687,7 +583,18 @@ export default {
 | 
	
		
			
				|  |  |          this.configuration.dicData = this.configuration.dicData.concat(this.form.belongToCorpList)
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  |        delete this.form.belongToCorpList
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'deliveryAmount', 0)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'totalQuantity', 0)
 | 
	
		
			
				|  |  | +      this.$set(this.form, 'purchaseAmount', 0)
 | 
	
		
			
				|  |  |        this.contactsData.forEach(item => {
 | 
	
		
			
				|  |  | +        this.$set(item, "srcId", item.id)
 | 
	
		
			
				|  |  | +        this.$set(item, "deliveryAmount", item.amount)
 | 
	
		
			
				|  |  | +        this.$set(item, "actualQuantity", (Number(item.purchaseQuantity) - Number(item.actualQuantity)))
 | 
	
		
			
				|  |  | +        // 入库数量和入库金额的比例
 | 
	
		
			
				|  |  | +        this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
 | 
	
		
			
				|  |  | +        this.form.deliveryAmount += Number(item.deliveryAmount)
 | 
	
		
			
				|  |  | +        this.form.totalQuantity += Number(item.actualQuantity)
 | 
	
		
			
				|  |  | +        this.form.purchaseAmount += Number(item.deliveryAmount)
 | 
	
		
			
				|  |  |          delete item.id
 | 
	
		
			
				|  |  |          delete item.pid
 | 
	
		
			
				|  |  |        })
 | 
	
	
		
			
				|  | @@ -706,6 +613,12 @@ export default {
 | 
	
		
			
				|  |  |          this.advantageProjectData = this.form.deliveryFeesList
 | 
	
		
			
				|  |  |          this.bankOfDepositData = this.form.deliveryFilesList
 | 
	
		
			
				|  |  |          this.configuration.dicData = this.form.corpName
 | 
	
		
			
				|  |  | +        this.contactsData.forEach(item => {
 | 
	
		
			
				|  |  | +          this.form.deliveryAmount += Number(item.deliveryAmount)
 | 
	
		
			
				|  |  | +          this.form.totalQuantity += Number(item.actualQuantity)
 | 
	
		
			
				|  |  | +          // 入库金额和入库数量的比例
 | 
	
		
			
				|  |  | +          this.$set(item, 'scale', (item.deliveryAmount / item.actualQuantity))
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  |          let feesData = []
 | 
	
		
			
				|  |  |          this.form.deliveryFeesList.forEach(item => {
 | 
	
		
			
				|  |  |            let a = {
 | 
	
	
		
			
				|  | @@ -769,6 +682,10 @@ export default {
 | 
	
		
			
				|  |  |      copyOrder() {
 | 
	
		
			
				|  |  |        this.queryData(this.form.id, true)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 入库数量变化时调用
 | 
	
		
			
				|  |  | +    actualQuantityChange(row) {
 | 
	
		
			
				|  |  | +      row.deliveryAmount = Number(row.actualQuantity) * Number(row.scale)
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      // 类别变换时触发
 | 
	
		
			
				|  |  |      warehouseTreeChange(id) {
 | 
	
		
			
				|  |  |        this.warehouseName = []
 | 
	
	
		
			
				|  | @@ -1087,6 +1004,55 @@ export default {
 | 
	
		
			
				|  |  |        this.configuration.dicData = this.configuration.dicData.concat(data)
 | 
	
		
			
				|  |  |        this.removeRepeat()
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    // 确认收货
 | 
	
		
			
				|  |  | +    sendInGoods() {
 | 
	
		
			
				|  |  | +      this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  | +        if (valid) {
 | 
	
		
			
				|  |  | +          if (this.contactsData.length == 0) {
 | 
	
		
			
				|  |  | +            return this.$message.error('商品信息为空')
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          for (let item in this.contactsData) {
 | 
	
		
			
				|  |  | +            if (!this.contactsData[item].id) {
 | 
	
		
			
				|  |  | +              return this.$message.error('有商品未保存,请先保存')
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          //商品信息
 | 
	
		
			
				|  |  | +          this.form.deliveryItemsList = this.contactsData
 | 
	
		
			
				|  |  | +          this.form.deliveryFeesList = this.advantageProjectData
 | 
	
		
			
				|  |  | +          this.form.deliveryFilesList = this.bankOfDepositData
 | 
	
		
			
				|  |  | +          if (typeof this.form.corpsTypeId == 'object') {
 | 
	
		
			
				|  |  | +            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          sendInGoods(this.form).then(res => {
 | 
	
		
			
				|  |  | +            console.log(res)
 | 
	
		
			
				|  |  | +            this.$message.success('收货成功')
 | 
	
		
			
				|  |  | +            this.queryData(res.data.data.id)
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    // 撤销收货
 | 
	
		
			
				|  |  | +    revokeInGoods() {
 | 
	
		
			
				|  |  | +      this.$refs["form"].validate((valid) => {
 | 
	
		
			
				|  |  | +        if (valid) {
 | 
	
		
			
				|  |  | +          //商品信息
 | 
	
		
			
				|  |  | +          this.form.deliveryItemsList = this.contactsData
 | 
	
		
			
				|  |  | +          this.form.deliveryFeesList = this.advantageProjectData
 | 
	
		
			
				|  |  | +          this.form.deliveryFilesList = this.bankOfDepositData
 | 
	
		
			
				|  |  | +          if (typeof this.form.corpsTypeId == 'object') {
 | 
	
		
			
				|  |  | +            this.form.corpsTypeId = this.form.corpsTypeId.join(",")
 | 
	
		
			
				|  |  | +          }
 | 
	
		
			
				|  |  | +          revokeInGoods(this.form).then(res => {
 | 
	
		
			
				|  |  | +            this.$message.success('撤销成功')
 | 
	
		
			
				|  |  | +            this.queryData(res.data.data.id)
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +        } else {
 | 
	
		
			
				|  |  | +          return false;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +      });
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      //修改提交触发
 | 
	
		
			
				|  |  |      editCustomer(isBack = false) {
 | 
	
		
			
				|  |  |        console.log(this.form)
 |