ysy 1 yıl önce
ebeveyn
işleme
5fa987461e

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

@@ -65,6 +65,17 @@
           >
             添加销售订单
           </el-button>
+
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-plus"
+            class="ele-btn-icon"
+            @click=""
+          >
+            添加生产计划
+          </el-button>
+
         </template>
 
         <template v-slot:code="{ row }">
@@ -561,7 +572,7 @@
             (f) => f.dictCode == 1 || f.dictCode == 6
           );
 
-          console.log(  this.demandTypeList );
+
         });
       },
 

+ 68 - 55
src/views/materialPlan/components/saleOrder-search.vue

@@ -1,68 +1,81 @@
 <!-- 搜索表单 -->
 <template>
-    <el-form label-width="120px" class="ele-form-search" @keyup.enter.native="search" @submit.native.prevent>
-        <el-row :gutter="24">
+  <el-form
+    label-width="120px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="24">
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="销售订单号:">
+          <el-input v-model="where.code" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="物料编码:">
+          <el-input v-model="where.productCode" placeholder="请输入"></el-input>
+        </el-form-item>
+      </el-col>
 
-            <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-                <el-form-item label="销售订单号:">
-                    <el-input v-model="where.code" placeholder="请输入"></el-input>
-                </el-form-item>
-            </el-col>
-            <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
-                <el-form-item label="物料编码:">
-                    <el-input v-model="where.productCode" placeholder="请输入"></el-input>
-                </el-form-item>
-            </el-col>
+      <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
+        <el-form-item label="订单类型:">
+          <DictSelection
+            dictName="订单类型"
+            clearable
+            v-model="where.orderType"
+          >
+          </DictSelection>
+        </el-form-item>
+      </el-col>
 
-
-
-            <el-col v-bind="styleResponsive ? { sm: 4 } : { span: 4 }">
-                <div class="ele-form-actions">
-                    <el-button type="primary"  icon="el-icon-search" class="ele-btn-icon" @click="search">
-                        查询
-                    </el-button>
-                    <el-button @click="reset">重置</el-button>
-                </div>
-            </el-col>
-        </el-row>
-    </el-form>
+      <el-col v-bind="styleResponsive ? { sm: 4 } : { span: 4 }">
+        <div class="ele-form-actions">
+          <el-button
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+          >
+            查询
+          </el-button>
+          <el-button @click="reset">重置</el-button>
+        </div>
+      </el-col>
+    </el-row>
+  </el-form>
 </template>
-  
+
 <script>
-export default {
+  export default {
     data() {
-        // 默认表单数据
-        const defaultWhere = {
-            code: '',
-            productCode: '',
-           
-
-        };
-        return {
-            // 表单数据
-            where: { ...defaultWhere }
-        };
-    },
-    props: {
-
+      // 默认表单数据
+      const defaultWhere = {
+        code: '',
+        productCode: ''
+      };
+      return {
+        // 表单数据
+        where: { ...defaultWhere }
+      };
     },
+    props: {},
     computed: {
-        // 是否开启响应式布局
-        styleResponsive() {
-            return this.$store.state.theme.styleResponsive;
-        }
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
     },
     methods: {
-        /* 搜索 */
-        search() {
-            this.$emit('search', this.where);
-        },
-        /*  重置 */
-        reset() {
-            this.where = { ...this.defaultWhere };
-            this.search();
-        }
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      }
     }
-};
+  };
 </script>
-  

+ 296 - 173
src/views/materialPlan/components/saleOrderPop.vue

@@ -1,191 +1,314 @@
 <template>
-    <el-dialog :title="title" v-if="visible" :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">
-            <saleOrderSearch @search="reload" />
-
-            <!-- 数据表格 -->
-            <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :selection.sync="selection" row-key="id">
-
-            </ele-pro-table>
-
-
-        </el-card>
-
-        <div class="btns">
-            <el-button type="primary" size="small" @click="selected">选择</el-button>
-            <el-button size="small" @click="handleClose">关闭</el-button>
-        </div>
-    </el-dialog>
+  <el-dialog
+    :title="title"
+    v-if="visible"
+    :visible.sync="visible"
+    :before-close="handleClose"
+    :close-on-click-modal="true"
+    :close-on-press-escape="false"
+    append-to-body
+    width="90%"
+  >
+    <el-card shadow="never">
+      <saleOrderSearch @search="reload" />
+
+      <!-- 数据表格 -->
+      <ele-pro-table
+        ref="table"
+        :columns="columns"
+        :datasource="datasource"
+        :selection.sync="selection"
+        row-key="id"
+      >
+      </ele-pro-table>
+    </el-card>
+
+    <div class="btns">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
 </template>
-  
+
 <script>
-import saleOrderSearch from './saleOrder-search'
-import { getPageList } from '@/api/saleOrder';
-import dictMixins from '@/mixins/dictMixins';
-export default {
+  import saleOrderSearch from './saleOrder-search';
+  import { getPageList } from '@/api/saleOrder';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
     components: { saleOrderSearch },
     mixins: [dictMixins],
     data() {
-        return {
-            visible: false,
-            title: '销售订单',
-
-            // 表格列配置
-            columns: [
-                {
-                    columnKey: 'selection',
-                    type: 'selection',
-                    width: 45,
-                    align: 'center',
-                    selectable: (row, index) => {
-                        return !this.tableData.some((it) => it.id == row.id ||  it.salesOrderId == row.id);
-                    },
-                    reserveSelection: true,
-                    fixed: 'left'
-                },
-                {
-                    prop: 'code',
-                    label: '销售订单号',
-                    align: 'center',
-                    showOverflowTooltip: true,
-                    minWidth: 150,
-                    slot: 'code',
-                    sortable: true
-                },
-                {
-                    prop: 'lineNumber',
-                    label: '行号',
-                    align: 'center',
-                    showOverflowTooltip: true
-                },
-                {
-                    prop: 'productCode',
-                    label: '产品编码',
-                    align: 'center',
-                    showOverflowTooltip: true,
-                    minWidth: 140
-                },
-
-                {
-                    prop: 'productName',
-                    label: '产品名称',
-                    align: 'center',
-                    minWidth: 120
-                },
-            
-                {
-                    prop: 'brandNo',
-                    label: '牌号',
-                    align: 'center'
-                },
-                {
-                    prop: 'model',
-                    label: '型号',
-                    align: 'center',
-                    minWidth: 120
-                },
-                {
-                    prop: 'productSumWeight',
-                    label: '订单重量',
-                    align: 'center'
-                },
-                {
-                    prop: 'contractNum',
-                    label: '订单数量',
-                    align: 'center'
-                },
-
-                {
-                    prop: 'status',
-                    label: '生产状态',
-                    align: 'center',
-                    showOverflowTooltip: true,
-                    formatter: (_row, _column, cellValue) => {
-                        return this.getDictValue('生产状态', _row.status);
-                    }
-                },
-
-
-            ],
-
-            // 表格选中数据
-            selection: [],
-
-            tableData: [],
-            current: null
-
-        }
+      return {
+        visible: false,
+        title: '销售订单',
+
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'selection',
+            type: 'selection',
+            width: 45,
+            align: 'center',
+            selectable: (row, index) => {
+              return !this.tableData.some(
+                (it) => it.id == row.id || it.salesOrderId == row.id
+              );
+            },
+            reserveSelection: true,
+            fixed: 'left'
+          },
+          {
+            prop: 'code',
+            label: '销售订单号',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 150,
+            slot: 'code',
+            sortable: true
+          },
+          {
+            prop: 'lineNumber',
+            label: '行号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'productCode',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 140,
+            sortable: true
+          },
+
+          {
+            prop: 'productName',
+            label: '名称',
+            align: 'center',
+            minWidth: 120
+          },
+
+          {
+            prop: 'produceRoutingName',
+            label: '路线',
+            align: 'center',
+            minWidth: 120
+          },
+
+          {
+            prop: 'brandNo',
+            label: '牌号',
+            align: 'center'
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            minWidth: 150,
+
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'model',
+            label: '型号',
+            align: 'center',
+            minWidth: 120
+          },
+          {
+            prop: 'priority',
+            label: '优先级',
+            align: 'center',
+            minWidth: 120,
+            slot: 'priority',
+            sortable: 'custom'
+          },
+
+          {
+            prop: 'productSumWeight',
+            label: '订单重量',
+            align: 'center',
+            slot: 'productSumWeight'
+          },
+          {
+            prop: 'contractNum',
+            slot: 'contractNum',
+            label: this.clientEnvironmentId == '4' ? '交付数量' : '订单数量',
+            align: 'center'
+          },
+          {
+            prop: 'lackNum',
+            label: '欠交数量',
+            align: 'center'
+          },
+          {
+            prop: 'moCount',
+            label: '模数',
+            align: 'center',
+            show: this.clientEnvironmentId == '4'
+          },
+
+          {
+            prop: 'planedNum',
+            label: '未排完数量',
+            align: 'center',
+            formatter: (_row, _column, cellValue) => {
+              return _row.contractNum - _row.planedNum;
+            }
+          },
+
+          {
+            prop: 'blockCount',
+            label: '块数',
+            align: 'center',
+            show: this.clientEnvironmentId == '4'
+          },
+          {
+            prop: 'orderLibraryType',
+            label: '按单按库',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('按单按库', _row.orderLibraryType);
+            }
+          },
+          {
+            prop: 'deliveryRequirements',
+            label: '交付要求',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('交付要求', _row.deliveryRequirements);
+            }
+          },
+          {
+            prop: 'orderType',
+            label: '订单类型',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('订单类型', _row.orderType);
+            }
+          },
+          {
+            prop: 'orderSource',
+            label: '订单来源',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('订单来源', _row.orderSource);
+            }
+          },
+          {
+            prop: 'status',
+            label: '生产状态',
+            align: 'center',
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return this.getDictValue('生产状态', _row.status);
+            }
+          },
+          {
+            prop: 'releaseTime',
+            label: '下达时间',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'deliveryTime',
+            label: '交付日期',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'customerName',
+            label: '客户名称',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'serialNo',
+            label: '客户代号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'simpleName',
+            label: '客户简称',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+
+          {
+            prop: 'salesman',
+            label: '业务员',
+            showOverflowTooltip: true
+          }
+        ],
+
+        // 表格选中数据
+        selection: [],
+
+        tableData: [],
+        current: null
+      };
     },
 
-    watch: {
-
-    },
+    watch: {},
     created() {
-        this.requestDict('生产状态');
+      this.requestDict('按单按库');
+      this.requestDict('交付要求');
+      this.requestDict('订单类型');
+      this.requestDict('订单来源');
+      this.requestDict('生产状态');
     },
     methods: {
+      open(item) {
+        if (item) {
+          this.tableData = item;
+        }
 
-        open(item) {
-            if (item) {
-                this.tableData = item
-            }
-
-            this.visible = true
-
-
-
-        },
-
-
-        /* 表格数据源 */
-        async datasource({ page, limit, where }) {
-            where.status = [1, 2,  3, 4, 7,8]
-            const data = await getPageList({
-                ...where,
-                pageNum: page,
-                size: limit
-            });
-
-
-
-            return data;
-        },
-
-        /* 刷新表格 */
-        reload(where) {
-            this.$refs.table.reload({ page: 1, where: where });
-        },
-
-
-
-
-
-
-        handleClose() {
-            this.visible = false
-            this.$refs.table.setSelectedRows([]);
-            this.selection = []
-
-        },
-        selected() {
-
-            if (!this.selection.length) {
-                this.$message.error('请至少选择一条数据');
-                return;
-            }
-            this.$emit('chooseOrder', this.selection)
-            this.handleClose()
-        },
+        this.visible = true;
+      },
+
+      /* 表格数据源 */
+      async datasource({ page, limit, where }) {
+        where.status = [1, 2, 3, 4, 7, 8];
+        const data = await getPageList({
+          ...where,
+          pageNum: page,
+          size: limit
+        });
+
+        return data;
+      },
+
+      /* 刷新表格 */
+      reload(where) {
+        this.$refs.table.reload({ page: 1, where: where });
+      },
+
+      handleClose() {
+        this.visible = false;
+        this.$refs.table.setSelectedRows([]);
+        this.selection = [];
+      },
+      selected() {
+        if (!this.selection.length) {
+          this.$message.error('请至少选择一条数据');
+          return;
+        }
+        this.$emit('chooseOrder', this.selection);
+        this.handleClose();
+      }
     }
-}
+  };
 </script>
-  
+
 <style lang="scss" scoped>
-.btns {
+  .btns {
     text-align: center;
     padding: 10px 0;
-}
+  }
 </style>
-