Selaa lähdekoodia

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

huxy 2 vuotta sitten
vanhempi
commit
b6ebda6cd5
35 muutettua tiedostoa jossa 1018 lisäystä ja 311 poistoa
  1. 5 1
      src/api/document/shipmentList.js
  2. 9 0
      src/api/manage.js
  3. 2 2
      src/components/tools/UserMenu.vue
  4. 9 9
      src/views/advance-packingList/adPaList-clothes.vue
  5. 43 1
      src/views/book/addBookDrawer.vue
  6. 47 6
      src/views/book/book-list.vue
  7. 4 1
      src/views/cost-allocation-total/costDetailDrawer.vue
  8. 10 0
      src/views/cost-allocation-total/fabricLossesSummary.vue
  9. 38 5
      src/views/cost-allocation-total/inancialReconciliation.vue
  10. 82 6
      src/views/cost-allocation-total/list.vue
  11. 5 5
      src/views/cost-allocation-total/modal/SelectUserModal.vue
  12. 36 4
      src/views/cost-allocation-total/modal/detailFabricLossTable.vue
  13. 55 29
      src/views/cost-allocation-total/modal/fabInQuaModal.vue
  14. 46 28
      src/views/cost-allocation-total/modal/fabRemQuaModal.vue
  15. 52 27
      src/views/cost-allocation-total/modal/ingInQuaModal.vue
  16. 39 26
      src/views/cost-allocation-total/modal/ingRemQuaModal.vue
  17. 47 5
      src/views/cost-allocation-total/modal/mainTableExpenseCNYModal.vue
  18. 47 5
      src/views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue
  19. 33 23
      src/views/cost-allocation-total/modal/pilosityFewerModal.vue
  20. 4 3
      src/views/order/manualModal.vue
  21. 1 1
      src/views/order/orderDetailDrawer.vue
  22. 8 8
      src/views/packing-list/clothes-list.vue
  23. 9 9
      src/views/packing-list/fabric-list.vue
  24. 11 1
      src/views/packing-list/packinglist-clothes/detailsClothesDrawer.vue
  25. 2 0
      src/views/pre-book/addPreBookDrawer.vue
  26. 11 8
      src/views/pre-book/preBookList.vue
  27. 145 52
      src/views/reportForms/cost-allocation-table.vue
  28. 58 12
      src/views/reportForms/cost-allocation-table/tabs.vue
  29. 1 0
      src/views/reportForms/fabric-loss-table.vue
  30. 1 0
      src/views/reportForms/pro-progress-report.vue
  31. 1 1
      src/views/reportForms/supplier-capacity.vue
  32. 1 0
      src/views/reportForms/supply-capacity-table.vue
  33. 3 0
      src/views/shipment-details/declareElementsModal.vue
  34. 3 1
      src/views/shipment-details/itemNumEleModal.vue
  35. 150 32
      src/views/shipment-details/shipmentList.vue

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

@@ -59,6 +59,9 @@ const listExportXls = params => getAction('/shippingDetails/syShippingDetails/ex
 // 编辑删除
 const deleteEdit = params => postAction('/shippingDetails/syShippingDetails/singleRowdelect', params)
 
+
+//  批量删除
+const deleteBatch = params => deleteAction('/shippingDetails/syShippingDetails/deleteBatch', params)
 //报关要素查询按钮
 const queryLatelyDeclarationElements = params => getAction('/shippingDetails/syShippingDetails/queryLatelyDeclarationElements',params)
 
@@ -81,5 +84,6 @@ export {
   exportXls,
   deleteEdit,
   queryLatelyDeclarationElements,
-  listExportXls
+  listExportXls,
+  deleteBatch
 }

+ 9 - 0
src/api/manage.js

@@ -129,6 +129,15 @@ export function downFile(url,parameter){
   })
 }
 
+export function downFile1(url,parameter){
+  return axios({
+    url: url,
+    data: parameter,
+    method:'post' ,
+    responseType: 'blob'
+  })
+}
+
 /**
  * 下载文件
  * @param url 文件路径

+ 2 - 2
src/components/tools/UserMenu.vue

@@ -26,11 +26,11 @@
     <!-- update-end author:sunjianlei date:20200219 for: 菜单搜索改为动态组件,在手机端呈现出弹出框 -->
     <!-- update-end author:sunjianlei date:20191220 for: 解决全局样式冲突的问题 -->
     <!-- update_end  author:zhaoxin date:20191129 for: 做头部菜单栏导航 -->
-    <span class="action">
+    <!-- <span class="action">
       <a class="logout_title" target="_blank" href="http://doc.jeecg.com">
         <a-icon type="question-circle-o"></a-icon>
       </a>
-    </span>
+    </span> -->
     <header-notice class="action"/>
     <a-dropdown>
       <span class="action action-full ant-dropdown-link user-dropdown-menu">

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

@@ -385,7 +385,7 @@ export default {
         {
           title: '小po',
           dataIndex: 'smallPo',
-          width: 90,
+          width: 110,
           ellipsis: true,
           className: 'replacecolor'
         },
@@ -512,14 +512,14 @@ export default {
           className: 'replacecolor',
           
         },
-        {
-          title: '推送状态',
-          dataIndex: 'pushStatus',
-          width: 100,
-          scopedSlots: { customRender: 'pushStatesSlot' },
-          fixed: 'right',
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '推送状态',
+        //   dataIndex: 'pushStatus',
+        //   width: 100,
+        //   scopedSlots: { customRender: 'pushStatesSlot' },
+        //   fixed: 'right',
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '单据状态',

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

@@ -698,6 +698,7 @@ export default {
       allNet:0,
       allMoney:0,
       allBox:0,
+      allow:'yes',
       itemIds:[],//参照面料选中的ID集合
       validatorRules: {
           shippingOrderDate:[{required: true, message: '托书日期不能为空!'}],
@@ -1004,6 +1005,44 @@ export default {
                   // }
             }
             this.confirmLoading = true
+            this.allow = 'yes'
+           if(newObj.rmbList.length!==0){
+            newObj.rmbList.every(item=>{
+                if((item.freightForwarder!==''&&item.freightForwarder)&&((item.amount==''||!item.amount)||(item.itemColumn==''||!item.itemColumn))){
+                  this.$message.error('货代,金额,项目列均为必填');
+                  this.allow = 'no'
+                  return false
+                }else if((item.amount!==''&&item.amount)&&((item.freightForwarder==''||!item.freightForwarder)||(item.itemColumn==''||!item.itemColumn))){
+                  this.$message.error('货代,金额,项目列均为必填');
+                  this.allow = 'no'
+                  return false
+                }else if((item.itemColumn!==''&&item.itemColumn)&&((item.freightForwarder==''||!item.freightForwarder)||(item.amount==''||!item.amount))){
+                  this.$message.error('货代,金额,项目列均为必填');
+                  this.allow = 'no'
+                  return false
+                }
+                return true
+              })
+          }
+          if(newObj.usdList.length!==0){
+            newObj.usdList.every(item=>{
+              if((item.freightForwarder!==''&&item.freightForwarder)&&((item.amount==''||!item.amount)||(item.itemColumn==''||!item.itemColumn))){
+                  this.$message.error('货代,金额,项目列均为必填');
+                  this.allow = 'no'
+                  return false
+                }else if((item.amount!==''&&item.amount)&&((item.freightForwarder==''||!item.freightForwarder)||(item.itemColumn==''||!item.itemColumn))){
+                  this.$message.error('货代,金额,项目列均为必填');
+                  this.allow = 'no'
+                  return false
+                }else if((item.itemColumn!==''&&item.itemColumn)&&((item.freightForwarder==''||!item.freightForwarder)||(item.amount==''||!item.amount))){
+                  this.$message.error('货代,金额,项目列均为必填');
+                  this.allow = 'no'
+                  return false
+                }
+                return true
+              })
+          }
+        if(this.allow=='yes'){
           if(this.defaultMethod === 'add'){
            addPackingList(newObj).then(res => {
             this.confirmLoading = false
@@ -1033,8 +1072,11 @@ export default {
             }
            })
         }
+      }else{
+        this.confirmLoading = false
+      }
         
-        }
+      }
       })
       // this.getShipmentList() // 刷新托书列表
     },

+ 47 - 6
src/views/book/book-list.vue

@@ -61,7 +61,14 @@
 
               <a-col :md="5" :sm="8">
               <a-form-item label="单据日期" has-feedback>
-                <a-date-picker style="width: 100%" v-model="queryParam.shippingOrderDate" @change="orderDataChange" > </a-date-picker>
+                <a-range-picker
+                  :placeholder="['开始时间', '结束时间']"
+                  format="YYYY-MM-DD"
+                  style="width: 100%"
+                  v-model="shippingOrderDate"
+                  @change="orderDataChange"
+                />
+                <!-- <a-date-picker style="width: 100%" v-model="queryParam.shippingOrderDate" @change="orderDataChange" > </a-date-picker> -->
               </a-form-item>
             </a-col>
             
@@ -70,6 +77,19 @@
                   <a-input placeholder="请输入外销发票" v-model="queryParam.exportInvoiceNo"></a-input>
                 </a-form-item>
               </a-col>
+              <a-col :md="5" :sm="8">
+                <a-form-model-item label="发票推送状态">
+                  <a-select v-model="queryParam.timeStuta">
+                    <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-option value="5">推送中</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
                
             </template>
             <a-col :md="4" :sm="8">
@@ -151,7 +171,7 @@
               <!-- <a-menu-item><a @click="submit(record)">提交</a></a-menu-item> -->
               <a-menu-item><a @click="edit(record,'2')">详情</a></a-menu-item>
               <a-menu-item><a @click="edit(record,'1')">编辑</a></a-menu-item>
-               <a-menu-item v-if="record.readyFabric=='辅料'"><a @click="copyForm(record)">复制</a></a-menu-item>
+               <a-menu-item v-if="record.readyFabric=='辅料'||record.readyFabric=='面料'"><a @click="copyForm(record)">复制</a></a-menu-item>
               <!-- <a-menu-item ><a @click="pushU8(record)">推送u8</a></a-menu-item> -->
               <!-- <a-menu-item><a @click="print(record)">打印</a></a-menu-item> -->
               <a-menu-item>
@@ -163,7 +183,7 @@
              <a-menu slot="overlay" v-if="record.theDocumentsState == '1'">
               <!-- <a-menu-item><a @click="canaleSubmit(record)">取消提交</a></a-menu-item> -->
               <a-menu-item><a @click="edit(record,'2')">详情</a></a-menu-item>
-              <a-menu-item v-if="record.readyFabric=='辅料'"><a @click="copyForm(record)">复制</a></a-menu-item>
+              <a-menu-item v-if="record.readyFabric=='辅料'||record.readyFabric=='面料'"><a @click="copyForm(record)">复制</a></a-menu-item>
               <a-menu-item ><a @click="pushU8(record)" >推送u8</a></a-menu-item>
               <a-menu-item ><a @click="pushPackLst(record)" >推送装箱单发票</a></a-menu-item>
             </a-menu>
@@ -312,6 +332,7 @@ export default {
         }
       ],
       bookListData: [],
+      shippingOrderDate:[], //单据日期区间
       id: '',
       selectedRowKeys:[],//选中行id
       loading: false, // 表格加载
@@ -330,6 +351,7 @@ export default {
   },
 
   created() {
+    this.getDefaultTime()
     this.getBookList( )
   },
   watch:{
@@ -360,6 +382,20 @@ export default {
         })
       })
     },
+    getDefaultTime(){
+    var  date = new Date();
+    date.setDate(0);
+    var y = date.getFullYear(); //获取年份
+    var m = date.getMonth() + 1; //获取月份
+    m = m < 10 ? "0" + m : m; //月份补 0
+    var lastM = [y, m, '01'].join("-")
+    console.log([y, m, '01'].join("-"))
+    this.shippingOrderDate[0]= lastM
+    this.shippingOrderDate[1]= moment(new Date()).format('YYYY-MM-DD')
+    this.queryParam.shippingOrderDateB =  (lastM!==''&&lastM)?(moment( lastM).format('YYYY-MM-DD')):''
+    this.queryParam.shippingOrderDateE =  moment(new Date()).format('YYYY-MM-DD')
+    // return [y, m, '01'].join("-");
+    },
     // 查询按钮
     searchQuery() {
       this.toggleSearchStatus = false
@@ -373,10 +409,13 @@ export default {
     },
     // 重置
     searchReset() {
+      this.shippingOrderDate=[]
       this.queryParam = {
         pageNo:'',
-        pageSize:this.pagination.pageSize
+        pageSize:this.pagination.pageSize,
+        type:'成衣'
       }
+      this.getDefaultTime()
       this.getBookList()
       // this.getpreBookList()
     },
@@ -575,6 +614,7 @@ export default {
                  data.latestDateOfShipment = (moment(data.latestDateOfShipment)).format('YYYY-MM-DD')
               }
               this.$refs.addBookDrawer.addBook = data
+              this.$refs.addBookDrawer.addBook.id = ''
           }
         })
     },
@@ -598,8 +638,9 @@ export default {
       })
     },
     // 单据日期发生改变时
-    orderDataChange(){
-       this.queryParam.shippingOrderDate = (moment( this.queryParam.shippingOrderDate)).format('YYYY-MM-DD')
+    orderDataChange(data){
+       this.queryParam.shippingOrderDateB = (data.length==2&&data)?(moment( data[0]).format('YYYY-MM-DD')):''
+       this.queryParam.shippingOrderDateE = (data.length==2&&data)?(moment( data[1]).format('YYYY-MM-DD')):''
     },
 
     // // 分页、排序、筛选变化时触发

+ 4 - 1
src/views/cost-allocation-total/costDetailDrawer.vue

@@ -983,7 +983,10 @@ export default {
       this.detailModVis = false
       this.AssignedPerson='no',
       this.AssignedPersonQx='no',
-      this.authority='no'
+      this.authority='no',
+      this.detailsPlanNum= {
+        planNum: ''
+      }
     },
     bb() {},
     cc() {}

+ 10 - 0
src/views/cost-allocation-total/fabricLossesSummary.vue

@@ -81,6 +81,15 @@
                   </a-select>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="8">
+            <a-form-item label="是否有驳回">
+                <a-select v-model="queryParam.rejectDate">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="1">是</a-select-option>
+                    <a-select-option value="0">所有</a-select-option>
+                  </a-select>
+              </a-form-item>
+            </a-col>
             
             </template>
 
@@ -276,6 +285,7 @@ export default {
   created() {
     this.apply = this.$route.query.apply;
     this.getCostList()
+    document.title = '面料损耗列表'+ ' · ' + '森语'
   },
   methods: {
    // 分页查询

+ 38 - 5
src/views/cost-allocation-total/inancialReconciliation.vue

@@ -123,7 +123,11 @@
     </a-card>
 
     <!-- table区域  -->
+    <a-spin :spinning="loading">
     <a-card :bordered="false" style=" marginTop:10px;">
+      <div class="table-operator">
+        <a-button type="primary" @click="exportList('计划单统计表')" icon="plus">导出</a-button>
+      </div>
       <a-table
         bordered
         rowKey="index"
@@ -157,6 +161,7 @@
       </a-table>
       
     </a-card>
+  </a-spin>
 
     <!-- 详情 大抽屉 -->
     <!-- <costDetail-drawer ref="costDetailDrawer" :fatherList="getCostList" @ok="modalFormOk"></costDetail-drawer> -->
@@ -167,7 +172,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
-
+import { downFile } from '@/api/manage'
 import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
 
 import { checkList,savaList,savaList1 } from '@api/document/inancialReconciliation.js'
@@ -392,14 +397,14 @@ export default {
         // index: '',
         // planNum: '',
         // customerShortame: '',
-        pageSize:100,
+        pageSize:50,
         pageNo: '' // 点击的页数
       },
       // 分页
       pagination: {
-        pageSizeOptions: ["100","150", "500"],
+        pageSizeOptions: ["50","100","150", "500"],
         showSizeChanger: true,
-        pageSize:100
+        pageSize:50
       },
       dateFormat: 'YYYY-MM-DD',
       loading: false // 表格加载
@@ -408,6 +413,7 @@ export default {
   async created() {
     await this.defaultData()
     await this.getCostList()
+    document.title = '计划单统计表'+ ' · ' + '森语'
   },
   methods: {
    // 分页查询
@@ -426,7 +432,7 @@ export default {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size,
-              pageSizeOptions: ["100","150", "500"],
+              pageSizeOptions: ["50","100","150", "500"],
               showSizeChanger: true,
             }
           }else{
@@ -507,6 +513,33 @@ export default {
         })
     },
 
+    //导出
+    exportList(fileName){
+      var params = this.queryParam
+      this.loading = true
+      downFile('/orderData/syCostLossReview/planExportXls', params).then(data => {
+        console.log('888')
+      this.loading = false
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
+    },
+
     handleTableChange(pagination, filters, sorter) {
       this.queryParam.pageNo = pagination.current
       this.queryParam.pageSize = pagination.pageSize

+ 82 - 6
src/views/cost-allocation-total/list.vue

@@ -70,7 +70,32 @@
                 <a-input placeholder="请输入" v-model="queryParam.shortseveral"></a-input>
               </a-form-item>
             </a-col>
-            
+            <a-col :md="6" :sm="8">
+            <a-form-item label="是否有驳回">
+                <a-select v-model="queryParam.rejectDate">
+                    <a-select-option value="">请选择</a-select-option>
+                    <a-select-option value="1">是</a-select-option>
+                    <a-select-option value="0">所有</a-select-option>
+                  </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+              <a-form-item label="审核人">
+                <a-input placeholder="请输入" v-model="queryParam.approvalMan"></a-input>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="8">
+            <a-form-item label="单据状态">
+                <a-select v-model="queryParam.status">
+                    <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-option value="返单">返单</a-select-option>
+                    <a-select-option value="完成">完成</a-select-option>
+                  </a-select>
+              </a-form-item>
+            </a-col>
             
             </template>
 
@@ -90,7 +115,11 @@
     </a-card>
 
     <!-- table区域  -->
+    <a-spin :spinning="loading">
     <a-card :bordered="false" style=" marginTop:10px;">
+      <div class="table-operator">
+        <a-button type="primary" @click="exportList('成本分配列表')" icon="plus">导出</a-button>
+      </div>
       <a-table
         bordered
         rowKey="id"
@@ -119,6 +148,7 @@
         </span>
       </a-table>
     </a-card>
+  </a-spin>
     <ChistoryModal ref="ChistoryModal"></ChistoryModal>
     <!-- 详情 大抽屉 -->
     <costDetail-drawer ref="costDetailDrawer"   @close="getCostList"></costDetail-drawer>
@@ -129,7 +159,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
-
+import { downFile } from '@/api/manage'
 import costDetailDrawer from '@views/cost-allocation-total/costDetailDrawer.vue'
 import ChistoryModal from '@views/cost-allocation-total/modal/ChistoryModal'
 
@@ -154,9 +184,14 @@ export default {
           className: 'replacecolor',
            ellipsis: true
         },
+        { title: '制单人', width: 120, dataIndex: 'preparedBy', ellipsis: true, className: 'replacecolor' },
+        { title: '保存日期', width: 120, dataIndex: 'createTime', ellipsis: true, className: 'replacecolor' },
+        { title: '审核人', width: 120, dataIndex: 'approvalMan', ellipsis: true, className: 'replacecolor' },
+        { title: '审核日期', width: 120, dataIndex: 'approvalDate', ellipsis: true, className: 'replacecolor' },
+        { title: '返单日期', width: 120, dataIndex: 'rejectDate', ellipsis: true, className: 'replacecolor' },
+        { title: '结束日期', width: 120, dataIndex: 'finalApproveDate', ellipsis: true, className: 'replacecolor' },
         { title: '产品款号', width: 120, dataIndex: 'poStyleNum',  ellipsis: true, className: 'replacecolor' },
         { title: '外销员', width: 120, dataIndex: 'exportSales',  ellipsis: true,className: 'replacecolor' },
-        { title: '成衣合同号', width: 140, dataIndex: 'garmentContractno', ellipsis: true, className: 'replacecolor' },
         {
           title: '部门',
           width: 120,
@@ -164,6 +199,8 @@ export default {
           ellipsis: true,
           className: 'replacecolor'
         },
+        { title: '成衣合同号', width: 140, dataIndex: 'garmentContractno', ellipsis: true, className: 'replacecolor' },
+        
         { title: '客户简称', width: 150, dataIndex: 'customerShortame', ellipsis: true, className: 'replacecolor' },
         { title: '加工单位', width: 220, dataIndex: 'processUnit', ellipsis: true, align: 'left', className: 'replacecolor' },
         {
@@ -183,9 +220,21 @@ export default {
         },
         { title: '计划数量', width: 90, dataIndex: 'planQuantity', ellipsis: true, className: 'replacecolor' },
         { title: '实际出货数量', width: 120, dataIndex: 'actualShipquantity', ellipsis: true, className: 'replacecolor' },
-        { title: '短出数', width: 120, dataIndex: 'shortseveral', ellipsis: true, className: 'replacecolor' },
-        { title: '制单人', width: 120, dataIndex: 'preparedBy', ellipsis: true, className: 'replacecolor' },
-        { title: '操作', width: 120, dataIndex: 'option', ellipsis: true, className: 'replacecolor', scopedSlots: { customRender: 'action' } },
+        { title: '短出数', width: 100, dataIndex: 'shortseveral', ellipsis: true, className: 'replacecolor' },
+        { title: '外销总价($)', width: 120, dataIndex: 'usdTotalexportprice', ellipsis: true, className: 'replacecolor' },
+        { title: '外销金额(¥)', width: 120, dataIndex: 'rmbExportamount', ellipsis: true, className: 'replacecolor' },
+        { title: '面料不含税金额(¥)', width: 160, dataIndex: 'fabriccostNotincludestax', ellipsis: true, className: 'replacecolor' },
+        { title: '辅料不含税金额(¥)', width: 160, dataIndex: 'excipiencostNotincludestax', ellipsis: true, className: 'replacecolor' },
+        { title: '加工费(¥)', width: 100, dataIndex: 'rmbProcesscost', ellipsis: true, className: 'replacecolor' },
+        { 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: 120, dataIndex: 'remarks', ellipsis: true, className: 'replacecolor' },
+        { title: '状态', width: 120,fixed: 'right', dataIndex: ' ', ellipsis: true, className: 'replacecolor' },
+
+        { title: '操作', width: 120 ,fixed: 'right', dataIndex: 'option', ellipsis: true, className: 'replacecolor', scopedSlots: { customRender: 'action' } },
       ],
       costAllocationData: [],
       outdata:'',
@@ -209,6 +258,7 @@ export default {
     this.apply = this.$route.query.apply;
     console.log(this.$route.query)
     this.getCostList()
+    document.title = '成本分配列表'+ ' · ' + '森语'
   },
   methods: {
     // 分页查询
@@ -305,6 +355,32 @@ export default {
       };
       window.parent.postMessage({msg:"startApply", data:data}, "*");
     },
+    //导出
+    exportList(fileName){
+      var params = this.queryParam
+      this.loading = true
+      downFile('/orderData/syCostLossReview/exportXls', params).then(data => {
+      this.loading = false
+        console.log('888')
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
+    },
 
     handleTableChange(pagination, filters, sorter) {
       this.queryParam.pageNo = pagination.current

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

@@ -43,7 +43,7 @@
           :dataSource="dataSource1"
           :pagination="ipagination"
           :loading="loading"
-          :scroll="{ y: 240 }"
+          :scroll="{ y: 280 }"
           :rowSelection="{selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll,onSelect:onSelect,onChange: onSelectChange}"
           @change="handleTableChange">
 
@@ -177,9 +177,9 @@
         this.selectedRowKeys=[]
       },
       handleOk() {
-        if(this.selectedRowKeys.length>1){
-          this.$message.error('只能勾选一条数据');
-        }else{
+        // if(this.selectedRowKeys.length>1){
+        //   this.$message.error('只能勾选一条数据');
+        // }else{
           this.dataSource2 = this.selectionRows
         var name = []
         this.selectionRows.map(item=>name.push(item.realname))
@@ -187,7 +187,7 @@
         this.visible = false
         this.selectedRowKeys = []
         this.selectionRows = []
-        }
+        // }
         
       },
       add() {

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

@@ -3,7 +3,7 @@
     title="详情"
     v-model="detailModVis"
     :confirmLoading="confirmLoading"
-    width="86%"
+    width="98%"
     style="top:330px;left:100px;"
     @cancel="handlecLose"
   >
@@ -95,6 +95,19 @@
                 {{fabricLoss.dateTime}}
               </a-form-model-item>
             </a-col>
+            <a-col :md="6" :sm="8" class="noprint">
+              <a-button type="primary" @click="openEnclosure" >附件</a-button>
+            </a-col>
+            <a-col :md="6" :sm="8" class="noprint">
+              <a-upload  productName="file" :showUploadList="true" :file-list="fileList" :headers="tokenHeader" :multiple="false"   :action="importExcelUrl"  @change="handleImportExcel"  :data="{code:this.planNO,name:this.fileName}"  :beforeUpload="uploadFlie" :remove="removeFile">
+                <a-button type="primary" disabled>附件上传</a-button>
+              </a-upload>
+              <!-- <j-upload   v-model="fabricLoss.attachs"  ></j-upload> -->
+              <!-- <a-upload  name="file" action="https://www.mocky.io/v2/5cc8019d300000980a055e76"    :multiple="true"    :default-file-list="fileList">
+                <a-button type="primary" >附件上传</a-button>
+              </a-upload> -->
+              <!-- <a-button type="primary" @click="openEnclosure">附件</a-button> -->
+            </a-col>
 
             <!-- <a-col :md="6" :sm="8" class="noprint">
               <a-button type="primary" @click="openEnclosure">附件</a-button>
@@ -1058,6 +1071,9 @@ export default {
     determineAssignedPerson(){
       assignedData({code:this.planNO}).then(res => {
           if (res.success) {
+            this.AssignedPerson='no'
+            this.authority='no'
+            this.AssignedPersonQx='no'
             var array = res.result!==''?res.result.split(","):[]
             if(array.length!==0){
               this.AssignedPerson='yes'
@@ -1086,8 +1102,8 @@ export default {
     handlecLose(){
          this.detailModVis = false
          this.AssignedPerson='no',
-      this.AssignedPersonQx='no',
-      this.authority='no'
+         this.AssignedPersonQx='no',
+         this.authority='no'
          this.fabricLoss={fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]}
     },
     closeInformation(data,text){
@@ -1259,6 +1275,19 @@ export default {
         }
       }
       }
+    },
+     openEnclosure(){
+      this.$refs.attachmentDisplay.AttachmentModVis = true
+      var attachList = [];
+      if (this.fabricLoss != null && this.fabricLoss.accessorItemList != null){
+        this.fabricLoss.accessorItemList.forEach(e=>{
+          var attach = {};
+          attach.name = e.filename;
+          attach.src=e.fileurl;
+          attachList.push(attach);
+        });
+      }
+      this.$refs.attachmentDisplay.attachmentData =  attachList;
     },
     // 开票成本成衣-弹框
     clInvoiceQuantityCustomCell(record) {
@@ -1312,13 +1341,16 @@ export default {
 @import '~@assets/less/common.less';
 @import '~@assets/less/overwriter.less';
 /deep/.ant-modal-body{
-  height: 571px;
+  height: 615px;
     overflow-y: scroll;
 }
 /deep/ .ant-table.ant-table-bordered .ant-table-footer {
   border: none;
   padding: 0;
 }
+/deep/ .ant-modal{
+  top: 25px !important;
+}
 
 
 </style>

+ 55 - 29
src/views/cost-allocation-total/modal/fabInQuaModal.vue

@@ -6,7 +6,8 @@
     :confirmLoading="confirmLoading"
     width="86%"
     style="top:330px;left:100px;"
-    :footer="null"
+    @cancel="cancel"
+    :footer="null" 
   >
     <!-- tabel  -->
     <a-spin :spinning="confirmLoading">
@@ -19,8 +20,8 @@
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
           <span style="float: right;" class="table-operator">
-            <a-button type="primary" icon="download" @click="handleExportXls('成本分配-面料-转入数量')">导出</a-button>
-            <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('面料转入')">导出</a-button>
+            <!-- <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
             <a-button type="primary" @click="cancel" icon="rollback">取消</a-button>
           </span>
         </a-col>
@@ -34,7 +35,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import { downFile } from '@/api/manage'
+import { downFile,downFile1 } from '@/api/manage'
 
 export default {
   name: 'FabInQuaModal', // 面料 转入数量 弹框
@@ -68,7 +69,7 @@ export default {
           width: 120,
           className: 'replacecolor',
           customRender: (text, record, index) => {
-            var re =  Number(text).toFixed(2)
+            var re =  Number(text).toFixed(4)
             return re
          }
         },
@@ -89,14 +90,18 @@ export default {
           width: 120,
           className: 'replacecolor',
            customRender: (text, record, index) => {
-            var re =  Number(text).toFixed(2)
-            return re
+            if(text!==''&&text!==undefined&&text!==null){
+              var re =  Number(text).toFixed(2)
+               return re
+            }
          }
         }
       ],
       data: [],
       loading: false,
       confirmLoading: false,
+      record:'',
+      planNum:'',
       fabInQuaModVis: false
     }
   },
@@ -105,35 +110,46 @@ export default {
     father: {
       type: Function,
       default: null
+    },
+    planNum:{
+      type: String,
+      default: null
     }
+
   },
 
   methods: {
     // 导出
     handleExportXls(fileName) {
       console.log('需导出的fileName:', fileName)
-      const params = this.dyeLossRateData
+      const params = {
+        planNum:this.planNum,
+        syTransfer :this.data,
+        sheetName:"面料转入"
+      }
       console.log('导出参数', params)
-      // downFile('/scas/dyeLoss/excel', params).then(data => {
-      //   console.log('888')
-      //   if (!data) {
-      //     this.$message.warning('文件下载失败')
-      //     return
-      //   }
-      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
-      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-      //   } else {
-      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-      //     let link = document.createElement('a')
-      //     link.style.display = 'none'
-      //     link.href = url
-      //     link.setAttribute('download', fileName + '.xls')
-      //     document.body.appendChild(link)
-      //     link.click()
-      //     document.body.removeChild(link) // 下载完成移除元素
-      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
-      //   }
-      // })
+      // var json = JSON.stringify(params)
+      // debugger
+      downFile1('/cost/syCostAllocation/exportXlsSyCostAllocation', params).then(data => {
+        console.log('888')
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }),this.planNum+'-'+fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', this.planNum+'-'+fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
     },
     changeUnitCost(record){
       record.cost = record.unitCost*record.number
@@ -144,7 +160,17 @@ export default {
     cancel() {
       console.log('返回成本分配统计表')
       this.fabInQuaModVis = false
-    }
+      var allCost  = 0
+      this.data.map(item=>{
+        if(item.cost){
+          allCost +=Number(item.cost)
+        }else{
+          allCost +=0
+        }
+       
+      })
+      this.$emit('close',allCost,this.record)
+    },
   }
 }
 </script>

+ 46 - 28
src/views/cost-allocation-total/modal/fabRemQuaModal.vue

@@ -15,8 +15,8 @@
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
           <span style="float: right;" class="table-operator">
-            <a-button type="primary" icon="download" @click="handleExportXls('成本分配-面料-转入数量')">导出</a-button>
-            <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('面料余下')">导出</a-button>
+            <!-- <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
             <a-button type="primary" @click="cancel" icon="rollback">取消</a-button>
           </span>
         </a-col>
@@ -30,7 +30,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import { downFile } from '@/api/manage'
+import { downFile,downFile1 } from '@/api/manage'
 
 export default {
   name: 'FabRemQuaModal', // 面料 余下数量 弹框
@@ -61,7 +61,11 @@ export default {
           title: '使用数量',
           dataIndex: 'number',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(4)
+            return re
+         }
         },
         {
           title: '单位成本',
@@ -69,8 +73,11 @@ export default {
           width: 120,
           className: 'replacecolor',
           customRender: (text, record, index) => {
-            var re =  Number(text).toFixed(4)
-            return re
+            if(text!==''&&text){
+              var re =  Number(text).toFixed(4)
+              return re
+            }
+            
          }
         },
         {
@@ -83,7 +90,8 @@ export default {
       data: [],
       loading: false,
       confirmLoading: false,
-      fabRemQuaModVis: false
+      fabRemQuaModVis: false,
+      planNum:'',
     }
   },
   // 接收父组件 方法
@@ -91,6 +99,10 @@ export default {
     father: {
       type: Function,
       default: null
+    },
+    planNum:{
+      type: String,
+      default: null
     }
   },
 
@@ -98,28 +110,34 @@ export default {
     // 导出
     handleExportXls(fileName) {
       console.log('需导出的fileName:', fileName)
-      const params = this.dyeLossRateData
+      const params = {
+        planNum:this.planNum,
+        syRemaining :this.data,
+        sheetName:'面料余下'
+      }
       console.log('导出参数', params)
-      // downFile('/scas/dyeLoss/excel', params).then(data => {
-      //   console.log('888')
-      //   if (!data) {
-      //     this.$message.warning('文件下载失败')
-      //     return
-      //   }
-      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
-      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-      //   } else {
-      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-      //     let link = document.createElement('a')
-      //     link.style.display = 'none'
-      //     link.href = url
-      //     link.setAttribute('download', fileName + '.xls')
-      //     document.body.appendChild(link)
-      //     link.click()
-      //     document.body.removeChild(link) // 下载完成移除元素
-      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
-      //   }
-      // })
+      // var json = JSON.stringify(params)
+      // debugger
+      downFile1('/cost/syCostAllocation/exportXlsSyCostAllocation', params).then(data => {
+        console.log('888')
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), this.planNum+'-'+fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', this.planNum+'-'+fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
     },
     // 打印
     print() {},

+ 52 - 27
src/views/cost-allocation-total/modal/ingInQuaModal.vue

@@ -6,6 +6,7 @@
     :confirmLoading="confirmLoading"
     width="86%"
     style="top:330px;left:100px;"
+    @cancel="cancel"
     :footer="null"
   >
     <!-- tabel 加载 -->
@@ -19,8 +20,8 @@
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
           <span style="float: right;" class="table-operator">
-            <a-button type="primary" icon="download" @click="handleExportXls('成本分配-辅料-转入数量')">导出</a-button>
-            <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('辅料转入')">导出</a-button>
+            <!-- <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
             <a-button type="primary" @click="cancel" icon="rollback">取消</a-button>
           </span>
         </a-col>
@@ -34,7 +35,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import { downFile } from '@/api/manage'
+import { downFile,downFile1 } from '@/api/manage'
 export default {
   name: 'IngInQuaModal', // 辅料 转入数量 弹框
   mixins: [JeecgListMixin],
@@ -62,7 +63,7 @@ export default {
           width: 120,
           className: 'replacecolor',
           customRender: (text, record, index) => {
-            var re =  Number(text).toFixed(2)
+            var re =  Number(text).toFixed(4)
             return re
          }
         },
@@ -79,13 +80,17 @@ export default {
           width: 120,
           className: 'replacecolor',
           customRender: (text, record, index) => {
-            var re =  Number(text).toFixed(2)
-            return re
+            if(text!==''&&text!==undefined&&text!==null){
+              var re =  Number(text).toFixed(2)
+               return re
+            }
          }
         }
       ],
       data: [],
       loading: false, // 表格加载
+      planNum:'',
+      record:'',
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
       ingInQuaModVis: false
@@ -96,6 +101,10 @@ export default {
     father: {
       type: Function,
       default: null
+    },
+    planNum:{
+      type: String,
+      default: null
     }
   },
 
@@ -103,35 +112,51 @@ export default {
     // 导出
     handleExportXls(fileName) {
       console.log('需导出的fileName:', fileName)
-      const params = this.dyeLossRateData
+      const params = {
+        planNum:this.planNum,
+        sytransferIngreDeent :this.data,
+        sheetName:'辅料转入'
+      }
       console.log('导出参数', params)
-      // downFile('/scas/dyeLoss/excel', params).then(data => {
-      //   console.log('888')
-      //   if (!data) {
-      //     this.$message.warning('文件下载失败')
-      //     return
-      //   }
-      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
-      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-      //   } else {
-      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-      //     let link = document.createElement('a')
-      //     link.style.display = 'none'
-      //     link.href = url
-      //     link.setAttribute('download', fileName + '.xls')
-      //     document.body.appendChild(link)
-      //     link.click()
-      //     document.body.removeChild(link) // 下载完成移除元素
-      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
-      //   }
-      // })
+      downFile1('/cost/syCostAllocation/exportXlsSyCostAllocation', params).then(data => {
+        console.log('888')
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), this.planNum+'-'+fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', this.planNum+'-'+fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
     },
     // 打印
     print() {},
+    changeUnitCost(record){
+      record.cost = record.unitCost*record.number
+    },
 
     cancel() {
       console.log('返回成本分配统计表')
       this.ingInQuaModVis = false
+      var allCost  = 0
+      this.data.map(item=>{
+        if(item.cost){
+          allCost +=Number(item.cost)
+        }else{
+          allCost +=0
+        }
+      })
+      this.$emit('close',allCost,this.record)
     }
   }
 }

+ 39 - 26
src/views/cost-allocation-total/modal/ingRemQuaModal.vue

@@ -15,8 +15,8 @@
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
           <span style="float: right;" class="table-operator">
-            <a-button type="primary" icon="download" @click="handleExportXls('成本分配-辅料-转入数量')">导出</a-button>
-            <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button>
+            <a-button type="primary" icon="download" @click="handleExportXls('辅料余下')">导出</a-button>
+            <!-- <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
             <a-button type="primary" @click="cancel" icon="rollback">取消</a-button>
           </span>
         </a-col>
@@ -30,7 +30,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import { downFile } from '@/api/manage'
+import { downFile,downFile1 } from '@/api/manage'
 
 export default {
   name: 'IngRemQuaModal', // 辅料 余下数量 弹框
@@ -56,7 +56,11 @@ export default {
           title: '使用数量',
           dataIndex: 'number',
           width: 120,
-          className: 'replacecolor'
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            var re =  Number(text).toFixed(4)
+            return re
+         }
         },
         {
           title: '单位成本',
@@ -79,7 +83,8 @@ export default {
       data: [],
       loading: false,
       confirmLoading: false,
-      ingRemQuaModVis: false
+      ingRemQuaModVis: false,
+      planNum:""
     }
   },
   // 接收父组件 方法
@@ -87,6 +92,10 @@ export default {
     father: {
       type: Function,
       default: null
+    },
+    planNum:{
+      type: String,
+      default: null
     }
   },
   created() {},
@@ -94,28 +103,32 @@ export default {
     // 导出
     handleExportXls(fileName) {
       console.log('需导出的fileName:', fileName)
-      const params = this.dyeLossRateData
+      const params = {
+        planNum:this.planNum,
+        syRemainingIngreDeent :this.data,
+        sheetName:'辅料余下'
+      }
       console.log('导出参数', params)
-      // downFile('/scas/dyeLoss/excel', params).then(data => {
-      //   console.log('888')
-      //   if (!data) {
-      //     this.$message.warning('文件下载失败')
-      //     return
-      //   }
-      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
-      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-      //   } else {
-      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-      //     let link = document.createElement('a')
-      //     link.style.display = 'none'
-      //     link.href = url
-      //     link.setAttribute('download', fileName + '.xls')
-      //     document.body.appendChild(link)
-      //     link.click()
-      //     document.body.removeChild(link) // 下载完成移除元素
-      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
-      //   }
-      // })
+      downFile1('/cost/syCostAllocation/exportXlsSyCostAllocation', params).then(data => {
+        console.log('888')
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), this.planNum+'-'+fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', this.planNum+'-'+fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
     },
     // 打印
     print() {},

+ 47 - 5
src/views/cost-allocation-total/modal/mainTableExpenseCNYModal.vue

@@ -91,12 +91,54 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '金额',
-          dataIndex: 'disbursedLocalmoney',
+        { 
+          title: '美元', 
+          dataIndex: 'disbursedOriginalmoney', 
           width: 120,
-          className: 'replacecolor'
-        },
+          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: 'iNatMoney', 
+          width: 120, 
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          }, },
+        // {
+        //   title: '金额',
+        //   dataIndex: 'disbursedLocalmoney',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '供应商',
           dataIndex: 'processUnit',

+ 47 - 5
src/views/cost-allocation-total/modal/mainTableExpenseUSDModal.vue

@@ -92,12 +92,54 @@ export default {
           width: 120,
           className: 'replacecolor'
         },
-        {
-          title: '金额',
-          dataIndex: 'disbursedOriginalmoney',
+        { 
+          title: '美元', 
+          dataIndex: 'disbursedOriginalmoney', 
           width: 120,
-          className: 'replacecolor'
-        },
+          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: 'iNatMoney', 
+          width: 120, 
+          className: 'replacecolor',
+          customRender: (text, record, index) => {
+            if(text!==''&&text){
+              return Number(text).toFixed(2)
+            }
+          }, },
+        // {
+        //   title: '金额',
+        //   dataIndex: 'disbursedOriginalmoney',
+        //   width: 120,
+        //   className: 'replacecolor'
+        // },
         {
           title: '供应商',
           dataIndex: 'processUnit',

+ 33 - 23
src/views/cost-allocation-total/modal/pilosityFewerModal.vue

@@ -69,8 +69,8 @@
                 <a-row style="marginTop:20px;">
                   <a-col :md="24" :sm="12">
                     <span style="float: right;" class="table-operator">
-                      <!-- <a-button type="primary" icon="download" @click="handleExportXls('采购数量')">导出</a-button>
-                      <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
+                      <a-button type="primary" icon="download" @click="handleExportXls('多发少发')">导出</a-button>
+                      <!-- <a-button type="primary" @click="print" icon="printer" style="margin:0 10px;">打印</a-button> -->
                       <a-button type="primary" @click="backFabricLossTable" icon="rollback">返回</a-button>
                     </span>
                   </a-col>
@@ -84,6 +84,7 @@
 </template>
 
 <script>
+import { downFile,downFile1 } from '@/api/manage'
 export default {
   name: 'pilosityFewerListModal', // 事故单 弹框
   components: {},
@@ -92,6 +93,7 @@ export default {
       loading: false,
       confirmLoading: false,
       pilosityFewerModVis: false,
+       planNum:'',
       pilosityFewerList: [],
       pilosityFewerColumns:[
         {
@@ -140,6 +142,10 @@ export default {
     father: {
       type: Function,
       default: null
+    },
+    planNum:{
+      type: String,
+      default: null
     }
   },
   created() {},
@@ -147,28 +153,32 @@ export default {
     //  导出
     handleExportXls(fileName) {
       console.log('需导出的fileName:', fileName)
-      const params = this.dyeLossRateData
+      const params = {
+        planNum:this.planNum,
+        syPilosityFewer :this.pilosityFewerList,
+        sheetName:'多发少发'
+      }
       console.log('导出参数', params)
-      // downFile('/scas/dyeLoss/excel', params).then(data => {
-      //   console.log('888')
-      //   if (!data) {
-      //     this.$message.warning('文件下载失败')
-      //     return
-      //   }
-      //   if (typeof window.navigator.msSaveBlob !== 'undefined') {
-      //     window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-      //   } else {
-      //     let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-      //     let link = document.createElement('a')
-      //     link.style.display = 'none'
-      //     link.href = url
-      //     link.setAttribute('download', fileName + '.xls')
-      //     document.body.appendChild(link)
-      //     link.click()
-      //     document.body.removeChild(link) // 下载完成移除元素
-      //     window.URL.revokeObjectURL(url) // 释放掉blob对象
-      //   }
-      // })
+      downFile1('/cost/syCostAllocation/exportXlsSyCostAllocation', params).then(data => {
+        console.log('888')
+        if (!data) {
+          this.$message.warning('文件下载失败')
+          return
+        }
+        if (typeof window.navigator.msSaveBlob !== 'undefined') {
+          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), this.planNum+'-'+fileName + '.xlsx')
+        } else {
+          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+          let link = document.createElement('a')
+          link.style.display = 'none'
+          link.href = url
+          link.setAttribute('download', this.planNum+'-'+fileName + '.xlsx')
+          document.body.appendChild(link)
+          link.click()
+          document.body.removeChild(link) // 下载完成移除元素
+          window.URL.revokeObjectURL(url) // 释放掉blob对象
+        }
+      })
     },
     // 打印
     print() {},

+ 4 - 3
src/views/order/manualModal.vue

@@ -65,7 +65,8 @@
                      <a @click="handleExportXls(record)" style="color:green;">关联委外</a>
                      <a-divider type="vertical" />
                      <a @click="handleCopy(record,index)" style="color:green;">复制</a>
-                     <!-- <a @click="handleDelete(record,index)" style="color:red;">删行</a> -->
+                     <a-divider type="vertical" />
+                     <a @click="handleDelete(record,index)" style="color:red;">删行</a>
                  </span>
 
               </a-table>
@@ -193,12 +194,12 @@
         },
         {
           title: '操作',
-          width: 170,
+          width: 200,
           dataIndex: 'operation',
           scopedSlots: { customRender: 'operationSlot' },
           fixed: 'right',
           className: 'replacecolor',
-          ellipsis: true
+          // ellipsis: true
         },
         ],
         pagination:{}

+ 1 - 1
src/views/order/orderDetailDrawer.vue

@@ -101,7 +101,7 @@
 
             <a-col :md="6" :sm="8">
               <a-form-model-item label="订单备注" prop="orderRemarks">
-                {{ orderDetail.orderRemarks }}
+                {{ orderDetail.orderRemarks | ellipsis}}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">

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

@@ -547,14 +547,14 @@ export default {
           scopedSlots: { customRender: 'pushState' },
           className: 'replacecolor'
         },
-        {
-          title: '云工厂',
-          dataIndex: 'whetherCloudFactoryPush ',
-          width: 85,
-          fixed: 'right',
-          scopedSlots: { customRender: 'whetherCloudFactoryPush' },
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '云工厂',
+        //   dataIndex: 'whetherCloudFactoryPush ',
+        //   width: 85,
+        //   fixed: 'right',
+        //   scopedSlots: { customRender: 'whetherCloudFactoryPush' },
+        //   className: 'replacecolor'
+        // },
 
         {
           title: '单据状态',

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

@@ -351,14 +351,14 @@ export default {
           fixed: 'right',
           className: 'replacecolor'
         },
-        {
-          title: '云工厂',
-          dataIndex: 'whetherCloudFactoryPush ',
-          width: 85,
-          fixed: 'right',
-          scopedSlots: { customRender: 'whetherCloudFactoryPush' },
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '云工厂',
+        //   dataIndex: 'whetherCloudFactoryPush ',
+        //   width: 85,
+        //   fixed: 'right',
+        //   scopedSlots: { customRender: 'whetherCloudFactoryPush' },
+        //   className: 'replacecolor'
+        // },
          {
           title: '状态',
           dataIndex: 'status',
@@ -719,7 +719,7 @@ export default {
         if (res.success) {
             this.getFabricList()
             this.selectedRowKeys = []
-            this.$message.success('提交成功');
+            this.$message.success(res.message);
           }else{
             this.$message.error(res.message);
           }

+ 11 - 1
src/views/packing-list/packinglist-clothes/detailsClothesDrawer.vue

@@ -34,7 +34,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="英文品名" prop="englishProductName">
-                  {{clothesAdd.englishProductName}}
+                  {{clothesAdd.englishProductName | ellipsis}}
                   <!-- <a-input placeholder="请输入英文品名" v-model="clothesAdd.englishProductName"></a-input> -->
                 </a-form-model-item>
               </a-col>
@@ -419,6 +419,16 @@ export default {
   },
   created() {},
   mounted() {},
+  filters: {
+                //文字数超出时,超出部分使用...
+                ellipsis(value) {
+                    if (!value) return ''
+                    if (value.length > 20) {
+                        return value.slice(0, 30) + '...'
+                    }
+                    return value
+                }
+            },
   methods: {
     dynamicColumns(sizeTables){
        var newColumns = this.clothesAddColumns

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

@@ -543,6 +543,8 @@ export default {
     saveAdd() {
       const that = this;
       var newObj = this.addPreBook;
+      newObj.latestDateOfShipment =(this.addPreBook.latestDateOfShipment&&this.addPreBook.latestDateOfShipment!=='') ?moment(this.addPreBook.latestDateOfShipment).format('YYYY-MM-DD'):'';
+      newObj.theFinalShippingDate =(this.addPreBook.theFinalShippingDate&&this.addPreBook.theFinalShippingDate!=='') ? moment(this.addPreBook.theFinalShippingDate).format('YYYY-MM-DD'):'';
       if (newObj.syLetterDepositItemList.length == 0){
         this.$message.error('当前记录没有子表记录,无法保存');
         return;

+ 11 - 8
src/views/pre-book/preBookList.vue

@@ -256,14 +256,14 @@ export default {
         // { title: 'nottfy', dataIndex: 'nottfy', width: 150, className: 'replacecolor' },
         { title: '目的港', dataIndex: 'destinationPort', width: 140, className: 'replacecolor', ellipsis: true, },
         // { title: '装运期限', dataIndex: 'latestDateOfShipment', width: 120, className: 'replacecolor' },
-        {
-          title: '单据状态',
-          dataIndex: 'theDocumentsState',
-          width: 90,
-          scopedSlots: { customRender: 'documentStateSlot' },
-          fixed: 'right',
-          className: 'replacecolor'
-        },
+        // {
+        //   title: '单据状态',
+        //   dataIndex: 'theDocumentsState',
+        //   width: 90,
+        //   scopedSlots: { customRender: 'documentStateSlot' },
+        //   fixed: 'right',
+        //   className: 'replacecolor'
+        // },
         {
           title: '操作',
           dataIndex: 'operation',
@@ -308,7 +308,9 @@ export default {
     getPreBookData() {
       this.$nextTick(() => {
         // this.queryParam.pageSize = 50
+        this.loading = true
         preBookList(this.queryParam).then(res => {
+          this.loading = false
           if (res.success) {
             this.preBookListData = res.result.records;
             this.pagination = {
@@ -380,6 +382,7 @@ export default {
           res.result.money = res.result.money.toFixed(2)
           res.result.syLetterDepositItemList = []
           this.$refs.addPreBookDrawer.addPreBook = res.result;
+          this.$refs.addPreBookDrawer.addPreBook.id=''
           this.$refs.addPreBookDrawer.defultMethod = 'edit';
           this.$refs.addPreBookDrawer.visible = true
         }else{

+ 145 - 52
src/views/reportForms/cost-allocation-table.vue

@@ -1,6 +1,7 @@
 <template>
   <!--报表 成本分配表 (保存后数据到单证的成本分配汇总内)-->
   <div id="costAllocationTable">
+    <a-spin :spinning="loading">
     <a-card :bordered="false">
       <!-- 主表信息 点击搜索后 回显--->
       <a-row :gutter="24">
@@ -107,8 +108,8 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="不含税运杂费(¥)" prop="rmbExpense" >
-                {{detailsPlanNum.rmbExpense }}
+              <a-form-model-item label="不含税运杂费(¥)" prop="rmbNorTaxExpense" >
+                {{detailsPlanNum.rmbNorTaxExpense }}
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
@@ -138,7 +139,7 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="面料成本($)" prop="UsdfabriccostIncludestax" >
+              <a-form-model-item label="面料成本($)" prop="fabriccostIncludestaxUsd" >
                 {{ detailsPlanNum.fabriccostIncludestaxUsd }}
               </a-form-model-item>
             </a-col>
@@ -148,8 +149,9 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="辅料成本($)" prop="UsdexcipiencostIncludestax">
-                {{ detailsPlanNum.excipiencostIncludestaxUsd }}
+              <a-form-model-item label="辅料成本($)" prop="excipiencostIncludestaxUsd">
+                {{ detailsPlanNum.excipiencostIncludestaxUsd}}
+                <!-- {{ detailsPlanNum.excipiencostIncludestaxUsd }} -->
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
@@ -173,8 +175,8 @@
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="运费税额" prop="salesrrdersOriginaltotal">
-                {{detailsPlanNum.shuiemoney }}
+              <a-form-model-item label="运费税额" prop="shuiemoney">
+                {{detailsPlanNum.shuiemoney}}
               </a-form-model-item>
             </a-col>
             
@@ -228,7 +230,7 @@
               </a-form-model-item>
             </a-col> -->
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="备注" prop="UsdfabriccostNotincludestax" >
+              <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>
@@ -249,15 +251,15 @@
               </a-form-model-item>
             </a-col> -->
             <a-col :md="6" :sm="8">
-              <a-form-model-item label="制单人" prop="maker">
+              <a-form-model-item label="制单人" prop="preparedBy">
                 {{ detailsPlanNum.preparedBy }}
               </a-form-model-item>
             </a-col>
-            <a-col :md="6" :sm="8">
+            <!-- <a-col :md="6" :sm="8">
               <a-form-model-item label="查询人" prop="queryBy">
                 {{ detailsPlanNum.queryBy  }}
               </a-form-model-item>
-            </a-col>
+            </a-col> -->
             <a-col :md="6" :sm="8">
               <a-form-model-item label="查询时间" prop="queryTime">
                 {{ detailsPlanNum.queryTime  }}
@@ -299,7 +301,7 @@
 
     <!--tabs 组件引入  -->
     <a-card :bordered="false" style=" marginTop:10px;">
-      <div><tabs ref="unitTabs" :showSelect='showSelect'  @number="number" /></div>
+      <div><tabs ref="unitTabs" :showSelect='showSelect'  @number="number" :planNum="this.detailsPlanNum.planNum" @FabInQua="FabInQua"/></div>
     </a-card>
 
     <!-- 事故单 -->
@@ -308,7 +310,6 @@
         <h6 class="table-title">事故单</h6>
         <a-table
           rowKey="id"
-          :loading="loading"
           :columns="accidentListColumns"
           :data-source="accidentListData"
           bordered
@@ -327,7 +328,6 @@
         <h6 class="table-title" >费用支出</h6>
         <a-table
           rowKey="id"
-          :loading="loading"
           :columns="costPayColumns"
           :data-source="costPayData"
            bordered
@@ -371,6 +371,7 @@
       <!-- 事故单 -->
       <accidentList-modal ref="accidentListModal" :father="cc"></accidentList-modal>
     </div>
+  </a-spin>
   </div>
 </template>
 
@@ -408,6 +409,7 @@ export default {
         planNum: ''
       }, // 详情所有数据
       remarks: '', // 备注
+      copyFabriccostIncludestax:'',//保存查询获取得面料成本(¥)
 
       // 事故单 表头
       accidentListColumns: [
@@ -513,7 +515,9 @@ export default {
       // dateFormat: 'YYYY-MM-DD',
     }
   },
-  created() {},
+  created() {
+    document.title = '成本分配表'+ ' · ' + '森语'
+  },
   filters: {
                 //文字数超出时,超出部分使用...
                 ellipsis(value) {
@@ -530,11 +534,24 @@ export default {
       this.$nextTick(() => {
         // TODO:接口完善后,type 应改为 add(暂时为了回显数据)
         this.loading = true
+        this.$refs.unitTabs.mList = []
+        this.$refs.unitTabs.fList = []
+        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
+        }
         seachPlanNum({ plannum: this.detailsPlanNum.planNum, type: data }).then(res => {
           if (res.success) {
             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
@@ -551,8 +568,6 @@ export default {
                   })
               })
               }
-            //调整表头格式
-            this.adjustingHeader()
             this.accidentListData = res.result.syCostAllocationAccidentList //事故单
             this.accidentCalculation(this.accidentListData)
             // var accidentNum = 0
@@ -568,20 +583,35 @@ export default {
             })
             // tabs 名称集合
             this.$refs.unitTabs.tabNameList = res.result.processUnit.split(',')
-
             //所有tabs数据
             this.$refs.unitTabs.tabsAllData = res.result.processUnitList
 
             // 页面打开加载的数据
             var oneData = this.$refs.unitTabs.tabsAllData[0]
             this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
+            var all = 0
             this.$refs.unitTabs.fabData.map(item=>{
               if(item.remainingQuantitycost!=='' && item.remainingQuantitycost){
                 item.remainingQuantitycost = item.remainingQuantitycost.toFixed(2)
               }
+              if(item.transferCost&&item.transferCost!==''){
+                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.$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)
@@ -593,20 +623,25 @@ export default {
             })
             //  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 =(Number(this.$refs.unitTabs.sumInfo.fabricAmount)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//合计中的不含税面料总额
-             this.detailsPlanNum.fabriccostNotincludestax =  this.$refs.unitTabs.sumInfo.fabricExcludTax
+             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
+            v =0,
+            t=0
             oneData.syCostAllocationIngredientList.map(item=>{
               s+=Number(item.priceExcludingtax),
               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.ingExcludAmount = ((v/2).toFixed(2)/(1+(Number(this.detailsPlanNum.taxrate)/100))).toFixed(2)//辅料不含税金额合计
-            this.detailsPlanNum.excipiencostNotincludestax =  this.$refs.unitTabs.sumInfo.ingExcludAmount
+            // 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)//表头辅料成本(¥)
             //合计中出运明细相关金额
             var s =0,
             v = 0,
@@ -631,14 +666,50 @@ export default {
             this.$refs.unitTabs.sumInfo.shipProcesFees =(d/2).toFixed(2)//出运加工费
             this.$refs.unitTabs.sumInfo.exportedAmountRMB =(b/2).toFixed(2)//出运人民币外销金额 f
             this.detailsPlanNum.rmbExportamount = this.$refs.unitTabs.sumInfo.exportedAmountRMB //表头-外销总价(¥)
-            this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//
+             //调整表头格式
+             this.adjustingHeader()
+            this.$refs.unitTabs.sumInfo.excludingTaxProcessing =e.toFixed(2)//出运不含税加工费
+              this.detailsPlanNum.rmbProcesscost=(e==''|| !e)?'':Number(e).toFixed(2)//表头加工费(人民币)
             f=Number(this.$refs.unitTabs.sumInfo.ingAmount)+Number(this.$refs.unitTabs.sumInfo.shipProcesFees)
-            this.$refs.unitTabs.sumInfo.amountTotal = (Number(this.$refs.unitTabs.sumInfo.fabricExcludTax)+Number(this.$refs.unitTabs.sumInfo.ingExcludAmount)+Number( this.$refs.unitTabs.sumInfo.shipProcesFees)).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)//合计金额
             this.pagination = {
               total: res.result.total,
               current: res.result.current,
               pageSize: res.result.size
             }
+            if(data=='queryNew'){
+              this.detailsPlanNum.memo = Staging
+              this.detailsPlanNum.remarks = StagingLast
+              this.fileList = file
+              oneData.syCostAllocationFabricList.map(item=>{
+                this.$refs.unitTabs.mList.map(event=>{
+                  if(item.goodsName==event.goodsName){
+                    item.transferCost = event.transferCost
+                  }
+                })
+              })
+              oneData.syCostAllocationIngredientList.map(item=>{
+                this.$refs.unitTabs.fList.map(event=>{
+                  if(item.goodsName==event.goodsName){
+                    item.transferCost = event.transferCost
+                  }
+                })
+              })
+
+              //重新计算辅料相关数值
+              var s = 0,
+              v=0,
+                t=0
+            oneData.syCostAllocationIngredientList.map(item=>{
+              s+=Number(item.priceExcludingtax),
+              v+=item.rmbAmount?Number(item.rmbAmount):0
+              t+=item.transferCost?Number(item.transferCost):0
+            })
+            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.$refs.unitTabs.sumInfo.ingAmount =((v/2)+(t/2)).toFixed(2)//辅料金额合计  
+            this.detailsPlanNum.excipiencostIncludestax =   (  this.$refs.unitTabs.sumInfo.ingAmount ==''|| ! this.$refs.unitTabs.sumInfo.ingAmount )?0:Number( this.$refs.unitTabs.sumInfo.ingAmount ).toFixed(2)//表头辅料成本(¥)
+          }
           }else {
             this.loading = false
             this.$message.error(res.message);
@@ -679,28 +750,33 @@ 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(0)//计划数量
-      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(0)//实际出库数量
-      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)//销售订单原币金额   
+      // 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.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)
-      }
+
+      // 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)//加工费(人民币)
+      // }
     },
 
     //计算出运明细合计行
@@ -740,7 +816,7 @@ export default {
           // procesUnitPriceusd:procesUnitPriceusdAll.toFixed(3),
           processCost:processCostAll.toFixed(3)
         }
-        this.detailsPlanNum.salesordersLocaltotal = rmbAmountAll.toFixed(2)
+        // 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=='合计'){
@@ -767,10 +843,10 @@ export default {
       priceExcludingtaxAll = 0
         val.map(item=>{
           if(item.goodsName!=='合计'){
-          transferCostAll+=Number(item.transferCost)
-          rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
-          usdAmountAll+=item.usdAmount?Number(item.usdAmount):0
-          priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
+            if(item.rmbAmount !== item.usdAmount){  usdAmountAll+=item.usdAmount?Number(item.usdAmount):0   }
+            transferCostAll+=Number(item.transferCost)
+            rmbAmountAll+=item.rmbAmount?Number(item.rmbAmount):0
+            priceExcludingtaxAll+=item.priceExcludingtax?Number(item.priceExcludingtax):0
           }
         })
       var allObj ={
@@ -782,10 +858,16 @@ 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)
           }
+          if(rmbAmountAll == usdAmountAll){
+            this.detailsPlanNum.excipiencostIncludestaxUsd = 0
+          }else{
+            this.detailsPlanNum.excipiencostIncludestaxUsd = usdAmountAll.toFixed(2)
+          }
     },
     //事故单合计行
     addAccident(val){
@@ -830,6 +912,9 @@ export default {
       if(this.costPayData[this.costPayData.length-1].setNo=='合计'){this.costPayData.pop()}
        this.costPayData.push(obj)
       }
+      this.detailsPlanNum.shuiemoney = shuiemoneyAll.toFixed(3)
+      this.detailsPlanNum.rmbNorTaxExpense = obj.disbursedLocalmoney.toFixed(2)
+      this.detailsPlanNum.rmbExpense = obj.iNatMoney.toFixed(2)
     },
     daYin(){
          this.showSelect = 1
@@ -906,8 +991,10 @@ export default {
         // var planNum = this.detailsPlanNum.planNum,
          var json = this.detailsPlanNum
          json.outdata=moment(json.outdata).format('YYYY-MM-DD hh:mm:ss')
+         this.loading=true
         addHalfInfo(json).then(res => {
-          this.isDisabled = false
+          this.isDisabled = false  
+          this.loading=false
           if (res.success) {
             console.log('保存的部分信息', halfInfo)
             this.$message.success('保存成功')
@@ -957,7 +1044,13 @@ export default {
     },
     number(data1,data2){
       this.detailsPlanNum.fabriccostNotincludestax =  data1
-      this.detailsPlanNum.excipiencostNotincludestax =  data2
+      // this.detailsPlanNum.excipiencostNotincludestax =  data2
+    },
+    FabInQua(data){
+      if(this.copyFabriccostIncludestax!== this.detailsPlanNum.fabriccostIncludestax){
+        this.detailsPlanNum.fabriccostIncludestax=data.toFixed(2)//面料含税成本
+      }
+     
     },
 
     // father 方法

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

@@ -25,7 +25,7 @@
             </span>
             <!-- 面料 -转入数量 弹框-->
             <span slot="fabInQuaSlot" slot-scope="text">
-              <a>{{ Number(text).toFixed(4) }}</a>
+              <a>{{ Number(text).toFixed(4)}}</a>
             </span>
 
             <!-- 余下数量-->
@@ -178,16 +178,16 @@
     <!-- tabs内弹框 -->
     <div>
       <!-- 面料 转入数量 -->
-      <fabInQua-modal ref="fabInQuaModal" :father="aa"></fabInQua-modal>
+      <fabInQua-modal ref="fabInQuaModal" :father="aa"  :planNum="this.planNum"  @close="closeFabInQua"></fabInQua-modal>
 
       <!-- 余下数量 -->
-      <fabRemQua-modal ref="fabRemQuaModal" :father="bb"></fabRemQua-modal>
+      <fabRemQua-modal ref="fabRemQuaModal" :father="bb" :planNum="this.planNum" ></fabRemQua-modal>
 
       <!-- 辅料 转入数量 -->
-      <ingInQua-modal ref="ingInQuaModal" :father="cc"></ingInQua-modal>
+      <ingInQua-modal ref="ingInQuaModal" :father="cc" :planNum="this.planNum" @close="closeIngInQua"></ingInQua-modal>
       <!-- 余下数量 -->
-      <ingRemQua-modal ref="ingRemQuaModal" :father="bb"></ingRemQua-modal>
-      <pilosity-fewer-list-modal ref="pilosityFewerListModal"></pilosity-fewer-list-modal>
+      <ingRemQua-modal ref="ingRemQuaModal" :father="bb" :planNum="this.planNum"></ingRemQua-modal>
+      <pilosity-fewer-list-modal ref="pilosityFewerListModal" :planNum="this.planNum"></pilosity-fewer-list-modal>
       <submit-information  ref="submitInformation" @close="closeRemark" :showAll="showAll=='yes'?'yes':'no'"></submit-information>
     </div>
   </div>
@@ -245,7 +245,7 @@ export default {
           width: '8%',
           className: 'replacecolor',
           customRender: (text, record, index) => {
-            if(text!==''&&text){
+            if(text!==''&&text!==undefined&&text!==null){
               return Number(text).toFixed(2)
             }
           },
@@ -383,8 +383,11 @@ export default {
           width: '6%',
           className: 'replacecolor',
           customRender: (text, record, index) => {
-            if(text!==''&&text){
+            if(text!==''&&text!==undefined&&text!==null){
               return Number(text).toFixed(2)
+            }else{
+              var re = ''
+              return re
             }
           },
           // slots:{title:'transferCostTitle'} ,
@@ -627,6 +630,8 @@ export default {
       tabsAllData: [], //tabs所有数据集合
       tabNameList: [], //tabs数组集合
       activeKey: '0',
+      mList:[],
+      fList:[],
       sumInfo: {} //合计对象
     }
   },
@@ -638,6 +643,10 @@ export default {
     showAll: {
       type: String,
       default: null
+    },
+    planNum:{
+      type: String,
+      default: null
     }
   },
 
@@ -649,14 +658,14 @@ export default {
       this.sumInfo.amountTotal=''
       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.fabricExcludTax)+Number(this.sumInfo.ingExcludAmount)+Number( this.sumInfo.shipProcesFees)).toFixed(2)//合计金额
+      this.sumInfo.amountTotal = (Number(this.sumInfo.fabricAmount)+Number(this.sumInfo.ingAmount)+Number( this.sumInfo.shipProcesFees)).toFixed(2)//合计金额
       this.$forceUpdate()
       this.$emit('number',this.sumInfo.fabricExcludTax,this.sumInfo.ingExcludAmount)
     },
     Refresh(){
       setTimeout(()=> {
       this.$forceUpdate();
-      this.$refs.table.doLayout()
+      // this.$refs.table.doLayout()
     },200)
     },
     tabsCallback(key) {
@@ -682,18 +691,46 @@ export default {
         on: {
           click: event => {
             console.log('面料 - 转入数量')
+            console.log( this.mList,this.fList)
             this.$refs.fabInQuaModal.fabInQuaModVis = true
+            this.$refs.fabInQuaModal.record = record
             record.syTransfers.map(item=>{
               if(item.unitCost){
-                 item.unitCost =  (item.unitCost).toFixed(3)
+                 item.unitCost =  Number(item.unitCost).toFixed(3)
               }
             })
             this.$refs.fabInQuaModal.data = record.syTransfers
+            if(this.mList.length!==0){
+              this.mList.map(item=>{
+                if(item.goodsName == record.goodsName){
+                  this.$refs.fabInQuaModal.data = item.syTransfers
+                }
+              })
+            }
           }
         }
       }
     },
-
+    closeFabInQua(data,record){
+      var all = 0
+      this.fabData.map(item=>{
+        if(item.goodsName == record.goodsName){
+          item.transferCost = data
+        }
+        if(item.transferCost&&item.transferCost!==''){
+            all+=Number(item.transferCost)
+        }
+        this.$emit('FabInQua',all)
+      })
+      this.$forceUpdate()
+    },
+    closeIngInQua(data,record){
+      this.ingData.map(item=>{
+        if(item.goodsName == record.goodsName){
+          item.transferCost = data
+          debugge        }
+      })
+    },
     // 面料 -余下数量 弹框
     fabRemQuaCustomCell(record) {
       return {
@@ -727,12 +764,21 @@ export default {
           click: event => {
             console.log('辅料 - 转入数量')
             this.$refs.ingInQuaModal.ingInQuaModVis = true
+            this.$refs.ingInQuaModal.planNum = this.planNum
+            this.$refs.ingInQuaModal.record = record
             record.syTransfers.map(item=>{
               if(item.unitCost){
                item.unitCost =  (item.unitCost).toFixed(3)
               }
             })
             this.$refs.ingInQuaModal.data = record.syTransfers
+            if(this.fList.length!==0){
+              this.fList.map(item=>{
+                if(item.goodsName == record.goodsName){
+                  this.$refs.ingInQuaModal.data = item.syTransfers
+                }
+              })
+            }
           }
         }
       }

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

@@ -1491,6 +1491,7 @@ export default {
     // }
   },
   created(){
+    document.title = '面料损耗表'+ ' · ' + '森语'
     var ccode = this.$route.query.ccode;
     /*
     console.log("----------------ccode 1:"+ccode);

+ 1 - 0
src/views/reportForms/pro-progress-report.vue

@@ -283,6 +283,7 @@ export default {
     }
   },
   created() {
+    document.title = '生产进度报表'+ ' · ' + '森语'
     // this.getproProgressList()
   },
   methods: {

+ 1 - 1
src/views/reportForms/supplier-capacity.vue

@@ -281,7 +281,7 @@ export default {
   async created() {
     await this.getOption()
     this.getSupplierList()
-  
+    document.title = '供应商产能维护'+ ' · ' + '森语'
     
   },
   computed: {},

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

@@ -250,6 +250,7 @@ export default {
   created() {
     this.getData()
     this.getSupplyCapList() // 渲染 供应链产能报表
+    document.title = '供应商产能报表'+ ' · ' + '森语'
   },
 
   methods: {

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

@@ -208,6 +208,7 @@ export default {
       loading: false, // 表格加载
       pushState: false, //是否推送
       query:'1',//是否查询
+      record:'',
       // 子表表头
       declareElementsColumns: [
         {
@@ -347,6 +348,8 @@ export default {
         syDeclarationElementsAdd(newObj).then(res => {
         if (res.success) {
           this.$message.success('新增成功')
+          this.$emit('close-data',newObj,this.record)
+          this.$emit('save-information',newObj.syDeclarationElementsItemList)
           // this.$emit('table')
           this.close()
         }else {

+ 3 - 1
src/views/shipment-details/itemNumEleModal.vue

@@ -79,10 +79,11 @@ export default {
       loading: false, // 表格加载
       confirmLoading: false,
       itemNumEleModVis: false,
+      record:'',
       editItemNumber: {
         itemNumber: '',
         materialComposition: '',
-        isTc: ''
+        isTc: '',
       } // 编辑维护款号成分
     }
   },
@@ -100,6 +101,7 @@ export default {
       addItemNumEle(this.editItemNumber).then(res => {
         if (res.success) {
           this.$message.success('维护款号成分成功')
+          this.$emit('closeItem',this.editItemNumber,this.record)
           this.close()
       
         }

+ 150 - 32
src/views/shipment-details/shipmentList.vue

@@ -143,6 +143,15 @@
                 </a-form-model-item>
               </a-col>
 
+              <a-col :md="5" :sm="8">
+                <a-form-model-item label="是否全选">
+                  <a-select v-model="allList">
+                    <a-select-option value="1">全选</a-select-option>
+                    <a-select-option value="0">勾选</a-select-option>
+                  </a-select>
+                </a-form-model-item>
+              </a-col>
+
             </template>
 
             <a-col :md="4" :sm="8">
@@ -161,6 +170,7 @@
     </a-card>
 
     <!-- 操作按钮区域 -->
+    <a-spin :spinning="loading">
     <a-card :bordered="false" style=" marginTop:10px;">
       <div class="table-operator">
         <!-- <a-button type="primary" @click.stop="addShipDet" icon="plus">新增</a-button> -->
@@ -170,6 +180,7 @@
         <a-button type="primary" icon="download" @click="exportXlsShipment('出运明细列表')">出运明细导出</a-button>
         <a-button type="primary" icon="check" @click="submit">批量提交</a-button>
         <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-->
@@ -293,21 +304,21 @@
       <span style="margin-right: 55%;">共勾选{{selectedNumber}}条数</span>
       <span >总数量:{{ allMoney }}</span>
     </a-card>
-
+  </a-spin>
     <!-- 抽屉  -->
     <div>
       <!-- <addShipDet-drawer ref="addShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk" @close="closeAdd"></addShipDet-drawer> -->
        <!-- 参照订单数据 -->
       <referOrderData-modal ref="referOrderDataModal" @close="closeAdd" ></referOrderData-modal>
 
-      <editShipDet-drawer ref="editShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk" @close='closeAddEdit'></editShipDet-drawer>
+      <editShipDet-drawer ref="editShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"  @close='closeAddEdit'></editShipDet-drawer>
 
       <detailsShipDet-drawer ref="detailsShipDetDrawer" @ok="modalFormOk"></detailsShipDet-drawer>
       <!-- 申报要素 弹框 -->
-      <declareElements-modal ref="declareElementsModal" @table="getShipmentList" @close-declare="closeDeclare"></declareElements-modal>
+      <declareElements-modal ref="declareElementsModal" @table="getShipmentList" @save-information="saveInformation"  @close-declare="closeDeclare"  @close-data="closeData"></declareElements-modal>
 
       <!-- 维护款号成分 -->
-      <itemNumEle-modal ref="itemNumEleModal" @close="judageAdd"></itemNumEle-modal>
+      <itemNumEle-modal ref="itemNumEleModal" @close="closeItemNumEle"  @closeItem="changeList"></itemNumEle-modal>
     </div>
   </div>
 
@@ -339,7 +350,8 @@ import {
   pushShipment,
   rePushShipment,
   exportXls,
-  listExportXls
+  listExportXls,
+  deleteBatch
 } from '@api/document/shipmentList'
 
 export default {
@@ -371,6 +383,7 @@ export default {
       monthStartDate:'',//本月1号
       nextMonthStartDate:'',//下月1号
       nextMonthEndDate:'',//下月最后一天
+      allList:'0',
       shipmentListColumns: [
         {
           title: '账套',
@@ -439,7 +452,7 @@ export default {
         {
           title: '报关品名',
           dataIndex: 'declarationName',
-          width: 110,
+          width: 175,
           className: 'replacecolor',
            ellipsis: true,
           sorter:(a, b) => a.declarationName - b.declarationName,
@@ -590,16 +603,16 @@ export default {
 
         },
   
-        {
-          title: '推送结果',
-          dataIndex: 'pushState',
-          scopedSlots: { customRender: 'pushState' },
-          fixed: 'right',
-          width: 110,
-          className: 'replacecolor',
-          sorter:(a, b) => a.pushState - b.pushState,
-
-        },
+        // {
+        //   title: '推送结果',
+        //   dataIndex: 'pushState',
+        //   scopedSlots: { customRender: 'pushState' },
+        //   fixed: 'right',
+        //   width: 110,
+        //   className: 'replacecolor',
+        //   sorter:(a, b) => a.pushState - b.pushState,
+
+        // },
         {
           title: '单据状态',
           dataIndex: 'submitStatus',
@@ -621,6 +634,7 @@ export default {
       ],
       shipmentListData: [], // 发运明细数据
       allMoney:'',
+      copyTableData:[],//保存还未更新时的申报要素列表信息
       // 查询条件
       queryParam: {
         flourOrGarment:'1'
@@ -673,6 +687,7 @@ export default {
     // 分页查询 发运明细
     async getShipmentList() {
       this.loading = true
+      this.copyTableData = []
       await  shipmentList(this.queryParam).then(res => {
           if (res.success) {
            this.loading = false
@@ -712,7 +727,7 @@ export default {
     //关闭申报要素弹窗
      async closeDeclare(){
        //判断是否是新增的数据
-      await this.judageAdd()        
+      // await this.judageAdd()        
       var cc = []
       this.shipmentListData.map(item =>{
         this.selectedRows.map(item1 =>{
@@ -724,7 +739,31 @@ export default {
       this.selectedRows = cc
       cc.map(item => this.selectedRowKeys.push(item.itemIds))
     },
+    saveInformation(data){
+      this.copyTableData = data
+    },
+
+    //关闭维护款号成分弹窗
+    closeItemNumEle(){
 
+    },
+    changeList(data,record){
+      this.shipmentListData.map(item=>{
+        if(item.itemNumber == record.itemNumber && item.inventoryName==record.inventoryName && item.orderNumber == record.orderNumber){
+          item.isTc = data.isTc
+          item.materialComposition = data.materialComposition
+        }
+      })
+    },
+    closeData(data,record){
+      this.shipmentListData.map(item=>{
+        if(item.orderNumber == record.orderNumber && item.itemNumber==record.itemNumber && item.account == record.account&& item.inventoryName == record.inventoryName){
+          item.declarationName = data.declarationName
+          item.hsCode = data.hsCode
+          item.englishProductName = data.englishProductName
+        }
+      })
+    },
     // // 新增
     // addShipDet() {
     //   this.$refs.addShipDetDrawer.syShippingDetailsItemList = [];
@@ -755,16 +794,23 @@ export default {
             res.result['itemIds'] = record.itemIds;
 
             this.$refs.declareElementsModal.declareElements = res.result
+            this.$refs.declareElementsModal.declareElements.declarationName  = record.declarationName
+            this.$refs.declareElementsModal.declareElements.englishProductName  = record.englishProductName
+            this.$refs.declareElementsModal.declareElements.hsCode  = record.hsCode
             this.$refs.declareElementsModal.flourOrGarment = this.queryParam.flourOrGarment
             this.$refs.declareElementsModal.orderNumber = record.orderNumber
+            this.$refs.declareElementsModal.record = record
             if(!res.result.hsCode  || res.result.hsCode == ''){
              this.$refs.declareElementsModal.query = '0'
             }else{
              this.$refs.declareElementsModal.query = '1'
             }
-          
+          if(this,this.copyTableData.length==0){
             // 子表赋值
             this.$refs.declareElementsModal.declareElementsData = res.result.syDeclarationElementsItemList
+          }else{
+            this.$refs.declareElementsModal.declareElementsData = this.copyTableData
+          }
             if(record.pushState == '1' && record.submitStatus == '1'){
               this.$refs.declareElementsModal.pushState = true
           }
@@ -778,6 +824,7 @@ export default {
       this.$refs.itemNumEleModal.itemNumEleModVis = true
       this.$refs.itemNumEleModal.editItemNumber.itemIds = record.itemIds
       this.$refs.itemNumEleModal.editItemNumber.itemNumber = record.itemNumber
+      this.$refs.itemNumEleModal.record = record
       
       this.$refs.itemNumEleModal.editItemNumber.materialComposition = record.materialComposition
       this.$refs.itemNumEleModal.editItemNumber.isTc = record.isTc
@@ -816,12 +863,17 @@ export default {
           this.queryParam.id =  this.returnId
           this.queryParam.flourOrGarment =this.returnFlourOrGarment
         }
-      var obj ={}
-      if(this.selectedRowKeys.length==this.shipmentListData.length){
+      var obj ={},
+      yesA = 'yes'
+      if(this.allList == '1'){
         obj = this.queryParam
         obj.selectAll = '1'
       }else{
-        var grouyIdList=[]
+        if( this.selectedRowKeys.length==0){
+          this.$message.error('请勾引数据')
+          yesA = 'no'
+        }else{
+          var grouyIdList=[]
         this.shipmentListData.map(item=>{
           this.selectedRowKeys.map(e=>{
             if(item.itemIds == e){
@@ -832,12 +884,17 @@ export default {
         obj.groupidList = grouyIdList.toString()
         obj.selectAll = '0'
         obj.flourOrGarment =this.queryParam.flourOrGarment
+        }
+        
       }
-      exportXls(obj).then(res =>{
+      if(yesA == 'yes'){
+        this.loading = true
+        exportXls(obj).then(res =>{
         if(res.success==false){
           this.$message.error(res.message)
         }else{
           downFile('/shippingDetails/syShippingDetails/exportXls',obj).then(data => {
+            this.loading = false
             // this.queryParam = {}
             // this.defalutDate()
             if (!data) {
@@ -860,18 +917,25 @@ export default {
           })
         }
       })
+      }
+      
 
      
     },
 
     //明细导出
      exportXlsShipment(fileName){
-      var obj ={}
-      if(this.selectedRowKeys.length==this.shipmentListData.length){
+      var obj ={},
+      yesA = 'yes'
+      if(this.allList == '1'){
         obj = this.queryParam
         obj.selectAll = '1'
       }else{
-        var grouyIdList=[]
+        if(this.selectedRowKeys.length==0){
+          this.$message.error('请勾引数据')
+          yesA = 'no'
+        }else{
+          var grouyIdList=[]
         this.shipmentListData.map(item=>{
           this.selectedRowKeys.map(e=>{
             if(item.itemIds == e){
@@ -882,12 +946,17 @@ export default {
         obj.groupidList = grouyIdList.toString()
         obj.selectAll = '0'
         obj.flourOrGarment =this.queryParam.flourOrGarment
+        }
+        
       }
-      listExportXls(obj).then(res =>{
+      if( yesA == 'yes'){
+        this.loading = true
+        listExportXls(obj).then(res =>{
         if(res.success==false){
           this.$message.error(res.message)
         }else{  
       downFile('/shippingDetails/syShippingDetails/exportXlsShipping',obj).then(data => {
+        this.loading = false
         if (!data) {
           this.$message.warning('文件下载失败')
           return
@@ -908,6 +977,8 @@ export default {
       })
     }
      })
+      }
+      
     },
 
     //  编辑
@@ -958,6 +1029,7 @@ export default {
         //   }
         // }
         var grouyIdList = []
+        this.loading = true
         this.shipmentListData.map(item =>{
           this.selectedRowKeys.map(e=>{
             if(item.itemIds == e){
@@ -966,11 +1038,18 @@ export default {
           })
         })
         submitShipment({ submitListId: this.selectedRowKeys, type: '1' ,grouyIdList:grouyIdList}).then(res => {
+        this.loading = false
           if (res.success) {
-            console.log('提交成功,单据状态改为【已提交】')
-            this.shipmentListData.submitStatus = '1'
+            // this.shipmentListData.submitStatus = '1'
+            this.shipmentListData.map(item =>{
+              this.selectedRowKeys.map(e=>{
+                if(item.itemIds == e){
+                  item.submitStatus = '1'
+              }
+           })
+        })
             this.selectedRowKeys =[]
-             this.judageAdd()
+            //  this.judageAdd()
              // 渲染 发运明细列表
             this.$message.success('提交成功')
           }else {
@@ -984,12 +1063,20 @@ export default {
     cancelSubmit(record) {
       console.log('取消订单id:', record.id)
       this.$nextTick(() => {
+        this.loading = true
         cancelSubmitShipment({ submitListId: this.selectedRowKeys, type: '2' }).then(res => {
+        this.loading = false
           if (res.success) {
-            console.log('取消提交成功,单据状态改为【仅保存】')
-            this.shipmentListData.submitStatus = '0'
+            // this.shipmentListData.submitStatus = '0'
+            this.shipmentListData.map(item =>{
+              this.selectedRowKeys.map(e=>{
+                if(item.itemIds == e){
+                  item.submitStatus = '0'
+              }
+           })
+          })
             this.selectedRowKeys = []
-            this.judageAdd()
+            // this.judageAdd()
             this.$message.success('取消提交成功')
           }else {
              this.$message.error(res.message)
@@ -997,6 +1084,37 @@ export default {
         })
       })
     },
+    
+    //批量删除
+    batchDelete(){
+      this.$nextTick(() => {
+        var itemId = [],
+        ids = []
+        this.loading = true
+        this.shipmentListData.map(item =>{
+          this.selectedRowKeys.map(e=>{
+            if(item.itemIds == e){
+              itemId.push(item.itemIds)
+              ids.push(item.id)
+            }
+          })
+        })
+        deleteBatch({ ids: ids.toString() ,itemId:itemId.toString()}).then(res => {
+        this.loading = false
+          if (res.success) {
+            // console.log('提交成功,单据状态改为【已提交】')
+            // this.shipmentListData.submitStatus = '1'
+            this.selectedRowKeys =[]
+             this.judageAdd()
+             // 渲染 发运明细列表
+            this.$message.success('批量成功')
+          }else {
+            this.judageAdd()
+             this.$message.error(res.message)
+          }
+        })
+      })
+    },
 
     //  推送
     push(record) {