فهرست منبع

面料损耗第五版

fenghaifu 2 سال پیش
والد
کامیت
2f071bbaa6

+ 42 - 40
src/views/reportForms/fabric-loss-table.vue

@@ -197,10 +197,10 @@
           :row-key="record => record.id"
           :loading="loading"
           :columns="costInvoiceFabricColumns"
-          :data-source="fabricLoss.costInvoiceFabricData"
+          :data-source="fabricLoss.fabricCostClothList"
           bordered
           :pagination="false"
-          :footer="fabricFooterShow"
+          :footer="clothFooterShow"
         >
           <!-- 发票号码明细  -->
           <span slot="invoiceNum" slot-scope="text">
@@ -374,7 +374,7 @@ export default {
   },
   data() {
     return {
-      fabricLoss: {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[]}, // 主表信息
+      fabricLoss: {fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[]}, // 主表信息
       loading: false, // 表格加载
       validatorRules: {
         planNum: [{ required: true, message: '请输入计划单号进行搜索', trigger: 'blur' }]
@@ -452,14 +452,14 @@ export default {
           children: [
             {
               title: '根',
-              dataIndex: 'unitRoot',
-              width: 90,
+              dataIndex: 'iquantityPCS',
+              width: 100,
               className: 'replacecolor'
             },
             {
               title: '米',
-              dataIndex: 'unitMeter',
-              width: 90,
+              dataIndex: 'iquantityM',
+              width: 100,
               className: 'replacecolor'
             }
           ]
@@ -609,15 +609,15 @@ export default {
         {
           title: '发票号码',
           width: 120,
-          dataIndex: 'invoiceNum',
+          dataIndex: 'csbvcode',
 
           className: 'replacecolor',
           customCell: this.invoiceNumCustomCell,
           scopedSlots: { customRender: 'invoiceNum' }
         },
-        { title: '供应商', width: 120, dataIndex: 'supplier', className: 'replacecolor' },
-        { title: '采购发票金额', width: 120, dataIndex: 'PurchaseinvoiceCost', className: 'replacecolor' },
-        { title: '出运日期', width: 120, dataIndex: 'outData', className: 'replacecolor' }
+        { title: '供应商', width: 120, dataIndex: 'cvenName', className: 'replacecolor' },
+        { title: '采购发票金额', width: 120, dataIndex: 'inatSum', className: 'replacecolor' },
+        { title: '出运日期', width: 120, dataIndex: 'cshipTime', className: 'replacecolor' }
       ],
       costInvoiceFabricData: [
         { invoiceNum: '18TW-MYA-44', supplier: '供应商1', PurchaseinvoiceCost: '888.88', outData: '2018-05-04' },
@@ -856,33 +856,18 @@ export default {
       }
     },
 
-    // 发票号码
+    // 开票成本-面料弹框
     invoiceNumCustomCell(record) {
       return {
         on: {
           click: event => {
-            console.log('this:', this)
-            this.$refs.invoiceNumModal.invoiceNumModVis = true
+            this.$refs.invoiceNumModal.invoiceNumData = record.fabricCostClothDetailList;
+            this.$refs.invoiceNumModal.invoiceNumModVis = true;
           }
         }
       }
     },
 
-    // 开票成本-面料 ----合计行
-    fabricFooterShow(data) {
-      console.log('开票成本-面料 ----合计行')
-      console.log('data', data)
-      return (
-        <a-table
-          rowKey={Math.random}
-          bordered={false}
-          pagination={false}
-          columns={this.costInvoiceFabricColumns}
-          dataSource={this.fabricFooterDataSource || []}
-          showHeader={false}
-        ></a-table>
-      )
-    },
 
     // 开票成本-成衣 ----合计行
     clothesFooterShow(data) {
@@ -911,6 +896,19 @@ export default {
         ></a-table>
       )
     },
+    // 开票成本-面料 ----合计行
+    clothFooterShow(data) {
+      return (
+        <a-table
+          rowKey={Math.random}
+          bordered={false}
+          pagination={false}
+          columns={this.costInvoiceFabricColumns}
+          dataSource={this.clothFooterDataSource || []}
+          showHeader={false}
+        ></a-table>
+      )
+    },
 
     // 成衣-发票数量
     clInvoiceQuantityCustomCell(record) {
@@ -924,12 +922,12 @@ export default {
       }
     },
 
-    // 辅料-发票数量
+    // 开票成本辅料-弹框
     ingredientsInvoiceQuantityCustomCell(record) {
       return {
         on: {
           click: event => {
-            console.log('this:', this)
+            this.$refs.invoiceQuantityModal.invoiceQuantityData = record.fabricCostAssistDetailList;
             this.$refs.invoiceQuantityModal.invoiceQuantityModVis = true
           }
         }
@@ -991,17 +989,21 @@ export default {
   // },
   // 构建合计数据 --合计
   computed: {
-    fabricFooterDataSource() {
+    clothFooterDataSource() {
       // 开票成本-面料 合计
-      const total = Object.assign({}, this.costInvoiceFabricData[0])
-      for (const attr in total) {
-        total[attr] = '合计'
-        break
+      var item = {
+        "csbvcode":"合计"
+      };
+      var inatSum = 0;
+      for (let row of this.fabricLoss.fabricCostClothList){
+        inatSum += row.inatSum*1;
       }
-      return [total]
+      
+      item.inatSum= parseFloat(inatSum.toFixed(2));
+      return [item];
     },
     clothesFooterDataSource() {
-      // 开票成本-面料 合计
+      // 开票成本-衬衣 合计
       var item = {
         "cpbvcode":"合计"
       };
@@ -1017,7 +1019,7 @@ export default {
       item.ioriSum = parseFloat(ioriSum.toFixed(2));
       item.iquantity = parseFloat(iquantity.toFixed(4));
       item.ipbvquantity = parseFloat(ipbvquantity.toFixed(4));
-      return [item]
+      return [item];
     },
     assistFooterDataSource() {
       // 开票成本-辅料 合计
@@ -1038,7 +1040,7 @@ export default {
       item.iquantity = parseFloat(iquantity.toFixed(4));
       item.iquantityIn = parseFloat(iquantityIn.toFixed(4));
       item.iquantityInvoice = parseFloat(iquantityInvoice.toFixed(4));
-      return [item]
+      return [item];
     }
   }
 }

+ 6 - 6
src/views/reportForms/fabric-loss-table/invoiceNumModal.vue

@@ -77,34 +77,34 @@ export default {
       invoiceNumColumns: [
         {
           title: '物料',
-          dataIndex: 'material',
-          width: 120,
+          dataIndex: 'cinvName',
+          width: 400,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '数量',
-          dataIndex: 'quantity',
+          dataIndex: 'iquantity',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '开票单价',
-          dataIndex: 'invoicingPrice',
+          dataIndex: 'iprice',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '合计金额',
-          dataIndex: 'totalMoney',
+          dataIndex: 'inatSum',
           width: 120,
           key: '',
           className: 'replacecolor'
         }
       ],
-      invoiceNumData: [{}, {}, {}],
+      invoiceNumData: [],
 
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),

+ 5 - 5
src/views/reportForms/fabric-loss-table/invoiceQuantityModal.vue

@@ -45,34 +45,34 @@ export default {
       invoiceQuantityColumns: [
         {
           title: '开票数',
-          dataIndex: 'invoicedQuantity',
+          dataIndex: 'iquantityInvoice',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '未开票数',
-          dataIndex: 'notInvoicedQuantity',
+          dataIndex: 'iquantityInvoiceN',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '结算数量',
-          dataIndex: 'isquantity',
+          dataIndex: 'iquantitySettle',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '未结算数量',
-          dataIndex: 'notIsquantity',
+          dataIndex: 'iquantitySettleN',
           width: 120,
           key: '',
           className: 'replacecolor'
         }
       ],
-      invoiceQuantityData: [{}, {}, {}],
+      invoiceQuantityData: [],
       size: 'small', // 查询按钮变小
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),