Kaynağa Gözat

单证 - 成本分配汇总- 详情回显+tab字段等

liangy 3 yıl önce
ebeveyn
işleme
491f6353d0

+ 10 - 34
src/views/cost-allocation-total/costDetailDrawer.vue

@@ -9,167 +9,139 @@
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="计划单号" prop="planNum">
-                  <!-- 123456 -->
                   {{ detailsPlanNum.planNum }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="产品款号" prop="poStyleNum">
                   {{ detailsPlanNum.poStyleNum }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="外销员" prop="exportSales">
                   {{ detailsPlanNum.exportSales }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="成衣合同号" prop="garmentContractno">
                   {{ detailsPlanNum.garmentContractno }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="部门" prop="department">
                   {{ detailsPlanNum.department }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="客户简称" prop="customerShortame">
                   {{ detailsPlanNum.customerShortame }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="加工单位" prop="processUnit">
                   {{ detailsPlanNum.processUnit }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="出运日期" prop="outdata">
                   {{ detailsPlanNum.outdata }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="计划数量" prop="planQuantity">
                   {{ detailsPlanNum.planQuantity }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="美元外销总价" prop="usdTotalexportprice">
                   {{ detailsPlanNum.usdTotalexportprice }}
                 </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>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="税率%" prop="taxrate">
                   {{ detailsPlanNum.taxrate }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="实际出货数量" prop="actualShipquantity">
                   {{ detailsPlanNum.actualShipquantity }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="人民币外销金额" prop="rmbExportamount">
                   {{ detailsPlanNum.rmbExportamount }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="美元费用支出" prop="usdExpense">
                   {{ detailsPlanNum.usdExpense }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="加工费" prop="rmbProcesscost">
                   {{ detailsPlanNum.rmbProcesscost }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="短出数" prop="shortseveral">
                   {{ detailsPlanNum.shortseveral }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="短出货值" prop="shortvalue">
                   {{ detailsPlanNum.shortvalue }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="短出面料成本" prop="fabricshortcost">
                   {{ detailsPlanNum.fabricshortcost }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="事故单美金金额" prop="accidentUsdamount">
                   {{ detailsPlanNum.accidentUsdamount }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="面料含税成本" prop="fabriccostIncludestax">
                   {{ detailsPlanNum.fabriccostIncludestax }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="辅料含税成本" prop="excipiencostIncludestax">
                   {{ detailsPlanNum.excipiencostIncludestax }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="销售订单本币总额" prop="salesordersLocaltotal">
                   {{ detailsPlanNum.salesordersLocaltotal }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="事故单人民币金额" prop="accidentcnyAmount">
                   {{ detailsPlanNum.accidentcnyAmount }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="面料不含税成本" prop="fabriccostNotincludestax">
                   {{ detailsPlanNum.fabriccostNotincludestax }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="辅料不含税成本" prop="excipiencostNotincludestax">
                   {{ detailsPlanNum.excipiencostNotincludestax }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="销售订单原币总额" prop="salesrrdersOriginaltotal">
                   {{ detailsPlanNum.salesrrdersOriginaltotal }}
                 </a-form-model-item>
               </a-col>
-
               <a-col :md="6" :sm="8">
                 <a-form-model-item label="制单人" prop="preparedBy">
                   {{ detailsPlanNum.preparedBy }}
@@ -191,7 +163,7 @@
       <a-card :bordered="true" style="margin:10px 0">
         <!--tabs 组件引入  style="marginTop:60px;" -->
         <div>
-          <tabs />
+          <tabs ref="unitTabs" />
         </div>
 
         <!-- 事故单 -->
@@ -295,9 +267,9 @@ export default {
         { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
         { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
         { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
-        { title: ' 支出本币金额', dataIndex: 'disbursedLocalMoney', width: 120, className: 'replacecolor' },
-        { title: '支出原币金额', dataIndex: 'disbursedOriginalMoney', width: 120, className: 'replacecolor' },
-        { title: '发票号', dataIndex: 'invoiceNum', width: 120, className: 'replacecolor' },
+        { title: ' 支出本币金额', dataIndex: 'disbursedLocalmoney', width: 120, className: 'replacecolor' },
+        { title: '支出原币金额', dataIndex: 'disbursedOriginalmoney', width: 120, className: 'replacecolor' },
+        { title: '发票号', dataIndex: 'invoicenum', width: 120, className: 'replacecolor' },
         { title: '制单人', dataIndex: 'preparedBy', width: 120, className: 'replacecolor' }
       ],
       costPayData: [],
@@ -311,12 +283,16 @@ export default {
   methods: {
     getALLDetail() {
       this.$nextTick(() => {
-        console.log('详情拿到planNum', this.record.planNum)
+        // console.log('详情拿到planNum', this.record.planNum)
         costByPlanNum({ plannum: this.record.planNum }).then(res => {
           if (res.success) {
-            console.log('详情所有数据id', res.result[0].createBy)
+            console.log('详情所有数据createBy', res.result[0].createBy)
             this.detailsPlanNum = res.result[0]
 
+            this.$refs.unitTabs.fabData = res.result[0].syCostAllocationFabricList //面料
+            this.$refs.unitTabs.ingData = res.result[0].syCostAllocationIngredientList //辅料
+            this.$refs.unitTabs.shipData = res.result[0].syCostAllocationShipdetailList //发运明细
+            
             this.accidentListData = res.result[0].syCostAllocationAccidentList //事故单
             this.costPayData = res.result[0].syCostAllocationCostpayList //支出费用
 

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

@@ -72,7 +72,7 @@
           <a href="javascript:void(0);" @click="detail(record)">详情</a>
           <a-divider type="vertical" />
           <a-popconfirm title="确定取消审核吗?" ok-text="是" cancel-text="否" @confirm="cancelCheck(record)">
-            <a href="javascript:void(0);" style="color:green">取消审核</a>
+            <a href="javascript:void(0);" style="color:red">取消审核</a>
           </a-popconfirm>
         </span>
 
@@ -124,7 +124,7 @@ export default {
           className: 'replacecolor'
         },
         { title: '客户简称', width: 150, dataIndex: 'customerShortame', className: 'replacecolor' },
-        { title: '加工单位', width: 120, dataIndex: 'processUnit', className: 'replacecolor' },
+        { title: '加工单位', width: 220, dataIndex: 'processUnit', align: 'left', className: 'replacecolor' },
         //  {
         //   title: '创建时间',
         //   dataIndex: 'createTime',

+ 45 - 32
src/views/cost-allocation-total/modal/fabricTransferQuantityModal.vue → src/views/cost-allocation-total/modal/fabInQuaModal.vue

@@ -1,28 +1,21 @@
 <template>
   <!-- 成本分配统计表  面料 转入数量 -->
   <a-modal
-    title="转入数量"
-    v-model="fabricTransferQuantityModVis"
+    title="面料 - 转入数量"
+    v-model="fabInQuaModVis"
     :confirmLoading="confirmLoading"
     width="86%"
     style="top:330px;left:100px;"
     :footer="null"
   >
-    <!-- tabel 加载 -->
+    <!-- tabel  -->
     <a-spin :spinning="confirmLoading">
-      <a-table
-        :loading="loading"
-        bordered
-        :columns="fabricTransferQuantityColumns"
-        :data-source="fabricTransferQuantityData"
-        :pagination="false"
-      >
-      </a-table>
+      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
       <!-- 导出 打印 返回  -->
       <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" 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>
@@ -35,14 +28,18 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import { downFile } from '@/api/manage'
+
 export default {
-  name: 'FabricTransferQuantityModal', // 面料 转入数量 弹框
+  name: 'FabInQuaModal', // 面料 转入数量 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis, moment },
   data() {
     return {
-      // 面料- 转入数量 表头
-      fabricTransferQuantityColumns: [
+      // 面料 - 转入数量 表头
+      columns: [
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
@@ -80,11 +77,10 @@ export default {
           className: 'replacecolor'
         }
       ],
-      fabricTransferQuantityData: [{}],
-      loading: false, // 表格加载
-      // orderDataform: this.$form.createForm(this),
+      data: [{}, {}],
+      loading: false,
       confirmLoading: false,
-      fabricTransferQuantityModVis: false
+      fabInQuaModVis: false
     }
   },
   // 接收父组件 方法
@@ -94,23 +90,40 @@ export default {
       default: null
     }
   },
-  created() {},
+
   methods: {
-    // 第一行 导出
-    // handleExportXls() {},
+    // 导出
+    handleExportXls(fileName) {
+      console.log('需导出的fileName:', fileName)
+      const params = this.dyeLossRateData
+      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对象
+      //   }
+      // })
+    },
     // 打印
     print() {},
-    // 取消
+
     cancel() {
       console.log('返回成本分配统计表')
-      // this.$router.push('fabricLoss-table')
-      // this.fabricTransferQuantityModVis = false
-      this.close()
-    },
-
-    close() {
-      this.$emit('close')
-      this.fabricTransferQuantityModVis = false
+      this.fabInQuaModVis = false
     }
   }
 }

+ 45 - 33
src/views/cost-allocation-total/modal/fabricRemainingQuantityModal.vue → src/views/cost-allocation-total/modal/fabRemQuaModal.vue

@@ -1,8 +1,8 @@
 <template>
-  <!-- 成本分配统计表  面料 余下数量 -->
+  <!-- 面料 余下数量 弹框 成本分配统计表  -->
   <a-modal
-    title="余下数量"
-    v-model="fabricRemainingQuantityModVis"
+    title="面料 - 余下数量"
+    v-model="fabRemQuaModVis"
     :confirmLoading="confirmLoading"
     width="86%"
     style="top:330px;left:100px;"
@@ -10,19 +10,12 @@
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
-      <a-table
-        :loading="loading"
-        bordered
-        :columns="fabricRemainingQuantityColumns"
-        :data-source="fabricRemainingQuantityData"
-        :pagination="false"
-      >
-      </a-table>
+      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
       <!-- 导出 打印 返回  -->
       <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" 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>
@@ -35,17 +28,20 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import { downFile } from '@/api/manage'
+
 export default {
-  name: 'FabricRemainingQuantityModal', // 面料 余下数量 弹框
+  name: 'FabRemQuaModal', // 面料 余下数量 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis, moment },
   data() {
     return {
-      // 面料- 余下数量 表头
-      fabricRemainingQuantityColumns: [
+      columns: [
         {
           title: '存货名称',
-          dataIndex: 'inventoryName',
+          dataIndex: 'a',
           width: 120,
           className: 'replacecolor'
         },
@@ -80,11 +76,10 @@ export default {
           className: 'replacecolor'
         }
       ],
-      fabricRemainingQuantityData: [{}],
-      loading: false, // 表格加载
-      // orderDataform: this.$form.createForm(this),
+      data: [{}, {}],
+      loading: false,
       confirmLoading: false,
-     fabricRemainingQuantityModVis: false
+      fabRemQuaModVis: false
     }
   },
   // 接收父组件 方法
@@ -94,23 +89,40 @@ export default {
       default: null
     }
   },
-  created() {},
+
   methods: {
-    // 第一行 导出
-    // handleExportXls() {},
+    // 导出
+    handleExportXls(fileName) {
+      console.log('需导出的fileName:', fileName)
+      const params = this.dyeLossRateData
+      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对象
+      //   }
+      // })
+    },
     // 打印
     print() {},
-    // 取消
+
     cancel() {
       console.log('返回成本分配统计表')
-      // this.$router.push('fabricLoss-table')
-      // this.fabricTransferQuantityModVis = false
-      this.close()
-    },
-
-    close() {
-      this.$emit('close')
-      this.fabricRemainingQuantityModVis = false
+      this.fabRemQuaModVis = false
     }
   }
 }

+ 39 - 26
src/views/cost-allocation-total/modal/ingredientsTransferQuantityModal.vue → src/views/cost-allocation-total/modal/ingInQuaModal.vue

@@ -1,8 +1,8 @@
 <template>
-  <!-- 成本分配统计表  辅料 转入数量 -->
+  <!-- 辅料 转入数量 成本分配统计表   -->
   <a-modal
     title="转入数量"
-    v-model="ingredientsTransferQuantityModVis"
+    v-model="ingInQuaModVis"
     :confirmLoading="confirmLoading"
     width="86%"
     style="top:330px;left:100px;"
@@ -10,14 +10,7 @@
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
-      <a-table
-        :loading="loading"
-        bordered
-        :columns="ingredientsTransferQuantityColumns"
-        :data-source="ingredientsTransferQuantityData"
-        :pagination="false"
-      >
-      </a-table>
+      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
       <!-- 导出 打印 返回  -->
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
@@ -35,14 +28,17 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import { downFile } from '@/api/manage'
 export default {
-  name: 'IngredientsTransferQuantityModal', // 辅料 转入数量 弹框
+  name: 'IngInQuaModal', // 辅料 转入数量 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis, moment },
   data() {
     return {
       // 辅料- 转入数量 表头
-      ingredientsTransferQuantityColumns: [
+      columns: [
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
@@ -75,11 +71,11 @@ export default {
           className: 'replacecolor'
         }
       ],
-      ingredientsTransferQuantityData: [{}],
+      data: [{}, {}],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
-      ingredientsTransferQuantityModVis: false
+      ingInQuaModVis: false
     }
   },
   // 接收父组件 方法
@@ -91,21 +87,38 @@ export default {
   },
   created() {},
   methods: {
-    // 第一行 导出
-    // handleExportXls() {},
+    // 导出
+    handleExportXls(fileName) {
+      console.log('需导出的fileName:', fileName)
+      const params = this.dyeLossRateData
+      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对象
+      //   }
+      // })
+    },
     // 打印
     print() {},
-    // 取消
+
     cancel() {
       console.log('返回成本分配统计表')
-      // this.$router.push('fabricLoss-table')
-      // this.ingredientsTransferQuantityModVis = false
-      this.close()
-    },
-
-    close() {
-      this.$emit('close')
-      this.ingredientsTransferQuantityModVis = false
+      this.ingInQuaModVis = false
     }
   }
 }

+ 42 - 30
src/views/cost-allocation-total/modal/ingredientsRemainingQuantityModal.vue → src/views/cost-allocation-total/modal/ingRemQuaModal.vue

@@ -1,28 +1,21 @@
 <template>
-  <!-- 成本分配统计表  辅料 余下数量 -->
+  <!--   辅料 余下数量  成本分配统计表-->
   <a-modal
     title="余下数量"
-    v-model="ingredientsRemainingQuantityModVis"
+    v-model="ingRemQuaModVis"
     :confirmLoading="confirmLoading"
     width="86%"
     style="top:330px;left:100px;"
     :footer="null"
   >
-    <!-- tabel 加载 -->
+    <!-- tabel -->
     <a-spin :spinning="confirmLoading">
-      <a-table
-        :loading="loading"
-        bordered
-        :columns="ingredientsRemainingQuantityColumns"
-        :data-source="ingredientsRemainingQuantityData"
-        :pagination="false"
-      >
-      </a-table>
+      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
       <!-- 导出 打印 返回  -->
       <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" 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>
@@ -35,14 +28,18 @@
 <script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
+import moment from 'moment'
+
+import { downFile } from '@/api/manage'
+
 export default {
-  name: 'IngredientsRemainingQuantityModal', // 辅料 余下数量 弹框
+  name: 'IngRemQuaModal', // 辅料 余下数量 弹框
   mixins: [JeecgListMixin],
-  components: { JEllipsis },
+  components: { JEllipsis, moment },
   data() {
     return {
       // 辅料 - 余下数量 表头
-      ingredientsRemainingQuantityColumns: [
+      columns: [
         {
           title: '存货名称',
           dataIndex: 'inventoryName',
@@ -74,11 +71,10 @@ export default {
           className: 'replacecolor'
         }
       ],
-      ingredientsRemainingQuantityData: [{}],
-      loading: false, // 表格加载
-      // orderDataform: this.$form.createForm(this),
+      data: [{},{}],
+      loading: false,
       confirmLoading: false,
-      ingredientsRemainingQuantityModVis: false
+      ingRemQuaModVis: false
     }
   },
   // 接收父组件 方法
@@ -90,21 +86,37 @@ export default {
   },
   created() {},
   methods: {
-    // 第一行 导出
-    // handleExportXls() {},
+    // 导出
+    handleExportXls(fileName) {
+      console.log('需导出的fileName:', fileName)
+      const params = this.dyeLossRateData
+      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对象
+      //   }
+      // })
+    },
     // 打印
     print() {},
-    // 取消
     cancel() {
       console.log('返回成本分配统计表')
-      // this.$router.push('fabricLoss-table')
-      // this.ingredientsRemainingQuantityModVis = false
-      this.close()
-    },
-
-    close() {
-      this.$emit('close')
-      this.ingredientsRemainingQuantityModVis = false
+      this.ingRemQuaModVis = false
     }
   }
 }

+ 427 - 0
src/views/cost-allocation-total/tabTest.vue

@@ -0,0 +1,427 @@
+<template>
+  <!-- 加工单位 2 -->
+  <a-tab-pane key="2" tab="加工单位2" force-render>
+    <!-- tabs 面料 -->
+    <div>
+      <h6 class="table-title">面料</h6>
+
+      <a-table
+        rowKey="id"
+        :loading="loading"
+        :columns="twofabricColumns"
+        :data-source="twofabricData"
+        bordered
+        :pagination="false"
+      >
+        <!-- 转入数量 弹框-->
+        <span slot="twofabricTransferQuantity" slot-scope="text">
+          <a>{{ text }}</a>
+        </span>
+
+        <!-- 余下数量 弹框-->
+        <span slot="fabricremainingQuantity" slot-scope="text">
+          <a>{{ text }}</a>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- tabs 辅料 -->
+    <div style="margin:40px 0">
+      <h6 class="table-title">辅料</h6>
+
+      <a-table
+        rowKey="id"
+        :loading="loading"
+        :columns="twoingredientsColumns"
+        :data-source="twoingredientsData"
+        bordered
+        :pagination="false"
+      >
+        <!--辅料-转入数量 弹框-->
+        <span slot="ingredientsTransferQuantity" slot-scope="text">
+          <a>{{ text }}</a>
+        </span>
+        <!--辅料-余下数量 弹框-->
+        <span slot="fabricremainingQuantity" slot-scope="text">
+          <a>{{ text }}</a>
+        </span>
+      </a-table>
+    </div>
+
+    <!-- tabs 发运明细 -->
+    <div>
+      <h6 class="table-title">发运明细</h6>
+      <a-table
+        rowKey="id"
+        :loading="loading"
+        :columns="twoshipDetailsColumns"
+        :data-source="twoshipDetailsData"
+        bordered
+        :pagination="false"
+      >
+      </a-table>
+    </div>
+
+    <!-- tabs 合计 信息 -->
+    <div style="marginTop:30px;">
+      <h6 class="table-title">合计信息</h6>
+      <div style="border: 1px solid #e8e8e8;padding: 20px 20px 0 20px;">
+        <a-row :gutter="24">
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+              <a-col :md="6" :sm="8">
+                <a-form-item label="出货数量合计">
+                  <a-input v-model="totalInfo.shipmentQuantity"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="辅料金额合计">
+                  <a-input v-model="totalInfo.accessoriesAmount"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="辅料不含税金额合计">
+                  <a-input v-model="totalInfo.accessoriesExcludTax"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="出运美元外销总价">
+                  <a-input v-model="totalInfo.exportPriceUSD"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="出运加工费">
+                  <a-input v-model="totalInfo.shipProcesFees"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="面料不含税金额合计">
+                  <a-input v-model="totalInfo.fabricExcludTax"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="出运人民币外销金额">
+                  <a-input v-model="totalInfo.exportedAmountRMB"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="合计金额">
+                  <a-input v-model="totalInfo.amountTotal"></a-input>
+                </a-form-item>
+              </a-col>
+
+              <a-col :md="6" :sm="8">
+                <a-form-item label="面料金额合计">
+                  <a-input v-model="totalInfo.fabricAmount"></a-input>
+                </a-form-item>
+              </a-col>
+            </a-form>
+          </div>
+        </a-row>
+      </div>
+    </div>
+  </a-tab-pane>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      // two 面料 表头
+      twofabricColumns: [
+        {
+          title: '序号',
+          width: 90,
+          dataIndex: 'index',
+          key: 'index',
+          customRender: (text, record, index) => `${index + 1}`,
+          className: 'replacecolor'
+        },
+        { title: '面料', width: 160, dataIndex: 'fabric', className: 'replacecolor' },
+        {
+          title: '单位成本',
+          dataIndex: 'unitCost',
+          width: 120,
+          className: 'replacecolor'
+        },
+        { title: '存货名称', width: 160, dataIndex: 'inventoryName', className: 'replacecolor' },
+
+        {
+          title: '转入数量',
+          dataIndex: 'fabrictransferQuantity',
+          width: 120,
+          className: 'replacecolor',
+          customCell: this.twoFabricTransferQuantityCustomCell,
+          scopedSlots: { customRender: 'fabrictransferQuantity' }
+        },
+        { title: '转入成本', width: 160, dataIndex: 'transferCost', className: 'replacecolor' },
+
+        { title: '单耗/件', dataIndex: 'unitConsumption', width: 120, className: 'replacecolor' },
+        { title: '使用数量', dataIndex: 'usageQuantity', width: 120, className: 'replacecolor' },
+        { title: '计划数量', dataIndex: 'planQuantity', width: 120, className: 'replacecolor' },
+        {
+          title: '购入数量',
+          dataIndex: 'purchaseQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '余下数量',
+          dataIndex: 'twofabricRemainingQuantity',
+          width: 100,
+          className: 'replacecolor',
+          customCell: this.twofabricRemainingQuantityCustomCell,
+          scopedSlots: { customRender: 'twofabricRemainingQuantity' }
+        },
+        {
+          title: '损耗',
+          dataIndex: 'loss',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '余下数量的成本',
+          dataIndex: 'remainingQuantitycost',
+          width: 120,
+          className: 'replacecolor'
+        }
+      ],
+      twofabricData: [],
+      // two 辅料 表头
+      twoingredientsColumns: [
+        {
+          title: '序号',
+          width: 90,
+          dataIndex: 'index',
+          key: 'index',
+          fixed: 'left',
+          customRender: (text, record, index) => `${index + 1}`,
+          className: 'replacecolor'
+        },
+        { title: '辅料', width: 170, dataIndex: 'ingredients', fixed: 'left', className: 'replacecolor' },
+        {
+          title: '转入数量',
+          dataIndex: 'ingredientsTransferQuantity',
+          width: 120,
+          className: 'replacecolor',
+          customCell: this.twoingredientsTransferQuantityCustomCell,
+          scopedSlots: { customRender: 'ingredientsTransferQuantity' }
+        },
+        {
+          title: '转入成本',
+          dataIndex: 'transferCost',
+          width: 120,
+          className: 'replacecolor'
+        },
+
+        { title: '使用数量', dataIndex: 'usageQuantity', width: 120, className: 'replacecolor' },
+        {
+          title: '购入数量',
+          dataIndex: 'purchaseQuantity',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '余下数量',
+          dataIndex: 'twoingredientsRemainingQuantity',
+          width: 140,
+          className: 'replacecolor',
+          customCell: this.twoingredientsRemainingQuantityCustomCell,
+          scopedSlots: { customRender: 'twoingredientsRemainingQuantity' }
+        },
+        {
+          title: '损耗',
+          dataIndex: 'loss',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '人民币金额',
+          dataIndex: 'RMBAmount',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '美元金额',
+          dataIndex: 'USDAmount',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '不含税金额',
+          dataIndex: 'priceExcludingTax',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '转出率',
+          dataIndex: 'transferOutRate',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '进项税转出',
+          dataIndex: 'inputTaxTransferOut',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '用量',
+          dataIndex: 'dosage',
+          width: 120,
+          className: 'replacecolor'
+        }
+      ],
+      twoingredientsData: [],
+      // two 发运明细 表头
+      twoshipDetailsColumns: [
+        {
+          title: '序号',
+          width: 90,
+          dataIndex: 'index',
+          key: 'index',
+          fixed: 'left',
+          customRender: (text, record, index) => `${index + 1}`,
+          className: 'replacecolor'
+        },
+        { title: '发票号码', width: 180, dataIndex: 'invoiceNum', fixed: 'left', className: 'replacecolor' },
+        {
+          title: '出运日期',
+          dataIndex: 'outData',
+          width: 130,
+          className: 'replacecolor'
+          // customCell: this.ingredientsTransferQuantityCustomCell,
+          // scopedSlots: { customRender: 'fabrictransferQuantity' }
+        },
+        {
+          title: '汇率',
+          dataIndex: 'exchangeRate',
+          width: 120,
+          className: 'replacecolor'
+        },
+
+        { title: '订单号', dataIndex: 'orderNum', width: 160, className: 'replacecolor' },
+        {
+          title: '产品款号',
+          dataIndex: 'poStyleNum',
+          width: 120,
+          className: 'replacecolor'
+        },
+        {
+          title: '出货数量',
+          dataIndex: 'shipQuantity',
+          width: 120,
+          className: 'replacecolor'
+          // customCell: this.ingredientsRemainingQuantityCustomCell,
+          // scopedSlots: { customRender: 'fabricremainingQuantity' }
+        },
+        {
+          title: '外销单价',
+          dataIndex: 'loss',
+          width: 120,
+          className: 'exportUnitPrice'
+        },
+        {
+          title: '外销总价',
+          dataIndex: 'exportPrice',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '人民币金额',
+          dataIndex: 'RMBAmount',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '加工单价(人民币)',
+          dataIndex: 'procesUnitPriceRMB',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '加工单价(美元)',
+          dataIndex: 'procesUnitPriceUSD',
+          width: 160,
+          className: 'replacecolor'
+        },
+        {
+          title: '加工费',
+          dataIndex: 'processCost',
+          width: 160,
+          className: 'replacecolor'
+        }
+      ],
+      twoshipDetailsData: []
+    }
+  },
+  methods: {
+    //  加工单位2 面料 -转入数量 弹框
+    twoFabricTransferQuantityCustomCell() {
+      return {
+        on: {
+          click: event => {
+            console.log('点击单元格-加工单位2 面料-转入数量')
+            this.$refs.fabricTransferQuantityModal.fabricTransferQuantityModVis = true
+          }
+        }
+      }
+    },
+
+    //  加工单位2 面料 -余下数量 弹框
+    twofabricRemainingQuantityCustomCell() {
+      return {
+        on: {
+          click: event => {
+            console.log('点击单元格-辅料-余下数量')
+            this.$refs.fabricRemainingQuantityModal.fabricRemainingQuantityModVis = true
+          }
+        }
+      }
+    },
+    // 加工单位2 辅料-转入数量 弹框
+    twoingredientsTransferQuantityCustomCell() {
+      return {
+        on: {
+          click: event => {
+            console.log('点击单元格-辅料-转入数量')
+            this.$refs.ingredientsTransferQuantityModal.ingredientsTransferQuantityModVis = true
+          }
+        }
+      }
+    },
+    // 加工单位2 辅料-余下数量 弹框
+    twoingredientsRemainingQuantityCustomCell() {
+      return {
+        on: {
+          click: event => {
+            console.log('点击单元格-辅料-余下数量')
+            this.$refs.ingredientsRemainingQuantityModal.ingredientsRemainingQuantityModVis = true
+          }
+        }
+      }
+    },
+
+    // 事故单 单号 弹框
+    accidentListCustomCell(record) {
+      return {
+        on: {
+          click: event => {
+            console.log('this:', this)
+            this.$refs.accidentListModal.accidentListModVis = true
+          }
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style></style>

+ 69 - 524
src/views/cost-allocation-total/tabs.vue

@@ -1,6 +1,6 @@
 <template>
-  <!-- 成本分配汇总 详情tabs (单证 -->
-  <div id="tabs">
+  <!-- 详情 - 成本分配汇总 单证 -->
+  <div id="unitTabs">
     <a-tabs default-active-key="1" @change="tabsCallback">
       <a-tab-pane key="1" tab="加工单位1">
         <!-- tabs 面料 -->
@@ -9,19 +9,19 @@
           <a-table
             rowKey="(item)=>item.id"
             :loading="loading"
-            :columns="fabricColumns"
-            :data-source="fabricData"
+            :columns="fabColumns"
+            :data-source="fabData"
             bordered
             :pagination="false"
             :scroll="{ x: 1500, y: 300 }"
           >
             <!-- 面料 -转入数量 弹框-->
-            <span slot="fabricTransferQuantity" slot-scope="text">
+            <span slot="fabInQuaSlot" slot-scope="text">
               <a>{{ text }}</a>
             </span>
 
             <!-- 余下数量-->
-            <span slot="fabricRemainingQuantity" slot-scope="text">
+            <span slot="fabRemaQuaSlot" slot-scope="text">
               <a>{{ text }}</a>
             </span>
           </a-table>
@@ -33,18 +33,18 @@
           <a-table
             rowKey="id"
             :loading="loading"
-            :columns="ingredientsColumns"
-            :data-source="ingredientsData"
+            :columns="ingColumns"
+            :data-source="ingData"
             bordered
             :pagination="false"
             :scroll="{ x: 1000, y: 300 }"
           >
             <!--辅料-转入数量 弹框-->
-            <span slot="ingredientsTransferQuantity" slot-scope="text">
+            <span slot="ingInQuaSlot" slot-scope="text">
               <a>{{ text }}</a>
             </span>
             <!--辅料-余下数量 弹框-->
-            <span slot="ingredientsRemainingQuantity" slot-scope="text">
+            <span slot="ingRemQuaSlot" slot-scope="text">
               <a>{{ text }}</a>
             </span>
           </a-table>
@@ -56,8 +56,8 @@
           <a-table
             rowKey="id"
             :loading="loading"
-            :columns="shipDetailsColumns"
-            :data-source="shipDetailsData"
+            :columns="shipColumns"
+            :data-source="shipData"
             bordered
             :pagination="false"
             :scroll="{ x: 1000, y: 300 }"
@@ -131,155 +131,20 @@
           </div>
         </div>
       </a-tab-pane>
-
-      <!-- 加工单位 2 -->
-      <a-tab-pane key="2" tab="加工单位2" force-render>
-        <!-- tabs 面料 -->
-        <div>
-          <h6 class="table-title">面料</h6>
-
-          <a-table
-            rowKey="id"
-            :loading="loading"
-            :columns="twofabricColumns"
-            :data-source="twofabricData"
-            bordered
-            :pagination="false"
-          >
-            <!-- 转入数量 弹框-->
-            <span slot="twofabricTransferQuantity" slot-scope="text">
-              <a>{{ text }}</a>
-            </span>
-
-            <!-- 余下数量 弹框-->
-            <span slot="twofabricRemainingQuantity" slot-scope="text">
-              <a>{{ text }}</a>
-            </span>
-          </a-table>
-        </div>
-
-        <!-- tabs 辅料 -->
-        <div style="margin:40px 0">
-          <h6 class="table-title">辅料</h6>
-
-          <a-table
-            rowKey="id"
-            :loading="loading"
-            :columns="twoingredientsColumns"
-            :data-source="twoingredientsData"
-            bordered
-            :pagination="false"
-          >
-            <!--辅料-转入数量 弹框-->
-            <span slot="twoingredientsTransferQuantity" slot-scope="text">
-              <a>{{ text }}</a>
-            </span>
-            <!--辅料-余下数量 弹框-->
-            <span slot="twoingredientsRemainingQuantity" slot-scope="text">
-              <a>{{ text }}</a>
-            </span>
-          </a-table>
-        </div>
-
-        <!-- tabs 发运明细 -->
-        <div>
-          <h6 class="table-title">发运明细</h6>
-          <a-table
-            rowKey="id"
-            :loading="loading"
-            :columns="twoshipDetailsColumns"
-            :data-source="twoshipDetailsData"
-            bordered
-            :pagination="false"
-          >
-          </a-table>
-        </div>
-
-        <!-- tabs 合计 信息 -->
-        <div style="marginTop:30px;">
-          <h6 class="table-title">合计信息</h6>
-          <div style="border: 1px solid #e8e8e8;padding: 20px 20px 0 20px;">
-            <a-row :gutter="24">
-              <div class="table-page-search-wrapper">
-                <a-form layout="inline">
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="出货数量合计">
-                      <a-input v-model="totalInfo.shipmentQuantity"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="辅料金额合计">
-                      <a-input v-model="totalInfo.accessoriesAmount"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="辅料不含税金额合计">
-                      <a-input v-model="totalInfo.accessoriesExcludTax"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="出运美元外销总价">
-                      <a-input v-model="totalInfo.exportPriceUSD"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="出运加工费">
-                      <a-input v-model="totalInfo.shipProcesFees"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="面料不含税金额合计">
-                      <a-input v-model="totalInfo.fabricExcludTax"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="出运人民币外销金额">
-                      <a-input v-model="totalInfo.exportedAmountRMB"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="合计金额">
-                      <a-input v-model="totalInfo.amountTotal"></a-input>
-                    </a-form-item>
-                  </a-col>
-
-                  <a-col :md="6" :sm="8">
-                    <a-form-item label="面料金额合计">
-                      <a-input v-model="totalInfo.fabricAmount"></a-input>
-                    </a-form-item>
-                  </a-col>
-                </a-form>
-              </div>
-            </a-row>
-          </div>
-        </div>
-      </a-tab-pane>
     </a-tabs>
 
-    <!-- tabs 弹框 -->
+    <!-- tabs内弹框 -->
     <div>
       <!-- 面料 转入数量 -->
-      <fabricTransferQuantity-modal ref="fabricTransferQuantityModal" :father="aa"></fabricTransferQuantity-modal>
-      <!-- 面料 余下数量 -->
-      <fabricRemainingQuantity-modal ref="fabricRemainingQuantityModal" :father="bb"></fabricRemainingQuantity-modal>
+      <fabInQua-modal ref="fabInQuaModal" :father="aa"></fabInQua-modal>
+
+      <!-- 余下数量 -->
+      <fabRemQua-modal ref="fabRemQuaModal" :father="bb"></fabRemQua-modal>
 
       <!-- 辅料 转入数量 -->
-      <ingredientsTransferQuantity-modal
-        ref="ingredientsTransferQuantityModal"
-        :father="cc"
-      ></ingredientsTransferQuantity-modal>
-      <!-- 辅料 余下数量 -->
-      <ingredientsRemainingQuantity-modal
-        ref="ingredientsRemainingQuantityModal"
-        :father="bb"
-      ></ingredientsRemainingQuantity-modal>
+      <ingInQua-modal ref="ingInQuaModal" :father="cc"></ingInQua-modal>
+      <!-- 余下数量 -->
+      <ingRemQua-modal ref="ingRemQuaModal" :father="bb"></ingRemQua-modal>
     </div>
   </div>
 </template>
@@ -289,33 +154,28 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
 
-import fabricTransferQuantityModal from '@views/cost-allocation-total/modal/fabricTransferQuantityModal.vue'
-import fabricRemainingQuantityModal from '@views/cost-allocation-total/modal/fabricRemainingQuantityModal.vue'
-import ingredientsTransferQuantityModal from '@views/cost-allocation-total/modal/ingredientsTransferQuantityModal.vue'
-import ingredientsRemainingQuantityModal from '@views/cost-allocation-total/modal/ingredientsRemainingQuantityModal.vue'
+import fabInQuaModal from '@views/cost-allocation-total/modal/fabInQuaModal.vue'
+import fabRemQuaModal from '@views/cost-allocation-total/modal/fabRemQuaModal.vue'
+import ingInQuaModal from '@views/cost-allocation-total/modal/ingInQuaModal.vue'
+import ingRemQuaModal from '@views/cost-allocation-total/modal/ingRemQuaModal.vue'
 
 export default {
-  name: 'Tabs', //  成本分配汇总 详情tabs (单证)
+  name: 'UnitTabs', //  成本分配汇总 详情tabs (单证)
   mixins: [JeecgListMixin],
   components: {
     JEllipsis,
     moment,
-    fabricTransferQuantityModal, // 面料 转入数量
-    fabricRemainingQuantityModal, //  余下数量
-    ingredientsTransferQuantityModal, // 辅料 转入数量
-    ingredientsRemainingQuantityModal // 余下数量
+    fabInQuaModal, // 面料 转入数量
+    fabRemQuaModal, //  余下数量
+    ingInQuaModal, // 辅料 转入数量
+    ingRemQuaModal // 余下数量
   },
   data() {
     // let ellipsis = (v, l = 20) => <j-ellipsis value={v} length={l} /> // 省略
     return {
       totalInfo: {}, // tabs 中合计信息
       // one 面料 表头
-      fabricColumns: [
-        /*
-          text     序号一列默认显示的数据
-          record   一行的所有数据
-          index    tbale表格数据的下标,即数组的下标
-        */
+      fabColumns: [
         {
           title: '序号',
           width: 50,
@@ -327,11 +187,11 @@ export default {
         { title: '货物名称', width: 160, dataIndex: 'goodsName', className: 'replacecolor' },
         {
           title: '转入数量',
-          dataIndex: 'fabricTransferQuantity',
+          dataIndex: 'fabrictransferQuantity',
           width: 120,
           className: 'replacecolor',
-          customCell: this.fabricTransferQuantityCustomCell,
-          scopedSlots: { customRender: 'fabricTransferQuantity' }
+          customCell: this.fabQuaCustomCell,
+          scopedSlots: { customRender: 'fabInQuaSlot' }
         },
         {
           title: '转入成本',
@@ -351,11 +211,11 @@ export default {
         },
         {
           title: '余下数量',
-          dataIndex: 'fabricRemainingQuantity',
+          dataIndex: 'fabricremainingQuantity',
           width: 100,
           className: 'replacecolor',
-          customCell: this.fabricRemainingQuantityCustomCell,
-          scopedSlots: { customRender: 'fabricRemainingQuantity' }
+          customCell: this.fabRemQuaCustomCell,
+          scopedSlots: { customRender: 'fabRemaQuaSlot' }
         },
         {
           title: '损耗',
@@ -365,17 +225,14 @@ export default {
         },
         {
           title: '余下数量的成本',
-          dataIndex: 'remainingQuantityCost',
+          dataIndex: 'remainingQuantitycost',
           width: 120,
           className: 'replacecolor'
         }
       ],
-      fabricData: [
-        { fabricTransferQuantity: '8987', fabricRemainingQuantity: '67', loss: '1.17%' },
-        { fabricTransferQuantity: '6752', fabricRemainingQuantity: '37', loss: '1.17%' }
-      ],
+      fabData: [],
       // one 辅料 表头
-      ingredientsColumns: [
+      ingColumns: [
         {
           title: '序号',
           width: 90,
@@ -391,8 +248,8 @@ export default {
           dataIndex: 'ingredientsTransferQuantity',
           width: 120,
           className: 'replacecolor',
-          customCell: this.ingredientsTransferQuantityCustomCell,
-          scopedSlots: { customRender: 'ingredientsTransferQuantity' }
+          customCell: this.ingInQuaCustomCell,
+          scopedSlots: { customRender: 'ingInQuaSlot' }
         },
         {
           title: '转入成本',
@@ -413,8 +270,8 @@ export default {
           dataIndex: 'ingredientsRemainingQuantity',
           width: 140,
           className: 'replacecolor',
-          customCell: this.ingredientsRemainingQuantityCustomCell,
-          scopedSlots: { customRender: 'ingredientsRemainingQuantity' }
+          customCell: this.ingRemQuaCustomCell,
+          scopedSlots: { customRender: 'ingRemQuaSlot' }
         },
         {
           title: '损耗',
@@ -424,31 +281,31 @@ export default {
         },
         {
           title: '人民币金额',
-          dataIndex: 'RMBAmount',
+          dataIndex: 'rmbAmount',
           width: 160,
           className: 'replacecolor'
         },
         {
           title: '美元金额',
-          dataIndex: 'USDAmount',
+          dataIndex: 'usdAmount',
           width: 160,
           className: 'replacecolor'
         },
         {
           title: '不含税金额',
-          dataIndex: 'priceExcludingTax',
+          dataIndex: 'priceExcludingtax',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '转出率',
-          dataIndex: 'transferOutRate',
+          dataIndex: 'transferOutrate',
           width: 120,
           className: 'replacecolor'
         },
         {
-          title: '进项税转出',
-          dataIndex: 'inputTaxTransferOut',
+          title: '进项税转出', 
+          dataIndex: 'inputtaxTransferout',
           width: 160,
           className: 'replacecolor'
         },
@@ -459,11 +316,9 @@ export default {
           className: 'replacecolor'
         }
       ],
-      ingredientsData: [
-        { ingredientsTransferQuantity: '7899', transferCost: '12536', ingredientsRemainingQuantity: '6698' }
-      ],
+      ingData: [],
       // one 发运明细 表头
-      shipDetailsColumns: [
+      shipColumns: [
         {
           title: '序号',
           width: 90,
@@ -478,257 +333,8 @@ export default {
           title: '出运日期',
           dataIndex: 'outData',
           width: 130,
-          className: 'replacecolor',
-          customCell: this.ingredientsTransferQuantityCustomCell,
-          scopedSlots: { customRender: 'ingredientsTransferQuantity' }
-        },
-        {
-          title: '汇率',
-          dataIndex: 'exchangeRate',
-          width: 120,
           className: 'replacecolor'
         },
-
-        { title: '订单号', dataIndex: 'orderNum', width: 160, className: 'replacecolor' },
-        {
-          title: '产品款号',
-          dataIndex: 'poStyleNum',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '出货数量',
-          dataIndex: 'shipQuantity',
-          width: 120,
-          className: 'replacecolor',
-          customCell: this.ingredientsRemainingQuantityCustomCell,
-          scopedSlots: { customRender: 'ingredientsRemainingQuantity' }
-        },
-        {
-          title: '外销单价',
-          dataIndex: 'loss',
-          width: 120,
-          className: 'exportUnitPrice'
-        },
-        {
-          title: '外销总价',
-          dataIndex: 'exportPrice',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '人民币金额',
-          dataIndex: 'RMBAmount',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '加工单价(人民币)',
-          dataIndex: 'procesUnitPriceRMB',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '加工单价(美元)',
-          dataIndex: 'procesUnitPriceUSD',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '加工费',
-          dataIndex: 'processCost',
-          width: 160,
-          className: 'replacecolor'
-        }
-      ],
-      shipDetailsData: [{ invoiceNum: '19TW-PRU-138S', outData: '2019-10-16', exchangeRate: '7.1338' }],
-      // two 面料 表头
-      twofabricColumns: [
-        {
-          title: '序号',
-          width: 90,
-          dataIndex: 'index',
-          key: 'index',
-          customRender: (text, record, index) => `${index + 1}`,
-          className: 'replacecolor'
-        },
-        { title: '面料', width: 160, dataIndex: 'fabric', className: 'replacecolor' },
-        {
-          title: '单位成本',
-          dataIndex: 'unitCost',
-          width: 120,
-          className: 'replacecolor'
-        },
-        { title: '存货名称', width: 160, dataIndex: 'inventoryName', className: 'replacecolor' },
-
-        {
-          title: '转入数量',
-          dataIndex: 'twofabricTransferQuantity',
-          width: 120,
-          className: 'replacecolor',
-          customCell: this.twoFabricTransferQuantityCustomCell,
-          scopedSlots: { customRender: 'twofabricTransferQuantity' }
-        },
-        { title: '转入成本', width: 160, dataIndex: 'transferCost', className: 'replacecolor' },
-
-        { title: '单耗/件', dataIndex: 'unitConsumption', width: 120, className: 'replacecolor' },
-        { title: '使用数量', dataIndex: 'usageQuantity', width: 120, className: 'replacecolor' },
-        { title: '计划数量', dataIndex: 'planQuantity', width: 120, className: 'replacecolor' },
-        {
-          title: '购入数量',
-          dataIndex: 'purchaseQuantity',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '余下数量',
-          dataIndex: 'twofabricRemainingQuantity',
-          width: 100,
-          className: 'replacecolor',
-          customCell: this.twofabricRemainingQuantityCustomCell,
-          scopedSlots: { customRender: 'twofabricRemainingQuantity' }
-        },
-        {
-          title: '损耗',
-          dataIndex: 'loss',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '余下数量的成本',
-          dataIndex: 'remainingQuantityCost',
-          width: 120,
-          className: 'replacecolor'
-        }
-      ],
-      twofabricData: [
-        {
-          fabric: '裤绳',
-          inventoryName: 'XXSS',
-          twofabricTransferQuantity: '8987',
-          twofabricRemainingQuantity: '67',
-          loss: '1.17%'
-        },
-        {
-          fabric: '裤绳',
-          inventoryName: 'XXSS',
-          twofabricTransferQuantity: '6752',
-          twofabricRemainingQuantity: '37',
-          loss: '1.17%'
-        }
-      ],
-      // two 辅料 表头
-      twoingredientsColumns: [
-        {
-          title: '序号',
-          width: 90,
-          dataIndex: 'index',
-          key: 'index',
-          fixed: 'left',
-          customRender: (text, record, index) => `${index + 1}`,
-          className: 'replacecolor'
-        },
-        { title: '辅料', width: 170, dataIndex: 'ingredients', fixed: 'left', className: 'replacecolor' },
-        {
-          title: '转入数量',
-          dataIndex: 'twoingredientsTransferQuantity',
-          width: 120,
-          className: 'replacecolor',
-          customCell: this.twoingredientsTransferQuantityCustomCell,
-          scopedSlots: { customRender: 'twoingredientsTransferQuantity' }
-        },
-        {
-          title: '转入成本',
-          dataIndex: 'transferCost',
-          width: 120,
-          className: 'replacecolor'
-        },
-
-        { title: '使用数量', dataIndex: 'usageQuantity', width: 120, className: 'replacecolor' },
-        {
-          title: '购入数量',
-          dataIndex: 'purchaseQuantity',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '余下数量',
-          dataIndex: 'twoingredientsRemainingQuantity',
-          width: 140,
-          className: 'replacecolor',
-          customCell: this.twoingredientsRemainingQuantityCustomCell,
-          scopedSlots: { customRender: 'twoingredientsRemainingQuantity' }
-        },
-        {
-          title: '损耗',
-          dataIndex: 'loss',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '人民币金额',
-          dataIndex: 'RMBAmount',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '美元金额',
-          dataIndex: 'USDAmount',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '不含税金额',
-          dataIndex: 'priceExcludingTax',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '转出率',
-          dataIndex: 'transferOutRate',
-          width: 120,
-          className: 'replacecolor'
-        },
-        {
-          title: '进项税转出',
-          dataIndex: 'inputTaxTransferOut',
-          width: 160,
-          className: 'replacecolor'
-        },
-        {
-          title: '用量',
-          dataIndex: 'dosage',
-          width: 120,
-          className: 'replacecolor'
-        }
-      ],
-      twoingredientsData: [
-        {
-          twoingredientsTransferQuantity: '7899',
-          transferCost: '12536',
-          twoingredientsRemainingQuantity: '6698'
-        }
-      ],
-      // two 发运明细 表头
-      twoshipDetailsColumns: [
-        {
-          title: '序号',
-          width: 90,
-          dataIndex: 'index',
-          key: 'index',
-          fixed: 'left',
-          customRender: (text, record, index) => `${index + 1}`,
-          className: 'replacecolor'
-        },
-        { title: '发票号码', width: 180, dataIndex: 'invoiceNum', fixed: 'left', className: 'replacecolor' },
-        {
-          title: '出运日期',
-          dataIndex: 'outData',
-          width: 130,
-          className: 'replacecolor',
-          customCell: this.ingredientsTransferQuantityCustomCell,
-          scopedSlots: { customRender: 'ingredientsTransferQuantity' }
-        },
         {
           title: '汇率',
           dataIndex: 'exchangeRate',
@@ -747,9 +353,9 @@ export default {
           title: '出货数量',
           dataIndex: 'shipQuantity',
           width: 120,
-          className: 'replacecolor',
-          customCell: this.ingredientsRemainingQuantityCustomCell,
-          scopedSlots: { customRender: 'ingredientsRemainingQuantity' }
+          className: 'replacecolor'
+          // customCell: this.ingredientsRemainingQuantityCustomCell,
+          // scopedSlots: { customRender: 'fabricremainingQuantity' }
         },
         {
           title: '外销单价',
@@ -788,125 +394,64 @@ export default {
           className: 'replacecolor'
         }
       ],
-      twoshipDetailsData: [
-        { invoiceNum: '19TW-PRU-138S', outData: '2019-11-16', exchangeRate: '7.1338', RMBAmount: '160689.83' }
-      ]
+      shipData: []
     }
   },
   created() {
     // 渲染订单销售列表
   },
   methods: {
-    // tbas
     tabsCallback(key) {
       console.log(key)
     },
-    // --------------------------------------------------------
+
     // 面料 -转入数量 弹框
-    fabricTransferQuantityCustomCell(record) {
+    fabQuaCustomCell(record) {
       return {
         on: {
           click: event => {
-            console.log('点击单元格-面料-转入数量')
-            this.$refs.fabricTransferQuantityModal.fabricTransferQuantityModVis = true
+            console.log('面料 - 转入数量')
+            this.$refs.fabInQuaModal.fabInQuaModVis = true
           }
         }
       }
     },
+
     // 面料 -余下数量 弹框
-    fabricRemainingQuantityCustomCell() {
+    fabRemQuaCustomCell(record) {
       return {
         on: {
           click: event => {
-            console.log('点击单元格-面料-余下数量')
-            this.$refs.fabricRemainingQuantityModal.fabricRemainingQuantityModVis = true
+            console.log('面料 - 余下数量')
+            this.$refs.fabRemQuaModal.fabRemQuaModVis = true
           }
         }
       }
     },
 
     // 辅料-转入数量 弹框
-    ingredientsTransferQuantityCustomCell() {
+    ingInQuaCustomCell(record) {
       return {
         on: {
           click: event => {
-            console.log('点击单元格-辅料-转入数量')
-            this.$refs.ingredientsTransferQuantityModal.ingredientsTransferQuantityModVis = true
+            console.log('辅料 - 转入数量')
+            this.$refs.ingInQuaModal.ingInQuaModVis = true
           }
         }
       }
     },
     // 辅料-余下数量 弹框
-    ingredientsRemainingQuantityCustomCell() {
-      return {
-        on: {
-          click: event => {
-            console.log('点击单元格-辅料-余下数量')
-            this.$refs.ingredientsRemainingQuantityModal.ingredientsRemainingQuantityModVis = true
-          }
-        }
-      }
-    },
-    // ---------------------------
-    //  加工单位2 面料 -转入数量 弹框
-    twoFabricTransferQuantityCustomCell() {
-      return {
-        on: {
-          click: event => {
-            console.log('点击单元格-加工单位2 面料-转入数量')
-            this.$refs.fabricTransferQuantityModal.fabricTransferQuantityModVis = true
-          }
-        }
-      }
-    },
-
-    //  加工单位2 面料 -余下数量 弹框
-    twofabricRemainingQuantityCustomCell() {
-      return {
-        on: {
-          click: event => {
-            console.log('点击单元格-辅料-余下数量')
-            this.$refs.fabricRemainingQuantityModal.fabricRemainingQuantityModVis = true
-          }
-        }
-      }
-    },
-    // 加工单位2 辅料-转入数量 弹框
-    twoingredientsTransferQuantityCustomCell() {
-      return {
-        on: {
-          click: event => {
-            console.log('点击单元格-辅料-转入数量')
-            this.$refs.ingredientsTransferQuantityModal.ingredientsTransferQuantityModVis = true
-          }
-        }
-      }
-    },
-    // 加工单位2 辅料-余下数量 弹框
-    twoingredientsRemainingQuantityCustomCell() {
-      return {
-        on: {
-          click: event => {
-            console.log('点击单元格-辅料-余下数量')
-            this.$refs.ingredientsRemainingQuantityModal.ingredientsRemainingQuantityModVis = true
-          }
-        }
-      }
-    },
-
-    // 事故单 单号 弹框
-    accidentListCustomCell(record) {
+    ingRemQuaCustomCell(record) {
       return {
         on: {
           click: event => {
-            console.log('this:', this)
-            this.$refs.accidentListModal.accidentListModVis = true
+            console.log('辅料 - 余下数量')
+            this.$refs.ingRemQuaModal.ingRemQuaModVis = true
           }
         }
       }
     },
 
-    // -弹框接收父组件方法---------------------------------------
     aa() {},
     bb() {},
     cc() {}

+ 0 - 2
src/views/reportForms/dye-loss-table.vue

@@ -191,7 +191,6 @@ export default {
     // 查询染损列表
     getdyeLossList() {
       this.$nextTick(() => {
-        // TODO:判断是否又查询条件  有的话  页面初始化
         dyeLossList(this.queryParam).then(res => {
           // if(this.queryParam) {}
           if (res.success) {
@@ -219,7 +218,6 @@ export default {
 
       this.queryParam.pageNo = ''
       this.getdyeLossList() // 渲染染损列表
-      console.log('重置页数')
     },
     searchReset() {
       this.queryParam = {}

+ 1 - 16
src/views/shipment-details/addShipDetDrawer.vue

@@ -195,13 +195,6 @@
                 </a-form-model-item>
               </template>
 
-              <!-- 申报要素 :rules="rules.declarationElements"-->
-              <template slot="declarationElements" slot-scope="text, record, index">
-                <a-form-model-item prop="declarationElements">
-                  <a-input style="width:100%" type="text" v-model="record.declarationElements" />
-                </a-form-model-item>
-              </template>
-
               <!--处理方式 -->
               <template slot="treatmentMethod" slot-scope="text, record, index">
                 <a-form-model-item prop="treatmentMethod">
@@ -548,15 +541,6 @@ export default {
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
-
-        {
-          title: '申报要素',
-          dataIndex: 'declarationElements',
-          width: 160,
-          scopedSlots: { customRender: 'declarationElements' },
-          className: 'replacecolor'
-        },
-
         {
           title: '价格备注',
           dataIndex: 'priceRemarks',
@@ -645,6 +629,7 @@ export default {
         val[i]['orderRemainingQuantity'] = val[i].surplusNum
         val[i]['salesUnitPrice'] = val[i].unitPriceIncludingTax
         val[i]['customerOrder'] = val[i].customerOrderNumber
+        val[i]['shipmentQuantity'] = val[i].surplusNum //订单剩余数量 赋值给发货数量
       }
       this.msgFormSon = val
       this.syShippingDetailsItemList = this.msgFormSon