|
|
@@ -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) => {
|