Bladeren bron

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

huxy 1 jaar geleden
bovenliggende
commit
c2591052f9

+ 4 - 1
src/api/document/pre-book.js

@@ -26,4 +26,7 @@ const cancelSubmit = params => postAction('/letterDeposit/syLetterDeposit/syShip
 // 参照预装箱单
 const querySyPreAssembledPackingList = params => getAction('/letterDeposit/syLetterDeposit/querySyPreAssembledPackingList', params)
 
-export { preBookList, addPreBook, preBookById, editById, deletePreBook, submit, cancelSubmit, querySyPreAssembledPackingList }
+// 删除子表信息
+const deleteSonList = params => postAction('/letterDeposit/syLetterDeposit//deleteQuery', params)
+
+export { preBookList, addPreBook, preBookById, editById, deletePreBook, submit, cancelSubmit, querySyPreAssembledPackingList,deleteSonList }

+ 6 - 0
src/views/book/addBookDrawer.vue

@@ -286,6 +286,7 @@
                <span class="all">总毛重:{{ allGross.toFixed(2) }}</span>
                <span class="all">总净重:{{ allNet.toFixed(2) }}</span>
                <span class="all">总金额:{{ allMoney.toFixed(2) }}</span>
+               <span class="all">总体积:{{ allVloum.toFixed(3) }}</span>
              </div>
           </a-form-model>
 
@@ -697,6 +698,7 @@ export default {
       allGross:0,
       allNet:0,
       allMoney:0,
+      allVloum:0,
       allBox:0,
       allow:'yes',
       itemIds:[],//参照面料选中的ID集合
@@ -905,6 +907,7 @@ export default {
     },
         // 设置表头计算值,直接设置表头值对象不能刷新,把表头对象换了就可以了
     setHeadCalField(){
+      this.allVloum = 0
       var containerNumberArr = [],
           readyFabricArr = []
       var headData = JSON.parse(JSON.stringify(this.addBook));
@@ -931,6 +934,7 @@ export default {
         headData.totalVolume = (containerNumberArr.length)*68;
       }
       headData.money = parseFloat(moneyAll.toFixed(2));
+      this.allVloum = headData.totalVolume 
       this.addBook = headData;
     },
 
@@ -1323,6 +1327,7 @@ export default {
       this.allMount = 0
       this.allNet = 0
       this.allBox = 0
+      // this.allVloum = 0
         val.map(item=>{
           this.allGross+=Number(item.grossWeight)
           this.allMoney+=Number(item.totalPrice)
@@ -1330,6 +1335,7 @@ export default {
           this.allNet+=Number(item.netWeight)
           this.allBox += Number(item.boxNumber)
         })
+        this.setHeadCalField()
       }
       
       }

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

@@ -174,6 +174,7 @@
                <span class="all">总毛重:{{ allGross.toFixed(2) }}</span>
                <span class="all">总净重:{{ allNet.toFixed(2) }}</span>
                <span class="all">总金额:{{ allMoney.toFixed(2) }}</span>
+               <span class="all">总体积:{{ allVloum.toFixed(3) }}</span>
              </div>
           </a-form-model>
           
@@ -479,6 +480,7 @@ export default {
       allGross:0,
       allNet:0,
       allMoney:0,
+      allVloum:0,
       allBox:0,
       validatorRules: {
           shippingOrderDate:[{required: true, message: '托书日期不能为空!'}],
@@ -502,6 +504,7 @@ export default {
           this.allNet+=Number(item.netWeight)
           this.allBox += Number(item.boxNumber)
         })
+        this.getTotalVolumn()
       }
     },
    filters: {
@@ -531,6 +534,30 @@ export default {
     //     ></a-table>
     //   )
     // },
+    getTotalVolumn(){
+      this.allVloum = 0
+      var containerNumberArr = [],
+          readyFabricArr = []
+      // var headData = JSON.parse(JSON.stringify(this.addBook));
+      var    vol = 0
+      for (var i=0; i<this.addBookData.length; i++){
+        var rowData = this.addBookData[i];
+        if(rowData.readyFabric == '面料'){
+          containerNumberArr.push(rowData.containerNumber)
+          readyFabricArr.push(rowData.readyFabric)
+        }
+        if (rowData.volume != undefined && rowData.volume != ""){
+          vol += rowData.volume*1;
+        }
+      }
+       var totalVolume = parseFloat(vol.toFixed(4));
+      containerNumberArr = [...new Set(containerNumberArr)]
+      readyFabricArr = [...new Set(readyFabricArr)]
+      if(readyFabricArr.length == 1 && readyFabricArr[0] == '面料'){
+        totalVolume = (containerNumberArr.length)*68;
+      }
+      this.allVloum = totalVolume
+    },
     
     // 抽屉 取消
     handleCancel() {

+ 4 - 3
src/views/cost-allocation-total/list.vue

@@ -50,7 +50,7 @@
                 <a-input placeholder="请输入" v-model="queryParam.processUnit"></a-input>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="8">
+            <!-- <a-col :md="6" :sm="8">
               <a-form-item label="出运日期">
                 <a-date-picker style="width: 100%" v-model="outdata"  @change="changeData" :format="dateFormat"> </a-date-picker>
               </a-form-item>
@@ -69,7 +69,7 @@
               <a-form-item label="短出数">
                 <a-input placeholder="请输入" v-model="queryParam.shortseveral"></a-input>
               </a-form-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="8">
             <a-form-item label="是否有驳回">
                 <a-select v-model="queryParam.rejectDate">
@@ -232,7 +232,7 @@ export default {
         { title: '事故金额(¥)', width: 120, dataIndex: 'accidentcnyAmount', ellipsis: true, className: 'replacecolor' },
         { title: '事故金额($)', width: 120, dataIndex: 'accidentUsdamount', ellipsis: true, className: 'replacecolor' },
         { title: '备注', width: 120, dataIndex: 'remarks', ellipsis: true, className: 'replacecolor' },
-        { title: '状态', width: 120,fixed: 'right', dataIndex: ' ', ellipsis: true, className: 'replacecolor' },
+        { title: '状态', width: 120,fixed: 'right', dataIndex: 'status', ellipsis: true, className: 'replacecolor' },
 
         { title: '操作', width: 120 ,fixed: 'right', dataIndex: 'option', ellipsis: true, className: 'replacecolor', scopedSlots: { customRender: 'action' } },
       ],
@@ -336,6 +336,7 @@ export default {
     },
 
     searchQuery() {
+      this.queryParam.pageNo=''
       this.getCostList()
     },
     changeData(){

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

@@ -1015,7 +1015,7 @@ export default {
       // 打开订单数据弹框
       this.$refs.ReferencePrePacklist.referencePrePacklist = true
       this.$refs.ReferencePrePacklist.queryParam = {}
-      this.$refs.ReferencePrePacklist.searchQuery()
+      this.$refs.ReferencePrePacklist.advancePackingListData=[]
     },
     referCallback(){
       this.getSpltList()

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

@@ -261,7 +261,7 @@ import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 import AdvancePackingListModal from '@views/pre-book/advancePackingListModal.vue'
 import { JVXETypes } from '@/components/jeecg/JVxeTable'
-import { addPreBook, editById } from '@api/document/pre-book.js'
+import { addPreBook, editById ,deleteSonList} from '@api/document/pre-book.js'
 
 export default {
   name: 'AddPreBookDrawer', // 新增预托书
@@ -518,8 +518,18 @@ export default {
     // ------------------------------------------
     // 操作 删除
     handleDelete(prop) {
-      this.addPreBook.syLetterDepositItemList.splice(prop.index, 1);
-      this.setHeadCalField();      
+      deleteSonList({id:prop.row.syPreAssembledPackingListItemId}).then(res => {
+              // that.confirmLoading = false;
+              if (res.success) {
+                  this.$message.success(res.message)
+                  this.addPreBook.syLetterDepositItemList.splice(prop.index, 1);
+                  this.setHeadCalField(); 
+              }else{
+                this.$message.error(res.message)
+              }
+            })
+      // this.addPreBook.syLetterDepositItemList.splice(prop.index, 1);
+      // this.setHeadCalField();      
     },
 
     // 抽屉 取消

+ 30 - 14
src/views/reportForms/cost-allocation-table.vue

@@ -1,6 +1,7 @@
 <template>
   <!--报表 成本分配表 (保存后数据到单证的成本分配汇总内)-->
   <div id="costAllocationTable">
+    <h1 class="title">成本分配表</h1>
     <a-spin :spinning="loading">
     <a-card :bordered="false">
       <!-- 主表信息 点击搜索后 回显--->
@@ -445,7 +446,7 @@ export default {
           },
         },
         { title: '事故单主题', width: 120, dataIndex: 'accidentTheme', className: 'replacecolor' },
-        { title: '责任人', width: 120, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
+        { title: '责任人', width: 100, dataIndex: 'responsibilityPerson1', className: 'replacecolor' },
         // { title: '币种', width: 120, dataIndex: 'moneyType', className: 'replacecolor' },
         // { title: '金额', dataIndex: 'amount', width: 120, className: 'replacecolor' }
       ],
@@ -453,13 +454,13 @@ export default {
 
       // 费用支出 表头
       costPayColumns: [
-        { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
-        { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
-        { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
+        { title: '账套号', width: '10%', dataIndex: 'setNo', className: 'replacecolor' },
+        { title: '支出单号', width: '10%', dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
+        { title: '费用项目', dataIndex: 'expenseItem', width: '10%', className: 'replacecolor' },
         { 
           title: '美元', 
           dataIndex: 'disbursedOriginalmoney', 
-          width: 120,
+          width: '10%',
           className: 'replacecolor' ,
           customRender: (text, record, index) => {
             if(text!==''&&text){
@@ -470,7 +471,7 @@ export default {
         { 
           title: '人民币(不含税)', 
           dataIndex: 'disbursedLocalmoney', 
-          width: 120, className: 'replacecolor',
+          width: '10%', className: 'replacecolor',
           customRender: (text, record, index) => {
             if(text!==''&&text){
               return Number(text).toFixed(2)
@@ -480,7 +481,7 @@ export default {
         { 
           title: '人民币(税额)', 
           dataIndex: 'shuiemoney', 
-          width: 120, 
+          width: '10%', 
           className: 'replacecolor',
           customRender: (text, record, index) => {
             if(text!==''&&text){
@@ -491,15 +492,15 @@ export default {
         { 
           title: '人民币(价税合计)', 
           dataIndex: 'iNatMoney', 
-          width: 120, 
+          width: '10%', 
           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' }
+        { title: '发票号', dataIndex: 'invoicenum', width: '10%', className: 'replacecolor' },
+        { title: '制单人', dataIndex: 'preparedBy', width: '10%', className: 'replacecolor' }
       ],
       costPayData: [],
 
@@ -598,7 +599,12 @@ export default {
                 all+=Number(item.transferCost)
               }
             })
-            // this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax||this.detailsPlanNum.fabriccostIncludestax=='0')?all.toFixed(2):Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本
+            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.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
             this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
             this.detailsPlanNum.outdata = oneData.syCostAllocationShipdetail.length!==0?oneData.syCostAllocationShipdetail[0].outdata:''
@@ -668,8 +674,12 @@ export default {
             this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
              //调整表头格式
              this.adjustingHeader()
-            this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//出运不含税加工费
-              this.detailsPlanNum.rmbProcesscost=(e==''|| !e)?'':Number(e).toFixed(2)//表头加工费(人民币)
+           if(Number(oneData.syCostAllocationShipdetail[0].procesUnitPriceusd)>0){
+            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)//表头加工费(人民币)
             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 = {
@@ -753,7 +763,7 @@ export default {
       // 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.rmbExpense=( this.detailsPlanNum.rmbExpense==''|| !this.detailsPlanNum.rmbExpense)?0:Number( this.detailsPlanNum.rmbExpense).toFixed(2)//人民币费用支出
+      this.detailsPlanNum.fabriccostIncludestaxUsd=( this.detailsPlanNum.fabriccostIncludestaxUsd==''|| !this.detailsPlanNum.fabriccostIncludestaxUsd)?0:Number( this.detailsPlanNum.fabriccostIncludestaxUsd).toFixed(2)//面料成本($)
       this.detailsPlanNum.actualShipquantity=( this.detailsPlanNum.actualShipquantity==''|| !this.detailsPlanNum.actualShipquantity)?0:Number( this.detailsPlanNum.actualShipquantity).toFixed(0)//实际出库数量
       this.detailsPlanNum.rmbExportamount=( this.detailsPlanNum.rmbExportamount==''|| !this.detailsPlanNum.rmbExportamount)?0:Number( this.detailsPlanNum.rmbExportamount).toFixed(2)//人民币外销金额
       this.detailsPlanNum.usdExpense=( this.detailsPlanNum.usdExpense==''|| !this.detailsPlanNum.usdExpense)?0:Number( this.detailsPlanNum.usdExpense).toFixed(2)//美元费用支出
@@ -941,6 +951,7 @@ export default {
          +'.ant-table-row-cell-break-word{width:5% !important}'
          + 'th{color: #333}\n'
          + 'a{color: #666; text-decoration:none;}\n'
+         +'.title{text-align: center;}'
          + '</style>';
          win.document.write(style+html);
          win.focus();
@@ -1049,6 +1060,8 @@ export default {
     FabInQua(data){
       if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
         this.detailsPlanNum.fabriccostIncludestax=data.toFixed(2)//面料含税成本
+
+        // this.detailsPlanNum.fabriccostIncludestax=(Number(this.copyFabriccostIncludestax)+data).toFixed(2)//面料含税成本
       }
      
     },
@@ -1101,4 +1114,7 @@ export default {
 .taxrate{
   width: 40%;
 }
+.title{
+  display: none;
+}
 </style>

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

@@ -659,6 +659,11 @@ export default {
       this.sumInfo.fabricExcludTax =(Number(this.sumInfo.fabricAmount)/(1+(Number(data)/100))).toFixed(2)//合计中的不含税面料总额
       this.sumInfo.ingExcludAmount = (Number(this.sumInfo.ingAmount).toFixed(2)/(1+(Number(data)/100))).toFixed(2)//辅料不含税金额合计
       this.sumInfo.amountTotal = (Number(this.sumInfo.fabricAmount)+Number(this.sumInfo.ingAmount)+Number( this.sumInfo.shipProcesFees)).toFixed(2)//合计金额
+      if(Number(this.shipData[0].procesUnitPriceusd)>0){
+            this.sumInfo.excludingTaxProcessing =this.sumInfo.shipProcesFees//出运不含税加工费-合计信息
+      }else{
+              this.sumInfo.excludingTaxProcessing =(Number(this.sumInfo.shipProcesFees).toFixed(2)/(1+(Number(data)/100))).toFixed(2)//出运不含税加工费-合计信息
+            }  
       this.$forceUpdate()
       this.$emit('number',this.sumInfo.fabricExcludTax,this.sumInfo.ingExcludAmount)
     },
@@ -728,7 +733,7 @@ export default {
       this.ingData.map(item=>{
         if(item.goodsName == record.goodsName){
           item.transferCost = data
-          debugge        }
+             }
       })
     },
     // 面料 -余下数量 弹框

+ 7 - 0
src/views/reportForms/supply-capacity-table.vue

@@ -216,6 +216,13 @@ export default {
           className: 'replacecolor',
           ellipsis: true,
         },
+        {
+          title: '最终客户',
+          width: 70,
+          dataIndex: 'cdefine11',
+          className: 'replacecolor',
+          ellipsis: true,
+        },
         { title: '累计入库数量', width: 85, dataIndex: 'ireceivedQTY', className: 'replacecolor',ellipsis: true, },
         { title: '单位', width: 70, dataIndex: 'unit', className: 'replacecolor',ellipsis: true, },
       ],