浏览代码

面料损耗表第二版

fenghaifu 2 年之前
父节点
当前提交
8e7c631947

+ 29 - 33
src/views/reportForms/fabric-loss-table.vue

@@ -182,7 +182,7 @@
           :row-key="record => record.id"
           :loading="loading"
           :columns="costInvoiceColumns"
-          :data-source="costInvoiceData"
+          :data-source="fabricLoss.fabricCostInvoiceList"
           bordered
           :pagination="false"
         >
@@ -253,7 +253,7 @@
           :row-key="record => record.id"
           :loading="loading"
           :columns="costPayColumns"
-          :data-source="costPayData"
+          :data-source="fabricLoss.fabricExpensesList"
           bordered
           :pagination="false"
         >
@@ -380,7 +380,7 @@ export default {
       },
       // 采购订单 表头
       purchaseOrderColumns: [
-        { title: '货物名称', width: 150, dataIndex: 'cinvName', className: 'replacecolor' },
+        { title: '货物名称', width: 180, dataIndex: 'cinvName', className: 'replacecolor', align:'left'},
         { title: '批号', width: 80, dataIndex: 'cbatch', className: 'replacecolor' },
         { title: '计划数量', dataIndex: 'iquantity', width: 80, className: 'replacecolor' },
         {
@@ -393,17 +393,17 @@ export default {
         },
 
         { title: '采购供应商', dataIndex: 'cvenAbbName', width: 100, className: 'replacecolor' },
-        { title: '分配数量', dataIndex: 'allotQuantity', width: 80, className: 'replacecolor' },
-        { title: '委外供应商', dataIndex: 'outsourceSupplier', width: 100, className: 'replacecolor' },
+        { title: '分配数量', dataIndex: 'iquantityOut', width: 80, className: 'replacecolor' },
+        { title: '委外供应商', dataIndex: 'omcVenAbbName', width: 100, className: 'replacecolor' },
         {
           title: '余纱',
-          dataIndex: 'surplusYarn',
+          dataIndex: 'iquantityLeft',
           width: 80,
           className: 'replacecolor',
           customCell: this.surplusYarnCustomCell,
           scopedSlots: { customRender: 'surplusYarn' }
         },
-        { title: '采购损耗', dataIndex: 'purchaseLoss', width: 80, className: 'replacecolor' }
+        { title: '采购损耗', dataIndex: 'iquantityLeftRate', width: 80, className: 'replacecolor' }
       ],
       purchaseOrderData: [
         {
@@ -438,13 +438,13 @@ export default {
         { title: '工厂', width: 80, dataIndex: 'cvenAbbName', className: 'replacecolor' },
         {
           title: '材料出库数量',
-          dataIndex: 'ioutQuantity',
+          dataIndex: 'iquantityOut',
           width: 100,
           className: 'replacecolor',
           customCell: this.materialsOutQuantityCustomCell,
           scopedSlots: { customRender: 'materialsOutQuantity' }
         },
-        { title: '委外订单数量', dataIndex: 'iquantity', width: 100, className: 'replacecolor' },
+        { title: '计划数量', dataIndex: 'iquantity', width: 100, className: 'replacecolor' },
 
         {
           title: '单位',
@@ -466,18 +466,17 @@ export default {
 
         {
           title: '采购入库数量',
-          dataIndex: 'purchaseInQuantity',
+          dataIndex: 'iquantityIn',
           width: 100,
           className: 'replacecolor',
           customCell: this.purchaseInQuantityCustomCell,
           scopedSlots: { customRender: 'purchaseInQuantity' }
         },
         { title: '物料编码', dataIndex: 'cinvCode', width: 120, className: 'replacecolor' },
-        { title: '货物名称', dataIndex: 'cinvName', width: 400, className: 'replacecolor' },
-        { title: '颜色', dataIndex: 'color', width: 120, className: 'replacecolor' },
-        { title: '计划数量', dataIndex: 'planQuantity', width: 100, className: 'replacecolor' },
-        { title: '损耗', dataIndex: 'loss', wiclassName: 'replacecolor' },
-        { title: '多发少发', dataIndex: 'moreOrLess', width: 100, className: 'replacecolor' }
+        { title: '货物名称', dataIndex: 'cinvName', width: 400, className: 'replacecolor', align:'left' },
+        { title: '颜色', dataIndex: 'ccolor', width: 120, className: 'replacecolor' },
+        { title: '损耗', dataIndex: 'cquantityLoss', wiclassName: 'replacecolor' },
+        { title: '多发少发', dataIndex: 'iquantityMoreLess', width: 100, className: 'replacecolor' }
       ],
       outsourceOrderData: [
         {
@@ -552,7 +551,7 @@ export default {
         },
         { title: '物料编码', dataIndex: 'materialCode', width: 120, className: 'replacecolor' },
         { title: '货物名称', dataIndex: 'goodsName', width: 100, className: 'replacecolor' },
-        { title: '颜色', dataIndex: 'color', width: 120, className: 'replacecolor' },
+        { title: '颜色', dataIndex: 'ccolor', width: 120, className: 'replacecolor' },
         { title: '计划数量', dataIndex: 'planQuantity', width: 120, className: 'replacecolor' },
         { title: '损耗', dataIndex: 'loss', width: 90, className: 'replacecolor' },
         { title: '多发少发', dataIndex: 'moreOrLess', width: 100, className: 'replacecolor' }
@@ -592,9 +591,9 @@ export default {
 
       // 成本发票 表头
       costInvoiceColumns: [
-        { title: '类型', width: 120, dataIndex: 'costInvoiceType', className: 'replacecolor' },
-        { title: '工厂', width: 120, dataIndex: 'factory', className: 'replacecolor' },
-        { title: '成本金额', dataIndex: 'costAmount', width: 120, className: 'replacecolor' }
+        { title: '类型', width: 120, dataIndex: 'cvcname', className: 'replacecolor' },
+        { title: '工厂', width: 120, dataIndex: 'cvenAbbName', className: 'replacecolor' },
+        { title: '成本金额', dataIndex: 'imoney', width: 120, className: 'replacecolor' }
       ],
       costInvoiceData: [
         { costInvoiceType: '纱款', factory: '17TW-C-17B', costAmount: '5081.72' },
@@ -696,13 +695,13 @@ export default {
 
       // 费用支出 表头
       costPayColumns: [
-        { title: '账套号', width: 120, dataIndex: 'setNo', className: 'replacecolor' },
-        { title: '支出单号', width: 120, dataIndex: 'disbursementSlipNo', className: 'replacecolor' },
-        { title: '费用项目', dataIndex: 'expenseItem', width: 120, className: 'replacecolor' },
-        { title: ' 支出本币金额', 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' }
+        { title: '账套号', width: 120, dataIndex: 'caccount', className: 'replacecolor' },
+        { title: '支出单号', width: 120, dataIndex: 'cspvcode', className: 'replacecolor' },
+        { title: '费用项目', dataIndex: 'cexpName', width: 120, className: 'replacecolor' },
+        { title: ' 支出本币金额', dataIndex: 'inatMoney', width: 120, className: 'replacecolor' },
+        { title: '支出原币金额', dataIndex: 'imoney', width: 120, className: 'replacecolor' },
+        { title: '发票号', dataIndex: 'cinvoinceNo', width: 120, className: 'replacecolor' },
+        { title: '制单人', dataIndex: 'cmaker', width: 120, className: 'replacecolor' }
       ],
       costPayData: [{}],
 
@@ -752,20 +751,17 @@ export default {
       return {
         on: {
           click: event => {
-            console.log('点击了单元格')
 
-            if (this.purchaseOrderColumns.cinvName == '来源余纱') {
+            if (record.cinvName == '来源余纱') {
               console.log('来源余纱this:', this)
               console.log('来源余纱event:', event)
-              this.$refs.fromsurplusYarnModal.fromsurplusYarnModVis = true
-            }
-            if (this.purchaseOrderColumns.cinvName == '其他入库的纱') {
+              this.$refs.surplusYarnModal.surplusYarnModVis = true
+            }else if (record.cinvName == '其他入库的纱') {
               console.log('其他入库的纱this:', this)
               console.log('其他入库的纱event:', event)
               this.$refs.otherYarnsInModal.otherYarnsInModVis = true
             } else {
-              console.log('this:', this)
-              console.log('event:', event)
+              this.$refs.purchaseAmountModal.purchaseAmountData = record.fabricPoOrderInList;
               this.$refs.purchaseAmountModal.purchaseAmountModVis = true
             }
           }

+ 9 - 9
src/views/reportForms/fabric-loss-table/purchaseAmountModal.vue

@@ -77,62 +77,62 @@ export default {
       purchaseAmountColumns: [
         {
           title: '单据号',
-          dataIndex: 'orderNum',
+          dataIndex: 'ccode',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '单据类型',
-          dataIndex: 'documentType',
+          dataIndex: 'cbusType',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '入库单数量',
-          dataIndex: 'inReceiptQuantity',
+          dataIndex: 'iquantity',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '含税单价',
-          dataIndex: 'priceInTax',
+          dataIndex: 'iprice',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '开票数',
-          dataIndex: 'invoicedQuantity',
+          dataIndex: 'iquantityInvoice',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '未开票数',
-          dataIndex: 'notInvoicedQuantity',
+          dataIndex: 'iquantityNInvoice',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '结算数量',
-          dataIndex: 'isquantity',
+          dataIndex: 'iquantitySettle',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '未结算数量',
-          dataIndex: 'notIsquantity',
+          dataIndex: 'iquantityNSettle',
           width: 120,
           key: '',
           className: 'replacecolor'
         }
       ],
-      purchaseAmountData: [{}, {}, {}],
+      purchaseAmountData: [],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,