Преглед на файлове

订单生产:添加物料信息

002390 преди 1 година
родител
ревизия
603774dad0
променени са 2 файла, в които са добавени 48 реда и са изтрити 9 реда
  1. 20 0
      src/views/purchase/task/xie-yi-zhi-cai/column.js
  2. 28 9
      src/views/purchase/task/xie-yi-zhi-cai/index.vue

+ 20 - 0
src/views/purchase/task/xie-yi-zhi-cai/column.js

@@ -99,3 +99,23 @@ export const TableColumns = [
     },
   },
 ];
+
+export const BasicColumns = [
+  {
+    item: { key: "materialCode", title: "物料编码" },
+    attr: {},
+  },
+  {
+    item: { key: "materialName", title: "物料名称" },
+    attr: {},
+  },
+  {
+    item: { key: "manufacturerName", title: "生产厂商" },
+    attr: {},
+  },
+  {
+    item: { key: "customerName", title: "需求客户" },
+    attr: {},
+  },
+ 
+]

+ 28 - 9
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -1,5 +1,5 @@
 <script>
-import { TableColumns } from "./column";
+import { TableColumns ,BasicColumns} from "./column";
 import { initDicts } from "@/utils/init.js";
 import { FIRSTDIRECT, ADD } from "@/api/business/purchase/task";
 export default {
@@ -24,6 +24,7 @@ export default {
       visible: false,
       loading: false,
       tableColumns: TableColumns,
+      basicColumns:BasicColumns,
       data: [],
     };
   },
@@ -137,14 +138,32 @@ export default {
         
       </template>
       <div v-for="(item, index) in data" :key="index" class="m-4">
-        <h3 class="mb-4">
-          <span style="margin-right: 10px">{{ item.materialName }}</span>
-          <span style="color: tomato">{{ item.puQty }}</span>
-          (<span style="color: tomato">{{
-            item.puQty - (item.executeQty || 0)
-          }}</span
-          >) <span> {{ item.puUnitName }}</span>
-        </h3>
+        
+        <el-descriptions>
+          <template slot="title" >
+            <template>
+              <span style="margin-right: 10px">{{ item.materialName }}</span>
+              <span style="color: tomato">{{ item.puQty }}</span>
+              (<span style="color: tomato">{{
+                item.puQty - (item.executeQty || 0)
+              }}</span
+              >) <span> {{ item.puUnitName }}</span>
+            </template>
+          </template>
+
+          <el-descriptions-item 
+            v-for="(basic,bIndex) in basicColumns"
+            :key="bIndex"
+            :label="basic.item.title"
+          >{{ item[basic.item.key] }}
+          </el-descriptions-item>
+          <el-descriptions-item 
+            label="需求数量"
+          >{{ item.puQty - (item.executeQty || 0) }}
+          </el-descriptions-item>
+          
+        </el-descriptions>
+
         <el-super-table
           v-model="item.orderPriceVos"
           :columns="tableColumns"