ysy 1 year ago
parent
commit
8b3d816a84
5 changed files with 31 additions and 7 deletions
  1. BIN
      aps.rar
  2. BIN
      public/logo.png
  3. BIN
      src/assets/file/AiMiLL.png
  4. BIN
      src/assets/logo.png
  5. 31 7
      src/views/saleOrder/salesToProduction.vue

BIN
aps.rar


BIN
public/logo.png


BIN
src/assets/file/AiMiLL.png


BIN
src/assets/logo.png


+ 31 - 7
src/views/saleOrder/salesToProduction.vue

@@ -51,12 +51,19 @@
           </el-col>
           <el-col v-bind="styleResponsive ? { lg: 4, md: 8 } : { span: 4 }">
             <el-form-item label="余量系数:" prop="marginCoefficient">
-              <DictSelection
-                @itemChange="itemChange"
-                style="width: 200px"
-                dictName="余量系数"
+              <el-select
                 v-model="form.marginCoefficient"
-              ></DictSelection>
+                filterable
+                allow-create
+                @change="itemChange"
+              >
+                <el-option
+                  v-for="(item, index) in marginList"
+                  :key="index"
+                  :label="item.name"
+                  :value="item.value"
+                />
+              </el-select>
             </el-form-item>
           </el-col>
 
@@ -121,7 +128,6 @@
             align="center"
             prop="productName"
             width="120"
-    
           >
           </el-table-column>
 
@@ -361,6 +367,9 @@
     getUpdateInfoById,
     getProductVersion
   } from '@/api/saleOrder';
+
+  import { getByCode } from '@/api/system/dictionary-data';
+
   import dictMixins from '@/mixins/dictMixins';
   import { deepClone } from '@/utils/index';
   import { getRouteTabKey, removePageTab } from '@/utils/page-tab-util';
@@ -385,7 +394,8 @@
           salesOrders: [],
           produceRoutingName: '',
           marginCoefficient: '1.0',
-          batchNo: null
+          batchNo: null,
+          marginList: []
         },
 
         // 表单验证规则
@@ -408,6 +418,7 @@
       this.requestDict('按单按库');
       this.requestDict('订单类型');
       this.requestDict('交付要求');
+      this.getByCodeFn();
       if (this.type == 'edit') {
         this.getPlanInfo(this.$route.query.id);
       } else {
@@ -428,6 +439,19 @@
 
         this.form.stockCountBase = res;
       },
+
+      getByCodeFn() {
+        getByCode('margin_code').then((res) => {
+          let _arr = [];
+          res.data.map((item) => {
+            const key = Object.keys(item)[0];
+            const value = item[key];
+
+            _arr.push({ name: key, value: value });
+          });
+          this.marginList = _arr;
+        });
+      },
       getSaleInfo() {
         let params = JSON.parse(this.$route.query.selection);
         productionToPlan(params).then((res) => {