ysy 2 лет назад
Родитель
Сommit
8460a1c13d

+ 17 - 0
src/components/CreatePlan/ProductionVersion2.vue

@@ -6,6 +6,13 @@
       <ele-pro-table ref="table" :columns="columns" :datasource="datasource" height="calc(100vh - 350px)"
         class="dict-table" @cell-click="cellClick">
         <!-- 表头工具栏 -->
+
+        
+
+        <template v-slot:status="{ row }">
+          {{ checkStatus(row) }}
+        </template>
+
         <template v-slot:action="{ row }">
           <el-radio class="radio" v-model="radio" :label="row.id"><i></i></el-radio>
         </template>
@@ -82,6 +89,11 @@ export default {
           label: '选择'
         }
       ],
+      statusList: [
+        { label: '草稿', value: -1 },
+        { label: '失效', value: 0 },
+        { label: '生效', value: 1 }
+      ],
       categoryLevelId: '9',
       radio: null
     }
@@ -91,6 +103,11 @@ export default {
 
   },
   methods: {
+
+    checkStatus(row) {
+      let obj = this.statusList.find((it) => it.value == row.status);
+      return obj.label;
+    },
     /* 表格数据源 */
     datasource({ page, where, limit }) {
       return routeList({

+ 16 - 3
src/views/materialPlan/components/ProductModal.vue

@@ -56,6 +56,7 @@ export default {
         children: 'children',
         label: 'name'
       },
+      type: null,
 
       // 表格列配置
       columns: [
@@ -65,7 +66,7 @@ export default {
           width: 45,
           align: 'center',
           selectable: (row, index) => {
-            return !this.processData.some((it) => it.id == row.id );
+            return !this.processData.some((it) => it.id == row.id || it.categoryId == row.id);
           },
           reserveSelection: true,
           fixed: 'left'
@@ -152,7 +153,8 @@ export default {
       return res;
     },
 
-    open(item, row) {
+    open(item, row, type) {
+      this.type = type
       this.processData = item || []
       this.current = row;
       this.visible = true
@@ -215,7 +217,18 @@ export default {
         this.$message.error('请至少选择一条数据');
         return;
       }
-      this.$emit('chooseModal', this.selection, this.current)
+      if (this.type == 'add') {
+        let _arr = []
+        _arr = this.selection.map(m => {
+          m.categoryId = m.id
+          delete m.id
+          return {
+            ...m
+          }
+        })
+      }
+
+      this.$emit('chooseModal', _arr, this.current)
       this.handleClose()
     },
   }

+ 2 - 2
src/views/materialPlan/components/plan-edit-dialog.vue

@@ -150,7 +150,7 @@
     <div slot="footer">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="confirm">保存</el-button>
-      <el-button type="primary" @click="confirm">保存并提交</el-button>
+   
     </div>
 
 
@@ -536,7 +536,7 @@ export default {
     },
 
     categorySelect(row) {
-      this.$refs.productRefs.open(row.materialList, row)
+      this.$refs.productRefs.open(row.materialList, row, this.type)
     },
 
     chooseModal(data, current) {

+ 8 - 1
src/views/saleOrder/index.vue

@@ -26,6 +26,12 @@
           <el-link :underline="false" @click="openDetails(row)">
             {{ row.code }}
           </el-link>
+
+          
+        </template>
+
+        <template v-slot:productSumWeight="{ row }">
+           {{  row.productSumWeight }}
         </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
@@ -161,7 +167,8 @@
           {
             prop: 'productSumWeight',
             label: '合同重量',
-            align: 'center'
+            align: 'center',
+            slot: 'productSumWeight'
           },
           {
             prop: 'contractNum',