浏览代码

Merge branch 'master' of http://139.196.39.194:9021/chenc/sen-yu-new-web

huxy 1 年之前
父节点
当前提交
6cfb7d0c33

+ 2 - 2
src/views/advance-packingList/adPaList-clothes.vue

@@ -618,7 +618,7 @@ export default {
           this.$refs.addAdpackingDrawer.editDecide = 'edit';
           this.$refs.addAdpackingDrawer.addAdpacking = res.result; //接口参数
           this.$refs.addAdpackingDrawer.addState = '0'; 
-          this.$refs.addAdpackingDrawer.loadSizeTables(res.result.syPreAssembledPackingListItemList[0].sizeTables);
+          this.$refs.addAdpackingDrawer.loadSizeTables(res.result.sizeTables);
           // var totalNetWeight = 0;
           // var totalGrossWeight = 0;
           // var totalVolume = 0;
@@ -656,7 +656,7 @@ export default {
           this.$refs.detailsAdpackingDrawer.visible = true;
           res.result.syPreAssembledPackingListItemList.map(item=>item.hod = moment(item.hod).format('YYYY-MM-DD'))
           this.$refs.detailsAdpackingDrawer.addAdpacking = res.result; //接口参数
-          this.$refs.detailsAdpackingDrawer.loadSizeTables(res.result.syPreAssembledPackingListItemList[0].sizeTables);
+          this.$refs.detailsAdpackingDrawer.loadSizeTables(res.result.sizeTables);
           var totalNetWeight = 0;
           var totalGrossWeight = 0;
           var totalVolume = 0;

+ 3 - 0
src/views/cost-allocation-total/costDetailDrawer.vue

@@ -638,6 +638,9 @@ export default {
 
     //判断有无指派人
     determineAssignedPerson(){
+      this.AssignedPerson='no'
+      this.authority='no'
+      this.AssignedPersonQx='no'
       assignedData({code:this.planNo}).then(res => {
           if (res.success) {
             var array = res.result!==''?res.result.split(","):[]

+ 4 - 4
src/views/cost-allocation-total/modal/SelectUserModal.vue

@@ -177,9 +177,9 @@
         this.selectedRowKeys=[]
       },
       handleOk() {
-        // if(this.selectedRowKeys.length>1){
-        //   this.$message.error('只能勾选一条数据');
-        // }else{
+        if(this.selectedRowKeys.length==0){
+          this.$message.error('必须勾选一条数据');
+        }else{
           this.dataSource2 = this.selectionRows
         var name = []
         this.selectionRows.map(item=>name.push(item.realname))
@@ -187,7 +187,7 @@
         this.visible = false
         this.selectedRowKeys = []
         this.selectionRows = []
-        // }
+        }
         
       },
       add() {

+ 1 - 1
src/views/packing-list/clothes-list.vue

@@ -999,7 +999,7 @@ export default {
             this.getSpltList()
             this.$message.success('删除成功')
           } else {
-            this.$message.error('删除成功')
+            this.$message.error(res.message)
           }
        
         })

+ 1 - 1
src/views/packing-list/fabric-list.vue

@@ -785,7 +785,7 @@ export default {
             this.getFabricList()
             this.$message.success('删除成功')
           } else {
-            this.$message.error('删除成功')
+            this.$message.error(res.message)
           }
        
         })

+ 2 - 1
src/views/pre-book/addPreBookDrawer.vue

@@ -633,7 +633,8 @@ export default {
         this.addPreBook.termsOfDeliveryvalue = 'FOB'
         this.addPreBook.exchangeEarningsValue = 'T/T'
         if(this.addPreBook.exportPort==''||!this.addPreBook.exportPort){
-          this.addPreBook.exportPort='NINGBO'
+          this.$set(this.addPreBook,'exportPort','NINGBO');
+          // this.addPreBook.exportPort='NINGBO'
         }
         var dd = moment(new Date()).format('YYYY-MM-DD')
          this.$set( this.addPreBook,'shippingOrderDate',dd)

+ 34 - 19
src/views/reportForms/cost-allocation-table.vue

@@ -507,6 +507,7 @@ export default {
       isDisabled: false, //按钮禁止
       billstatus: '', // 单据状态
       color1:0,
+      fabricCost:'',//保存表头面料成本(¥)
       color2:0,
       fileList:[],
       url: {
@@ -534,10 +535,12 @@ export default {
     onSearch(data) {
       this.$nextTick(() => {
         // TODO:接口完善后,type 应改为 add(暂时为了回显数据)
+        this.fabricCost = ''
         this.loading = true
         this.$refs.unitTabs.mList = []
         this.$refs.unitTabs.fList = []
-        var Staging = '',
+        this.StagingList = []  //更新时重新计算面料成本(¥)使用
+        var Staging = '', 
         StagingLast = '',
         file = ''
         if(data=='queryNew'){
@@ -546,6 +549,7 @@ export default {
           file = this.fileList
           this.$refs.unitTabs.mList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationFabricList
           this.$refs.unitTabs.fList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationIngredientList
+          this.StagingList = this.$refs.unitTabs.fabData
         }
         seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
           if (res.success) {
@@ -599,12 +603,12 @@ export default {
                 all+=Number(item.transferCost)
               }
             })
-            this.detailsPlanNum.fabriccostIncludestaxUsd = Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate//表头面料成本($)
-            // //表头面料成本(¥),面料成本($),合计信息-面料金额合计
-            // if(!this.detailsPlanNum.fabriccostIncludestax|| this.detailsPlanNum.fabriccostIncludestax=='0'|| this.detailsPlanNum.fabriccostIncludestax==''){
-            //   this.detailsPlanNum.fabriccostIncludestax = all
-            // }
-            // this.detailsPlanNum.fabriccostIncludestaxUsd = Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate
+  
+            
+            this.fabricCost = this.detailsPlanNum.fabriccostIncludestax
+            this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2) // 表头面料成本(¥)
+            this.detailsPlanNum.fabriccostIncludestaxUsd = (Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate).toFixed(2)//表头面料成本($)
+            this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
             this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
             this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
             this.detailsPlanNum.outdata = oneData.syCostAllocationShipdetail.length!==0?oneData.syCostAllocationShipdetail[0].outdata:''
@@ -638,7 +642,7 @@ export default {
             v =0,
             t=0
             oneData.syCostAllocationIngredientList.map(item=>{
-              s+=Number(item.priceExcludingtax),
+              s+=item.priceExcludingtax?Number(item.priceExcludingtax):0,
               v+=item.rmbAmount?Number(item.rmbAmount):0
               t+=item.transferCost?Number(item.transferCost):0
             })
@@ -660,11 +664,10 @@ export default {
               v+=Number(item.shipQuantity)
               d+=Number(item.processCost)
               b+=Number(item.rmbAmount)
-              if(item.exchangeRate=='6.888' && item.outdata!=='合计'){
-                 e+=Number(item.processCost)
-              }else if(item.outdata!=='合计'){
-                e+=(Number(item.processCost)/1.13)
+              if(item.outdata!=='合计'){
+                e+=Number(item.procesUnitPriceusd)*Number(item.shipQuantity)
               }
+              
             })
             this.$refs.unitTabs.sumInfo.exportPriceUSD = (s/2).toFixed(2)//出运美元外销总价
             this.detailsPlanNum.usdTotalexportprice = this.$refs.unitTabs.sumInfo.exportPriceUSD //表头-外销总价($)
@@ -675,11 +678,13 @@ export default {
              //调整表头格式
              this.adjustingHeader()
            if(Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
-            this.$refs.unitTabs.sumInfo.excludingTaxProcessing =this.$refs.unitTabs.sumInfo.shipProcesFees//出运不含税加工费
+            this.$refs.unitTabs.sumInfo.excludingTaxProcessing =this.$refs.unitTabs.sumInfo.shipProcesFees//出运不含税加工费-合计信息
              }else{
               this.$refs.unitTabs.sumInfo.excludingTaxProcessing =( this.$refs.unitTabs.sumInfo.shipProcesFees/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//出运不含税加工费
              }    
-            this.detailsPlanNum.rmbProcesscost=(e==''|| !e)?'':Number(e).toFixed(2)//表头加工费(人民币)
+             this.detailsPlanNum.rmbProcesscost = this.$refs.unitTabs.sumInfo.excludingTaxProcessing
+             this.detailsPlanNum.usdProcesscost = e.toFixed(2)
+            // this.detailsPlanNum.rmbProcesscost=(e==''|| !e)?'':Number(e).toFixed(2)//表头加工费(人民币)
             f=Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number(this.$refs.unitTabs.sumInfo.shipProcesFees)
             this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricAmount)+Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).toFixed(2)//合计金额
             this.pagination = {
@@ -691,14 +696,21 @@ export default {
               this.detailsPlanNum.memo = Staging
               this.detailsPlanNum.remarks = StagingLast
               this.fileList = file
+              var all = 0
               oneData.syCostAllocationFabricList.map(item=>{
                 this.$refs.unitTabs.mList.map(event=>{
                   if(item.goodsName==event.goodsName){
                     item.transferCost = event.transferCost
                   }
                 })
+                if(item.transferCost&&item.transferCost!==''){
+                    all+=item.transferCost
+                  }
               })
-              oneData.syCostAllocationIngredientList.map(item=>{
+              this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.fabricCost)).toFixed(2) // 表头面料成本(¥)
+              this.detailsPlanNum.fabriccostIncludestaxUsd = (Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate).toFixed(2)//表头面料成本($)
+              this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
+               oneData.syCostAllocationIngredientList.map(item=>{
                 this.$refs.unitTabs.fList.map(event=>{
                   if(item.goodsName==event.goodsName){
                     item.transferCost = event.transferCost
@@ -854,7 +866,7 @@ export default {
         val.map(item=>{
           if(item.goodsName!=='合计'){
             if(item.rmbAmount !== item.usdAmount){  usdAmountAll+=item.usdAmount?Number(item.usdAmount):0   }
-            transferCostAll+=Number(item.transferCost)
+            transferCostAll+=item.transferCostAll?Number(item.transferCost):0
             rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
             priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
           }
@@ -1058,11 +1070,14 @@ export default {
       // this.detailsPlanNum.excipiencostNotincludestax =  data2
     },
     FabInQua(data){
-      if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
-        this.detailsPlanNum.fabriccostIncludestax=data.toFixed(2)//面料含税成本
+      // if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
+        this.detailsPlanNum.fabriccostIncludestax=(Number(data)+Number(this.fabricCost)).toFixed(2)//面料含税成本
 
         // this.detailsPlanNum.fabriccostIncludestax=(Number(this.copyFabriccostIncludestax)+data).toFixed(2)//面料含税成本
-      }
+      // }
+      this.detailsPlanNum.fabriccostIncludestaxUsd = (Number(this.detailsPlanNum.fabriccostIncludestax)/this.detailsPlanNum.exchangeRate).toFixed(2)//表头面料成本($)
+      this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
+      this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
      
     },
 

+ 3 - 3
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -8,7 +8,6 @@
         <div :class="[(fabData.length==0?'noprint': '')]">
           <h6 class="table-title">面料</h6>
           <a-table
-            rowKey="(item)=>item.id"
             :loading="loading"
             :columns="fabColumns"
             :data-source="fabData"
@@ -699,6 +698,7 @@ export default {
             console.log( this.mList,this.fList)
             this.$refs.fabInQuaModal.fabInQuaModVis = true
             this.$refs.fabInQuaModal.record = record
+           
             record.syTransfers.map(item=>{
               if(item.unitCost){
                  item.unitCost =  Number(item.unitCost).toFixed(3)
@@ -707,7 +707,7 @@ export default {
             this.$refs.fabInQuaModal.data = record.syTransfers
             if(this.mList.length!==0){
               this.mList.map(item=>{
-                if(item.goodsName == record.goodsName){
+                if(item.goodsName == record.goodsName && item.syTransfers.length!==0){
                   this.$refs.fabInQuaModal.data = item.syTransfers
                 }
               })
@@ -779,7 +779,7 @@ export default {
             this.$refs.ingInQuaModal.data = record.syTransfers
             if(this.fList.length!==0){
               this.fList.map(item=>{
-                if(item.goodsName == record.goodsName){
+                if(item.goodsName == record.goodsName &&item.syTransfers){
                   this.$refs.ingInQuaModal.data = item.syTransfers
                 }
               })

+ 0 - 1
src/views/reportForms/fabric-loss-table.vue

@@ -132,7 +132,6 @@
         <h6 class="table-title">采购订单</h6>
 
         <a-table
-          :row-key="record => record.id"
           :loading="loading"
           :columns="purchaseOrderColumns"
           :data-source="fabricLoss.fabricPoOrderList"

+ 5 - 2
src/views/shipment-details/declareElementsModal.vue

@@ -296,14 +296,17 @@ export default {
     //查询最近报关信息
     queryLatelyDeclarationElements(){
       var hscode = this.declareElements.declarationName;
+      var  inventoryName=this.declareElements.inventoryName
       queryLatelyDeclarationElements({hscode:hscode,itemNumber:this.declareElements.itemNumber,orderNumber:this.orderNumber,pkOrg:this.declareElements.acSetNo}).then(res=>{ 
-      if(res.success){
+        if(res.success){
         res.result['itemIds'] = this.declareElements.itemIds;
         this.declareElements=res.result;
         this.declareElementsData=res.result.syDeclarationElementsItemList;
+        this.declareElements.inventoryName = inventoryName
         //console.info("赋值数据:"+JSON.stringify(this.declareElements))
       }else{
         this.$message.error(res.message);
+        this.declareElements.inventoryName = inventoryName
       }
       })
     },
@@ -349,7 +352,7 @@ export default {
         if (res.success) {
           this.$message.success('新增成功')
           this.$emit('close-data',newObj,this.record)
-          this.$emit('save-information',newObj.syDeclarationElementsItemList)
+          this.$emit('save-information',newObj)
           // this.$emit('table')
           this.close()
         }else {

+ 7 - 3
src/views/shipment-details/shipmentList.vue

@@ -635,6 +635,7 @@ export default {
       shipmentListData: [], // 发运明细数据
       allMoney:'',
       copyTableData:[],//保存还未更新时的申报要素列表信息
+      copyFromData:{},////保存修改报关要素所点击得那行数据
       // 查询条件
       queryParam: {
         flourOrGarment:'1'
@@ -688,6 +689,7 @@ export default {
     async getShipmentList() {
       this.loading = true
       this.copyTableData = []
+      this.copyFromData = {} //保存修改报关要素所点击得那行数据
       await  shipmentList(this.queryParam).then(res => {
           if (res.success) {
            this.loading = false
@@ -740,7 +742,7 @@ export default {
       cc.map(item => this.selectedRowKeys.push(item.itemIds))
     },
     saveInformation(data){
-      this.copyTableData = data
+      this.copyTableData = data.syDeclarationElementsItemList
     },
 
     //关闭维护款号成分弹窗
@@ -756,6 +758,7 @@ export default {
       })
     },
     closeData(data,record){
+      this.copyFromData = record//保存修改报关要素所点击得那行数据
       this.shipmentListData.map(item=>{
         if(item.orderNumber == record.orderNumber && item.itemNumber==record.itemNumber && item.account == record.account&& item.inventoryName == record.inventoryName){
           item.declarationName = data.declarationName
@@ -805,8 +808,9 @@ export default {
             }else{
              this.$refs.declareElementsModal.query = '1'
             }
-          if(this,this.copyTableData.length==0){
-            // 子表赋值
+          //判断报关要素保存时子表是否有数据以及再次点击时所点击行和报关要素修改行满不满足带出子表得条件
+          if(this.copyTableData.length==0||!(this.copyFromData.orderNumber == record.orderNumber && this.copyFromData.itemNumber==record.itemNumber && this.copyFromData.account == record.account&& this.copyFromData.inventoryName == record.inventoryName)){
+           // 子表赋值
             this.$refs.declareElementsModal.declareElementsData = res.result.syDeclarationElementsItemList
           }else{
             this.$refs.declareElementsModal.declareElementsData = this.copyTableData