695593266@qq.com пре 1 година
родитељ
комит
26b15ae6da

+ 199 - 178
src/views/materialPlan/components/ProductModal.vue

@@ -1,21 +1,42 @@
 <template>
-  <el-dialog :title="title" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="true"
-    :close-on-press-escape="false" append-to-body width="70%">
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="true"
+    :close-on-press-escape="false"
+    append-to-body
+    width="70%"
+  >
     <el-card shadow="never">
-
-
-      <ele-split-layout width="244px" allow-collapse :right-style="{ overflow: 'hidden' }">
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
         <div class="ele-border-lighter split-layout-right-content">
-          <el-tree :data="treeList" :props="defaultProps" ref="treeRef"
-            :default-expanded-keys="categoryId ? [categoryId] : []" :highlight-current="true" node-key="id"
-            @node-click="handleNodeClick"></el-tree>
+          <el-tree
+            :data="treeList"
+            :props="defaultProps"
+            ref="treeRef"
+            :default-expanded-keys="categoryId ? [categoryId] : []"
+            :highlight-current="true"
+            node-key="id"
+            @node-click="handleNodeClick"
+          ></el-tree>
         </div>
 
         <!-- 数据表格 -->
         <template v-slot:content>
           <ProductSearch @search="reload" ref="searchRef" />
-          <ele-pro-table style="min-height: 450px" ref="table" :columns="columns" :datasource="datasource"
-            :selection.sync="selection" row-key="id">
+          <ele-pro-table
+            style="min-height: 450px"
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            :selection.sync="selection"
+            row-key="id"
+          >
           </ele-pro-table>
         </template>
       </ele-split-layout>
@@ -29,193 +50,193 @@
 </template>
 
 <script>
-import { getList } from '@/api/classifyManage/itemInformation';
-import ProductSearch from './product-search.vue';
-import { getTreeByGroup } from '@/api/classifyManage';
-export default {
-  components: {
-    ProductSearch
-  },
-  data() {
-    return {
-      visible: false,
-      title: '选择物料',
-
-      categoryLevelId: 1,
-      categoryId: 1,
-      treeList: [],
-      treeLoading: false,
-
-      defaultProps: {
-        children: 'children',
-        label: 'name'
-      },
-      type: null,
-
-      // 表格列配置
-      columns: [
-        {
-          columnKey: 'selection',
-          type: 'selection',
-          width: 45,
-          align: 'center',
-          selectable: (row, index) => {
-            return !this.processData.some(
-              (it) => it.id == row.id || it.categoryId == row.id
-            );
-          },
-          reserveSelection: true,
-          fixed: 'left'
-        },
-        // {
-        //   label: '周期',
-        //   prop: 'purchasingCycle'
-        // },
-        {
-          label: '物料名称',
-          prop: 'name'
+  import { getList } from '@/api/classifyManage/itemInformation';
+  import ProductSearch from './product-search.vue';
+  import { getTreeByGroup } from '@/api/classifyManage';
+  export default {
+    components: {
+      ProductSearch
+    },
+    data() {
+      return {
+        visible: false,
+        title: '选择物料',
+
+        categoryLevelId: 1,
+        categoryId: 1,
+        treeList: [],
+        treeLoading: false,
+
+        defaultProps: {
+          children: 'children',
+          label: 'name'
         },
+        type: null,
+
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            selectable: (row, index) => {
+              return !this.processData.some(
+                (it) => it.id == row.id || it.categoryId == row.id
+              );
+            },
+            reserveSelection: true,
+            fixed: 'left'
+          },
+          // {
+          //   label: '周期',
+          //   prop: 'purchasingCycle'
+          // },
+          {
+            label: '物料名称',
+            prop: 'name'
+          },
 
-        {
-          label: '物料编码',
-          prop: 'code'
-        },
-        {
-          label: '牌号',
-          prop: 'brandNum'
-        },
-        {
-          label: '型号',
-          prop: 'modelType'
-        },
+          {
+            label: '物料编码',
+            prop: 'code'
+          },
+          {
+            label: '牌号',
+            prop: 'brandNum'
+          },
+          {
+            label: '型号',
+            prop: 'modelType'
+          },
 
-        {
-          prop: 'measuringUnit',
-          label: '计量单位',
-          showOverflowTooltip: true
-        },
+          {
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true
+          },
 
-        {
-          prop: 'weightUnit',
-          label: '重量单位',
-          showOverflowTooltip: true
-        },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true
+          },
 
-        {
-          prop: 'roughWeight',
-          label: '毛重',
-          showOverflowTooltip: true,
-          minWidth: 90
-        },
+          {
+            prop: 'roughWeight',
+            label: '毛重',
+            showOverflowTooltip: true,
+            minWidth: 90
+          },
 
-        {
-          prop: 'netWeight',
-          label: '净重',
-          showOverflowTooltip: true,
-          minWidth: 90
-        },
+          {
+            prop: 'netWeight',
+            label: '净重',
+            showOverflowTooltip: true,
+            minWidth: 90
+          },
 
-        {
-          prop: 'inventoryQuantity',
-          label: '库存',
-          showOverflowTooltip: true
-        }
-      ],
-
-      // 表格选中数据
-      selection: [],
-
-      processData: [],
-      current: null
-    };
-  },
-
-  watch: {},
-  methods: {
-    /* 表格数据源 */
-    async datasource({ page, limit, where }) {
-      const res = await getList({
-        ...where,
-
-        pageNum: page,
-        size: limit,
-        categoryLevelId: this.categoryLevelId
-      });
-      return res;
-    },
+          {
+            prop: 'inventoryQuantity',
+            label: '库存',
+            showOverflowTooltip: true
+          }
+        ],
 
-    open(item, row, type) {
-      this.type = type;
-      this.processData = item || [];
-      this.current = row;
-      this.visible = true;
+        // 表格选中数据
+        selection: [],
 
-      this.getTreeData();
+        processData: [],
+        current: null
+      };
     },
 
-    async getTreeData() {
-      try {
-        this.treeLoading = true;
+    watch: {},
+    methods: {
+      /* 表格数据源 */
+      async datasource({ page, limit, where }) {
+        const res = await getList({
+          ...where,
+
+          pageNum: page,
+          size: limit,
+          categoryLevelId: this.categoryLevelId
+        });
+        return res;
+      },
+
+      open(item, row, type) {
+        this.type = type;
+        this.processData = item || [];
+        this.current = row;
+        this.visible = true;
 
-        const res = await getTreeByGroup({ type: 3 });
+        this.getTreeData();
+      },
+
+      async getTreeData() {
+        try {
+          this.treeLoading = true;
+
+          const res = await getTreeByGroup({ type: 3 });
+          this.treeLoading = false;
+          if (res?.code === '0') {
+            this.treeList = res.data;
+
+            this.$nextTick(() => {
+              // 默认高亮第一级树节点
+              if (this.treeList[0]) {
+                this.rootTreeId = this.treeList[0].id;
+                this.$nextTick(() => {
+                  this.$refs.treeRef.setCurrentKey(this.treeList[0].id);
+                });
+              }
+            });
+            return this.treeList;
+          }
+        } catch (error) {}
         this.treeLoading = false;
-        if (res?.code === '0') {
-          this.treeList = res.data;
-
-          this.$nextTick(() => {
-            // 默认高亮第一级树节点
-            if (this.treeList[0]) {
-              this.rootTreeId = this.treeList[0].id;
-              this.$nextTick(() => {
-                this.$refs.treeRef.setCurrentKey(this.treeList[0].id);
-              });
-            }
-          });
-          return this.treeList;
-        }
-      } catch (error) { }
-      this.treeLoading = false;
-    },
+      },
 
-    handleNodeClick(data) {
-      this.categoryLevelId = data.id;
-      this.$refs.table.reload({ pageNum: 1, where: {} });
-    },
+      handleNodeClick(data) {
+        this.categoryLevelId = data.id;
+        this.$refs.table.reload({ pageNum: 1, where: {} });
+      },
 
-    /* 刷新表格 */
-    reload(where) {
-      this.$refs.table.reload({ page: 1, where: where });
-    },
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
 
-    handleClose() {
-      this.visible = false;
-      this.$refs.table.setSelectedRows([]);
-      this.selection = [];
-    },
-    selected() {
-      let _arr = [];
-      if (!this.selection.length) {
-        this.$message.error('请至少选择一条数据');
-        return;
-      }
+      handleClose() {
+        this.visible = false;
+        this.$refs.table.setSelectedRows([]);
+        this.selection = [];
+      },
+      selected() {
+        let _arr = [];
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
 
-      _arr = this.selection.map((m) => {
-        m.categoryId = m.id;
-        m.unit = m.measuringUnit;
-        return {
-          ...m
-        };
-      });
-      this.$emit('chooseModal', _arr, this.current);
-      this.handleClose();
+        _arr = this.selection.map((m) => {
+          m.categoryId = m.id;
+          m.unit = m.measuringUnit;
+          return {
+            ...m
+          };
+        });
+        this.$emit('chooseModal', _arr, this.current);
+        this.handleClose();
+      }
     }
-  }
-};
+  };
 </script>
 
 <style lang="scss" scoped>
-.btns {
-  text-align: center;
-  padding: 10px 0;
-}
+  .btns {
+    text-align: center;
+    padding: 10px 0;
+  }
 </style>

+ 8 - 3
src/views/materialPlan/components/materialPlan-search.vue

@@ -25,7 +25,7 @@
           </el-select>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 5, md: 12 } : { span: 5 }">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 5 }">
         <el-form-item label="创建时间:">
           <el-date-picker
             class="w100"
@@ -56,7 +56,7 @@
           </el-select>
         </el-form-item>
       </el-col>
-      <el-col v-bind="styleResponsive ? { lg: 4, md: 12 } : { span: 4 }">
+      <el-col v-bind="styleResponsive ? { lg: 3, md: 12 } : { span: 4 }">
         <div class="ele-form-actions">
           <el-button
             type="primary"
@@ -119,6 +119,7 @@
       activeName: {
         handler() {
           if (this.activeName) {
+            console.log('11111');
             this.status = this.statusOpt[this.activeName][0].value;
             this.reset();
           }
@@ -126,7 +127,10 @@
         immediate: true
       }
     },
-    created() {},
+    created() {
+      console.log(this.activeName, 'this.activeName');
+      console.log(this.statusOpt, 'this.statusOpt');
+    },
     methods: {
       /* 搜索 */
       search() {
@@ -149,6 +153,7 @@
       /*  重置 */
       reset() {
         this.where = { ...this.defaultWhere };
+        this.status = null;
         this.where.statusList = this.statusOpt[this.activeName][0].value;
         this.search();
       }

+ 25 - 4
src/views/materialPlan/components/produce-edit-dialog.vue

@@ -2,7 +2,9 @@
   <ele-modal
     :visible.sync="visible"
     :closed="cancel"
-    :title="`${type == 'add' ? '创建' : '编辑'}生产配料计划`"
+    :title="`${
+      type == 'add' ? '创建' : type == 'detail' ? '详情' : '编辑'
+    }生产配料计划`"
     custom-class="ele-dialog-form"
     :close-on-click-modal="true"
     :close-on-press-escape="false"
@@ -19,13 +21,21 @@
       <el-row :gutter="32">
         <el-col :span="12">
           <el-form-item label="配料计划名称" prop="name">
-            <el-input placeholder="请选择" v-model="formData.name"></el-input>
+            <el-input
+              placeholder="请输入"
+              v-model="formData.name"
+              :disabled="type == 'detail'"
+            ></el-input>
           </el-form-item>
         </el-col>
 
         <el-col :span="12">
           <el-form-item label="备注" prop="remark">
-            <el-input placeholder="备注" v-model="formData.remark"></el-input>
+            <el-input
+              placeholder="备注"
+              v-model="formData.remark"
+              :disabled="type == 'detail'"
+            ></el-input>
           </el-form-item>
         </el-col>
       </el-row>
@@ -38,7 +48,7 @@
         :columns="columns"
         row-key="id"
       >
-        <template v-slot:toolbar>
+        <template v-slot:toolbar v-if="type != 'detail'">
           <el-button
             size="small"
             type="primary"
@@ -55,6 +65,7 @@
             placeholder="请输入"
             readonly
             :value="row.code || row.salesOrderCode"
+            :disabled="type == 'detail'"
           ></el-input>
         </template>
 
@@ -126,6 +137,7 @@
                 <el-input
                   v-model="row.demandQuantity"
                   placeholder="请输入"
+                  :disabled="type == 'detail'"
                   @input="
                     (value) =>
                       (row.demandQuantity = value.replace(
@@ -140,6 +152,7 @@
                 <el-input
                   v-model="row.purchaseQuantity"
                   placeholder="请输入"
+                  :disabled="type == 'detail'"
                   @input="
                     (value) =>
                       (row.purchaseQuantity = value.replace(
@@ -200,6 +213,14 @@
       workOrderPop,
       ProductModal
     },
+
+    props: {
+      isDetail: {
+        type: Boolean,
+        default: false
+      }
+    },
+
     data() {
       return {
         visible: false,

+ 1 - 1
src/views/materialPlan/components/producePlan.vue

@@ -908,7 +908,7 @@
             this.$nextTick(() => {
               this.expandedRowKeys = this.$refs.table
                 .getData()
-                .map((item) => item.id);
+                .map((item) => item.bomId);
               this.$refs.table.toggleRowExpansionAll();
             });
           });

+ 167 - 150
src/views/materialPlan/pickPlan.vue

@@ -1,15 +1,35 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never" v-loading="loading">
-      <materialPlan-search @search="reload" :statusOpt="statusOpt" :activeName="activeName" ref="searchRef">
+      <materialPlan-search
+        @search="reload"
+        :statusOpt="statusOpt"
+        :activeName="activeName"
+        ref="searchRef"
+      >
       </materialPlan-search>
 
-
       <!-- 数据表格 -->
-      <ele-pro-table ref="table" :initLoad="false" :columns="columns" :datasource="datasource"
-        cache-key="pickPlanTable">
+      <ele-pro-table
+        ref="table"
+        :initLoad="false"
+        :columns="columns"
+        :datasource="datasource"
+        cache-key="pickPlanTable"
+      >
         <template v-slot:toolbar>
-          <el-button type="primary" @click="handleEdit('add')">创建计划</el-button>
+          <el-button type="primary" @click="handleEdit('add')"
+            >创建计划</el-button
+          >
+        </template>
+
+        <template v-slot:name="{ row }">
+          <el-link
+            type="primary"
+            :underline="false"
+            @click="openEdit('detail', row)"
+            >{{ row.name }}</el-link
+          >
         </template>
 
         <template v-slot:status="{ row }">
@@ -18,173 +38,170 @@
           </span>
         </template>
 
-
-
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
-
-
-          <el-link type="primary" :underline="false" icon="el-icon-edit" @click="handleEdit('edit', row)">
+          <el-link
+            type="primary"
+            :underline="false"
+            icon="el-icon-edit"
+            @click="handleEdit('edit', row)"
+          >
             修改计划
           </el-link>
-          <el-link @click="handleDel(row)" type="danger" :underline="false" icon="el-icon-delete">
+          <el-link
+            @click="handleDel(row)"
+            type="danger"
+            :underline="false"
+            icon="el-icon-delete"
+          >
             删除
           </el-link>
-
         </template>
       </ele-pro-table>
     </el-card>
-    <produceEditDialog ref="produceEditDialogRef" @success="reload"></produceEditDialog>
-
+    <produceEditDialog
+      ref="produceEditDialogRef"
+      @success="reload"
+    ></produceEditDialog>
   </div>
 </template>
 
 <script>
-import materialPlanSearch from './components/materialPlan-search.vue';
-
-import produceEditDialog from './components/produce-edit-dialog'
-import { getList, del, } from '@/api/materialPlan/index';
-export default {
-  components: {
-
-    produceEditDialog,
-    materialPlanSearch,
-
-  },
-
-  data() {
-    return {
-      activeName: 'second',
-
-      // 加载状态
-      loading: false,
-
-
-
-      statusOpt: {
-
-        second: [
-          { label: '所有状态', value: null },
-          { label: '待排产', value: '1' },
-          { label: '待发布', value: '2' },
-          { label: '发布失败', value: '3' },
-          { label: '已完成', value: '6' },
-        ]
-      },
-
-
-    };
-  },
-  computed: {
-    // 表格列配置
-    columns() {
-      return [
-        {
-          columnKey: 'index',
-          label: '序号',
-          type: 'index',
-          width: 55,
-          align: 'center',
-          fixed: 'left'
-        },
-        {
-          slot: 'name',
-          prop: 'name',
-          label: '计划名称',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'code',
-          label: '计划编号',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'status',
-          label: '状态',
-          align: 'center',
-          slot: 'status',
-          action: 'status',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'createUserName',
-          label: '创建人',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          prop: 'createTime',
-          label: '创建时间',
-          align: 'center',
-          showOverflowTooltip: true
-        },
-        {
-          columnKey: 'action',
-          label: '操作',
-          width: 250,
-          align: 'center',
-          resizable: false,
-          fixed: 'right',
-          slot: 'action'
-        }
-      ];
-    }
-  },
-  methods: {
-    statusFormatter(status) {
-      const obj = this.statusOpt[this.activeName].find(
-        (i) => i.value == status
-      );
-
-      return obj && obj.label;
+  import materialPlanSearch from './components/materialPlan-search.vue';
+
+  import produceEditDialog from './components/produce-edit-dialog';
+  import { getList, del } from '@/api/materialPlan/index';
+  export default {
+    components: {
+      produceEditDialog,
+      materialPlanSearch
     },
 
-
-    /* 表格数据源 */
-    datasource({ page, limit, where }) {
-      where.type = 2
-      delete where.statusList
-      return getList({
-        pageNum: page,
-        size: limit,
-        ...where
-      });
-    },
-    handleEdit(type, row) {
-      this.$refs.produceEditDialogRef.open(type, row);
+    data() {
+      return {
+        activeName: 'second',
+
+        // 加载状态
+        loading: false,
+
+        statusOpt: {
+          second: [
+            { label: '所有状态', value: null },
+            { label: '待排产', value: '1' },
+            { label: '待发布', value: '2' },
+            { label: '发布失败', value: '3' },
+            { label: '已完成', value: '6' }
+          ]
+        }
+      };
     },
-
-    handleDel({ id }) {
-      this.$confirm('确认删除当前数据!', '提示').then(async () => {
-        await del([id]);
-        this.$message.success('删除成功!');
-        this.reload();
-      });
+    computed: {
+      // 表格列配置
+      columns() {
+        return [
+          {
+            columnKey: 'index',
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            fixed: 'left'
+          },
+          {
+            slot: 'name',
+            prop: 'name',
+            label: '领料名称',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'code',
+            label: '领料编号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'status',
+            label: '状态',
+            align: 'center',
+            slot: 'status',
+            action: 'status',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createUserName',
+            label: '创建人',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'createTime',
+            label: '创建时间',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 250,
+            align: 'center',
+            resizable: false,
+            fixed: 'right',
+            slot: 'action'
+          }
+        ];
+      }
     },
+    methods: {
+      statusFormatter(status) {
+        const obj = this.statusOpt[this.activeName].find(
+          (i) => i.value == status
+        );
 
+        return obj && obj.label;
+      },
 
+      /* 表格数据源 */
+      datasource({ page, limit, where }) {
+        where.type = 2;
+        // delete where.statusList;
+        return getList({
+          pageNum: page,
+          size: limit,
+          ...where
+        });
+      },
+      handleEdit(type, row) {
+        this.$refs.produceEditDialogRef.open(type, row);
+      },
 
-    handleTabChange() {
-      this.$refs.searchRef.reset();
-    },
-
-    /* 刷新表格 */
-    reload(where = {}) {
-      if (where.statusList) {
-        where.statusList = where.statusList.split(',')
-      }
-      this.$nextTick(() => {
-        this.$refs.table.reload({ page: 1, where });
-      });
-    },
-
+      handleDel({ id }) {
+        this.$confirm('确认删除当前数据!', '提示').then(async () => {
+          await del([id]);
+          this.$message.success('删除成功!');
+          this.reload();
+        });
+      },
 
+      handleTabChange() {
+        this.$refs.searchRef.reset();
+      },
 
+      openEdit(type, row) {
+        this.$refs.produceEditDialogRef.open(type, row);
+      },
 
-  }
-};
+      /* 刷新表格 */
+      reload(where = {}) {
+        if (where.statusList) {
+          where.statusList = where.statusList.split(',');
+        }
+        this.$nextTick(() => {
+          this.$refs.table.reload({ page: 1, where });
+        });
+      }
+    }
+  };
 </script>
 
-<style lang="scss" scoped></style>
+<style lang="scss" scoped></style>

+ 128 - 129
src/views/productionPlan/components/currentDetailDialog.vue

@@ -9,96 +9,96 @@
     :maxable="true"
   >
     <div class="form-wrapper">
-<!--      <el-form :model="requestData" label-width="0" :show-message="false">-->
-<!--        <el-descriptions title="" :column="2" border>-->
-<!--          <el-descriptions-item label="计划编号">-->
-<!--            {{ formData.code }}</el-descriptions-item-->
-<!--          >-->
+      <!--      <el-form :model="requestData" label-width="0" :show-message="false">-->
+      <!--        <el-descriptions title="" :column="2" border>-->
+      <!--          <el-descriptions-item label="计划编号">-->
+      <!--            {{ formData.code }}</el-descriptions-item-->
+      <!--          >-->
 
-<!--          <el-descriptions-item label="产品编码">{{-->
-<!--            formData.productCode-->
-<!--            }}</el-descriptions-item>-->
+      <!--          <el-descriptions-item label="产品编码">{{-->
+      <!--            formData.productCode-->
+      <!--            }}</el-descriptions-item>-->
 
-<!--          <el-descriptions-item label="产品名称">{{-->
-<!--            formData.productName-->
-<!--            }}</el-descriptions-item>-->
+      <!--          <el-descriptions-item label="产品名称">{{-->
+      <!--            formData.productName-->
+      <!--            }}</el-descriptions-item>-->
 
-<!--          <el-descriptions-item label="牌号|型号">-->
-<!--            {{ formData.brandNo }}|{{ formData.model }}</el-descriptions-item-->
-<!--          >-->
+      <!--          <el-descriptions-item label="牌号|型号">-->
+      <!--            {{ formData.brandNo }}|{{ formData.model }}</el-descriptions-item-->
+      <!--          >-->
 
-<!--          <el-descriptions-item label="批次号">{{-->
-<!--            formData.batchNo-->
-<!--            }}</el-descriptions-item>-->
+      <!--          <el-descriptions-item label="批次号">{{-->
+      <!--            formData.batchNo-->
+      <!--            }}</el-descriptions-item>-->
 
-<!--          <el-descriptions-item label="工艺路线">{{-->
-<!--            formData.produceRoutingName-->
-<!--            }}</el-descriptions-item>-->
+      <!--          <el-descriptions-item label="工艺路线">{{-->
+      <!--            formData.produceRoutingName-->
+      <!--            }}</el-descriptions-item>-->
 
-<!--          <el-descriptions-item label="要求生产数量">{{-->
-<!--            formData.requiredFormingNum-->
-<!--            }}</el-descriptions-item>-->
-<!--          <el-descriptions-item label="要求完成日期">{{-->
-<!--            formData.reqMoldTime-->
-<!--            }}</el-descriptions-item>-->
-<!--        </el-descriptions>-->
-<!--      </el-form>-->
+      <!--          <el-descriptions-item label="要求生产数量">{{-->
+      <!--            formData.requiredFormingNum-->
+      <!--            }}</el-descriptions-item>-->
+      <!--          <el-descriptions-item label="要求完成日期">{{-->
+      <!--            formData.reqMoldTime-->
+      <!--            }}</el-descriptions-item>-->
+      <!--        </el-descriptions>-->
+      <!--      </el-form>-->
 
-<!--      <headerTitle title="剩余拆批" class="mt20"> </headerTitle>-->
+      <!--      <headerTitle title="剩余拆批" class="mt20"> </headerTitle>-->
       <el-form ref="form" :model="form" :rules="rules">
-<!--        <ele-pro-table-->
-<!--          ref="table"-->
-<!--          :needPage="false"-->
-<!--          :columns="columns"-->
-<!--          :datasource="form.surplusUnpack"-->
-<!--        >-->
-<!--          <template v-slot:toolbar>-->
-<!--            <el-button-->
-<!--              size="small"-->
-<!--              type="primary"-->
-<!--              icon="el-icon-plus"-->
-<!--              class="ele-btn-icon"-->
-<!--              :disabled="requiredFormingNum == 0 ? true : false"-->
-<!--              @click="openUnpack"-->
-<!--            >-->
-<!--              拆批-->
-<!--            </el-button>-->
-<!--          </template>-->
+        <!--        <ele-pro-table-->
+        <!--          ref="table"-->
+        <!--          :needPage="false"-->
+        <!--          :columns="columns"-->
+        <!--          :datasource="form.surplusUnpack"-->
+        <!--        >-->
+        <!--          <template v-slot:toolbar>-->
+        <!--            <el-button-->
+        <!--              size="small"-->
+        <!--              type="primary"-->
+        <!--              icon="el-icon-plus"-->
+        <!--              class="ele-btn-icon"-->
+        <!--              :disabled="requiredFormingNum == 0 ? true : false"-->
+        <!--              @click="openUnpack"-->
+        <!--            >-->
+        <!--              拆批-->
+        <!--            </el-button>-->
+        <!--          </template>-->
 
-<!--          <template v-slot:requiredFormingNum="scope">-->
-<!--            <el-form-item-->
-<!--              v-if="requiredFormingNum != 0"-->
-<!--              :prop="'surplusUnpack.' + scope.$index + '.requiredFormingNum'"-->
-<!--              :rules="[-->
-<!--                {-->
-<!--                  required: true,-->
-<!--                  message: '请输入要求生产数量',-->
-<!--                  trigger: 'change'-->
-<!--                },-->
-<!--                {-->
-<!--                  pattern: /^\d+(\.{0,1}\d+){0,1}$/,-->
-<!--                  message: '拆批数超过生产数量',-->
-<!--                  trigger: ['blur', 'change']-->
-<!--                }-->
-<!--              ]"-->
-<!--            >-->
-<!--              <el-input-->
-<!--                disabled-->
-<!--                v-model="requiredFormingNum"-->
-<!--                placeholder="请输入"-->
-<!--              ></el-input>-->
-<!--            </el-form-item>-->
+        <!--          <template v-slot:requiredFormingNum="scope">-->
+        <!--            <el-form-item-->
+        <!--              v-if="requiredFormingNum != 0"-->
+        <!--              :prop="'surplusUnpack.' + scope.$index + '.requiredFormingNum'"-->
+        <!--              :rules="[-->
+        <!--                {-->
+        <!--                  required: true,-->
+        <!--                  message: '请输入要求生产数量',-->
+        <!--                  trigger: 'change'-->
+        <!--                },-->
+        <!--                {-->
+        <!--                  pattern: /^\d+(\.{0,1}\d+){0,1}$/,-->
+        <!--                  message: '拆批数超过生产数量',-->
+        <!--                  trigger: ['blur', 'change']-->
+        <!--                }-->
+        <!--              ]"-->
+        <!--            >-->
+        <!--              <el-input-->
+        <!--                disabled-->
+        <!--                v-model="requiredFormingNum"-->
+        <!--                placeholder="请输入"-->
+        <!--              ></el-input>-->
+        <!--            </el-form-item>-->
 
-<!--            <el-form-item v-else> 工单已全部拆完 </el-form-item>-->
-<!--          </template>-->
+        <!--            <el-form-item v-else> 工单已全部拆完 </el-form-item>-->
+        <!--          </template>-->
 
-<!--          <template v-slot:splitResidue="scope">-->
-<!--            {{ formData.splitResidue }}-->
-<!--          </template>-->
+        <!--          <template v-slot:splitResidue="scope">-->
+        <!--            {{ formData.splitResidue }}-->
+        <!--          </template>-->
 
-<!--        </ele-pro-table>-->
+        <!--        </ele-pro-table>-->
 
-<!--        <headerTitle title="拆批" class="mt20"> </headerTitle>-->
+        <!--        <headerTitle title="拆批" class="mt20"> </headerTitle>-->
 
         <ele-pro-table
           ref="table"
@@ -107,55 +107,55 @@
           :datasource="datasource"
           :init-load="false"
         >
-<!--          <template v-slot:requiredFormingNum="scope">-->
-<!--            <el-form-item-->
-<!--              :prop="'unpackList.' + scope.$index + '.requiredFormingNum'"-->
-<!--              :rules="{-->
-<!--                required: true,-->
-<!--                message: '请输入要求生产数量',-->
-<!--                trigger: 'change'-->
-<!--              }"-->
-<!--            >-->
-<!--              <el-input-number-->
-<!--                type="number"-->
-<!--                @change="changeNum(scope.$index)"-->
-<!--                :min="0"-->
-<!--                v-model="scope.row.requiredFormingNum"-->
-<!--                placeholder="请输入"-->
-<!--              ></el-input-number>-->
-<!--            </el-form-item>-->
-<!--          </template>-->
+          <!--          <template v-slot:requiredFormingNum="scope">-->
+          <!--            <el-form-item-->
+          <!--              :prop="'unpackList.' + scope.$index + '.requiredFormingNum'"-->
+          <!--              :rules="{-->
+          <!--                required: true,-->
+          <!--                message: '请输入要求生产数量',-->
+          <!--                trigger: 'change'-->
+          <!--              }"-->
+          <!--            >-->
+          <!--              <el-input-number-->
+          <!--                type="number"-->
+          <!--                @change="changeNum(scope.$index)"-->
+          <!--                :min="0"-->
+          <!--                v-model="scope.row.requiredFormingNum"-->
+          <!--                placeholder="请输入"-->
+          <!--              ></el-input-number>-->
+          <!--            </el-form-item>-->
+          <!--          </template>-->
 
-<!--          <template v-slot:reqMoldTime="scope">-->
-<!--            <el-form-item-->
-<!--              :prop="'unpackList.' + scope.$index + '.reqMoldTime'"-->
-<!--              :rules="{-->
-<!--                required: true,-->
-<!--                message: '请选择开始计划时间',-->
-<!--                trigger: 'change'-->
-<!--              }"-->
-<!--            >-->
-<!--              <el-date-picker-->
-<!--                class="w100"-->
-<!--                v-model="scope.row.reqMoldTime"-->
-<!--                type="date"-->
-<!--                value-format="yyyy-MM-dd"-->
-<!--              ></el-date-picker>-->
-<!--            </el-form-item>-->
-<!--          </template>-->
+          <!--          <template v-slot:reqMoldTime="scope">-->
+          <!--            <el-form-item-->
+          <!--              :prop="'unpackList.' + scope.$index + '.reqMoldTime'"-->
+          <!--              :rules="{-->
+          <!--                required: true,-->
+          <!--                message: '请选择开始计划时间',-->
+          <!--                trigger: 'change'-->
+          <!--              }"-->
+          <!--            >-->
+          <!--              <el-date-picker-->
+          <!--                class="w100"-->
+          <!--                v-model="scope.row.reqMoldTime"-->
+          <!--                type="date"-->
+          <!--                value-format="yyyy-MM-dd"-->
+          <!--              ></el-date-picker>-->
+          <!--            </el-form-item>-->
+          <!--          </template>-->
 
           <template v-slot:action="{ $index }">
-<!--            <el-popconfirm-->
-<!--              class="ele-action"-->
-<!--              title="确定要删除此子单吗?"-->
-<!--              @confirm="remove($index)"-->
-<!--            >-->
-<!--              <template v-slot:reference>-->
-<!--                <el-link type="danger" :underline="false" icon="el-icon-delete">-->
-<!--                  删除-->
-<!--                </el-link>-->
-<!--              </template>-->
-<!--            </el-popconfirm>-->
+            <!--            <el-popconfirm-->
+            <!--              class="ele-action"-->
+            <!--              title="确定要删除此子单吗?"-->
+            <!--              @confirm="remove($index)"-->
+            <!--            >-->
+            <!--              <template v-slot:reference>-->
+            <!--                <el-link type="danger" :underline="false" icon="el-icon-delete">-->
+            <!--                  删除-->
+            <!--                </el-link>-->
+            <!--              </template>-->
+            <!--            </el-popconfirm>-->
             <el-link type="primary" :underline="false" icon="el-icon-view">
               库存
             </el-link>
@@ -247,9 +247,8 @@
             label: '预计交期时间',
             align: 'center',
             minWidth: 80
-          },
-        ],
-
+          }
+        ]
       };
     },
     methods: {
@@ -263,12 +262,12 @@
         return getCurrentList({
           pageNum: page,
           size: limit,
-          ...where,
+          ...where
         });
       },
       open(row) {
-         this.visible = true;
-         this.reload({code: row.bomCode});
+        this.visible = true;
+        this.reload({ code: row.bomCode });
       },
       cancel() {
         this.formData = {};

+ 5 - 0
src/views/saleOrder/components/create-order.vue

@@ -695,6 +695,11 @@
               }
             }
           }
+          if (res.productInfoList && res.productInfoList.length != 0) {
+            res.productInfoList.forEach((item) => {
+              item.lackNum = null;
+            });
+          }
           this.disabledList = res.productInfoList;
           this.form = res;
         });

+ 3 - 1
src/views/workOrder/components/releaseDialog.vue

@@ -191,6 +191,7 @@
               :pageSize="20"
               v-loading="tabLoading"
               :selection.sync="item.selection"
+              row-key="id"
             >
               <template v-slot:toolbar>
                 <el-button
@@ -470,7 +471,8 @@
             type: 'selection',
             columnKey: 'selection',
             align: 'center',
-            fixed: 'left'
+            fixed: 'left',
+            reserveSelection: true
           },
           {
             prop: 'name',

+ 2 - 2
vue.config.js

@@ -36,10 +36,10 @@ module.exports = {
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
         // target: 'http://192.168.1.251:18086',
-        // target: 'http://192.168.1.144:18086',
+        target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.211:18086',
         // target: 'http://192.168.1.251:18186',
-        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.125:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''