|  | @@ -180,17 +180,7 @@
 | 
	
		
			
				|  |  |                  {{detailsPlanNum.shuiemoney}}
 | 
	
		
			
				|  |  |                </a-form-model-item>
 | 
	
		
			
				|  |  |              </a-col>
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            <!-- <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="供应商事故单($)" prop="salesrrdersOriginaltotal">
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.supperAccidentUsdamount, }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col>
 | 
	
		
			
				|  |  | -            <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="供应商事故单(¥)" prop="salesrrdersOriginaltotal">
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.supperAccidentcnyAmount }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  | +          
 | 
	
		
			
				|  |  |              <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  |                <a-form-model-item label="税率%" prop="taxrate" > 
 | 
	
		
			
				|  |  |                  <a-input placeholder="请输入" v-model="detailsPlanNum.taxrate"  @blur="changeTaxrate" class="taxrate"  v-show='showSelect==0'/>
 | 
	
	
		
			
				|  | @@ -198,69 +188,17 @@
 | 
	
		
			
				|  |  |                </a-form-model-item>
 | 
	
		
			
				|  |  |              </a-col>
 | 
	
		
			
				|  |  |             
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | -            <!-- <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="短出面料成本" prop="fabricshortcost" class="fontColor">
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.fabricshortcost }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -           
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            <!-- <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="面料不含税成本(美元)" prop="UsdfabriccostNotincludestax" >
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.fabriccostNotincludestaxUsd }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  | -<!--            
 | 
	
		
			
				|  |  | -            <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="辅料不含税成本(美元)" prop="UsdexcipiencostNotincludestax">
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.excipiencostNotincludestaxUsd }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  | -            <!-- <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="制单人" prop="preparedBy">
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.preparedBy }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  |              <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  |                <a-form-model-item label="备注" prop="memo" >
 | 
	
		
			
				|  |  |                  <a-input style="width:100%" type="text" v-model="detailsPlanNum.memo" @blur="changeContainerNumber" v-show='showSelect==0'/>
 | 
	
		
			
				|  |  |                  <span v-show='showSelect==1'>{{ detailsPlanNum.memo }}</span>
 | 
	
		
			
				|  |  |                </a-form-model-item>
 | 
	
		
			
				|  |  |              </a-col>
 | 
	
		
			
				|  |  | -            <!-- <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="查询时间" prop="UsdfabriccostNotincludestax" >
 | 
	
		
			
				|  |  | -                {{  }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col>
 | 
	
		
			
				|  |  | -            <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="查询人" prop="UsdfabriccostNotincludestax" >
 | 
	
		
			
				|  |  | -                {{  }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col>
 | 
	
		
			
				|  |  | -            <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="" prop="UsdfabriccostNotincludestax" >
 | 
	
		
			
				|  |  | -                {{  }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  |              <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  |                <a-form-model-item label="制单人" prop="preparedBy">
 | 
	
		
			
				|  |  |                  {{ detailsPlanNum.preparedBy }}
 | 
	
		
			
				|  |  |                </a-form-model-item>
 | 
	
		
			
				|  |  |              </a-col>
 | 
	
		
			
				|  |  | -            <!-- <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  | -              <a-form-model-item label="查询人" prop="queryBy">
 | 
	
		
			
				|  |  | -                {{ detailsPlanNum.queryBy  }}
 | 
	
		
			
				|  |  | -              </a-form-model-item>
 | 
	
		
			
				|  |  | -            </a-col> -->
 | 
	
		
			
				|  |  |              <a-col :md="6" :sm="8">
 | 
	
		
			
				|  |  |                <a-form-model-item label="查询时间" prop="queryTime">
 | 
	
		
			
				|  |  |                  {{ detailsPlanNum.queryTime  }}
 | 
	
	
		
			
				|  | @@ -380,19 +318,10 @@
 | 
	
		
			
				|  |  |  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 | 
	
		
			
				|  |  |  import JEllipsis from '@/components/jeecg/JEllipsis'
 | 
	
		
			
				|  |  |  import moment from 'moment'
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -// 原始文件(应该跟单证内弹框一样,尝试公用,成功后可删除以下注释)
 | 
	
		
			
				|  |  | -// import mainTableExpenseCNYModal from '@views/reportForms/cost-allocation-table/mainTableExpenseCNYModal.vue'
 | 
	
		
			
				|  |  | -// import mainTableExpenseUSDModal from '@views/reportForms/cost-allocation-table/mainTableExpenseUSDModal.vue'
 | 
	
		
			
				|  |  | -// import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue' // 事故单
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -// import tabs from '@views/cost-allocation-total/tabs.vue' // tabs组件
 | 
	
		
			
				|  |  |  import tabs from '@views/reportForms/cost-allocation-table/tabs.vue' // tabs组件
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import mainTableExpenseCNYModal from '@views/cost-allocation-total/modal/mainTableExpenseCNYModal.vue'
 | 
	
		
			
				|  |  |  import mainTableExpenseUSDModal from '@views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue'
 | 
	
		
			
				|  |  |  import accidentListModal from '@views/cost-allocation-total/modal/accidentListModal.vue' // 事故单
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  import { seachPlanNum, addHalfInfo,deleteFileDetail } from '@api/document/cost-allocation-total.js'
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  export default {
 | 
	
	
		
			
				|  | @@ -410,8 +339,6 @@ export default {
 | 
	
		
			
				|  |  |          planNum: ''
 | 
	
		
			
				|  |  |        }, // 详情所有数据
 | 
	
		
			
				|  |  |        remarks: '', // 备注
 | 
	
		
			
				|  |  | -      copyFabriccostIncludestax:'',//保存查询获取得面料成本(¥)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        // 事故单 表头
 | 
	
		
			
				|  |  |        accidentListColumns: [
 | 
	
		
			
				|  |  |          {
 | 
	
	
		
			
				|  | @@ -447,8 +374,6 @@ export default {
 | 
	
		
			
				|  |  |          },
 | 
	
		
			
				|  |  |          { title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
 | 
	
		
			
				|  |  |          { title: '责任人', width: 100, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
 | 
	
		
			
				|  |  | -        // { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
 | 
	
		
			
				|  |  | -        // { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
 | 
	
		
			
				|  |  |        ],
 | 
	
		
			
				|  |  |        accidentListData: [],
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -543,6 +468,7 @@ export default {
 | 
	
		
			
				|  |  |          var Staging = '', 
 | 
	
		
			
				|  |  |          StagingLast = '',
 | 
	
		
			
				|  |  |          file = ''
 | 
	
		
			
				|  |  | +        //更新前保存字段
 | 
	
		
			
				|  |  |          if(data=='queryNew'){
 | 
	
		
			
				|  |  |            Staging =this.detailsPlanNum.memo
 | 
	
		
			
				|  |  |            StagingLast = this.detailsPlanNum.remarks
 | 
	
	
		
			
				|  | @@ -556,11 +482,11 @@ export default {
 | 
	
		
			
				|  |  |              this.PrintButton = false
 | 
	
		
			
				|  |  |               this.loading = false
 | 
	
		
			
				|  |  |              this.detailsPlanNum = res.result //所有详情
 | 
	
		
			
				|  |  | -            this.copyFabriccostIncludestax = res.result.fabriccostIncludestax
 | 
	
		
			
				|  |  |              if(Number(this.detailsPlanNum.shortseveral)<0){
 | 
	
		
			
				|  |  |                this.detailsPlanNum.shortseveral = 0
 | 
	
		
			
				|  |  |                this.detailsPlanNum.shortvalue = 0
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            //表头-附件列表
 | 
	
		
			
				|  |  |              var fileList =  (this.detailsPlanNum.attachs!==''&&this.detailsPlanNum.attachs)?this.detailsPlanNum.attachs.split(","):[]
 | 
	
		
			
				|  |  |                this.fileList = []
 | 
	
		
			
				|  |  |                if(fileList.length!==0){
 | 
	
	
		
			
				|  | @@ -574,12 +500,7 @@ export default {
 | 
	
		
			
				|  |  |                })
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              this.accidentListData = res.result.syCostAllocationAccidentList //事故单
 | 
	
		
			
				|  |  | -            this.accidentCalculation(this.accidentListData)
 | 
	
		
			
				|  |  | -            // var accidentNum = 0
 | 
	
		
			
				|  |  | -            // this.accidentListData.map(item =>{
 | 
	
		
			
				|  |  | -            //   item.id = accidentNum + 1
 | 
	
		
			
				|  |  | -            //   accidentNum += 1
 | 
	
		
			
				|  |  | -            // })
 | 
	
		
			
				|  |  | +            this.accidentCalculation(this.accidentListData)   //计算事故单美元金额和事故单人民币金额
 | 
	
		
			
				|  |  |              this.costPayData = res.result.syCostAllocationCostpayList //支出费用
 | 
	
		
			
				|  |  |              var num = 0
 | 
	
		
			
				|  |  |              this.costPayData.map(item =>{
 | 
	
	
		
			
				|  | @@ -594,49 +515,35 @@ export default {
 | 
	
		
			
				|  |  |              // 页面打开加载的数据
 | 
	
		
			
				|  |  |              var oneData = this.$refs.unitTabs.tabsAllData[0]
 | 
	
		
			
				|  |  |              this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
 | 
	
		
			
				|  |  | -            var all = 0
 | 
	
		
			
				|  |  | +            var all = 0,//面料sheet-转入成本总计
 | 
	
		
			
				|  |  | +                allYu = 0//面料sheet-余下数量成本总计
 | 
	
		
			
				|  |  |              this.$refs.unitTabs.fabData.map(item=>{
 | 
	
		
			
				|  |  |                if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
 | 
	
		
			
				|  |  |                  item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
 | 
	
		
			
				|  |  | +                allYu +=Number(item.remainingQuantitycost)
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |                if(item.transferCost&&item.transferCost!==''){
 | 
	
		
			
				|  |  |                  all+=Number(item.transferCost)
 | 
	
		
			
				|  |  |                }
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  | -  
 | 
	
		
			
				|  |  | -            
 | 
	
		
			
				|  |  |              this.fabricCost = this.detailsPlanNum.fabriccostIncludestax
 | 
	
		
			
				|  |  | -            this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2) // 表头面料成本(¥)
 | 
	
		
			
				|  |  | +            this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.detailsPlanNum.fabriccostIncludestax)-allYu).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:''
 | 
	
		
			
				|  |  | -            // this.$refs.unitTabs.shipData.map(item=>{
 | 
	
		
			
				|  |  | -            //   if(item.procesUnitPriceusd==0||item.procesUnitPriceusd==item.procesUnitPricermb||item.procesUnitPriceusd==''||!item.procesUnitPriceusd){
 | 
	
		
			
				|  |  | -            //     item.procesUnitPricermb = item.procesUnitPricermb!==''&&item.procesUnitPricermb?Number(item.procesUnitPricermb).toFixed(4):0
 | 
	
		
			
				|  |  | -            //     item.processCost = Number(item.procesUnitPricermb)*Number(item.shipQuantity)
 | 
	
		
			
				|  |  | -            //   }else{
 | 
	
		
			
				|  |  | -            //     item.procesUnitPriceusd = item.procesUnitPriceusd!==''&&item.procesUnitPriceusd?Number(item.procesUnitPriceusd).toFixed(4):0
 | 
	
		
			
				|  |  | -            //     item.shipQuantity = item.shipQuantity!==''&&item.shipQuantity?Number(item.shipQuantity).toFixed(4):0
 | 
	
		
			
				|  |  | -            //     item.processCost = Number(item.procesUnitPriceusd)*Number(item.shipQuantity)*Number(item.exchangeRate)
 | 
	
		
			
				|  |  | -            //   }
 | 
	
		
			
				|  |  | -            // })
 | 
	
		
			
				|  |  | -            this.addAmountIng(oneData.syCostAllocationIngredientList)
 | 
	
		
			
				|  |  | -            this.addAmountCostPay(this.costPayData)
 | 
	
		
			
				|  |  | -            this.addAccident(this.accidentListData)
 | 
	
		
			
				|  |  | -            this.calculation(oneData.syCostAllocationShipdetail)
 | 
	
		
			
				|  |  | +            this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//表头-面料不含税成本(¥)
 | 
	
		
			
				|  |  | +            this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList //辅料sheet数据源
 | 
	
		
			
				|  |  | +            this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail //发运明细sheet数据源
 | 
	
		
			
				|  |  | +            this.detailsPlanNum.outdata = oneData.syCostAllocationShipdetail.length!==0?oneData.syCostAllocationShipdetail[0].outdata:'' //表头-出运日期
 | 
	
		
			
				|  |  | +            this.addAmountIng(oneData.syCostAllocationIngredientList) //辅料sheet合计行
 | 
	
		
			
				|  |  | +            this.addAmountCostPay(this.costPayData) //费用支出合计行
 | 
	
		
			
				|  |  | +            this.addAccident(this.accidentListData)//事故单合计行
 | 
	
		
			
				|  |  | +            this.calculation(oneData.syCostAllocationShipdetail) //出运明细合计行
 | 
	
		
			
				|  |  |              //合计中面料相关金额
 | 
	
		
			
				|  |  |              var s=0
 | 
	
		
			
				|  |  |              oneData.syCostAllocationFabricList.map(item=>{
 | 
	
		
			
				|  |  |                s+=Number(item.transferCost)
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  | -            //  this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
 | 
	
		
			
				|  |  |               this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
 | 
	
		
			
				|  |  |               this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
 | 
	
		
			
				|  |  | -            //  this.detailsPlanNum.fabriccostNotincludestax =  this.$refs.unitTabs.sumInfo.fabricExcludTax
 | 
	
		
			
				|  |  | -             // this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
 | 
	
		
			
				|  |  | -            // this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
 | 
	
		
			
				|  |  |              //合计中辅料相关金额
 | 
	
		
			
				|  |  |              var s = 0,
 | 
	
		
			
				|  |  |              v =0,
 | 
	
	
		
			
				|  | @@ -646,9 +553,7 @@ export default {
 | 
	
		
			
				|  |  |                v+=item.rmbAmount?Number(item.rmbAmount):0
 | 
	
		
			
				|  |  |                t+=item.transferCost?Number(item.transferCost):0
 | 
	
		
			
				|  |  |              })
 | 
	
		
			
				|  |  | -            // this.$refs.unitTabs.sumInfo.ingAmount =(v/2).toFixed(2)//辅料金额合计
 | 
	
		
			
				|  |  |              this.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计
 | 
	
		
			
				|  |  | -            // this.$refs.unitTabs.sumInfo.ingExcludAmount = ((v/2).toFixed(2)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//辅料不含税金额合计
 | 
	
		
			
				|  |  |              this.$refs.unitTabs.sumInfo.ingExcludAmount = (((s/2)+(t/2)/(1+(Number(this.detailsPlanNum.taxrate)/100)))).toFixed(2)//合计sheet辅料不含税金额合计
 | 
	
		
			
				|  |  |              this.detailsPlanNum.excipiencostNotincludestax =  ( this.$refs.unitTabs.sumInfo.ingExcludAmount==''|| !this.$refs.unitTabs.sumInfo.ingExcludAmount)?0:Number(this.$refs.unitTabs.sumInfo.ingExcludAmount).toFixed(2)//表头辅料料不含税成本   
 | 
	
		
			
				|  |  |              this.detailsPlanNum.excipiencostIncludestax =   (  this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
 | 
	
	
		
			
				|  | @@ -682,9 +587,8 @@ export default {
 | 
	
		
			
				|  |  |               }else{
 | 
	
		
			
				|  |  |                this.$refs.unitTabs.sumInfo.excludingTaxProcessing =( this.$refs.unitTabs.sumInfo.shipProcesFees/(1+(Number(this.detailsPlanNum.taxrate)/100))).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)//表头加工费(人民币)
 | 
	
		
			
				|  |  | +             this.detailsPlanNum.rmbProcesscost = this.$refs.unitTabs.sumInfo.excludingTaxProcessing //表头-加工费人民币
 | 
	
		
			
				|  |  | +             this.detailsPlanNum.usdProcesscost = 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 = {
 | 
	
	
		
			
				|  | @@ -692,24 +596,30 @@ export default {
 | 
	
		
			
				|  |  |                current: res.result.current,
 | 
	
		
			
				|  |  |                pageSize: res.result.size
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +            //更新时-面料sheet/辅料sheet-弹窗数据处理
 | 
	
		
			
				|  |  |              if(data=='queryNew'){
 | 
	
		
			
				|  |  |                this.detailsPlanNum.memo = Staging
 | 
	
		
			
				|  |  |                this.detailsPlanNum.remarks = StagingLast
 | 
	
		
			
				|  |  |                this.fileList = file
 | 
	
		
			
				|  |  | -              var all = 0
 | 
	
		
			
				|  |  | +              var all = 0,
 | 
	
		
			
				|  |  | +              allYu = 0
 | 
	
		
			
				|  |  |                oneData.syCostAllocationFabricList.map(item=>{
 | 
	
		
			
				|  |  |                  this.$refs.unitTabs.mList.map(event=>{
 | 
	
		
			
				|  |  |                    if(item.goodsName==event.goodsName){
 | 
	
		
			
				|  |  |                      item.transferCost = event.transferCost
 | 
	
		
			
				|  |  | +                    item.remainingQuantitycost = event.remainingQuantitycost
 | 
	
		
			
				|  |  |                    }
 | 
	
		
			
				|  |  |                  })
 | 
	
		
			
				|  |  |                  if(item.transferCost&&item.transferCost!==''){
 | 
	
		
			
				|  |  |                      all+=item.transferCost
 | 
	
		
			
				|  |  |                    }
 | 
	
		
			
				|  |  | +                  if(item.remainingQuantitycost&&item.remainingQuantitycost!==''){
 | 
	
		
			
				|  |  | +                    allYu+=item.remainingQuantitycost
 | 
	
		
			
				|  |  | +                  }
 | 
	
		
			
				|  |  |                })
 | 
	
		
			
				|  |  | -              this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.fabricCost)).toFixed(2) // 表头面料成本(¥)
 | 
	
		
			
				|  |  | +              this.detailsPlanNum.fabriccostIncludestax = (all+Number(this.fabricCost)-allYu).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.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){
 | 
	
	
		
			
				|  | @@ -772,7 +682,6 @@ export default {
 | 
	
		
			
				|  |  |        },
 | 
	
		
			
				|  |  |      //调整表头格式
 | 
	
		
			
				|  |  |      adjustingHeader(){
 | 
	
		
			
				|  |  | -      // this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''||!this.detailsPlanNum.outdata)?0:moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
 | 
	
		
			
				|  |  |        this.detailsPlanNum.planQuantity=( this.detailsPlanNum.planQuantity==''|| !this.detailsPlanNum.planQuantity)?0:Number( this.detailsPlanNum.planQuantity).toFixed(0)//计划数量
 | 
	
		
			
				|  |  |        this.detailsPlanNum.usdTotalexportprice=( this.detailsPlanNum.usdTotalexportprice==''|| !this.detailsPlanNum.usdTotalexportprice)?0:Number( this.detailsPlanNum.usdTotalexportprice).toFixed(2)//美元外销总价
 | 
	
		
			
				|  |  |        this.detailsPlanNum.fabriccostIncludestaxUsd=( this.detailsPlanNum.fabriccostIncludestaxUsd==''|| !this.detailsPlanNum.fabriccostIncludestaxUsd)?0:Number( this.detailsPlanNum.fabriccostIncludestaxUsd).toFixed(2)//面料成本($)
 | 
	
	
		
			
				|  | @@ -781,11 +690,9 @@ export default {
 | 
	
		
			
				|  |  |        this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?0:Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
 | 
	
		
			
				|  |  |        this.detailsPlanNum.usdProcesscost=( this.detailsPlanNum.usdProcesscost==''|| !this.detailsPlanNum.usdProcesscost)?'':Number( this.detailsPlanNum.usdProcesscost).toFixed(2)//加工费(人民币)
 | 
	
		
			
				|  |  |        this.detailsPlanNum.accidentUsdamount=( this.detailsPlanNum.accidentUsdamount==''|| !this.detailsPlanNum.accidentUsdamount)?0:Number( this.detailsPlanNum.accidentUsdamount).toFixed(2)//事故单美元金额
 | 
	
		
			
				|  |  | -      // this.detailsPlanNum.excipiencostIncludestax=( this.detailsPlanNum.excipiencostIncludestax==''|| !this.detailsPlanNum.excipiencostIncludestax)?0:Number( this.detailsPlanNum.excipiencostIncludestax).toFixed(2)//辅料含税成本
 | 
	
		
			
				|  |  |        this.detailsPlanNum.salesordersLocaltotal=( this.detailsPlanNum.salesordersLocaltotal==''|| !this.detailsPlanNum.salesordersLocaltotal)?0:Number( this.detailsPlanNum.salesordersLocaltotal).toFixed(2)//销售本币金额
 | 
	
		
			
				|  |  |        this.detailsPlanNum.accidentcnyAmount=( this.detailsPlanNum.accidentcnyAmount==''|| !this.detailsPlanNum.accidentcnyAmount)?0:Number( this.detailsPlanNum.accidentcnyAmount).toFixed(2)//事故单人民币金额   
 | 
	
		
			
				|  |  |        this.detailsPlanNum.fabriccostNotincludestax=( this.detailsPlanNum.fabriccostNotincludestax==''|| !this.detailsPlanNum.fabriccostNotincludestax)?0:Number( this.detailsPlanNum.fabriccostNotincludestax).toFixed(2)//面料不含税成本   
 | 
	
		
			
				|  |  | -      // this.detailsPlanNum.excipiencostNotincludestax=( this.detailsPlanNum.excipiencostNotincludestax==''|| !this.detailsPlanNum.excipiencostNotincludestax)?0:Number( this.detailsPlanNum.excipiencostNotincludestax).toFixed(2)//辅料料不含税成本   
 | 
	
		
			
				|  |  |        this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?0:Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额  
 | 
	
		
			
				|  |  |        this.detailsPlanNum.excipiencostIncludestaxUsd=( this.detailsPlanNum.excipiencostIncludestaxUsd==''|| !this.detailsPlanNum.excipiencostIncludestaxUsd)?0: this.detailsPlanNum.excipiencostIncludestaxUsd//辅料成本($)
 | 
	
		
			
				|  |  |        this.detailsPlanNum.shuiemoney=( this.detailsPlanNum.shuiemoney==''|| !this.detailsPlanNum.shuiemoney)?0: this.detailsPlanNum.shuiemoney//运费税额
 | 
	
	
		
			
				|  | @@ -803,42 +710,25 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      //计算出运明细合计行
 | 
	
		
			
				|  |  |      calculation(val){
 | 
	
		
			
				|  |  | -      // var  average = 0
 | 
	
		
			
				|  |  | -      //  val.map(item=>{
 | 
	
		
			
				|  |  | -      //   if(item.outdata !=='合计'){
 | 
	
		
			
				|  |  | -      //     average += (Number(item.exportUnitPrice)*Number(item.shipQuantity)*Number(item.exchangeRate))
 | 
	
		
			
				|  |  | -      //   }
 | 
	
		
			
				|  |  | -      //  })
 | 
	
		
			
				|  |  | -      //  this.detailsPlanNum.shortvalue = average.toFixed(2)
 | 
	
		
			
				|  |  |         var shipQuantityAll =0,
 | 
	
		
			
				|  |  | -        // exportUnitPriceALll = 0,
 | 
	
		
			
				|  |  |          exportPriceAll =0,
 | 
	
		
			
				|  |  |          rmbAmountAll = 0,
 | 
	
		
			
				|  |  | -        // procesUnitPricermbAll = 0,
 | 
	
		
			
				|  |  | -        // procesUnitPriceusdAll = 0,
 | 
	
		
			
				|  |  |          processCostAll = 0
 | 
	
		
			
				|  |  |          val.map(item=>{
 | 
	
		
			
				|  |  |            if(item.outdata !=='合计'){
 | 
	
		
			
				|  |  |            shipQuantityAll+=Number(item.shipQuantity)
 | 
	
		
			
				|  |  | -          // exportUnitPriceALll+=Number(item.exportUnitPrice)
 | 
	
		
			
				|  |  |            exportPriceAll+=Number(item.exportPrice)
 | 
	
		
			
				|  |  |            rmbAmountAll+=Number(item.rmbAmount)
 | 
	
		
			
				|  |  | -          // procesUnitPricermbAll+=Number(item.procesUnitPricermb)
 | 
	
		
			
				|  |  | -          // procesUnitPriceusdAll+=Number(item.procesUnitPriceusd)
 | 
	
		
			
				|  |  |            processCostAll+=Number(item.processCost)
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  |          var allObj ={
 | 
	
		
			
				|  |  |            outdata:'合计',
 | 
	
		
			
				|  |  |            shipQuantity:shipQuantityAll.toFixed(3),
 | 
	
		
			
				|  |  | -          // exportUnitPrice:exportUnitPriceALll.toFixed(3),
 | 
	
		
			
				|  |  |            exportPrice:exportPriceAll.toFixed(3),
 | 
	
		
			
				|  |  |            rmbAmount:rmbAmountAll.toFixed(3),
 | 
	
		
			
				|  |  | -          // procesUnitPricermb:procesUnitPricermbAll.toFixed(3),
 | 
	
		
			
				|  |  | -          // procesUnitPriceusd:procesUnitPriceusdAll.toFixed(3),
 | 
	
		
			
				|  |  |            processCost:processCostAll.toFixed(3)
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        // this.detailsPlanNum.salesordersLocaltotal = rmbAmountAll.toFixed(2)
 | 
	
		
			
				|  |  |          //发运明细-合计行
 | 
	
		
			
				|  |  |          if(this.$refs.unitTabs.shipData.length!==0 ){
 | 
	
		
			
				|  |  |            if(this.$refs.unitTabs.shipData[this.$refs.unitTabs.shipData.length-1].outdata=='合计'){
 | 
	
	
		
			
				|  | @@ -880,7 +770,6 @@ export default {
 | 
	
		
			
				|  |  |            ingredientsTransferQuantity:'',
 | 
	
		
			
				|  |  |            ingredientsRemainingQuantity:''
 | 
	
		
			
				|  |  |          }  
 | 
	
		
			
				|  |  | -        // this.detailsPlanNum.excipiencostNotincludestax =  allObj.priceExcludingtax
 | 
	
		
			
				|  |  |          if(this.$refs.unitTabs.ingData.length!==0 ){
 | 
	
		
			
				|  |  |            if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
 | 
	
		
			
				|  |  |              this.$refs.unitTabs.ingData.push(allObj)
 | 
	
	
		
			
				|  | @@ -938,6 +827,7 @@ export default {
 | 
	
		
			
				|  |  |        this.detailsPlanNum.rmbNorTaxExpense = obj.disbursedLocalmoney.toFixed(2)
 | 
	
		
			
				|  |  |        this.detailsPlanNum.rmbExpense = obj.iNatMoney.toFixed(2)
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | +    //打印
 | 
	
		
			
				|  |  |      daYin(){
 | 
	
		
			
				|  |  |           this.showSelect = 1
 | 
	
		
			
				|  |  |           this.$nextTick(() => {
 | 
	
	
		
			
				|  | @@ -996,22 +886,12 @@ export default {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      // 页面 保存
 | 
	
		
			
				|  |  |      save() {
 | 
	
		
			
				|  |  | -      console.log('点击保存')
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |        this.isDisabled = true
 | 
	
		
			
				|  |  |        setTimeout(() => {
 | 
	
		
			
				|  |  |          let that = this
 | 
	
		
			
				|  |  |          that.isDisabled = false
 | 
	
		
			
				|  |  |        }, 3000)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -      // if (this.detailsPlanNum.remarks) {
 | 
	
		
			
				|  |  | -        // 保存 部分信息
 | 
	
		
			
				|  |  |          var halfInfo = {}
 | 
	
		
			
				|  |  | -        // halfInfo.planNum = this.detailsPlanNum.planNum
 | 
	
		
			
				|  |  | -        // halfInfo.remarks = this.detailsPlanNum.remarks
 | 
	
		
			
				|  |  | -        // halfInfo.billstatus = '1'
 | 
	
		
			
				|  |  | -        // console.log(halfInfo.planNum, halfInfo.remarks, halfInfo.billstatus)
 | 
	
		
			
				|  |  | -        // var planNum = this.detailsPlanNum.planNum,
 | 
	
		
			
				|  |  |           var json = this.detailsPlanNum
 | 
	
		
			
				|  |  |           json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
 | 
	
		
			
				|  |  |           this.loading=true
 | 
	
	
		
			
				|  | @@ -1026,9 +906,6 @@ export default {
 | 
	
		
			
				|  |  |              this.$message.error(res.message);
 | 
	
		
			
				|  |  |            }
 | 
	
		
			
				|  |  |          })
 | 
	
		
			
				|  |  | -      // } else {
 | 
	
		
			
				|  |  | -      //   this.$message.error('备注不能为空')
 | 
	
		
			
				|  |  | -      // }
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      //  主表:人民币费用支出  弹框
 | 
	
	
		
			
				|  | @@ -1069,12 +946,8 @@ export default {
 | 
	
		
			
				|  |  |        this.detailsPlanNum.fabriccostNotincludestax =  data1
 | 
	
		
			
				|  |  |        // this.detailsPlanNum.excipiencostNotincludestax =  data2
 | 
	
		
			
				|  |  |      },
 | 
	
		
			
				|  |  | -    FabInQua(data){
 | 
	
		
			
				|  |  | -      // 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)//面料含税成本
 | 
	
		
			
				|  |  | -      // }
 | 
	
		
			
				|  |  | +    FabInQua(data,allYu){
 | 
	
		
			
				|  |  | +        this.detailsPlanNum.fabriccostIncludestax=(Number(data)+Number(this.fabricCost)-Number(allYu)).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):'' //合计中的面料总额
 |