Browse Source

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

huxy 1 year ago
parent
commit
379ddfdb37

+ 29 - 0
package-lock.json

@@ -61,6 +61,7 @@
         "html-webpack-plugin": "^4.2.0",
         "less": "^3.9.0",
         "mini-css-extract-plugin": "^2.6.1",
+        "vue-easytable": "^2.27.1",
         "vue-template-compiler": "^2.6.10"
       }
     },
@@ -19323,6 +19324,22 @@
       "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.8.tgz",
       "integrity": "sha512-Xgi/aLQCcNCiBTUdovy/i4LWx0G7fQnAENBpDWA3J4i87Zlk9DJRksXrClsQ6nnaFRfQVkMimij5GEvAMaXdYw=="
     },
+    "node_modules/vue-easytable": {
+      "version": "2.27.1",
+      "resolved": "https://registry.npmmirror.com/vue-easytable/-/vue-easytable-2.27.1.tgz",
+      "integrity": "sha512-Rs2cqaPYamH8zXQo/f90AyM/ROGMsB5Njb74GpooWacAKEXbHU0wXYvEjSBZ7CcS6TVqliA/ZbgVqOoA/o9bHQ==",
+      "dev": true,
+      "dependencies": {
+        "lodash": "^4.17.20",
+        "resize-observer-polyfill": "^1.5.1",
+        "vue": "^2.6.12",
+        "vue-template-compiler": "^2.6.11"
+      },
+      "peerDependencies": {
+        "lodash": "^4.17.20",
+        "vue": ">= 2.6.0"
+      }
+    },
     "node_modules/vue-eslint-parser": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz",
@@ -37811,6 +37828,18 @@
       "resolved": "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.8.tgz",
       "integrity": "sha512-Xgi/aLQCcNCiBTUdovy/i4LWx0G7fQnAENBpDWA3J4i87Zlk9DJRksXrClsQ6nnaFRfQVkMimij5GEvAMaXdYw=="
     },
+    "vue-easytable": {
+      "version": "2.27.1",
+      "resolved": "https://registry.npmmirror.com/vue-easytable/-/vue-easytable-2.27.1.tgz",
+      "integrity": "sha512-Rs2cqaPYamH8zXQo/f90AyM/ROGMsB5Njb74GpooWacAKEXbHU0wXYvEjSBZ7CcS6TVqliA/ZbgVqOoA/o9bHQ==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.20",
+        "resize-observer-polyfill": "^1.5.1",
+        "vue": "^2.6.12",
+        "vue-template-compiler": "^2.6.11"
+      }
+    },
     "vue-eslint-parser": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-5.0.0.tgz",

+ 1 - 0
package.json

@@ -63,6 +63,7 @@
     "html-webpack-plugin": "^4.2.0",
     "less": "^3.9.0",
     "mini-css-extract-plugin": "^2.6.1",
+    "vue-easytable": "^2.27.1",
     "vue-template-compiler": "^2.6.10"
   },
   "eslintConfig": {

+ 1 - 1
src/api/document/shipmentList.js

@@ -61,7 +61,7 @@ const deleteEdit = params => postAction('/shippingDetails/syShippingDetails/sing
 
 
 //  批量删除
-const deleteBatch = params => deleteAction('/shippingDetails/syShippingDetails/deleteBatch', params)
+const deleteBatch = params => postAction('/shippingDetails/syShippingDetails/deleteBatch', params)
 //报关要素查询按钮
 const queryLatelyDeclarationElements = params => getAction('/shippingDetails/syShippingDetails/queryLatelyDeclarationElements',params)
 

+ 3 - 0
src/main.js

@@ -7,6 +7,8 @@ import Storage from 'vue-ls'
 import router from './router'
 import store from './store/'
 import { VueAxios } from '@/utils/request'
+import "vue-easytable/libs/theme-default/index.css";
+import VueEasytable from "vue-easytable";
 // import * as echarts from 'echarts'
 
 import Antd, { version } from 'ant-design-vue'
@@ -66,6 +68,7 @@ Vue.use(vueBus)
 Vue.use(JeecgComponents)
 Vue.use(VueAreaLinkage)
 Vue.use(preventReClick)
+Vue.use(VueEasytable);
 // Vue.prototype.$echarts = echarts // 全局echarts
 Vue.config.productionTip = false
 

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

@@ -888,7 +888,7 @@ export default {
     // 操作 单条数据导出
     itemXls(record,sta) {
       var data = sta
-       downFile('/spapl/syPreAssembledPackingList/exportXls',{id:record.id,status:data}).then(data => {
+       downFile('/spapl/syPreAssembledPackingList/exportXls',{id:record.id,selectAll:data}).then(data => {
          if (!data) {
           this.$message.warning('文件下载失败')
           return

+ 10 - 5
src/views/book/addBookDrawer.vue

@@ -237,8 +237,8 @@
       <!--操作按钮区域 参照装箱单  増行-->
       <a-card :bordered="true" style="margin:10px 0  40px 0;">
         <div class="table-operator">
-          <a-button type="primary" @click="referPackingList('0')" icon="ordered-list">参照装箱单-成衣</a-button>
-          <a-button type="primary" @click="referPackingList('1')" icon="ordered-list">参照装箱单-面料</a-button>
+          <a-button type="primary" @click="referPackingList('0')" icon="ordered-list" :disabled="defaultMethod=='edit'&&syStuta=='1'">参照装箱单-成衣</a-button>
+          <a-button type="primary" @click="referPackingList('1')" icon="ordered-list" :disabled="defaultMethod=='edit'&&syStuta=='1'">参照装箱单-面料</a-button>
           <a-button type="primary" @click="syShippingOrderMerge" :disabled="query=='1'" icon="plus" style="margin-left: 20px">合并</a-button>
         </div>
 
@@ -275,8 +275,9 @@
 
               <!-- 操作 -->
               <span slot="operationSlot" slot-scope="text, record,index">
-                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(index)">
-                  <a href="javascript:void(0);" style="color:red;">删除</a>
+                <a-popconfirm title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(index)" :disabled="defaultMethod=='edit'&&syStuta=='1'">
+                  <a href="javascript:void(0);" style="color:red;" v-if="!(defaultMethod=='edit'&&syStuta=='1')">删除</a>
+                  <a href="javascript:void(0);" style="color:gray;" v-if="(defaultMethod=='edit'&&syStuta=='1')">删除</a>
                 </a-popconfirm>
               </span>
             </a-table>
@@ -693,6 +694,7 @@ export default {
       defaultMethod : 'add',
       confirmLoading: false,
       visible: false,
+      syStuta:'',
       dateFormat: 'YYYY-MM-DD',
       allMount:0,
       allGross:0,
@@ -782,7 +784,9 @@ export default {
         this.addBookData = this.addBookData.concat(data);
         this.addBook.termsOfDeliveryvalue = 'FOB'
         this.addBook.exchangeEarningsValue = 'T/T'
-        this.addBook.exportPort='NINGBO'
+        if(this.defaultMethod=='add'){
+          this.addBook.exportPort='NINGBO'
+        }
         var dd = moment(new Date()).format('YYYY-MM-DD')
          this.$set( this.addBook,'shippingOrderDate',dd)
          //参照成衣是表头数据默认值
@@ -1293,6 +1297,7 @@ export default {
       this.FreightOption=[]
       this.visible = false
       this.defaultMethod = 'add'
+      this.syStuta = ''
       this.resumeColumns()
       this.$refs.form.resetFields()
     },

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

@@ -352,7 +352,7 @@ export default {
 
   created() {
     this.getDefaultTime()
-    this.getBookList( )
+    // this.getBookList( )
   },
   watch:{
     selectedRowKeys(newVal){
@@ -559,6 +559,7 @@ export default {
             if(pattern == '1'){
               this.$refs.addBookDrawer.visible = true
               this.$refs.addBookDrawer.defaultMethod = 'edit'
+              this.$refs.addBookDrawer.syStuta = record.syStuta
               if(data.latestDateOfShipment!==''&&data.latestDateOfShipment){
                  data.latestDateOfShipment = (moment(data.latestDateOfShipment)).format('YYYY-MM-DD')
               }

+ 2 - 2
src/views/book/detailsBookDrawer.vue

@@ -127,12 +127,12 @@
                 </a-form-model-item>
               </a-col>
 
-              <a-col :md="6" :sm="8">
+              <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="金额" prop="money">
                   {{addBook.money}}
                  
                 </a-form-model-item>
-              </a-col>
+              </a-col> -->
 
               <!-- <a-col :md="6" :sm="8">
                 <a-form-model-item label="人民币" prop="cny">

+ 1 - 0
src/views/cost-allocation-total/inancialReconciliation.vue

@@ -61,6 +61,7 @@
                     <a-select-option value="提交">提交</a-select-option>
                     <a-select-option value="返单">返单</a-select-option>
                     <a-select-option value="完成">完成</a-select-option>
+                    <a-select-option value="已指派">已指派</a-select-option>
                   </a-select>
                 <!-- <a-input placeholder="请输入分配表单据状态" v-model="queryParam.cstatus"></a-input> -->
               </a-form-item>

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

@@ -229,8 +229,10 @@ export default {
         { title: '加工费($)', width: 100, dataIndex: 'usdProcesscost', ellipsis: true, className: 'replacecolor' },
         { title: '不含税运杂费(¥)', width: 145, dataIndex: 'rmbExpense', ellipsis: true, className: 'replacecolor' },
         { title: '运杂费($)', width: 100, dataIndex: 'usdExpense', ellipsis: true, className: 'replacecolor' },
-        { title: '事故金额(¥)', width: 120, dataIndex: 'accidentcnyAmount', ellipsis: true, className: 'replacecolor' },
-        { title: '事故金额($)', width: 120, dataIndex: 'accidentUsdamount', ellipsis: true, className: 'replacecolor' },
+        { title: '责任单位事故金额(¥)', width: 170, dataIndex: 'accidentcnyAmount', ellipsis: true, className: 'replacecolor' },
+        { title: '责任单位事故金额($)', width: 170, dataIndex: 'accidentUsdamount', ellipsis: true, className: 'replacecolor' },
+        { title: '公司承担事故金额(¥)', width: 170, dataIndex: 'pkorgAmountrmb', ellipsis: true, className: 'replacecolor' },
+        { title: '公司承担事故金额($)', width: 170, dataIndex: 'pkorgAmount', ellipsis: true, className: 'replacecolor' },
         { title: '备注', width: 120, dataIndex: 'remarks', ellipsis: true, className: 'replacecolor' },
         { title: '状态', width: 120,fixed: 'right', dataIndex: 'status', ellipsis: true, className: 'replacecolor' },
 

+ 21 - 9
src/views/cost-allocation-total/modal/fabRemQuaModal.vue

@@ -10,7 +10,11 @@
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
-      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
+      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> 
+        <span slot="unitCost" slot-scope="text,record">
+              <a-input placeholder="请输入" v-model="record.unitCost"  @change="changeUnitCost(record)" @blur="blurUnitCost(record)"/>
+        </span>
+      </a-table>
       <!-- 导出 打印 返回  -->
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
@@ -38,6 +42,7 @@ export default {
   components: { JEllipsis, moment },
   data() {
     return {
+      recordF:{},
       columns: [
         {
           title: '存货名称',
@@ -72,13 +77,7 @@ export default {
           dataIndex: 'unitCost',
           width: 120,
           className: 'replacecolor',
-          customRender: (text, record, index) => {
-            if(text!==''&&text){
-              var re =  Number(text).toFixed(4)
-              return re
-            }
-            
-         }
+          scopedSlots: { customRender: 'unitCost' },
         },
         {
           title: '总成本',
@@ -141,10 +140,23 @@ export default {
     },
     // 打印
     print() {},
-
+    changeUnitCost(record){
+      var all = (Number(record.unitCost)*Number(record.number)).toFixed(2)
+      this.$set(record,'cost',all)
+    },
+    blurUnitCost(record){
+      record.unitCost = Number(record.unitCost).toFixed(4)
+    },
     cancel() {
       console.log('返回成本分配统计表')
       this.fabRemQuaModVis = false
+      var all = 0
+      this.data.map(item=>{
+        if(item.cost&&item.cost!==''){
+          all+=Number(item.cost)
+        }
+      })
+      this.$emit('close',all,this.recordF)
     }
   }
 }

+ 1 - 1
src/views/pre-book/preBookList.vue

@@ -301,7 +301,7 @@ export default {
   },
 
   created() {
-    this.getPreBookData() // 渲染预托书
+    // this.getPreBookData() // 渲染预托书
   },
   methods: {
     // 分页查询 预托书

+ 82 - 177
src/views/reportForms/cost-allocation-table.vue

@@ -33,7 +33,7 @@
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="产品款号" prop="poStyleNum">
-                <span :title=" detailsPlanNum.poStyleNum">{{ detailsPlanNum.poStyleNum | ellipsis}}</span>
+                <span :title="detailsPlanNum.poStyleNum">{{ detailsPlanNum.poStyleNum | ellipsis}}</span>
                 <!-- {{ detailsPlanNum.poStyleNum }} -->
               </a-form-model-item>
             </a-col>
@@ -94,7 +94,7 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="加工费(¥)" prop="rmbProcesscost">
+              <a-form-model-item label="不含税加工费(¥)" prop="rmbProcesscost">
                 {{ detailsPlanNum.rmbProcesscost }}
               </a-form-model-item>
             </a-col>
@@ -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  }}
@@ -295,6 +233,9 @@
                 <a-button type="primary" >附件上传</a-button>
               </a-upload>
             </a-col>
+            <a-col :md="6" :sm="8" class="noprint">
+              <a-button type="primary" @click="openEnclosure">附件</a-button>
+            </a-col>
         </a-form-model>
       </div>
       </a-row>
@@ -371,6 +312,8 @@
       <mainTableExpenseUSD-modal ref="mainTableExpenseUSDModal" :father="bb"></mainTableExpenseUSD-modal>
       <!-- 事故单 -->
       <accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
+      <!-- 附件 -->
+      <attachment-display ref="attachmentDisplay"></attachment-display>
     </div>
   </a-spin>
   </div>
@@ -380,25 +323,16 @@
 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'
-
+import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
 export default {
   name: 'CostAllocationTable', // 成本分配 (新增)
   mixins: [JeecgListMixin],
-  components: { JEllipsis, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal },
+  components: { JEllipsis, moment, tabs, mainTableExpenseCNYModal, mainTableExpenseUSDModal, accidentListModal,AttachmentDisplay },
 
   data() {
     return {
@@ -410,8 +344,6 @@ export default {
         planNum: ''
       }, // 详情所有数据
       remarks: '', // 备注
-      copyFabriccostIncludestax:'',//保存查询获取得面料成本(¥)
-
       // 事故单 表头
       accidentListColumns: [
         {
@@ -447,8 +379,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,12 +473,13 @@ export default {
         var Staging = '', 
         StagingLast = '',
         file = ''
+        //更新前保存字段
         if(data=='queryNew'){
           Staging =this.detailsPlanNum.memo
           StagingLast = this.detailsPlanNum.remarks
           file = this.fileList
-          this.$refs.unitTabs.mList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationFabricList
-          this.$refs.unitTabs.fList = this.$refs.unitTabs.tabsAllData[0].syCostAllocationIngredientList
+          this.$refs.unitTabs.mList =this.$refs.unitTabs.tabsAllData.length!==0? this.$refs.unitTabs.tabsAllData[0].syCostAllocationFabricList:[]
+          this.$refs.unitTabs.fList = this.$refs.unitTabs.tabsAllData.length!==0?this.$refs.unitTabs.tabsAllData[0].syCostAllocationIngredientList:[]
           this.StagingList = this.$refs.unitTabs.fabData
         }
         seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
@@ -556,11 +487,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 +505,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 +520,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 +558,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 +592,9 @@ 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 //表头-加工费人民币
+             f= Number(this.$refs.unitTabs.sumInfo.excludingTaxProcessing)/Number(this.detailsPlanNum.exchangeRate)
+             this.detailsPlanNum.usdProcesscost =e!==0? e.toFixed(2):f.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,25 +602,34 @@ 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)
-               oneData.syCostAllocationIngredientList.map(item=>{
+              this.detailsPlanNum.fabriccostNotincludestax = (Number(this.detailsPlanNum.fabriccostIncludestax)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//表头-面料不含税成本(¥)
+              this.$refs.unitTabs.sumInfo.fabricAmount=this.detailsPlanNum.fabriccostIncludestax
+               this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
+                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)//合计金额
+              oneData.syCostAllocationIngredientList.map(item=>{
                 this.$refs.unitTabs.fList.map(event=>{
                   if(item.goodsName==event.goodsName){
                     item.transferCost = event.transferCost
@@ -772,73 +691,44 @@ 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)//面料成本($)
       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)//美元费用支出
       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//运费税额
-      this.detailsPlanNum.fabriccostIncludestax=( this.detailsPlanNum.fabriccostIncludestax==''|| !this.detailsPlanNum.fabriccostIncludestax)?0:Number( this.detailsPlanNum.fabriccostIncludestax).toFixed(2)//面料含税成本 
       this.color1 = Number(this.detailsPlanNum.rmbExportamount)-Number(this.detailsPlanNum.fabriccostNotincludestax)-Number(this.detailsPlanNum.excipiencostNotincludestax)-Number(this.detailsPlanNum.rmbProcesscost)-Number(this.detailsPlanNum.rmbExpense)
       this.color2 = this.color1/Number(this.detailsPlanNum.usdTotalexportprice)
       this.color2 = this.color2>0?this.color2:-this.color2
-
-      // if(this.detailsPlanNum.pkOrg=='103'){
-      //   this.detailsPlanNum.rmbProcesscost = (Number(this.detailsPlanNum.rmbProcesscost)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)
-      // }else{
-      //   this.detailsPlanNum.rmbProcesscost=( this.detailsPlanNum.rmbProcesscost==''|| !this.detailsPlanNum.rmbProcesscost)?'':Number( this.detailsPlanNum.rmbProcesscost).toFixed(2)//加工费(人民币)
-      // }
     },
 
     //计算出运明细合计行
     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)
@@ -894,13 +783,19 @@ export default {
     //事故单合计行
     addAccident(val){
      var amountAll=0,
-     amountrmbAll=0
+     amountrmbAll=0,
+     pkorgAmountAll = 0,
+     pkorgAmountrmbAll = 0
      val.map(item=>{
       if(item.accidentUndertaker!=='合计'){
         amountAll+=Number(item.amount) 
         amountrmbAll+=Number(item.amountrmb)  
+        pkorgAmountAll+=item.pkorgAmount?Number(item.pkorgAmount):0
+        pkorgAmountrmbAll+=item.pkorgAmountrmb?Number(item.pkorgAmountrmb):0
       }
      })
+     this.detailsPlanNum.pkorgAmount = pkorgAmountAll
+     this.detailsPlanNum.pkorgAmountrmb = pkorgAmountrmbAll
      var allObj={
       accidentUndertaker:'合计',
       amount:amountAll,
@@ -937,7 +832,23 @@ export default {
       this.detailsPlanNum.shuiemoney = shuiemoneyAll.toFixed(3)
       this.detailsPlanNum.rmbNorTaxExpense = obj.disbursedLocalmoney.toFixed(2)
       this.detailsPlanNum.rmbExpense = obj.iNatMoney.toFixed(2)
+      this.detailsPlanNum.usdExpense = (this.detailsPlanNum.rmbExpense/Number(this.detailsPlanNum.exchangeRate)).toFixed(2)
     },
+     // 附件
+     openEnclosure(){
+      this.$refs.attachmentDisplay.AttachmentModVis = true
+      var attachList = [];
+      if (this.detailsPlanNum != null && this.detailsPlanNum.accessorItemList != null){
+        this.detailsPlanNum.accessorItemList.forEach(e=>{
+          var attach = {};
+          attach.name = e.filename;
+          attach.src=e.fileurl;
+          attachList.push(attach);
+        });
+      }
+      this.$refs.attachmentDisplay.attachmentData =  attachList;
+    },
+    //打印
     daYin(){
          this.showSelect = 1
          this.$nextTick(() => {
@@ -967,8 +878,17 @@ export default {
          + '</style>';
          win.document.write(style+html);
          win.focus();
-         win.print();
-         win.close();
+         setTimeout(function(){
+          let textArea = win.document.getElementsByTagName('textarea')
+          for (let i = 0; i < textArea.length; i++) {
+             textArea[i].style.height = 'auto' // 先设置成auto,再设置高度,删除文字的时候高度才会改变
+             textArea[i].style.height = textArea[i].scrollHeight+100 + 'px'
+          }
+            win.print();
+            win.close();
+         },500)
+        //  win.print();
+        //  win.close();
 		     this.showSelect = 0
         })
         
@@ -996,22 +916,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 +936,6 @@ export default {
             this.$message.error(res.message);
           }
         })
-      // } else {
-      //   this.$message.error('备注不能为空')
-      // }
     },
 
     //  主表:人民币费用支出  弹框
@@ -1069,15 +976,13 @@ 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):'' //合计中的面料总额
+      this.$refs.unitTabs.sumInfo.fabricAmount=this.detailsPlanNum.fabriccostIncludestax
+      this.$refs.unitTabs.sumInfo.fabricExcludTax =(this.detailsPlanNum.fabriccostNotincludestax!==''&&this.detailsPlanNum.fabriccostNotincludestax)?(Number(this.detailsPlanNum.fabriccostNotincludestax)).toFixed(2):''//合计中的不含税面料总额
+      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)//合计金额
      
     },
 

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

@@ -95,7 +95,7 @@
         </div>
 
         <!-- tabs 合计 信息 -->
-        <div style="marginTop:30px;">
+        <div style="marginTop:30px;" class="noprint">
           <h6 class="table-title">合计信息</h6>
           <div style="border: 1px solid #e8e8e8;padding: 20px 20px 0 20px;">
             <a-row :gutter="24">
@@ -180,7 +180,7 @@
       <fabInQua-modal ref="fabInQuaModal" :father="aa"  :planNum="this.planNum"  @close="closeFabInQua"></fabInQua-modal>
 
       <!-- 余下数量 -->
-      <fabRemQua-modal ref="fabRemQuaModal" :father="bb" :planNum="this.planNum" ></fabRemQua-modal>
+      <fabRemQua-modal ref="fabRemQuaModal" :father="bb" :planNum="this.planNum" @close="closeFabRemQuaModal"></fabRemQua-modal>
 
       <!-- 辅料 转入数量 -->
       <ingInQua-modal ref="ingInQuaModal" :father="cc" :planNum="this.planNum" @close="closeIngInQua"></ingInQua-modal>
@@ -717,7 +717,8 @@ export default {
       }
     },
     closeFabInQua(data,record){
-      var all = 0
+      var all = 0,
+      allYu = 0
       this.fabData.map(item=>{
         if(item.goodsName == record.goodsName){
           item.transferCost = data
@@ -725,8 +726,28 @@ export default {
         if(item.transferCost&&item.transferCost!==''){
             all+=Number(item.transferCost)
         }
-        this.$emit('FabInQua',all)
+        if(item.remainingQuantitycost&&item.remainingQuantitycost!==''){
+          allYu+=Number(item.remainingQuantitycost)
+        }
+      })
+      this.$emit('FabInQua',all,allYu)
+      this.$forceUpdate()
+    },
+    closeFabRemQuaModal(data,record){
+      var all = 0,
+      allYu = 0
+      this.fabData.map(item=>{
+        if(item.goodsName == record.goodsName){
+          item.remainingQuantitycost = data
+        }
+        if(item.transferCost&&item.transferCost!==''){
+            all+=Number(item.transferCost)
+        }
+        if(item.remainingQuantitycost&&item.remainingQuantitycost!==''){
+          allYu+=Number(item.remainingQuantitycost)
+        }
       })
+      this.$emit('FabInQua',all,allYu)
       this.$forceUpdate()
     },
     closeIngInQua(data,record){
@@ -743,7 +764,15 @@ export default {
           click: event => {
             console.log('面料 - 余下数量')
             this.$refs.fabRemQuaModal.fabRemQuaModVis = true
+            this.$refs.fabRemQuaModal.recordF = record
             this.$refs.fabRemQuaModal.data = record.syRemaining
+            if(this.mList.length!==0){
+              this.mList.map(item=>{
+                if(item.goodsName == record.goodsName && item.syRemaining.length!==0){
+                  this.$refs.fabRemQuaModal.data = item.syRemaining
+                }
+              })
+            }
           }
         }
       }

+ 1 - 1
src/views/shipment-details/declareElementsModal.vue

@@ -81,7 +81,7 @@
              </a-col>
 
              <a-col :md="6" :sm="8">
-                <a-form-model-item label="报关单位" prop="declarationUnit" >
+                <a-form-model-item label="报关单位" prop="declarationUnit" :rules="[{ required: true, message: '请选择报关单位!' }]">
                   <j-search-select-tag
                   placeholder=""
                   v-model="declareElements.declarationUnit"

+ 147 - 0
src/views/shipment-details/dropp.vue

@@ -0,0 +1,147 @@
+<template>
+    <div id="declareElementsModal">
+        <a href="javascript:void(0);" @click="changeBao" style="color:green"  v-if="authority">报关要素</a>
+           <a href ="javascript:return false;"  style="opacity: 0.2"  v-if="!authority">报关要素</a>
+           <a-divider type="vertical" />
+          <a href="javascript:void(0);" @click="changeWei" style="color:green">维护款号成分</a>
+          
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
+            <!-- 已保存 -->
+            <a-menu slot="overlay" v-if="this.row.submitStatus == '0'">
+              <a-menu-item>
+                <a @click="details()">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a @click="edit()">编辑</a>
+              </a-menu-item>
+              <a-menu-item>
+                <a-popconfirm  arrowPointAtCenter title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete()">
+                  <a href="javascript:void(0);" style="color:red;">删除</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+            <!-- 已提交 且 推送成功   -->
+            <a-menu slot="overlay" v-if="this.row.pushState == '1' && this.roe.submitStatus == '1'">
+              <a-menu-item>
+                <a @click="details()">详情</a>
+              </a-menu-item>
+            </a-menu>
+
+            <!-- 已提交 且 推送失败  -->
+            <a-menu slot="overlay" v-if="this.row.pushState == '2' && this.row.submitStatus == '1'">
+              <a-menu-item>
+                <a @click="details()">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定重新推送吗?" ok-text="是" cancel-text="否" @confirm="rePush()">
+                  <a href="javascript:void(0);" style="color:green;">重新推送</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+
+            <!-- 已提交 -->
+            <a-menu slot="overlay" v-if="this.row.submitStatus == '1'">
+              <a-menu-item>
+                <a @click="details()">详情</a>
+              </a-menu-item>
+
+              <!-- <a-menu-item>
+                <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
+                  <a href="javascript:void(0);" style="color:red;">取消提交</a>
+                </a-popconfirm>
+              </a-menu-item> -->
+
+              <a-menu-item>
+                <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push()">
+                  <a href="javascript:void(0);" style="color:green;">推送</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+
+            <!-- 未推送 -->
+            <a-menu slot="overlay" v-if="this.row.pushState == '0'">
+              <a-menu-item>
+                <a @click="details()">详情</a>
+              </a-menu-item>
+
+              <a-menu-item>
+                <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push()">
+                  <a href="javascript:void(0);" style="color:green;">推送</a>
+                </a-popconfirm>
+              </a-menu-item>
+            </a-menu>
+            </a-dropdown>
+    </div>
+  </template>
+  
+  <script>
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import JEllipsis from '@/components/jeecg/JEllipsis'
+  import moment from 'moment'
+  import { USER_AUTH } from "@/store/mutation-types"
+  export default {
+    name: 'Drapp', // 报关要素
+    mixins: [JeecgListMixin],
+    components: { JEllipsis, moment },
+  
+    data() {
+      let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
+  
+      return {
+        authority:true
+      }
+    },
+    // 接收父组件 方法
+    props: {
+            row: Object,
+            column: Object,
+            rowIndex: Number,
+        },
+  
+    created() {  
+        let allAuthes = JSON.parse(sessionStorage.getItem(USER_AUTH));
+           var quanXian = []
+           allAuthes.map(item=>{ quanXian.push(item.action)})
+           if(quanXian.indexOf('cymx:sbys')==-1 && this.queryParam.flourOrGarment=='0'){
+            this.authority = true
+           }else if(quanXian.indexOf('cymx:sbys')==-1 && this.queryParam.flourOrGarment=='1'){
+            this.authority = false
+           }
+    },
+    methods: {
+        changeBao(){
+         this.$emit('triggerT')
+         },
+         changeWei(){
+            this.$emit('triggerW')
+         },
+         details(){
+            this.$emit('details')
+         },
+         edit(){
+            this.$emit('edit')
+         },
+         handleDelete(){
+            this.$emit('handleDelete')
+         },
+         rePush(){
+            this.$emit('rePush')
+         },
+         push(){
+            this.$emit('push')
+         }
+    },
+  
+    computed: {}
+  }
+  </script>
+  <style lang="less" scoped>
+  @import '~@assets/less/common.less';
+  @import '~@assets/less/overwriter.less';
+
+  </style>
+  

+ 169 - 133
src/views/shipment-details/shipmentList.vue

@@ -182,125 +182,11 @@
         <a-button type="primary" icon="close" @click="cancelSubmit">批量取消提交</a-button>
         <a-button type="primary" icon="close" @click="batchDelete">批量删除</a-button>
       </div>
-
-      <!-- 子表  :row-key="record => record.id"  :pagination="ipagination-->
-      <a-table
-        v-if="shipmentListData"
-        bordered
-        ref="TableInfo"
-        rowKey="itemIds"
-        :columns="shipmentListColumns"
-        :data-source="shipmentListData"
-        :loading="loading"
-        :pagination="false"
-        :scroll="{ x: 1500 , y: 600}"
-        :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
-        @change="handleTableChange"
-      >
-        <!-- 推送状态 -->
-        <span slot="pushState" slot-scope="text, record">
-          <a-tag color="#2db7f5" v-if="record.pushState == '0'">未推送</a-tag>
-          <a-tag color="#87d068" v-if="record.pushState == '1'">推送成功</a-tag>
-          <a-tag color="#f50" v-if="record.pushState == '2'">推送失败</a-tag>
-        </span>
-
-        <!-- 单据状态 -->
-        <span slot="state" slot-scope="text, record">
-          <a-tag color="orange" v-if="record.submitStatus == '0'">已保存</a-tag>
-          <a-tag color="green" v-if="record.submitStatus == '1'">已提交</a-tag>
-        </span>
-
-        <!-- 操作 默认按钮  未提交未推送-->
-        <span slot="operationSlot" slot-scope="text, record">
-           <a href="javascript:void(0);" @click="declareElements(record)" style="color:green"  v-if="authority">报关要素</a>
-           <a href ="javascript:return false;"  style="opacity: 0.2"  v-if="!authority">报关要素</a>
-           <a-divider type="vertical" />
-          <a href="javascript:void(0);" @click="itemNumberElement(record)" style="color:green">维护款号成分</a>
-          
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多<a-icon type="down"/></a>
-            <!-- 已保存 -->
-            <a-menu slot="overlay" v-if="record.submitStatus == '0'">
-              <a-menu-item>
-                <a @click="details(record)">详情</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a @click="edit(record)">编辑</a>
-              </a-menu-item>
-
-              <!-- <a-menu-item>
-                <a-popconfirm title="确定提交吗?" ok-text="是" cancel-text="否" @confirm="submit(record)">
-                  <a href="javascript:void(0);" style="color:green;">提交</a>
-                </a-popconfirm>
-              </a-menu-item> -->
-
-              <a-menu-item>
-                <a-popconfirm  arrowPointAtCenter title="确定删除吗?" ok-text="是" cancel-text="否" @confirm="handleDelete(record)">
-                  <a href="javascript:void(0);" style="color:red;">删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-
-              <!-- <a-menu-item>
-                <a href="javascript:void(0);" @click="itemNumberElement(record)">维护款号成分</a>
-              </a-menu-item> -->
-            </a-menu>
-
-            <!-- 已提交 且 推送成功   -->
-            <a-menu slot="overlay" v-if="record.pushState == '1' && record.submitStatus == '1'">
-              <a-menu-item>
-                <a @click="details(record)">详情</a>
-              </a-menu-item>
-            </a-menu>
-
-            <!-- 已提交 且 推送失败  -->
-            <a-menu slot="overlay" v-if="record.pushState == '2' && record.submitStatus == '1'">
-              <a-menu-item>
-                <a @click="details(record)">详情</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a-popconfirm title="确定重新推送吗?" ok-text="是" cancel-text="否" @confirm="rePush(record)">
-                  <a href="javascript:void(0);" style="color:green;">重新推送</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-
-            <!-- 已提交 -->
-            <a-menu slot="overlay" v-if="record.submitStatus == '1'">
-              <a-menu-item>
-                <a @click="details(record)">详情</a>
-              </a-menu-item>
-
-              <!-- <a-menu-item>
-                <a-popconfirm title="确定取消提交吗?" ok-text="是" cancel-text="否" @confirm="cancelSubmit(record)">
-                  <a href="javascript:void(0);" style="color:red;">取消提交</a>
-                </a-popconfirm>
-              </a-menu-item> -->
-
-              <a-menu-item>
-                <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
-                  <a href="javascript:void(0);" style="color:green;">推送</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-
-            <!-- 未推送 -->
-            <a-menu slot="overlay" v-if="record.pushState == '0'">
-              <a-menu-item>
-                <a @click="details(record)">详情</a>
-              </a-menu-item>
-
-              <a-menu-item>
-                <a-popconfirm title="确定推送吗?" ok-text="是" cancel-text="否" @confirm="push(record)">
-                  <a href="javascript:void(0);" style="color:green;">推送</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span>
-      </a-table>
+      
+      <!-- 测试 -->
+      <ve-table :columns="columns" :virtual-scroll-option="virtualScrollOption"  :max-height="600" :table-data="shipmentListData" style="width:100%" :border-y="true" :sort-option="sortOption" :scroll-width="1500"  row-key-field-name="itemIds"   :checkbox-option="checkboxOption">
+      </ve-table>
+      <div v-show="showEmpty" class="empty-data">暂无数据</div>
       <span style="margin-right: 55%;">共勾选{{selectedNumber}}条数</span>
       <span >总数量:{{ allMoney }}</span>
     </a-card>
@@ -335,6 +221,7 @@ import addShipDetDrawer from '@views/shipment-details/addShipDetDrawer.vue'
 import detailsShipDetDrawer from '@views/shipment-details/detailsShipDetDrawer.vue'
 import editShipDetDrawer from '@views/shipment-details/editShipDetDrawer.vue'
 import declareElementsModal from '@views/shipment-details/declareElementsModal.vue'
+import Drapp from './dropp.vue'
 import ReferOrderDataModal from '@views/shipment-details/referOrderDataModal.vue'
 import itemNumEleModal from '@views/shipment-details/itemNumEleModal.vue'
 import { randomUUID } from '@/utils/util'
@@ -353,7 +240,6 @@ import {
   listExportXls,
   deleteBatch
 } from '@api/document/shipmentList'
-
 export default {
   name: 'ShipmentList', // 发运明细列表
   mixins: [JeecgListMixin],
@@ -368,7 +254,8 @@ export default {
     cancelSubmitShipment,
     pushShipment,
     rePushShipment,
-    itemNumEleModal
+    itemNumEleModal,
+    Drapp,
   },
 
   data() {
@@ -384,6 +271,45 @@ export default {
       nextMonthStartDate:'',//下月1号
       nextMonthEndDate:'',//下月最后一天
       allList:'0',
+      virtualScrollOption: {
+        // 是否开启
+         enable: false,
+      },
+      checkboxOption: {
+                     selectedRowKeys: [],
+                    // 行选择改变事件
+                    selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
+                      this.checkboxOption.selectedRowKeys = selectedRowKeys
+                      this.selectedRowKeys = selectedRowKeys;
+                      var rows=[]
+                      this.shipmentListData.map(item=>{
+                        this.selectedRowKeys.map(event=>{
+                          if(item.itemIds == event) {rows.push(item)}
+                        })
+                        
+                      })
+                        this.selectedRows= rows
+                       this.selectedNumber =this.selectedRowKeys.length
+                    },
+                    // 全选改变事件
+                    selectedAllChange: ({ isSelected, selectedRowKeys }) => {
+                      this.checkboxOption.selectedRowKeys = []
+                      this.checkboxOption.selectedRowKeys = selectedRowKeys
+                      this.selectedRowKeys = selectedRowKeys;
+                      if(isSelected){
+                        this.selectedRows = []
+                        this.selectedRows = this.shipmentListData
+                      }else{
+                      this.selectedRows = []
+                      }
+                      this.selectedNumber =this.selectedRowKeys.length
+                    },
+                },
+                sortOption: {
+                    sortChange: (params) => {
+                        this.sortChange(params);
+                    },
+                },
       shipmentListColumns: [
         {
           title: '账套',
@@ -646,11 +572,88 @@ export default {
       preDeliveryDate:[],//预发货日期
       returnId:'',//新增后返回的id筛选条件
       returnFlourOrGarment:'',//新增后返回类型条件
+      showEmpty:true,
       pagination: {
         // total: '',
         // current: 0,
         // pageSize: 0
       },
+
+      columns: [
+          {field: "",key: "ju",type: "checkbox",title: "",width: 50, align: "center",ellipsis: {showTitle: true,},},
+          { field: "account", key: "a", title: "账套", align: "center", width: 85,sortBy: "",ellipsis: {showTitle: true,},},
+          { field: "orderNumber", key: "b", title: "销售订单号", align: "center",width: 180,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "itemNumber", key: "c", title: "款号", align: "center",width: 130,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "salesman", key: "d", title: "业务员", align: "center", width: 100,sortBy: "", ellipsis: {showTitle: true,},},
+          { field: "distributionPoint", key: "e", title: "分销点", align: "center", width: 110,sortBy: "", ellipsis: {showTitle: true,},},
+          { field: "smallPo", key: "f", title: "小po", align: "center", width: 110,sortBy: "", ellipsis: {showTitle: true,},},
+          { field: "inventoryName", key: "g", title: "存货名称", align: "center", width: 220,sortBy: "", ellipsis: {showTitle: true,},},
+          { field: "declarationName", key: "h", title: "报关品名", align: "center", width: 175,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "isTc", key: "i", title: "是否TC", align: "center", width: 110,sortBy: "", ellipsis: {showTitle: true,}, renderBodyCell: ({ row, column, rowIndex }, h) => {
+                            const text = row[column.field];
+                            if(text=='0'){
+                              return (
+                                <span>否</span>
+                              ) 
+                            }else{
+                              return (
+                                <span>是</span>
+                              );
+                            }
+                            
+                        },},
+          { field: "preDeliveryDate", key: "j", title: "预发货日期", align: "center", width: 120,sortBy: "", ellipsis: {showTitle: true,}, },
+          { field: "shipmentQuantity", key: "k", title: "数量", align: "center", width: 80,sortBy: "", ellipsis: {showTitle: true,},},
+          { field: "customsDeclarationUnitPrice", key: "m", title: "报关单价", align: "center", width: 100,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "garmentFactory", key: "l", title: "成衣工厂", align: "center", width: 100,sortBy: "" ,ellipsis: {showTitle: true,},},
+          { field: "hsCode", key: "n", title: "HScode", align: "center", width: 120,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "englishProductName", key: "o", title: "英文品名", align: "center", width: 110,sortBy: "",ellipsis: {showTitle: true,},  },
+          { field: "materialComposition", key: "p", title: "物料成分", align: "center", width: 180,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "purOrSubOrder", key: "q", title: "采购/委外订单号", align: "center", width: 180,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "numberOfSets", key: "r", title: "套装件数", align: "center", width: 100,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "packId", key: "s", title: "pack id", align: "center", width: 110,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "customerAbbreviation", key: "t", title: "客户简称", align: "center", width: 100,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "salesDepartment", key: "u", title: "部门", align: "center", width: 100,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "documentNo", key: "v", title: "单据号", align: "center", width: 140,sortBy: "",ellipsis: {showTitle: true,}, },
+          { field: "submitStatus", key: "w", title: "单据状态",fixed: "right", align: "center", width: 110,sortBy: "" ,ellipsis: {showTitle: true,}, renderBodyCell: ({ row, column, rowIndex }, h) => {
+                            const text = row[column.field];
+                            if(text=='0'){
+                              return (
+                                <a-tag color="orange" >已保存</a-tag>
+                              ) 
+                            }else{
+                              return (
+                                <a-tag color="green">已提交</a-tag>
+                              );
+                            }
+                        }},
+          { field: "operation", key: "x",fixed: "right" , title: "操作", align: "center", width: 250, renderBodyCell: ({ row, column, rowIndex }, h) => {
+                            return <Drapp  row={row}  column={column} rowIndex={rowIndex} on-details={() => this.details(row)} on-push={() => this.push(row)} on-rePush={() => this.rePush(row)}  on-edit={() => this.edit(row)} on-handleDelete={() => this.handleDelete(row)} on-triggerT={() => this.declareElements(row)}  on-triggerW={()=>this.itemNumberElement(row)}/>;
+                        }}
+        ],
+        tableData: [
+          {
+            account:'1',
+            orderNumber:'2',
+            itemNumber:'3',
+            salesman:'4',
+            itemIds:'1'
+          },
+          {
+            account:'2',
+            orderNumber:'2',
+            itemNumber:'3',
+            salesman:'4',
+            itemIds:'2'
+          },
+          {
+            account:'3',
+            orderNumber:'2',
+            itemNumber:'3',
+            salesman:'4',
+            itemIds:'3'
+          },
+        ],
       dateFormat: 'YYYY-MM-DD',
       
     }
@@ -660,11 +663,6 @@ export default {
     // this.defalutDate()
   },
   mounted(){
-  },
-   watch:{
-    selectedRowKeys(newVal){
-       this.selectedNumber =newVal.length
-    }
   },
   methods: {
     moment,
@@ -710,16 +708,14 @@ export default {
             this.authority = false
            }
            this.shipmentListData = res.result.records
+           this.showEmpty =  this.shipmentListData.length==0?true:false
+           this.virtualScrollOption.enable =  this.shipmentListData.length>500?true:false
             for (var i=0; i<this.shipmentListData.length; i++){
               this.shipmentListData.randomId = randomUUID();
             }
             
             this.selectedRowKeys = []
-            // this.pagination = {
-            //   total: res.result.total,
-            //   current: res.result.current,
-            //   pageSize: res.result.size
-            // }
+            this.checkboxOption.selectedRowKeys = []
           }else {
              this.$message.error(res.message)
              this.loading = false
@@ -764,6 +760,7 @@ export default {
           item.declarationName = data.declarationName
           item.hsCode = data.hsCode
           item.englishProductName = data.englishProductName
+          item.declarationUnit = data.declarationUnit
         }
       })
     },
@@ -802,6 +799,7 @@ export default {
             this.$refs.declareElementsModal.declareElements.hsCode  = record.hsCode
             this.$refs.declareElementsModal.flourOrGarment = this.queryParam.flourOrGarment
             this.$refs.declareElementsModal.orderNumber = record.orderNumber
+            this.$refs.declareElementsModal.declareElements.declarationUnit = record.declarationUnit
             this.$refs.declareElementsModal.record = record
             if(!res.result.hsCode  || res.result.hsCode == ''){
              this.$refs.declareElementsModal.query = '0'
@@ -1053,6 +1051,7 @@ export default {
            })
         })
             this.selectedRowKeys =[]
+            this.checkboxOption.selectedRowKeys = []
             //  this.judageAdd()
              // 渲染 发运明细列表
             this.$message.success('提交成功')
@@ -1067,8 +1066,16 @@ export default {
     cancelSubmit(record) {
       console.log('取消订单id:', record.id)
       this.$nextTick(() => {
+        var grouyIdList = []
         this.loading = true
-        cancelSubmitShipment({ submitListId: this.selectedRowKeys, type: '2' }).then(res => {
+        this.shipmentListData.map(item =>{
+          this.selectedRowKeys.map(e=>{
+            if(item.itemIds == e){
+              grouyIdList.push(item.groupId)
+            }
+          })
+        })
+        cancelSubmitShipment({ submitListId: this.selectedRowKeys, type: '2',grouyIdList:grouyIdList }).then(res => {
         this.loading = false
           if (res.success) {
             // this.shipmentListData.submitStatus = '0'
@@ -1103,12 +1110,13 @@ export default {
             }
           })
         })
-        deleteBatch({ ids: ids.toString() ,itemId:itemId.toString()}).then(res => {
+        deleteBatch({ ids: ids ,itemId:itemId}).then(res => {
         this.loading = false
           if (res.success) {
             // console.log('提交成功,单据状态改为【已提交】')
             // this.shipmentListData.submitStatus = '1'
             this.selectedRowKeys =[]
+            this.checkboxOption.selectedRowKeys = []
              this.judageAdd()
              // 渲染 发运明细列表
             this.$message.success('批量成功')
@@ -1119,6 +1127,22 @@ export default {
         })
       })
     },
+    sortChange(params) {
+                this.shipmentListData.sort((a, b) => {
+                  for (var key in params) {
+                   if(params[key]){
+                    if (params[key] === "asc") {
+                            return a[key] - b[key];
+                        } else if (params[key] === "desc") {
+                            return b[key] - a[key];
+                        } else {
+                            return 0;
+                        }
+                   }
+                  }
+                });
+            },
+
 
     //  推送
     push(record) {
@@ -1237,6 +1261,7 @@ export default {
       // this.defalutDate()
       this.selectedRows = []
       this.selectedRowKeys = []
+      this.checkboxOption.selectedRowKeys = []
       this.shipmentListData = [] // 渲染 发运明细列表
     },
 
@@ -1314,4 +1339,15 @@ padding-bottom: 0px !important;
 /deep/ .ant-table-thead > tr > th, .ant-table-tbody > tr > td{
   padding: 9px 16px
 }
+.empty-data {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        height: 200px;
+        width: 100%;
+        color: #666;
+        font-size: 16px;
+        border: 1px solid #eee;
+        border-top: 0;
+    }
 </style>

+ 12 - 2
yarn.lock

@@ -12116,6 +12116,16 @@
   "resolved" "https://registry.npmjs.org/vue-cropper/-/vue-cropper-0.5.8.tgz"
   "version" "0.5.8"
 
+"vue-easytable@^2.27.1":
+  "integrity" "sha512-Rs2cqaPYamH8zXQo/f90AyM/ROGMsB5Njb74GpooWacAKEXbHU0wXYvEjSBZ7CcS6TVqliA/ZbgVqOoA/o9bHQ=="
+  "resolved" "https://registry.npmmirror.com/vue-easytable/-/vue-easytable-2.27.1.tgz"
+  "version" "2.27.1"
+  dependencies:
+    "lodash" "^4.17.20"
+    "resize-observer-polyfill" "^1.5.1"
+    "vue" "^2.6.12"
+    "vue-template-compiler" "^2.6.11"
+
 "vue-eslint-parser@^2.0.3":
   "integrity" "sha512-ZezcU71Owm84xVF6gfurBQUGg8WQ+WZGxgDEQu1IHFBZNx7BFZg3L1yHxrCBNNwbwFtE1GuvfJKMtb6Xuwc/Bw=="
   "resolved" "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz"
@@ -12254,7 +12264,7 @@
     "hash-sum" "^1.0.2"
     "loader-utils" "^1.0.2"
 
-"vue-template-compiler@^2.4.4", "vue-template-compiler@^2.6.10":
+"vue-template-compiler@^2.4.4", "vue-template-compiler@^2.6.10", "vue-template-compiler@^2.6.11":
   "integrity" "sha512-jYM6TClwDS9YqP48gYrtAtaOhRKkbYmbzE+Q51gX5YDr777n7tNI/IZk4QV4l/PjQPNh/FVa/E92sh/RqKMrog=="
   "resolved" "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.13.tgz"
   "version" "2.7.13"
@@ -12267,7 +12277,7 @@
   "resolved" "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz"
   "version" "1.9.1"
 
-"vue@^2.4.4", "vue@^2.5.17", "vue@^2.5.3", "vue@^2.6.10":
+"vue@^2.4.4", "vue@^2.5.17", "vue@^2.5.3", "vue@^2.6.10", "vue@^2.6.12":
   "integrity" "sha512-QnM6ULTNnPmn71eUO+4hdjfBIA3H0GLsBnchnI/kS678tjI45GOUZhXd0oP/gX9isikXz1PAzSnkPspp9EUNfQ=="
   "resolved" "https://registry.npmjs.org/vue/-/vue-2.7.13.tgz"
   "version" "2.7.13"