|
@@ -23,20 +23,6 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <!-- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="加工方式:" prop="produceType">
|
|
|
|
|
- <el-select v-model="form.produceType" style="width: 100%" @change="changeProduceType" size="mini">
|
|
|
|
|
- <el-option v-for="item of producedList" :key="item.code" :label="item.name"
|
|
|
|
|
- :value="item.code"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
-
|
|
|
|
|
- <!-- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="工艺路线:" prop="brandNum">
|
|
|
|
|
- <el-input placeholder="" size="mini" disabled v-model="form.brandNum"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
|
<el-form-item label="批次号:" prop="batchNo">
|
|
<el-form-item label="批次号:" prop="batchNo">
|
|
|
<el-input placeholder="输入批次号" size="mini" v-model="form.batchNo"></el-input>
|
|
<el-input placeholder="输入批次号" size="mini" v-model="form.batchNo"></el-input>
|
|
@@ -77,130 +63,18 @@
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
|
|
|
|
|
- <!-- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="BOM版本:" prop="bomCategoryId" v-if="clientEnvironmentId != 4">
|
|
|
|
|
- <el-select v-model="form.bomCategoryId" style="width: 100%" @change="changeBomId" size="mini">
|
|
|
|
|
- <el-option v-for="item of bomVersionList" :key="item.id"
|
|
|
|
|
- :label="item.name + '(V' + item.versions + '.0)'" :value="item.id"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
- <!-- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="批次号:" prop="batchNo">
|
|
|
|
|
- <el-input v-model="form.batchNo" size="mini" style="width: 100%" placeholder="输入批次号"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
|
|
<headerTitle title="产品信息"> </headerTitle>
|
|
<headerTitle title="产品信息"> </headerTitle>
|
|
|
|
|
|
|
|
<el-row :gutter="24">
|
|
<el-row :gutter="24">
|
|
|
- <!-- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="加工方式:" prop="produceType">
|
|
|
|
|
- <el-select v-model="form.produceType" style="width: 100%" @change="changeProduceType" size="mini">
|
|
|
|
|
- <el-option v-for="item of producedList" :key="item.code" :label="item.name"
|
|
|
|
|
- :value="item.code"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
|
|
|
|
|
- <!-- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="BOM版本:" prop="bomCategoryId" v-if="clientEnvironmentId != 4">
|
|
|
|
|
- <el-select v-model="form.bomCategoryId" style="width: 100%" @change="changeBomId" size="mini">
|
|
|
|
|
- <el-option v-for="item of bomVersionList" :key="item.id"
|
|
|
|
|
- :label="item.name + '(V' + item.versions + '.0)'" :value="item.id"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="工艺路线:" prop="produceRoutingId" v-if="clientEnvironmentId !== 4">
|
|
|
|
|
- <el-select v-model="form.produceRoutingId" style="width: 100%" @change="changeRoute" size="mini">
|
|
|
|
|
- <el-option v-for="item of routingList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
- </el-option>
|
|
|
|
|
-
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="工艺路线:" prop="produceRoutingId" v-if="clientEnvironmentId == 4">
|
|
|
|
|
- <el-input v-model="form.produceRoutingName" style="width: 100%" readonly size="mini"></el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col> -->
|
|
|
|
|
-
|
|
|
|
|
- </el-row>
|
|
|
|
|
-
|
|
|
|
|
- <el-row :gutter="24">
|
|
|
|
|
- <!-- clientEnvironmentId == 4 -->
|
|
|
|
|
- <div v-if="false">
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="模数:" prop="requiredFormingNum">
|
|
|
|
|
- <el-input v-model.number="form.moCount" @input="tableHandleKeyUp(form, 'moCount')" size="mini"
|
|
|
|
|
- oninput="value=value.replace(/[^\d]/g,'')" style="width: 100%" placeholder="输入模数">
|
|
|
|
|
- <!-- <template slot="append">{{ form.measuringUnit }} </template> -->
|
|
|
|
|
- </el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="块数:" prop="requiredFormingNum">
|
|
|
|
|
- <el-input v-model.number="form.blockCount" @input="tableHandleKeyUp(form, 'blockCount')" size="mini"
|
|
|
|
|
- oninput="value=value.replace(/[^\d]/g,'')" style="width: 100%" placeholder="输入块数">
|
|
|
|
|
- <!-- <template slot="append">{{ form.measuringUnit }} </template> -->
|
|
|
|
|
- </el-input>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
-
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="权重等级:" prop="weight">
|
|
|
|
|
- <el-select v-model="form.weight" style="width: 100%" @change="changeProduceType" size="mini">
|
|
|
|
|
- <el-option v-for="item of weightList" :key="item.code" :label="item.name"
|
|
|
|
|
- :value="item.code"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6">
|
|
|
|
|
- <el-form-item label="是否开槽:" prop="isSlotting">
|
|
|
|
|
- <el-select v-model="form.isSlotting" style="width: 100%" @change="changeProduceType" size="mini">
|
|
|
|
|
- <el-option v-for="item of isSlotting" :key="item.code" :label="item.name"
|
|
|
|
|
- :value="item.code"></el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- <el-col :span="6" v-if="form.isSlotting == 1">
|
|
|
|
|
- <el-form-item label="开槽类型:" prop="slottingType">
|
|
|
|
|
- <DictSelection dictName="开槽类型" v-model="form.slottingType" size="mini">
|
|
|
|
|
- </DictSelection>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
- </el-col>
|
|
|
|
|
- </div>
|
|
|
|
|
- <!-- <ele-pro-table
|
|
|
|
|
- ref="table"
|
|
|
|
|
- :key="activeName"
|
|
|
|
|
- :initLoad="false"
|
|
|
|
|
- :columns="newColumns"
|
|
|
|
|
- :datasource="datasource"
|
|
|
|
|
- row-key="code"
|
|
|
|
|
- :selection.sync="selection"
|
|
|
|
|
- :cache-key="`${activeName}ProductionPlanTable`"
|
|
|
|
|
- @sort-change="onSortChange"
|
|
|
|
|
- autoAmendPage
|
|
|
|
|
- :parse-data="parseData"
|
|
|
|
|
- @update:selection="handleSelectionChange"
|
|
|
|
|
- ></ele-pro-table> -->
|
|
|
|
|
<ele-pro-table ref="tableRef" :columns="columns" row-key="code" :cache-key="`ProductionPlanTable`"
|
|
<ele-pro-table ref="tableRef" :columns="columns" row-key="code" :cache-key="`ProductionPlanTable`"
|
|
|
:datasource="form.productInfoList" border height="40vh" key="id">
|
|
:datasource="form.productInfoList" border height="40vh" key="id">
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-slot:requiredFormingNum="{ row, $index }">
|
|
<template v-slot:requiredFormingNum="{ row, $index }">
|
|
|
- <!-- :prop="'requiredFormingNum.' + scope.$index + '.requiredFormingNum'" :rules="{
|
|
|
|
|
- required: true,
|
|
|
|
|
- message: '请输入要求生产数量',
|
|
|
|
|
- trigger: 'blur'
|
|
|
|
|
- }" -->
|
|
|
|
|
-
|
|
|
|
|
|
|
|
|
|
<el-input v-model.number="row.requiredFormingNum" size="small" type="number" style="width: 100%"
|
|
<el-input v-model.number="row.requiredFormingNum" size="small" type="number" style="width: 100%"
|
|
|
placeholder="输入数量" @input="tableHandleKeyUp(row, 'sum')"></el-input>
|
|
placeholder="输入数量" @input="tableHandleKeyUp(row, 'sum')"></el-input>
|
|
@@ -227,8 +101,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <template v-slot:bomCategoryId="{ row, $index }" >
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <template v-slot:bomCategoryId="{ row, $index }">
|
|
|
<el-select v-model="row.bomCategoryId" @change="changeBomId(row, $index)">
|
|
<el-select v-model="row.bomCategoryId" @change="changeBomId(row, $index)">
|
|
|
<el-option v-for="item of row.bomVersionList" :key="item.id"
|
|
<el-option v-for="item of row.bomVersionList" :key="item.id"
|
|
|
:label="item.name + '(V' + item.versions + '.0)'" :value="item.id"></el-option>
|
|
:label="item.name + '(V' + item.versions + '.0)'" :value="item.id"></el-option>
|
|
@@ -802,27 +675,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
// bomVersionList
|
|
// bomVersionList
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
this.form.productInfoList = this.form.productInfoList.concat(result);
|
|
this.form.productInfoList = this.form.productInfoList.concat(result);
|
|
|
|
|
|
|
|
- console.log(this.form.productInfoList, '1111111111');
|
|
|
|
|
|
|
|
|
|
this.$refs.tableRef.setData(this.form.productInfoList);
|
|
this.$refs.tableRef.setData(this.form.productInfoList);
|
|
|
|
|
|
|
|
this.changeLineNumber();
|
|
this.changeLineNumber();
|
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // this.$set(this.form, 'categoryId', list[0].id);
|
|
|
|
|
- // this.$set(this.form, 'productName', list[0].name);
|
|
|
|
|
- // this.$set(this.form, 'productCode', list[0].code);
|
|
|
|
|
- // this.$set(this.form, 'specification', list[0].specification);
|
|
|
|
|
- // this.$set(this.form, 'brandNum', list[0].brandNum);
|
|
|
|
|
- // this.$set(this.form, 'modelType', list[0].modelType);
|
|
|
|
|
- // this.$set(this.form, 'measuringUnit', list[0].measuringUnit);
|
|
|
|
|
-
|
|
|
|
|
//重置
|
|
//重置
|
|
|
this.$set(this.form, 'produceType', '');
|
|
this.$set(this.form, 'produceType', '');
|
|
|
this.$set(this.form, 'bomCategoryId', '');
|
|
this.$set(this.form, 'bomCategoryId', '');
|
|
@@ -878,6 +738,7 @@ export default {
|
|
|
productInfoList: [],
|
|
productInfoList: [],
|
|
|
requiredFormingNum: ''
|
|
requiredFormingNum: ''
|
|
|
};
|
|
};
|
|
|
|
|
+ this.$refs.tableRef.setData([]);
|
|
|
},
|
|
},
|
|
|
changeBomId(row, index) {
|
|
changeBomId(row, index) {
|
|
|
|
|
|
|
@@ -892,22 +753,35 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
changeProductType(row, index) {
|
|
changeProductType(row, index) {
|
|
|
- console.log(row, '11111');
|
|
|
|
|
let param = {
|
|
let param = {
|
|
|
bomType: row.productType,
|
|
bomType: row.productType,
|
|
|
categoryId: row.categoryId
|
|
categoryId: row.categoryId
|
|
|
}
|
|
}
|
|
|
bomListByPlan(param).then(res => {
|
|
bomListByPlan(param).then(res => {
|
|
|
let arr = res || [];
|
|
let arr = res || [];
|
|
|
|
|
+
|
|
|
if (arr.length == 0) {
|
|
if (arr.length == 0) {
|
|
|
row.bomCategoryId = '';
|
|
row.bomCategoryId = '';
|
|
|
}
|
|
}
|
|
|
- console.log(arr);
|
|
|
|
|
|
|
|
|
|
- row.bomVersionList = arr;
|
|
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ row.bomVersionList = arr;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ this.form.productInfoList[index].bomVersionList = arr;
|
|
|
|
|
+
|
|
|
|
|
+ let arrAll = JSON.parse(JSON.stringify(this.form));
|
|
|
|
|
+
|
|
|
|
|
+ this.$set(this,'form',arrAll);
|
|
|
|
|
+
|
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// this.$set(this.form.productInfoList[index], 'bomVersionList', arr);
|
|
// this.$set(this.form.productInfoList[index], 'bomVersionList', arr);
|
|
|
|
|
|
|
|
- this.$forceUpdate()
|
|
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|