Browse Source

面料损耗第六版

fenghaifu 2 years ago
parent
commit
6cc71b9d6a

+ 14 - 158
src/views/reportForms/fabric-loss-table.vue

@@ -127,6 +127,10 @@
           <span slot="surplusYarn" slot-scope="text">
             <a>{{ text }}</a>
           </span>
+          <!-- 分配数量 -->
+          <span slot="slotIquantityOut" slot-scope="text">
+            <a>{{ text }}</a>
+          </span>
         </a-table>
       </div>
 
@@ -164,12 +168,12 @@
           :pagination="false"
         >
           <!-- 材料出库数量 -->
-          <span slot="materialsOutQuantityAbroad" slot-scope="text">
+          <span slot="materialsOutQuantity" slot-scope="text">
             <a>{{ text }}</a>
           </span>
 
           <!-- 采购入库数量 -->
-          <span slot="purchaseInQuantityAbroad" slot-scope="text">
+          <span slot="purchaseInQuantity" slot-scope="text">
             <a>{{ text }}</a>
           </span>
         </a-table>
@@ -325,6 +329,9 @@
         <!-- 余纱 -->
         <surplusYarn-modal ref="surplusYarnModal" :father="bb"></surplusYarn-modal>
 
+        <!-- 其他入库的纱 -->
+        <otherYarnsIn-modal ref="otherYarnsInModal" :father="hh"></otherYarnsIn-modal>
+
         <!-- 委外订单国内弹框 -->
         <materialsOutQuantity-modal ref="materialsOutQuantityModal" :father="cc"></materialsOutQuantity-modal>
 
@@ -352,6 +359,7 @@ import invoiceNumModal from '@views/reportForms/fabric-loss-table/invoiceNumModa
 import invoiceQuantityModal from '@views/reportForms/fabric-loss-table/invoiceQuantityModal.vue'
 import accidentListModal from '@views/reportForms/fabric-loss-table/accidentListModal.vue'
 import surplusYarnModal from '@views/reportForms/fabric-loss-table/surplusYarnModal.vue'
+import otherYarnsInModal from '@views/reportForms/fabric-loss-table/otherYarnsInModal.vue'
 import { getFabricLossDatas } from '@api/reportForms/fabric-loss-table'
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
@@ -363,6 +371,7 @@ export default {
   components: {
     // 面料损耗表 所有弹框
     PurchaseAmountModal,
+    otherYarnsInModal,
     materialsOutQuantityModal,
     purchaseInQuantityModal,
     invoiceNumModal,
@@ -406,32 +415,6 @@ export default {
         },
         { title: '采购损耗', dataIndex: 'iquantityLeftRate', width: 80, className: 'replacecolor' }
       ],
-      purchaseOrderData: [
-        {
-          goodsName: '75D 低弹丝白',
-          batchNum: '123',
-          planQuantity: '1350.512',
-          purchaseQuantity: '1389.1',
-          purchaseSupplier: '腾依',
-          allotQuantity: '1389.1',
-          outsourceSupplier: '飞亚',
-          surplusYarn: '74859.53',
-          purchaseLoss: '0%'
-        },
-        {
-          goodsName: '货物2',
-          batchNum: '234',
-          planQuantity: '345',
-          purchaseQuantity: '355',
-          purchaseSupplier: '供应商2',
-          allotQuantity: '230',
-          outsourceSupplier: '委外供应商2',
-          surplusYarn: '8495.7',
-          purchaseLoss: '10%'
-        },
-        { goodsName: '来源余纱', purchaseQuantity: '2570.4' },
-        { goodsName: '其他入库的纱', purchaseQuantity: '999' }
-      ],
 
       // 委外订单国内 表头
       outsourceOrderColumns: [
@@ -479,116 +462,6 @@ export default {
         { title: '损耗', dataIndex: 'cquantityLoss', wiclassName: 'replacecolor' },
         { title: '多发少发', dataIndex: 'iquantityMoreLess', width: 120, className: 'replacecolor' }
       ],
-      outsourceOrderData: [
-        {
-          makeWorkmanship: '织造工厂1',
-          factory: '飞亚',
-          materialsOutQuantityData: '863',
-          purchaseAmount: '**',
-          unitRoot: '77',
-          unitMeter: '12',
-          purchaseInQuantity: '848.9',
-          materialCode: '**',
-          goodsName: '**',
-          color: 'red',
-          planQuantity: '**',
-          loss: '**',
-          moreOrLess: '**'
-        },
-        {
-          makeWorkmanship: '织造工厂2',
-          factory: '的亚',
-          materialsOutQuantityData: '8263',
-          purchaseAmount: '**',
-          companyRoot: '**',
-          companyMeter: '**',
-          purchaseInQuantity: '448.9',
-          materialCode: '**',
-          goodsName: '**',
-          color: 'red',
-          planQuantity: '**',
-          loss: '**',
-          moreOrLess: '**'
-        }
-      ],
-
-      // 委外订单国外 表头
-      outsourceOrderAbroadColumns: [
-        { title: '制造工艺', width: 120, dataIndex: 'makeWorkmanship', className: 'replacecolor' },
-        { title: '工厂', width: 120, dataIndex: 'factory', className: 'replacecolor' },
-        {
-          title: '材料出库数量',
-          dataIndex: 'materialsOutQuantityAbroadData',
-          width: 120,
-          className: 'replacecolor',
-          customCell: this.materialsOutQuantityAbroadCustomCell,
-          scopedSlots: { customRender: 'materialsOutQuantityAbroad' }
-        },
-        { title: '采购数量', dataIndex: 'purchaseAmount', width: 120, className: 'replacecolor' },
-        {
-          title: '单位',
-          children: [
-            {
-              title: '根',
-              dataIndex: 'unitRoot',
-              width: 90,
-              className: 'replacecolor'
-            },
-            {
-              title: '米',
-              dataIndex: 'unitMeter',
-              width: 90,
-              className: 'replacecolor'
-            }
-          ]
-        },
-        {
-          title: '采购入库数量',
-          dataIndex: 'purchaseInQuantityAbroad',
-          width: 120,
-          className: 'replacecolor',
-          customCell: this.purchaseInQuantityAbroadCustomCell,
-          scopedSlots: { customRender: 'purchaseInQuantityAbroad' }
-        },
-        { title: '物料编码', dataIndex: 'materialCode', width: 120, className: 'replacecolor' },
-        { title: '货物名称', dataIndex: 'goodsName', width: 100, 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' }
-      ],
-      outsourceOrderAbroadData: [
-        {
-          makeWorkmanship: '织造工厂',
-          factory: '飞亚',
-          materialsOutQuantityAbroadData: '163',
-          purchaseAmount: '**',
-          unitRoot: '88',
-          unitMeter: '22',
-          purchaseInQuantityAbroad: '248.9',
-          materialCode: '**',
-          goodsName: '**',
-          color: 'red',
-          planQuantity: '**',
-          loss: '**',
-          moreOrLess: '**'
-        },
-        {
-          makeWorkmanship: '织造工厂3',
-          factory: '飞亚',
-          materialsOutQuantityAbroadData: '563',
-          purchaseAmount: '**',
-          companyRoot: '**',
-          companyMeter: '**',
-          purchaseInQuantityAbroad: '468.9',
-          materialCode: '**',
-          goodsName: '**',
-          color: 'orange',
-          planQuantity: '**',
-          loss: '**',
-          moreOrLess: '**'
-        }
-      ],
 
       // 成本发票 表头
       costInvoiceColumns: [
@@ -779,12 +652,10 @@ export default {
           click: event => {
 
             if (record.cinvName == '来源余纱') {
-              console.log('来源余纱this:', this)
-              console.log('来源余纱event:', event)
+              this.$refs.surplusYarnModal.surplusYarnData = record.fabricPoOrderOutList;
               this.$refs.surplusYarnModal.surplusYarnModVis = true
             }else if (record.cinvName == '其他入库的纱') {
-              console.log('其他入库的纱this:', this)
-              console.log('其他入库的纱event:', event)
+              this.$refs.otherYarnsInModal.otherYarnsInData = record.fabricPoOrderOutList;
               this.$refs.otherYarnsInModal.otherYarnsInModVis = true
             } else {
               this.$refs.purchaseAmountModal.purchaseAmountData = record.fabricPoOrderInList;
@@ -800,9 +671,7 @@ export default {
       return {
         on: {
           click: event => {
-            // console.log('点击了单元格')
-            console.log('this:', this)
-            console.log('event:', event)
+            this.$refs.surplusYarnModal.surplusYarnData = record.fabricPoOrderOutList;
             this.$refs.surplusYarnModal.surplusYarnModVis = true
           }
         }
@@ -814,7 +683,6 @@ export default {
       return {
         on: {
           click: event => {
-            console.log('this:', this)
             this.$refs.materialsOutQuantityModal.materialsOutQuantityModVis = true
           }
         }
@@ -826,7 +694,6 @@ export default {
       return {
         on: {
           click: event => {
-            console.log('this:', this)
             this.$refs.purchaseInQuantityModal.purchaseInQuantityModVis = true
           }
         }
@@ -845,17 +712,6 @@ export default {
       }
     },
 
-    // 委外 【采购入库数量】
-    purchaseInQuantityAbroadCustomCell(record) {
-      return {
-        on: {
-          click: event => {
-            console.log('this:', this)
-            this.$refs.purchaseInQuantityModal.purchaseInQuantityModVis = true
-          }
-        }
-      }
-    },
 
     // 开票成本-面料弹框
     invoiceNumCustomCell(record) {

+ 14 - 32
src/views/reportForms/fabric-loss-table/materialsOutQuantityModal.vue

@@ -89,8 +89,8 @@ export default {
       // 表头
       materialsOutQuantityColumns: [
         {
-          title: '批号',
-          dataIndex: 'batchNum',
+          title: '供应商',
+          dataIndex: 'supplier',
           width: 120,
           key: '',
           className: 'replacecolor'
@@ -103,29 +103,23 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '单价',
-          dataIndex: 'price',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        },
-        {
-          title: '名称',
-          dataIndex: 'name',
+          title: '物料编码',
+          dataIndex: 'materialCode',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
-          title: '供应商',
-          dataIndex: 'supplier',
+          title: '批号',
+          dataIndex: 'batchNum',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
+        
         {
-          title: '金额',
-          dataIndex: 'money',
+          title: '单价',
+          dataIndex: 'price',
           width: 120,
           key: '',
           className: 'replacecolor'
@@ -138,28 +132,16 @@ export default {
           className: 'replacecolor'
         },
         {
-          title: '成本',
-          dataIndex: 'cost',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        },
-        {
-          title: '物料编码',
-          dataIndex: 'materialCode',
+          title: '金额',
+          dataIndex: 'money',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
-        {
-          title: '物料名称',
-          dataIndex: 'materialName',
-          width: 120,
-          key: '',
-          className: 'replacecolor'
-        }
+        
+        
       ],
-      materialsOutQuantityData: [{}, {}, {}],
+      materialsOutQuantityData: [],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,

+ 5 - 5
src/views/reportForms/fabric-loss-table/otherYarnsIn.vue → src/views/reportForms/fabric-loss-table/otherYarnsInModal.vue

@@ -77,30 +77,30 @@ export default {
       otherYarnsInColumns: [
         {
           title: '使用数量',
-          dataIndex: 'usageQuantity',
+          dataIndex: 'iquantity',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '委外订单号',
-          dataIndex: 'purchaseAboardOrderNum',
+          dataIndex: 'ccode',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '计划号',
-          dataIndex: 'planNum',
+          dataIndex: 'cplanCode',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '采购单价',
-          dataIndex: 'purchasePrice',
+          dataIndex: 'iprice',
           width: 120,
           className: 'replacecolor'
         }
       ],
-      otherYarnsInData: [{}, {}],
+      otherYarnsInData: [],
 
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),

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

@@ -133,7 +133,7 @@ export default {
           className: 'replacecolor'
         }
       ],
-      purchaseInQuantityData: [{}, {}, {}],
+      purchaseInQuantityData: [],
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,

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

@@ -77,34 +77,34 @@ export default {
       surplusYarnColumns: [
         {
           title: '使用数量',
-          dataIndex: 'usageQuantity',
+          dataIndex: 'iquantity',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '委外订单号',
-          dataIndex: 'aboardorderNum',
+          dataIndex: 'ccode',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '计划号',
-          dataIndex: 'planNum',
+          dataIndex: 'cplanCode',
           width: 120,
           key: '',
           className: 'replacecolor'
         },
         {
           title: '采购单价',
-          dataIndex: 'purchasePrice',
+          dataIndex: 'iprice',
           width: 120,
           key: '',
           className: 'replacecolor'
         }
       ],
-      surplusYarnData: [{}, {}, {}],
+      surplusYarnData: [],
 
       loading: false, // 表格加载
       // orderDataform: this.$form.createForm(this),