|
@@ -30,35 +30,16 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
- <el-form-item label="生产版本:" prop="produceVersionName">
|
|
|
|
|
|
|
+ <el-form-item label="工艺路线:" prop="produceRoutingName">
|
|
|
<el-input
|
|
<el-input
|
|
|
@click.native="openVersion"
|
|
@click.native="openVersion"
|
|
|
- placeholder="请选择生产版本"
|
|
|
|
|
|
|
+ placeholder="请选择工艺路线"
|
|
|
readonly
|
|
readonly
|
|
|
- v-model="form.produceVersionName"
|
|
|
|
|
|
|
+ v-model="form.produceRoutingName"
|
|
|
></el-input>
|
|
></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
- <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
|
|
- <el-form-item label="产线:">
|
|
|
|
|
- <!-- <el-input
|
|
|
|
|
- v-model="form.productLine"
|
|
|
|
|
- placeholder="选择生产版本带入"
|
|
|
|
|
- readonly
|
|
|
|
|
- ></el-input> -->
|
|
|
|
|
- <el-select
|
|
|
|
|
- placeholder="选择生产版本带入"
|
|
|
|
|
- v-model="form.productLine"
|
|
|
|
|
- >
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="(item, index) in lineNamesList"
|
|
|
|
|
- :key="index"
|
|
|
|
|
- :label="item"
|
|
|
|
|
- :value="item"
|
|
|
|
|
- ></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
|
|
+
|
|
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
<el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
|
|
|
<el-form-item label="使用改型:" prop="modification">
|
|
<el-form-item label="使用改型:" prop="modification">
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
@@ -298,9 +279,7 @@
|
|
|
></AdditionalOrder>
|
|
></AdditionalOrder>
|
|
|
<ProductionVersion
|
|
<ProductionVersion
|
|
|
ref="versionRefs"
|
|
ref="versionRefs"
|
|
|
- @confirm="confirmVersion"
|
|
|
|
|
- :productCode="form.productCode"
|
|
|
|
|
- :produceVersionId="form.produceVersionId"
|
|
|
|
|
|
|
+ @changeProduct="changeProduct"
|
|
|
></ProductionVersion>
|
|
></ProductionVersion>
|
|
|
<PlanSubmit
|
|
<PlanSubmit
|
|
|
ref="submitRefs"
|
|
ref="submitRefs"
|
|
@@ -314,7 +293,7 @@
|
|
|
<script>
|
|
<script>
|
|
|
import AdditionalOrder from './components/AdditionalOrder.vue';
|
|
import AdditionalOrder from './components/AdditionalOrder.vue';
|
|
|
import PlanSubmit from './components/plan-submit.vue';
|
|
import PlanSubmit from './components/plan-submit.vue';
|
|
|
- import ProductionVersion from '@/components/CreatePlan/ProductionVersion.vue';
|
|
|
|
|
|
|
+ import ProductionVersion from '@/components/CreatePlan/ProductionVersion2.vue';
|
|
|
import {
|
|
import {
|
|
|
productionToPlan,
|
|
productionToPlan,
|
|
|
saveSaleToPlan,
|
|
saveSaleToPlan,
|
|
@@ -341,16 +320,16 @@
|
|
|
type: this.$route.query.type,
|
|
type: this.$route.query.type,
|
|
|
form: {
|
|
form: {
|
|
|
planType: 1,
|
|
planType: 1,
|
|
|
- produceVersionId: '',
|
|
|
|
|
- productLine: '',
|
|
|
|
|
|
|
+ produceRoutingId: '',
|
|
|
|
|
+
|
|
|
stockCountBase: '',
|
|
stockCountBase: '',
|
|
|
salesOrders: [],
|
|
salesOrders: [],
|
|
|
- produceVersionName: ''
|
|
|
|
|
|
|
+ produceRoutingName: ''
|
|
|
},
|
|
},
|
|
|
- lineNamesList: [],
|
|
|
|
|
|
|
+
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
rules: {
|
|
rules: {
|
|
|
- produceVersionName: [
|
|
|
|
|
|
|
+ produceRoutingName: [
|
|
|
{ required: true, message: '请选择生产版本', trigger: 'change' }
|
|
{ required: true, message: '请选择生产版本', trigger: 'change' }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
@@ -379,9 +358,7 @@
|
|
|
async getPlanInfo(id) {
|
|
async getPlanInfo(id) {
|
|
|
const data = await getUpdateInfoById(id);
|
|
const data = await getUpdateInfoById(id);
|
|
|
this.form = data;
|
|
this.form = data;
|
|
|
- if (data.productCode) {
|
|
|
|
|
- this.getVersionData();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
async _getInventory() {
|
|
async _getInventory() {
|
|
|
const res = await getInventory(
|
|
const res = await getInventory(
|
|
@@ -413,15 +390,7 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- getVersionData() {
|
|
|
|
|
- getProductVersion(this.form.productCode).then((res) => {
|
|
|
|
|
- res.map((item) => {
|
|
|
|
|
- if (item.produceVersionId == this.form.produceVersionId) {
|
|
|
|
|
- this.lineNamesList = Array.from(new Set(item.lineNames || []));
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
cancel() {
|
|
cancel() {
|
|
|
const key = getRouteTabKey();
|
|
const key = getRouteTabKey();
|
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
@@ -511,15 +480,10 @@
|
|
|
openVersion() {
|
|
openVersion() {
|
|
|
this.$refs.versionRefs.open();
|
|
this.$refs.versionRefs.open();
|
|
|
},
|
|
},
|
|
|
- confirmVersion(data) {
|
|
|
|
|
- this.$set(this.form, 'produceVersionName', data.produceVersionName);
|
|
|
|
|
- this.$set(this.form, 'produceVersionId', data.produceVersionId);
|
|
|
|
|
- this.$set(
|
|
|
|
|
- this.form,
|
|
|
|
|
- 'productLine',
|
|
|
|
|
- data.lineNames.length ? data.lineNames[0] : ''
|
|
|
|
|
- );
|
|
|
|
|
- this.lineNamesList = Array.from(new Set(data.lineNames || []));
|
|
|
|
|
|
|
+ changeProduct(data) {
|
|
|
|
|
+ this.$set(this.form, 'produceRoutingName', data.name);
|
|
|
|
|
+ this.$set(this.form, 'produceRoutingId', data.id);
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
confirmChoose(list) {
|
|
confirmChoose(list) {
|
|
@@ -592,7 +556,7 @@
|
|
|
code: code,
|
|
code: code,
|
|
|
formingNum: params.contractNum,
|
|
formingNum: params.contractNum,
|
|
|
formingWeight: params.sumOrderWeight,
|
|
formingWeight: params.sumOrderWeight,
|
|
|
- produceVersionId: params.produceVersionId,
|
|
|
|
|
|
|
+ produceRoutingId: params.produceRoutingId,
|
|
|
status: 4,
|
|
status: 4,
|
|
|
model: params.model,
|
|
model: params.model,
|
|
|
brandNo: params.brandNo,
|
|
brandNo: params.brandNo,
|