瀏覽代碼

成本分配表-转入数量-单价可编辑

jbb 2 年之前
父節點
當前提交
a267c78c33

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

@@ -10,7 +10,11 @@
   >
     <!-- tabel 加载 -->
     <a-spin :spinning="confirmLoading">
-      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> </a-table>
+      <a-table :loading="loading" bordered :columns="columns" :data-source="data" :pagination="false"> 
+        <span slot="unitCost" slot-scope="text,record">
+              <a-input placeholder="请输入" v-model="record.unitCost"  @change="changeUnitCost(record)"/>
+        </span>
+      </a-table>
       <!-- 导出 打印 返回  -->
       <a-row style="marginTop:20px;">
         <a-col :md="24" :sm="12">
@@ -67,10 +71,7 @@ export default {
           dataIndex: 'unitCost',
           width: 120,
           className: 'replacecolor',
-          customRender: (text, record, index) => {
-            var re =  Number(text).toFixed(3)
-            return re
-         }
+          scopedSlots: { customRender: 'unitCost' },
         },
         {
           title: '总成本',

+ 0 - 3
src/views/reportForms/cost-allocation-table.vue

@@ -366,9 +366,6 @@ export default {
             // 页面打开加载的数据
             var oneData = this.$refs.unitTabs.tabsAllData[0]
             this.$refs.unitTabs.fabData = oneData.syCostAllocationFabricList
-            this.$refs.unitTabs.fabData[0].syTransfers.map(item =>{
-              item.unitCost =  item.unitCost.toFixed(3)
-             })
             this.$refs.unitTabs.ingData = oneData.syCostAllocationIngredientList
             this.$refs.unitTabs.shipData = oneData.syCostAllocationShipdetail
             this.calculation(oneData.syCostAllocationShipdetail)

+ 6 - 0
src/views/reportForms/cost-allocation-table/tabs.vue

@@ -469,6 +469,9 @@ export default {
           click: event => {
             console.log('面料 - 转入数量')
             this.$refs.fabInQuaModal.fabInQuaModVis = true
+            record.syTransfers.map(item=>{
+               item.unitCost =  (item.unitCost).toFixed(3)
+            })
             this.$refs.fabInQuaModal.data = record.syTransfers
           }
         }
@@ -495,6 +498,9 @@ export default {
           click: event => {
             console.log('辅料 - 转入数量')
             this.$refs.ingInQuaModal.ingInQuaModVis = true
+            record.syTransfers.map(item=>{
+               item.unitCost =  (item.unitCost).toFixed(3)
+            })
             this.$refs.ingInQuaModal.data = record.syTransfers
           }
         }