Bladeren bron

进口 财务

qinbai 3 jaren geleden
bovenliggende
commit
121382e0b7

+ 1 - 1
src/api/basicData/inventoryAccount.js

@@ -30,7 +30,7 @@ export function typeSave(data) {
 // 查询商品库存
 export function selectGoodsNum(data) {
   return request({
-    url: '/api/blade-stock/client/get_stock',
+    url: '/api/blade-stock/client/getStockByCondition',
     method: 'get',
     params: data
   })

+ 2 - 1
src/components/bill/billApplication.vue

@@ -42,7 +42,7 @@
   export default {
     name: "billApplication",
     props:{
-      billType:{
+      billId:{
         type:String
       },
       choceApplication: {
@@ -150,6 +150,7 @@
       },
       onLoad(page, params = {}) {
         this.loading = true;
+        params.srcParentId = this.billId
         if (params.createTime != undefined) {  //合同
           params.createStartDate = params.createTime[0]+ " " + "00:00:00";
           params.createEndDate = params.createTime[1] + " " + "23:59:59";

+ 0 - 7
src/views/financialManagement/billDetails/configuration/mainList.json

@@ -86,13 +86,6 @@
       "overHidden": true
     },
     {
-      "label": "数量",
-      "prop": "quantity",
-      "overHidden": true,
-      "width": 120,
-      "index": 6
-    },
-    {
       "label": "单价",
       "prop": "price",
       "width": 120,

+ 9 - 3
src/views/financialManagement/paymentRequest/paymentRequestDetails.vue

@@ -461,10 +461,16 @@
         this.oldForm = Object.assign({},data);
 
         this.checkDisabled = data.checkStatus === "未请核"?false:true;
-        this.$set(this.option,"disabled",this.checkDisabled)
 
-        // const column = this.findObject(this.option.column, "remark");
-        // column.disabled = false;
+        this.option.column.forEach(item =>{
+          if( item.prop == "remark" ){
+            this.$set(item,"disabled",false)
+          }else{
+            this.$set(item,"disabled",this.checkDisabled)
+          }
+        })
+
+        console.log(this.option.column)
 
         if(data.itemsList){
           this.dataList = data.itemsList

+ 22 - 2
src/views/financialManagement/paymentSettle/paymentSettleDetailsPage.vue

@@ -268,7 +268,9 @@
             },
             {
               label: '付款日期',
-              prop: 'time',
+              prop: 'settlementDate',
+              format:"yyyy-MM-dd",
+              valueFormat:"yyyy-MM-dd 00:00:00",
               span: 8,
               type:"date",
               rules: [
@@ -487,7 +489,25 @@
         this.oldForm = Object.assign({},data);
 
         this.financeDisabled = data.financeStatus == ("待结算" || "结算完成")?true:false;
-        this.$set(this.option,"disabled",this.financeDisabled)
+        //待结算  付款日期 备注  可编辑
+        if(data.financeStatus == "待结算"){
+          this.option.column.forEach(item =>{
+            if( item.prop == "remark" || item.prop == "settlementDate"){
+              this.$set(item,"disabled",false)
+            }else{
+              this.$set(item,"disabled",this.financeDisabled)
+            }
+          })
+        }else{
+          this.option.column.forEach(item =>{
+            if( item.prop == "remark"){
+              this.$set(item,"disabled",false)
+            }else{
+              this.$set(item,"disabled",this.financeDisabled)
+            }
+          })
+        }
+
 
         if(data.itemsList){
           this.dataList = data.itemsList

+ 1 - 2
src/views/importTrade/invoice/config/customerContact.json

@@ -62,13 +62,12 @@
     {
       "label": "箱号",
       "prop": "cntrNo",
-      "cell": true,
       "index": 4,
       "width":120
     },
     {
       "label": "库存件数",
-      "prop": "inQuantity",
+      "prop": "inventoryNumber",
       "index": 5,
       "width":120
     },

+ 40 - 31
src/views/importTrade/invoice/detailsPageEdit.vue

@@ -267,6 +267,7 @@ import { getOrgOrderNo } from "@/api/importTrade/salesContract"
 import  marketDetail from "@/components/procurement/market";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import _ from "lodash";
+import  {generateShipment} from "@/api/importTrade/salesContract"
 
 export default {
   name: "detailsPageEdit",
@@ -494,38 +495,38 @@ export default {
     }
     if (this.detailData.form) {
       this.buttonLoading = true;
-      this.form = JSON.parse(this.detailData.form);
-      this.$set(this.form,"saleman",this.form.salesName)
-      //是否计算合同号
-      this.form.id = null
-      this.form.sysNo = null
+      generateShipment(this.detailData.form).then(res=>{
+        this.form = res.data.data
 
-      this.form.orderItemsList.forEach((item, index) => {
-        item.srcId = item.id
-        item.orgOrderNo = this.form.orgOrderNo
-        item.contractNumber = item.orgOrderNo
-        item.contractAmount = item.amount
-        item.currency = this.form.currency
-        item.exRate = this.form.exchangeRate
-        if (item.actualQuantity !== 0) {   //如果发过货
-          item.actualQuantity = _.subtract(item.orderQuantity, item.actualQuantity); //发货件数 =  总件数 - 已发件数
-        } else {
-          item.actualQuantity = item.orderQuantity;
-        }
-        //码单重量 除以 数量     每个的码单重量
-        // item.singleton = {
-        //   BQ : _.divide(item.billWeight, item.orderQuantity),
-        //   IQ : _.divide(item.invoiceWeight, item.orderQuantity)
-        // }
-        delete item.orderQuantity
-        delete item.id
-        // this.$refs.crudContact.rowCellAdd(item);
-        // this.$refs.crudContact.rowCell(item,this.contactsData.length - 1)
+        this.$set(this.form,"saleman",this.form.salesName)
+        //是否计算合同号
+        this.form.id = null
+        this.form.sysNo = null
+        console.log(this.form.orderItemsList)
+        this.form.orderItemsList.forEach((item, index) => {
+
+          item.srcId = item.id
+          item.contractNumber = item.orgOrderNo  //合同号
+          item.orgOrderNo = this.form.orgOrderNo
+          item.contractAmount = item.amount
+          item.currency = this.form.currency
+          item.exRate = this.form.exchangeRate
+          if (item.actualQuantity !== 0) {   //如果发过货
+            item.actualQuantity = _.subtract(item.orderQuantity, item.actualQuantity); //发货件数 =  总件数 - 已发件数
+          } else {
+            item.actualQuantity = item.orderQuantity;
+          }
+
+          delete item.orderQuantity
+          delete item.id
+        })
+        this.contactsData = this.form.orderItemsList
+        console.log(this.contactsData)
+        this.sumOrderNo();
+        delete this.form.orderItemsList
+      }).finally(()=>{
+        this.buttonLoading = false
       })
-      this.contactsData = this.form.orderItemsList
-      this.sumOrderNo();
-      delete this.form.orderItemsList
-      this.buttonLoading = false
     }
   },
   methods: {
@@ -603,7 +604,13 @@ export default {
           cntrNo: row.cntrNo
         }
         selectGoodsNum(params).then(res => {
-          this.$set(this.contactsData[row.$index], "inventoryNumber", res.data.data)
+          if(res.data.data){
+            this.$set(this.contactsData[row.$index],"inventoryNumber",res.data.data.inQuantity)
+            this.$set(this.contactsData[row.$index],"inWeight",res.data.data.inWeight)
+          }else {
+            this.$set(this.contactsData[row.$index],"inventoryNumber",0.00)
+            this.$set(this.contactsData[row.$index],"inWeight",0.00)
+          }
         })
       }
     },
@@ -704,6 +711,8 @@ export default {
           });
           this.contactsData.splice(index, 1);
         }
+      }).finally(()=>{
+        this.totalChange()
       })
     },
     confirmGoods() {

+ 12 - 11
src/views/importTrade/receipt/config/customerContact.json

@@ -81,12 +81,12 @@
     },
     {
       "label": "库存件数",
-      "prop": "inQuantity",
+      "prop": "inventoryNumber",
       "index": 5,
       "width":120
     },
     {
-      "label": "库存重量",
+      "label": "库存重量(吨)",
       "prop": "inWeight",
       "index": 5,
       "width":120
@@ -96,9 +96,10 @@
       "prop": "actualQuantity",
       "index": 6,
       "width":120
-    },{
-      "label": "码单重量(吨)",
-      "prop": "billWeight",
+    },
+    {
+      "label": "发票重量(吨)",
+      "prop": "invoiceWeight",
       "index": 7,
       "width":120,
       "rules": [
@@ -110,8 +111,8 @@
       ]
     },
     {
-      "label": "单价",
-      "prop": "price",
+      "label": "码单重量(吨)",
+      "prop": "billWeight",
       "index": 8,
       "width":120,
       "rules": [
@@ -123,8 +124,8 @@
       ]
     },
     {
-      "label": "发票金额",
-      "prop": "contractAmount",
+      "label": "单价",
+      "prop": "price",
       "index": 9,
       "width":120,
       "rules": [
@@ -136,8 +137,8 @@
       ]
     },
     {
-      "label": "发票重量(吨)",
-      "prop": "invoiceWeight",
+      "label": "发票金额",
+      "prop": "contractAmount",
       "index": 10,
       "width":120,
       "rules": [

+ 56 - 18
src/views/importTrade/receipt/detailsPageEdit.vue

@@ -100,7 +100,9 @@
               <span v-else>{{ row.contractNumber }}</span>
             </template>
             <template slot="priceCategory" slot-scope="{row,index}">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <goods-select
+                style="width:90% !important;"
                 v-if="row.$cellEdit"
                 v-model="row.priceCategoryNames"
                 @valueName="(value) => valueName(value,row)"
@@ -111,7 +113,9 @@
               <span v-else>{{ row.priceCategoryNames }}</span>
             </template>
             <template slot="cntrNo" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
+                style="width:90%"
                 v-if="row.$cellEdit"
                 v-model="row.cntrNo"
                 placeholder="请输入"
@@ -122,12 +126,15 @@
               <span v-else>{{ row.cntrNo }}</span>
             </template>
             <template slot="billWeight" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
+                style="width:90%"
                 v-if="row.$cellEdit"
                 v-model="row.billWeight"
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
+                @input="billWeightChange(row)"
                 @change="totalChange(row.billWeight)"
               ></el-input>
               <span v-else>{{ row.billWeight }}</span>
@@ -139,7 +146,6 @@
                 placeholder="请输入"
                 size="small"
                 oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d\d\d\d\d).*$/, "$1.$2")'
-                @input="billWeightChange(row)"
                 @change="totalChange(row.invoiceWeight)"
               ></el-input>
               <span v-else>{{ row.invoiceWeight }}</span>
@@ -156,7 +162,9 @@
               <span v-else>{{ row.price }}</span>
             </template>
             <template slot="actualQuantity" slot-scope="{ row }">
+              <span v-if="row.$cellEdit" class="required_fields">*</span>
               <el-input
+                style="width:90%"
                 v-if="row.$cellEdit"
                 v-model="row.actualQuantity"
                 placeholder="请输入"
@@ -248,9 +256,6 @@
 
 <script>
 import customerContact from "./config/customerContact.json"
-import commodity from "../invoice/config/commodity.json";
-import {getSysNo} from "@/api/importTrade/purchase";
-import {getDeptLazyTree, customerList} from "@/api/basicData/basicFeesDesc";
 import {detailReceiptList,
   submitReceiptList,
   removeGoodsItem,
@@ -259,9 +264,6 @@ import {detailReceiptList,
   confirmReceipt,
   repealReceipt
 } from "@/api/importTrade/receipt"
-import {
-  getList
-} from "@/api/basicData/deliveryNotice"
 import upLoadOption from "../../exportTrade/purchaseContract/config/uploadList.json";
 import {detailListData } from "@/api/importTrade/purchase";
 import { contrastObj,contrastList } from "@/util/contrastData";
@@ -269,7 +271,6 @@ import { getOrgOrderNo } from "@/api/importTrade/salesContract"
 import  procurementDetail from "@/components/procurement/purchase";
 import {selectGoodsNum} from "@/api/basicData/inventoryAccount"
 import _ from "lodash";
-import importInventory from "../../salesManagement/salesContract/config/importInventory.json";
 
 export default {
   name: "detailsPageEdit",
@@ -421,8 +422,8 @@ export default {
             ]
           },
           {
-            label: '码单重量',
-            prop: 'billWeight',
+            label: '发票重量',
+            prop: 'invoiceWeight',
             disabled: true,
             rules: [
               {
@@ -433,8 +434,8 @@ export default {
             ]
           },
           {
-            label: '发票重量',
-            prop: 'invoiceWeight',
+            label: '码单重量',
+            prop: 'billWeight',
             disabled: true,
             rules: [
               {
@@ -572,7 +573,13 @@ export default {
           cntrNo:row.cntrNo
         }
         selectGoodsNum(params).then(res =>{
-          this.$set(this.contactsData[row.$index],"inventoryNumber",res.data.data)
+          if(res.data.data){
+            this.$set(this.contactsData[row.$index],"inventoryNumber",res.data.data.inQuantity)
+            this.$set(this.contactsData[row.$index],"inWeight",res.data.data.inWeight)
+          }else {
+            this.$set(this.contactsData[row.$index],"inventoryNumber",0.00)
+            this.$set(this.contactsData[row.$index],"inWeight",0.00)
+          }
         })
       }
     },
@@ -684,23 +691,31 @@ export default {
           });
           this.contactsData.splice(index, 1);
         }
+      }).finally(()=>{
+        this.totalChange()
       })
     },
     //修改提交触发
     editCustomer(status) {
       this.$refs["form"].validate((valid) => {
         for (let i = 0; i < this.contactsData.length; i++) {
-          if (this.contactsData[i].billNo === "") {
+          if (this.contactsData[i].billNo === (null || "" )) {
             return this.$message.error(`请输入第${i + 1}行的提单号`);
           }
-          if (this.contactsData[i].contractNumber === "") {
+          if (this.contactsData[i].contractNumber === (null || "" )) {
             return this.$message.error(`请输入第${i + 1}行的合同号`);
           }
-          if (this.contactsData[i].priceCategory === "") {
+          if (this.contactsData[i].priceCategory === (null || "" )) {
             return this.$message.error(`请输入第${i + 1}行的货物品种`);
           }
-          if (this.contactsData[i].actualQuantity === null) {
-            return this.$message.error(`请输入第${i + 1}行的数量`);
+          if (this.contactsData[i].cntrNo === (null || "" )) {
+            return this.$message.error(`请输入第${i + 1}行的箱号`);
+          }
+          if (this.contactsData[i].actualQuantity === (null || "" )) {
+            return this.$message.error(`请输入第${i + 1}行的件数`);
+          }
+          if (this.contactsData[i].billWeight === (null || "" )) {
+            return this.$message.error(`请输入第${i + 1}行的码单重量`);
           }
         }
         this.form.billNo = this.contactsData.map(item =>{return item.billNo}).join(",")
@@ -761,10 +776,22 @@ export default {
             type: "warning"
           }).then(()=>{
             this.form.deliveryItemsList = this.contactsData;
+
             confirmReceipt(this.form).then(res =>{
               if(res.data.success){
                 this.$message.success("收货成功!")
+                this.form = res.data.data;
+                this.oldForm = Object.assign({},res.data.data);
                 this.receiptDisable = res.data.data.deliveryStatus === "已收货" ?   true :false
+                this.configuration.dicData = this.form.corpName
+                if(this.form.deliveryItemsList){
+                  this.contactsData = this.form.deliveryItemsList
+                  this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
+                }
+                if(this.form.deliveryFilesList){
+                  this.upLoadData = this.form.deliveryFilesList
+                  this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
+                }
               }
             })
           }).finally(()=>{
@@ -780,7 +807,18 @@ export default {
             repealReceipt(this.form).then(res =>{
               if(res.data.success){
                 this.$message.success("撤销成功!")
+                this.form = res.data.data;
+                this.oldForm = Object.assign({},res.data.data);
                 this.receiptDisable = res.data.data.deliveryStatus === "已收货" ?   true :false
+                this.configuration.dicData = this.form.corpName
+                if(this.form.deliveryItemsList){
+                  this.contactsData = this.form.deliveryItemsList
+                  this.oldContactsData = this.deepClone(this.form.deliveryItemsList)
+                }
+                if(this.form.deliveryFilesList){
+                  this.upLoadData = this.form.deliveryFilesList
+                  this.oldUpLoadData = this.deepClone(this.form.deliveryFilesList)
+                }
               }
             })
           }).finally(()=>{

+ 2 - 2
src/views/purchase/contract/config/mainList.json

@@ -81,7 +81,7 @@
     },
     {
       "label": "合同金额",
-      "prop": "amount",
+      "prop": "orderAmount",
       "overHidden": true,
       "index": 5,
       "width":100
@@ -116,7 +116,7 @@
     },
     {
       "label": "发票金额",
-      "prop": "orderAmount",
+      "prop": "invoiceAmount",
       "overHidden": true,
       "index": 10,
       "width":100

+ 36 - 14
src/views/purchase/contract/detailsPage.vue

@@ -280,11 +280,11 @@
       :close-on-press-escape="false"
       v-dialog-drag
     >
-<!--      <bill-application
-        :billType="billType"
+      <bill-application
+        :billId="form.id"
         @choceApplication="choceApplication"
       >
-      </bill-application>-->
+      </bill-application>
     </el-dialog>
     <el-dialog
       append-to-body
@@ -317,7 +317,7 @@ import {detailListData, submitData} from "@/api/importTrade/purchase";
 import feeInfo from "@/components/fee-info/main";
 import uploadFile from "@/components/upload-file/main";
 import _ from "lodash";
-// import  billApplication from "@/components/bill/billApplication";
+import  billApplication from "@/components/bill/billApplication";
 //商品详情接口
 import { corpsattn } from "@/api/basicData/configuration"
 import { contrastObj,contrastList } from "@/util/contrastData";
@@ -332,9 +332,8 @@ export default {
   components: {
     ApplyPayment,
     feeInfo,
-    uploadFile
-/*    ,
-    billApplication*/
+    uploadFile,
+    billApplication
   },
   data() {
     return {
@@ -532,7 +531,7 @@ export default {
               }
             ]
           }, {
-            label: '合同重量',
+            label: '合同重量(吨)',
             prop: 'contractWeight',
             rules: [
               {
@@ -835,19 +834,40 @@ export default {
           }
           const orderFilesList = this.$refs.uploadFile.submitData();
           for (let j = 0; j < this.contactsData.length; j++) {
-            if (this.contactsData[j].billNo === "") {
+            if (this.contactsData[j].billNo === (null || "")) {
               return this.$message.error(`请输入采购明细第${j + 1}行的提单号`);
             }
-            if (this.contactsData[j].priceCategory === "") {
+            if (this.contactsData[j].priceCategory === (null || "")) {
               return this.$message.error(`请输入采购明细第${j + 1}行的货物品种`);
             }
-            if (this.contactsData[j].orderQuantity === "") {
-              return this.$message.error(`请输入采购明细第${j + 1}行的数量`);
+            if (this.contactsData[j].itemType === (null || "")) {
+              return this.$message.error(`请输入采购明细第${j + 1}行的规格型号`);
+            }
+            if (this.contactsData[j].orderQuantity === (null || "")) {
+              return this.$message.error(`请输入采购明细第${j + 1}行的件数`);
+            }
+            if (this.contactsData[j].invoiceWeight === (null || "")) {
+              return this.$message.error(`请输入采购明细第${j + 1}行的发票重量`);
+            }
+            if (this.contactsData[j].billWeight === (null || "")) {
+              return this.$message.error(`请输入采购明细第${j + 1}行的码单重量`);
+            }
+            if (this.contactsData[j].price === (null || "")) {
+              return this.$message.error(`请输入采购明细第${j + 1}行的单价`);
             }
-            if (this.contactsData[j].orderQuantity == 0) {
-              return this.$message.error(`采购明细第${j + 1}行的数量不能为0`);
+            if (this.contactsData[j].amount === (null || "")) {
+              return this.$message.error(`请输入采购明细第${j + 1}行的发票金额`);
             }
           }
+
+
+          let invoiceList =  this.contactsData.map(item => {
+            if(item.amount){
+              return parseFloat(item.amount);
+            }else return 0
+          });
+          this.form.invoiceAmount = invoiceList.reduce((n,m) => n + m)
+
           this.form.billNo = this.contactsData.map(item =>{return item.billNo}).join(",")
           let submitDto = {
             ...this.form,
@@ -1028,6 +1048,8 @@ export default {
           });
           this.contactsData.splice(index, 1);
         }
+      }).finally(()=>{
+        this.totalChange()
       })
     },
     //关闭账单

+ 7 - 0
src/views/salesManagement/salesContract/config/importInventory.json

@@ -163,6 +163,13 @@
           "trigger": "blur"
         }
       ]
+    },
+    {
+      "label": "itemId",
+      "prop": "itemId",
+      "index": 11,
+      "width":200,
+      "hide": true
     }
   ]
 }

+ 9 - 1
src/views/salesManagement/salesContract/config/mainList.json

@@ -73,6 +73,14 @@
       "width":150
     },
     {
+      "label": "合同金额",
+      "prop": "orderAmount",
+      "overHidden": true,
+      "search": true,
+      "index": 4,
+      "width":120
+    },
+    {
       "label": "件数",
       "prop": "orderQuantity",
       "overHidden": true,
@@ -102,7 +110,7 @@
     },
     {
       "label": "发票金额",
-      "prop": "orderAmount",
+      "prop": "invoiceAmount",
       "overHidden": true,
       "search": true,
       "index": 9,

+ 40 - 13
src/views/salesManagement/salesContract/detailsPage.vue

@@ -463,7 +463,6 @@ export default {
             prop: 'currency',
           }, {
             label: '汇率',
-            type:"unit",
             prop: 'exchangeRate',
             rules: [
               {
@@ -839,21 +838,42 @@ export default {
           }
           let orderUpLoadList = this.$refs.uploadFile.submitData();
           for (let j = 0; j < this.importInventoryData.length; j++) {
-            if (this.importInventoryData[j].billNo === "") {
+            if (this.importInventoryData[j].billNo === (null || "")) {
               return this.$message.error(`请输入销售明细第${j + 1}行的提单号`);
             }
-            if (this.importInventoryData[j].orgOrderNo === "") {
+            if (this.importInventoryData[j].orgOrderNo === (null || "")) {
               return this.$message.error(`请输入销售明细第${j + 1}行的合同号`);
             }
-            if (this.importInventoryData[j].priceCategory === "") {
+            if (this.importInventoryData[j].priceCategory === (null || "")) {
               return this.$message.error(`请输入销售明细第${j + 1}行的货品物种`);
             }
-            if (this.importInventoryData[j].orderQuantity === "") {
+            if (this.importInventoryData[j].orderQuantity === (null || "")) {
               return this.$message.error(`请输入销售明细第${j + 1}行的件数`);
             }
+            if (this.importInventoryData[j].invoiceWeight === (null || "")) {
+              return this.$message.error(`请输入销售明细第${j + 1}行的发票重量`);
+            }
+            if (this.importInventoryData[j].billWeight === (null || "")) {
+              return this.$message.error(`请输入销售明细第${j + 1}行的码单重量`);
+            }
+            if (this.importInventoryData[j].price === (null || "")) {
+              return this.$message.error(`请输入销售明细第${j + 1}行的单价`);
+            }
+            if (this.importInventoryData[j].amount === (null || "")) {
+              return this.$message.error(`请输入销售明细第${j + 1}行的发票金额`);
+            }
           }
           this.buttonLoading = true;
           this.form.billNo = this.importInventoryData.map(item =>{return item.billNo}).join(",")
+
+          //发票金额合计  存入主表
+          let invoiceList =  this.importInventoryData.map(item => {
+            if(item.amount){
+              return parseFloat(item.amount);
+            }else return 0
+          });
+          this.form.invoiceAmount = invoiceList.reduce((n,m) => n + m)
+
           let submitDto = {
             ...this.form,
             orderItemsList: this.importInventoryData,
@@ -939,12 +959,16 @@ export default {
               }
             });
           }else{
-            generateShipment(params).then(res=>{
-              this.$router.push({
-                path: "/importTrade/invoice/index",
-                query: {form: JSON.stringify(res.data.data)},
-              });
-            })
+            this.$router.push({
+              path: "/importTrade/invoice/index",
+              query: {form: params},
+            });
+            // generateShipment(params).then(res=>{
+            //   this.$router.push({
+            //     path: "/importTrade/invoice/index",
+            //     query: {form: JSON.stringify(res.data.data)},
+            //   });
+            // })
           }
         }
       }else{
@@ -963,14 +987,15 @@ export default {
         if(res.data.length != 0){
           this.contractDic = res.data;
           row.orgOrderNo =  res.data[0].orderNo
-          row.itemId = res.data.itemId;
+          row.itemId = res.data[0].itemId;
           row.priceCategoryNames  = res.data[0].itemName[0].cname
           row.priceCategory  = res.data[0].itemName[0].id
         }else{
           this.$message.warning("无此提单号记录!");
           this.contractDic  = [];
           row.orgOrderNo =  ''
-          row.priceCategoryNames  = ''
+          row.itemId = ''
+            row.priceCategoryNames  = ''
           row.priceCategory  = ''
         }
       }).catch(()=>{
@@ -1051,6 +1076,8 @@ export default {
           });
           this.importInventoryData.splice(index, 1);
         }
+      }).finally(()=>{
+        this.totalChange()
       })
     },
     backToList() {