Преглед изворни кода

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

huxy пре 2 година
родитељ
комит
83a03e8c35

+ 1 - 1
src/views/book/addBookDrawer.vue

@@ -769,7 +769,7 @@ export default {
         var dd = moment(new Date()).format('YYYY-MM-DD')
          this.$set( this.addBook,'shippingOrderDate',dd)
          //参照成衣是表头数据默认值
-         if(text == '成衣'){
+         if(text == '成衣' && this.defaultMethod=='add'){
            var transitionData = data[0]
            var idZhu = ''
            if(this.addBook.id !=='' &&this.addBook.id){

+ 7 - 0
src/views/book/detailsBookDrawer.vue

@@ -391,6 +391,13 @@ export default {
           ellipsis: true,
           className: 'replacecolor'
         },
+        {
+          title: '业务员',
+          dataIndex: 'salesman',
+          width: 160,
+          ellipsis: true,
+          className: 'replacecolor'
+        },
       ],
       addBookData: [],
       CNYColumns: [

+ 2 - 1
src/views/book/packingListModal.vue

@@ -450,7 +450,8 @@ export default {
       this.$emit('close')
       this.packingListModVis = false
       this.queryParam = {}
-      this.packingListData =[]
+      this.packingListData =[],
+      this.fatherList=[]
       this.defulatSelect()
     },
     handleCancel() {

+ 6 - 1
src/views/cost-allocation-total/modal/ingRemQuaModal.vue

@@ -62,7 +62,12 @@ export default {
           title: '单位成本',
           dataIndex: 'unitCost',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '总成本',

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

@@ -107,6 +107,18 @@
                   </a-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="8">
+                <a-form-model-item label="推送状态">
+                  <a-select v-model="queryParam.pushState">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="0">未推送</a-select-option>
+                    <a-select-option value="1">推送成功</a-select-option>
+                    <a-select-option value="2">推送失败</a-select-option>
+                    <a-select-option value="3">推送中</a-select-option>
+                    <a-select-option value="4">不在推送</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
             </template>
 
             <a-col :md="6" :sm="8">
@@ -735,7 +747,7 @@ export default {
       bitchPush({ids : ids}).then(res =>{
         this.clothesListData.map(item=>{
           this.selectedRowKeys.map(event=>{
-            if(item.id==event){
+            if(item.pushState!=='4'&&item.id==event){
               item.pushState = '3'
             }
           })

+ 15 - 3
src/views/packing-list/fabric-list.vue

@@ -45,7 +45,7 @@
                 <a-input placeholder="请输入" v-model="queryParam.planLotNumber"></a-input>
               </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="8">
+            <a-col :md="6" :sm="8">
                 <a-form-item label="业务员">
                   <!-- <a-input placeholder="请输入业务员" v-model="queryParam.salesman"></a-input> -->
                    <j-search-select-tag
@@ -60,7 +60,7 @@
                   <a-input placeholder="请输入制单人" v-model="queryParam.createBy"></a-input>
                 </a-form-item>
               </a-col>
-               <a-col :md="5" :sm="8">
+               <a-col :md="6" :sm="8">
                 <a-form-model-item label="是否被参照">
                   <a-select v-model="queryParam.isReference">
                     <a-select-option value="">请选择</a-select-option>
@@ -78,6 +78,18 @@
                 </j-search-select-tag>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="8">
+                <a-form-model-item label="推送状态">
+                  <a-select v-model="queryParam.pushState">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="0">未推送</a-select-option>
+                    <a-select-option value="1">推送成功</a-select-option>
+                    <a-select-option value="2">推送失败</a-select-option>
+                    <a-select-option value="3">推送中</a-select-option>
+                    <a-select-option value="4">不在推送</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
              </template>
 
             <a-col :md="6" :sm="8">
@@ -705,7 +717,7 @@ export default {
       bitchPush({ids : ids}).then(res =>{
         this.fabricListData.map(item=>{
           this.selectedRowKeys.map(event=>{
-            if(item.id==event){
+            if(item.pushState!=='4'&&item.id==event){
               item.pushState = '3'
               this.$forceUpdate()
             }

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

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

+ 141 - 40
src/views/reportForms/cost-allocation-table.vue

@@ -198,8 +198,8 @@
           :scroll="{ }"
         >
           <!-- 事故单 -->
-          <span slot="accidentNum" slot-scope="text">
-            <a>{{ text }}</a>
+          <span slot="accidentNum" slot-scope="text,record">
+            <a :href="'http://www.myfitt.cn:18086/#/IncidentTicketModalDetail?id='+record.id" target="_blank">{{ text }}</a>
           </span>
         </a-table>
       </div>
@@ -302,8 +302,28 @@ export default {
           scopedSlots: { customRender: 'accidentNum' }
         },
         { title: '事故承担方', width: 120, dataIndex: 'accidentUndertaker', className: 'replacecolor' },
-        { title: '美元金额', width: 120, dataIndex: 'amount', className: 'replacecolor' },
-        { title: '人民币金额', width: 120, dataIndex: 'amountrmb', className: 'replacecolor' },
+        { 
+          title: '美元金额', 
+          width: 120, 
+          dataIndex: 'amount', 
+          className: 'replacecolor' ,
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
+        },
+        { 
+          title: '人民币金额', 
+          width: 120, 
+          dataIndex: 'amountrmb', 
+          className: 'replacecolor' ,
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
+        },
         { title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
         { title: '责任人', width: 120, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
         // { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
@@ -316,10 +336,48 @@ export default {
         { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
         { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
         { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
-        { title: '人民币(不含税)', dataIndex: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
-        { title: '美元', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
-        { title: '人民币(税额)', dataIndex: 'shuiemoney', width: 120, className: 'replacecolor' },
-        { title: '人民币(加税合计)', dataIndex: 'totalTaxIncrease', width: 120, className: 'replacecolor' },
+        { 
+          title: '美元', 
+          dataIndex: 'disbursedOriginalmoney', 
+          width: 120,
+          className: 'replacecolor' ,
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
+          },
+        { 
+          title: '人民币(不含税)', 
+          dataIndex: 'disbursedLocalmoney', 
+          width: 120, className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
+         },
+        { 
+          title: '人民币(税额)', 
+          dataIndex: 'shuiemoney', 
+          width: 120, 
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
+         },
+        { 
+          title: '人民币(价税合计)', 
+          dataIndex: 'totalTaxIncrease', 
+          width: 120, 
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          }, },
         { title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
         { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
       ],
@@ -352,14 +410,15 @@ export default {
             this.PrintButton = false
              this.loading = false
             this.detailsPlanNum = res.result //所有详情
-            this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''&&! this.detailsPlanNum.outdata)?'':moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
+            //调整表头格式
+            this.adjustingHeader()
             this.accidentListData = res.result.syCostAllocationAccidentList //事故单
             this.accidentCalculation(this.accidentListData)
-            var accidentNum = 0
-            this.accidentListData.map(item =>{
-              item.id = accidentNum + 1
-              accidentNum += 1
-            })
+            // var accidentNum = 0
+            // this.accidentListData.map(item =>{
+            //   item.id = accidentNum + 1
+            //   accidentNum += 1
+            // })
             this.costPayData = res.result.syCostAllocationCostpayList //支出费用
             var num = 0
             this.costPayData.map(item =>{
@@ -384,6 +443,7 @@ export default {
             this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
             this.addAmountIng(oneData.syCostAllocationIngredientList)
             this.addAmountCostPay(this.costPayData)
+            this.addAccident(this.accidentListData)
             this.calculation(oneData.syCostAllocationShipdetail)
             //合计中面料相关金额
             var s=0
@@ -391,7 +451,7 @@ export default {
               s+=Number(item.transferCost)
             })
             //  this.$refs.unitTabs.sumInfo.fabricAmount = s.toFixed(3) //合计中的面料总额
-             this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(this.detailsPlanNum.fabriccostIncludestax).toFixed(2):'' //合计中的面料总额
+             this.$refs.unitTabs.sumInfo.fabricAmount = (this.detailsPlanNum.fabriccostIncludestax!==''&&this.detailsPlanNum.fabriccostIncludestax)?(Number(this.detailsPlanNum.fabriccostIncludestax)).toFixed(2):'' //合计中的面料总额
              this.$refs.unitTabs.sumInfo.fabricExcludTax =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/1.13).toFixed(2)//合计中的不含税面料总额
             // this.detailsPlanNum.fabriccostIncludestax = s.toFixed(3) //表头中面料含税总额
             // this.detailsPlanNum.fabriccostNotincludestax = (s/1.13).toFixed(3) //表头中面料不含税总额
@@ -423,7 +483,7 @@ export default {
               }
             })
             this.$refs.unitTabs.sumInfo.exportPriceUSD = (s/2).toFixed(2)//出运美元外销总价
-            this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(0)//出货数量合计
+            this.$refs.unitTabs.sumInfo.shipQua =(v/2).toFixed(4)//出货数量合计
             this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
             this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
             this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//
@@ -442,6 +502,26 @@ export default {
       })
     },
 
+    //调整表头格式
+    adjustingHeader(){
+      this.detailsPlanNum.outdata = ( this.detailsPlanNum.outdata==''||!this.detailsPlanNum.outdata)?'':moment( this.detailsPlanNum.outdata).format('YYYY-MM-DD')
+      this.detailsPlanNum.planQuantity=( this.detailsPlanNum.planQuantity==''|| !this.detailsPlanNum.planQuantity)?'':Number( this.detailsPlanNum.planQuantity).toFixed(4)//计划数量
+      this.detailsPlanNum.usdTotalexportprice=( this.detailsPlanNum.usdTotalexportprice==''|| !this.detailsPlanNum.usdTotalexportprice)?'':Number( this.detailsPlanNum.usdTotalexportprice).toFixed(2)//美元外销总价
+      this.detailsPlanNum.rmbExpense=( this.detailsPlanNum.rmbExpense==''|| !this.detailsPlanNum.rmbExpense)?'':Number( this.detailsPlanNum.rmbExpense).toFixed(2)//人民币费用支出
+      this.detailsPlanNum.actualShipquantity=( this.detailsPlanNum.actualShipquantity==''|| !this.detailsPlanNum.actualShipquantity)?'':Number( this.detailsPlanNum.actualShipquantity).toFixed(4)//实际出库数量
+      this.detailsPlanNum.rmbExportamount=( this.detailsPlanNum.rmbExportamount==''|| !this.detailsPlanNum.rmbExportamount)?'':Number( this.detailsPlanNum.rmbExportamount).toFixed(2)//人民币外销金额
+      this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?'':Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
+      this.detailsPlanNum.rmbProcesscost=( this.detailsPlanNum.rmbProcesscost==''|| !this.detailsPlanNum.rmbProcesscost)?'':Number( this.detailsPlanNum.rmbProcesscost).toFixed(2)//加工费(人民币)
+      this.detailsPlanNum.accidentUsdamount=( this.detailsPlanNum.accidentUsdamount==''|| !this.detailsPlanNum.accidentUsdamount)?'':Number( this.detailsPlanNum.accidentUsdamount).toFixed(2)//事故单美元金额
+      this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax)?'':Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
+      this.detailsPlanNum.excipiencostIncludestax=( this.detailsPlanNum.excipiencostIncludestax==''|| !this.detailsPlanNum.excipiencostIncludestax)?'':Number( this.detailsPlanNum.excipiencostIncludestax).toFixed(2)//辅料含税成本
+      this.detailsPlanNum.salesordersLocaltotal=( this.detailsPlanNum.salesordersLocaltotal==''|| !this.detailsPlanNum.salesordersLocaltotal)?'':Number( this.detailsPlanNum.salesordersLocaltotal).toFixed(2)//销售本币金额
+      this.detailsPlanNum.accidentcnyAmount=( this.detailsPlanNum.accidentcnyAmount==''|| !this.detailsPlanNum.accidentcnyAmount)?'':Number( this.detailsPlanNum.accidentcnyAmount).toFixed(2)//事故单人民币金额   
+      this.detailsPlanNum.fabriccostNotincludestax=( this.detailsPlanNum.fabriccostNotincludestax==''|| !this.detailsPlanNum.fabriccostNotincludestax)?'':Number( this.detailsPlanNum.fabriccostNotincludestax).toFixed(2)//面料不含税成本   
+      this.detailsPlanNum.excipiencostNotincludestax=( this.detailsPlanNum.excipiencostNotincludestax==''|| !this.detailsPlanNum.excipiencostNotincludestax)?'':Number( this.detailsPlanNum.excipiencostNotincludestax).toFixed(2)//辅料料不含税成本   
+      this.detailsPlanNum.salesrrdersOriginaltotal=( this.detailsPlanNum.salesrrdersOriginaltotal==''|| !this.detailsPlanNum.salesrrdersOriginaltotal)?'':Number( this.detailsPlanNum.salesrrdersOriginaltotal).toFixed(2)//销售订单原币金额   
+    },
+
     //计算短出货值
     calculation(val){
       var  average = 0
@@ -485,13 +565,13 @@ export default {
         }
         if(this.$refs.unitTabs.shipData.length!==0 ){this.$refs.unitTabs.shipData.push(allObj)}
         this.$refs.unitTabs.shipData.map(item=>{
-          item.shipQuantity = Number(item.shipQuantity).toFixed(0)
-          item.exportUnitPrice = Number(item.exportUnitPrice).toFixed(4)
-          item.exportPrice = Number(item.exportPrice).toFixed(2)
-          item.rmbAmount = Number(item.rmbAmount).toFixed(2)
-          item.procesUnitPricermb = Number(item.procesUnitPricermb).toFixed(4)
-          item.procesUnitPriceusd = Number(item.procesUnitPriceusd).toFixed(4)
-          item.processCost = Number(item.processCost).toFixed(4)
+          item.shipQuantity = Number(item.shipQuantity)
+          item.exportUnitPrice = Number(item.exportUnitPrice)
+          item.exportPrice = Number(item.exportPrice)
+          item.rmbAmount = Number(item.rmbAmount)
+          item.procesUnitPricermb = Number(item.procesUnitPricermb)
+          item.procesUnitPriceusd = Number(item.procesUnitPriceusd)
+          item.processCost = Number(item.processCost)
         })
     },
     //辅料中的合计行
@@ -522,20 +602,38 @@ export default {
         })
       var allObj ={
           goodsName:'合计',
-          ingredientsTransferQuantity:ingredientsTransferQuantityALll.toFixed(3),
-          transferCost:transferCostAll.toFixed(3),
-          usageQuantity:usageQuantityAll.toFixed(3),
-          purchaseQuantity:purchaseQuantityAll.toFixed(3),
-          ingredientsRemainingQuantity:ingredientsRemainingQuantityAll.toFixed(3),
-          loss:lossAll.toFixed(3),
-          rmbAmount:rmbAmountAll.toFixed(3),
-          usdAmount:usdAmountAll.toFixed(3),
-          priceExcludingtax:priceExcludingtaxAll.toFixed(3),
-          dosage:dosageAll.toFixed(3)
+          ingredientsTransferQuantity:ingredientsTransferQuantityALll,
+          transferCost:transferCostAll,
+          usageQuantity:usageQuantityAll,
+          purchaseQuantity:purchaseQuantityAll,
+          ingredientsRemainingQuantity:ingredientsRemainingQuantityAll,
+          loss:lossAll,
+          rmbAmount:rmbAmountAll,
+          usdAmount:usdAmountAll,
+          priceExcludingtax:priceExcludingtaxAll,
+          dosage:dosageAll
         }
      if(this.$refs.unitTabs.ingData[this.$refs.unitTabs.ingData.length-1].goodsName=='合计'){this.$refs.unitTabs.ingData.pop()}
         if(this.$refs.unitTabs.ingData.length!==0 ){  this.$refs.unitTabs.ingData.push(allObj)}
     },
+    //事故单合计行
+    addAccident(val){
+     var amountAll=0,
+     amountrmbAll=0
+     val.map(item=>{
+      if(item.accidentUndertaker!=='合计'){
+        amountAll+=Number(item.amount) 
+        amountrmbAll+=Number(item.amountrmb)  
+      }
+     })
+     var allObj={
+      accidentUndertaker:'合计',
+      amount:amountAll,
+      amountrmb:amountrmbAll
+     }
+     if(this.accidentListData[this.accidentListData.length-1].goodsName=='合计'){this.accidentListData.pop()}
+        if(this.accidentListData.length!==0 ){  this.accidentListData.push(allObj)}
+    },
     //费用支出合计行
     addAmountCostPay(val){
       var disbursedLocalmoneyALL=0,
@@ -550,11 +648,12 @@ export default {
      })
      var obj={
       setNo:'合计',
-      disbursedLocalmoney:disbursedLocalmoneyALL.toFixed(3),
-      disbursedOriginalmoney:disbursedOriginalmoneyALL.toFixed(3),
+      disbursedLocalmoney:disbursedLocalmoneyALL,
+      disbursedOriginalmoney:disbursedOriginalmoneyALL,
       shuiemoney:shuiemoneyAll.toFixed(3),
-      totalTaxIncrease:(disbursedLocalmoneyALL+shuiemoneyAll).toFixed(3)
+      totalTaxIncrease:(disbursedLocalmoneyALL+shuiemoneyAll)
      }
+     console.log(this.costPayData[this.costPayData.length-1])
      if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
      if(this.costPayData.length!==0){ this.costPayData.push(obj)}
     },
@@ -662,10 +761,12 @@ export default {
       return {
         on: {
           click: event => {
-            console.log('this:', this)
-            // 调用【面料损耗表】中的【事故单】弹框
-            this.$refs.accidentListModal.accidentListModVis = true
-            this.$refs.accidentListModal.accidentList = record
+            
+// this.$router.push({path:'http://localhost:3000/#/IncidentTicketModalDetail'})
+            // console.log('this:', this)
+            // // 调用【面料损耗表】中的【事故单】弹框
+            // this.$refs.accidentListModal.accidentListModVis = true
+            // this.$refs.accidentListModal.accidentList = record
             
           }
         }

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

@@ -25,12 +25,12 @@
             </span>
             <!-- 面料 -转入数量 弹框-->
             <span slot="fabInQuaSlot" slot-scope="text">
-              <a>{{ text }}</a>
+              <a>{{ Number(text).toFixed(4) }}</a>
             </span>
 
             <!-- 余下数量-->
             <span slot="fabRemaQuaSlot" slot-scope="text">
-              <a>{{ text }}</a>
+              <a>{{ Number(text).toFixed(4) }}</a>
             </span>
             <!-- 备注 -->
             <span slot="remarks" slot-scope="text,record">
@@ -58,11 +58,11 @@
           </span>
             <!--辅料-转入数量 弹框-->
             <span slot="ingInQuaSlot" slot-scope="text">
-              <a>{{ text }}</a>
+              <a>{{ Number(text).toFixed(4) }}</a>
             </span>
             <!--辅料-余下数量 弹框-->
             <span slot="ingRemQuaSlot" slot-scope="text">
-              <a>{{ text }}</a>
+              <a>{{ Number(text).toFixed(4) }}</a>
             </span>
             <!-- 备注 -->
             <span slot="remarks" slot-scope="text,record">
@@ -232,17 +232,57 @@ export default {
           dataIndex: 'transferCost',
           width: '8%',
           className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
           // slots:{title:'transferCostTitle'} ,
         },
 
-        { title: '单耗/件', dataIndex: 'unitConsumption', width: '9%', className: 'replacecolor' },
-        { title: '使用数量', dataIndex: 'usageQuantity', width: '9%', className: 'replacecolor' },
-        { title: '计划数量', dataIndex: 'planQuantity', width: '9%', className: 'replacecolor' },
+        { 
+          title: '单耗/件', 
+          dataIndex: 'unitConsumption', 
+          width: '9%', 
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
+         },
+        { 
+          title: '使用数量', 
+          dataIndex: 'usageQuantity', 
+          width: '9%', 
+          className: 'replacecolor' ,
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
+        },
+        { 
+          title: '计划数量', 
+          dataIndex: 'planQuantity', 
+          width: '9%',
+          className: 'replacecolor' ,
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
+          },
         {
           title: '购入数量',
           dataIndex: 'purchaseQuantity',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '余下数量',
@@ -256,13 +296,23 @@ export default {
           title: '损耗',
           dataIndex: 'loss',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '余下数量的成本',
           dataIndex: 'remainingQuantitycost',
           width: '9%',
           className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
           // slots:{title:'remainingQuantitycostTitle'} ,
 
         },
@@ -307,15 +357,35 @@ export default {
           dataIndex: 'transferCost',
           width: '6%',
           className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
           // slots:{title:'transferCostTitle'} ,
         },
 
-        { title: '使用数量', dataIndex: 'usageQuantity', width: '8%', className: 'replacecolor' },
+        { 
+          title: '使用数量', 
+          dataIndex: 'usageQuantity', 
+          width: '8%', 
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
+         },
         {
           title: '购入数量',
           dataIndex: 'purchaseQuantity',
           width: '8%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '余下数量',
@@ -329,13 +399,23 @@ export default {
           title: '损耗',
           dataIndex: 'loss',
           width: '6%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '人民币金额',
           dataIndex: 'rmbAmount',
           width: '6%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
         },
         {
           title: '美元金额',
@@ -346,14 +426,19 @@ export default {
             if (record.rmbAmount == record.usdAmount)
               return "";
             else
-              return record.usdAmount;
+              return Number(record.usdAmount).toFixed(2);
            } 
         },
         {
           title: '不含税金额',
           dataIndex: 'priceExcludingtax',
           width: '6%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
         },
         // {
         //   title: '转出率',
@@ -371,7 +456,12 @@ export default {
           title: '用量',
           dataIndex: 'dosage',
           width: '6%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '供应商',
@@ -433,31 +523,56 @@ export default {
           title: '出货数量',
           dataIndex: 'shipQuantity',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '外销单价',
           dataIndex: 'exportUnitPrice',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '外销总价',
           dataIndex: 'exportPrice',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
         },
         {
           title: '人民币金额',
           dataIndex: 'rmbAmount',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          },
         },
         {
           title: '加工单价(人民币)',
           dataIndex: 'procesUnitPricermb',
           width: '9%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         },
         {
           title: '加工单价(美元)',
@@ -468,14 +583,19 @@ export default {
             if (record.procesUnitPricermb == record.procesUnitPriceusd)
               return "";
             else
-              return record.procesUnitPriceusd;
+              return Number(record.procesUnitPriceusd).toFixed(4);
            } 
         },
         {
           title: '加工费(人民币)',
           dataIndex: 'processCost',
           width: '8%',
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(4)
+            }
+          },
         }
       ],
       shipData: [],

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

@@ -39,6 +39,11 @@
                   {{ declareElements.itemIds }}
                 </a-form-model-item>
               </a-col>
+              <a-col :md="24" :sm="8" style="margin-bottom: 1%;" >
+                <a-form-model-item label="物料名称" prop="declarationUnit" >
+                  <a-input placeholder="请输入物料名称" v-model="declareElements.inventoryName" readOnly ></a-input>
+                </a-form-model-item>
+             </a-col>
             <a-col :md="6" :sm="8">
                 <a-form-model-item label="报关品名" prop="declarationName" :rules="[{ required: true, message: '请输入报关品名!' }]">
                   <!-- <a-input placeholder="请输入报关品名" v-model="declareElements.declarationName"></a-input> -->