|
@@ -188,17 +188,6 @@
|
|
|
<!-- placeholder="输入要求生产数量" @input="tableHandleKeyUp(row, 'sum')"></el-input> -->
|
|
<!-- placeholder="输入要求生产数量" @input="tableHandleKeyUp(row, 'sum')"></el-input> -->
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:blockCount="{ row, $index }">
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model.number="row.blockCount"
|
|
|
|
|
- size="small"
|
|
|
|
|
- type="number"
|
|
|
|
|
- style="width: 100%"
|
|
|
|
|
- placeholder="输入数量"
|
|
|
|
|
- @input="inputNumber(row, $index)"
|
|
|
|
|
- ></el-input>
|
|
|
|
|
- </template>
|
|
|
|
|
-
|
|
|
|
|
<template v-slot:productType="{ row, $index }">
|
|
<template v-slot:productType="{ row, $index }">
|
|
|
<el-select
|
|
<el-select
|
|
|
v-model="row.productType"
|
|
v-model="row.productType"
|
|
@@ -433,6 +422,9 @@
|
|
|
<el-button type="primary" @click="save" :loading="loading">
|
|
<el-button type="primary" @click="save" :loading="loading">
|
|
|
确定
|
|
确定
|
|
|
</el-button>
|
|
</el-button>
|
|
|
|
|
+ <el-button type="primary" @click="save('sub')" :loading="loading">
|
|
|
|
|
+ 发布
|
|
|
|
|
+ </el-button>
|
|
|
</template>
|
|
</template>
|
|
|
<ProcessRoute ref="processRouteRef" @changeParent="changeParent" />
|
|
<ProcessRoute ref="processRouteRef" @changeParent="changeParent" />
|
|
|
</ele-modal>
|
|
</ele-modal>
|
|
@@ -448,14 +440,12 @@
|
|
|
import {
|
|
import {
|
|
|
bomRoutingList,
|
|
bomRoutingList,
|
|
|
bomListByPlan,
|
|
bomListByPlan,
|
|
|
- saveSaleToPlan,
|
|
|
|
|
getFactoryList,
|
|
getFactoryList,
|
|
|
- temporarilyUpdate,
|
|
|
|
|
|
|
+ saveAndRelease,
|
|
|
temporaryPlanSave,
|
|
temporaryPlanSave,
|
|
|
getUpdateInfoByCode
|
|
getUpdateInfoByCode
|
|
|
} from '@/api/saleOrder';
|
|
} from '@/api/saleOrder';
|
|
|
import contactDialog from '@/components/contactDialog/openContactDialog.vue';
|
|
import contactDialog from '@/components/contactDialog/openContactDialog.vue';
|
|
|
- import awk from 'highlight.js/lib/languages/awk';
|
|
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
@@ -624,6 +614,31 @@
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
minWidth: 140
|
|
minWidth: 140
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ slot: 'measuringUnit',
|
|
|
|
|
+ prop: 'measuringUnit',
|
|
|
|
|
+ label: '计量单位',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 140
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ slot: 'moCount',
|
|
|
|
|
+ prop: 'moCount',
|
|
|
|
|
+ label: '模数',
|
|
|
|
|
+ headerSlot: 'headeRequiredFormingNum',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 140,
|
|
|
|
|
+ show: this.clientEnvironmentId == 4
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ slot: 'blockCount',
|
|
|
|
|
+ prop: 'blockCount',
|
|
|
|
|
+ label: '块数',
|
|
|
|
|
+ headerSlot: 'headeRequiredFormingNum',
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ minWidth: 140,
|
|
|
|
|
+ show: this.clientEnvironmentId == 4
|
|
|
|
|
+ },
|
|
|
{
|
|
{
|
|
|
slot: 'productType',
|
|
slot: 'productType',
|
|
|
prop: 'productType',
|
|
prop: 'productType',
|
|
@@ -649,29 +664,7 @@
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
minWidth: 240
|
|
minWidth: 240
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- slot: 'measuringUnit',
|
|
|
|
|
- prop: 'measuringUnit',
|
|
|
|
|
- label: '计量单位',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- minWidth: 140
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- slot: 'moCount',
|
|
|
|
|
- prop: 'moCount',
|
|
|
|
|
- label: '模数',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- minWidth: 140,
|
|
|
|
|
- show: this.clientEnvironmentId == 4
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- slot: 'blockCount',
|
|
|
|
|
- prop: 'blockCount',
|
|
|
|
|
- label: '块数',
|
|
|
|
|
- align: 'center',
|
|
|
|
|
- minWidth: 140,
|
|
|
|
|
- show: this.clientEnvironmentId == 4
|
|
|
|
|
- },
|
|
|
|
|
|
|
+
|
|
|
{
|
|
{
|
|
|
slot: 'factoriesId',
|
|
slot: 'factoriesId',
|
|
|
prop: 'factoriesId',
|
|
prop: 'factoriesId',
|
|
@@ -1127,7 +1120,7 @@
|
|
|
'produceRoutingName',
|
|
'produceRoutingName',
|
|
|
arr[0].produceRoutingName
|
|
arr[0].produceRoutingName
|
|
|
);
|
|
);
|
|
|
- console.log(arr[0],'arr[0]')
|
|
|
|
|
|
|
+ console.log(arr[0], 'arr[0]');
|
|
|
this.$set(item, 'routingList', arr[0].routingList);
|
|
this.$set(item, 'routingList', arr[0].routingList);
|
|
|
this.$set(item, 'bomCategoryName', arr[0].name);
|
|
this.$set(item, 'bomCategoryName', arr[0].name);
|
|
|
this.$set(item, 'bomCategoryVersions', arr[0].versions);
|
|
this.$set(item, 'bomCategoryVersions', arr[0].versions);
|
|
@@ -1280,7 +1273,7 @@
|
|
|
row.bomVersionList = arr;
|
|
row.bomVersionList = arr;
|
|
|
this.form.productInfoList[index].bomVersionList = arr;
|
|
this.form.productInfoList[index].bomVersionList = arr;
|
|
|
row.bomCategoryId = arr[0].id;
|
|
row.bomCategoryId = arr[0].id;
|
|
|
- this.changeBomId(row, index,arr[0]);
|
|
|
|
|
|
|
+ this.changeBomId(row, index, arr[0]);
|
|
|
let arrAll = JSON.parse(JSON.stringify(this.form));
|
|
let arrAll = JSON.parse(JSON.stringify(this.form));
|
|
|
this.$set(this, 'form', arrAll);
|
|
this.$set(this, 'form', arrAll);
|
|
|
}
|
|
}
|
|
@@ -1331,10 +1324,20 @@
|
|
|
this.$message.warning('请输入要求生产数量');
|
|
this.$message.warning('请输入要求生产数量');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!v.moCount && this.clientEnvironmentId == 4) {
|
|
|
|
|
+ flag = false;
|
|
|
|
|
+ this.$message.warning('请输入模数');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!v.blockCount && this.clientEnvironmentId == 4) {
|
|
|
|
|
+ flag = false;
|
|
|
|
|
+ this.$message.warning('请输入块数');
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
return flag;
|
|
return flag;
|
|
|
},
|
|
},
|
|
|
- save() {
|
|
|
|
|
|
|
+ save(type) {
|
|
|
this.$refs.form.validate(async (valid) => {
|
|
this.$refs.form.validate(async (valid) => {
|
|
|
if (!valid) {
|
|
if (!valid) {
|
|
|
return false;
|
|
return false;
|
|
@@ -1373,10 +1376,8 @@
|
|
|
this.form.timeDimensionPlanType = this.type;
|
|
this.form.timeDimensionPlanType = this.type;
|
|
|
await this.getPlanCode();
|
|
await this.getPlanCode();
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
-
|
|
|
|
|
- // console.log(this.form,'this.form 1+1 ')
|
|
|
|
|
- // return
|
|
|
|
|
- temporaryPlanSave(this.form)
|
|
|
|
|
|
|
+ let api = type == 'sub' ? saveAndRelease : temporaryPlanSave;
|
|
|
|
|
+ api(this.form)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
this.$message.success('新增成功!');
|
|
this.$message.success('新增成功!');
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
@@ -1388,9 +1389,10 @@
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
this.loading = true;
|
|
this.loading = true;
|
|
|
- console.log(this.form.productInfoList, 'this.form.productInfoList');
|
|
|
|
|
|
|
+ let api = type == 'sub' ? saveAndRelease : temporaryPlanSave;
|
|
|
|
|
+
|
|
|
// return
|
|
// return
|
|
|
- temporaryPlanSave(this.form)
|
|
|
|
|
|
|
+ api(this.form)
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
this.$message.success('修改成功!');
|
|
this.$message.success('修改成功!');
|
|
|
this.visible = false;
|
|
this.visible = false;
|
|
@@ -1502,8 +1504,6 @@
|
|
|
row['requiredFormingNum'] = numNew;
|
|
row['requiredFormingNum'] = numNew;
|
|
|
} else if (name === 'sum') {
|
|
} else if (name === 'sum') {
|
|
|
let e = row.requiredFormingNum;
|
|
let e = row.requiredFormingNum;
|
|
|
- //方数
|
|
|
|
|
- row.planProductNum = e;
|
|
|
|
|
|
|
|
|
|
row.blockCount = Math.floor(
|
|
row.blockCount = Math.floor(
|
|
|
e / ((modelLong * modeWide * modeHight) / 1000000)
|
|
e / ((modelLong * modeWide * modeHight) / 1000000)
|
|
@@ -1572,6 +1572,7 @@
|
|
|
}
|
|
}
|
|
|
// 更新绑定值
|
|
// 更新绑定值
|
|
|
row.requiredFormingNum = value;
|
|
row.requiredFormingNum = value;
|
|
|
|
|
+ this.tableHandleKeyUp(row, 'sum');
|
|
|
},
|
|
},
|
|
|
changeProduceType(e) {
|
|
changeProduceType(e) {
|
|
|
if (this.clientEnvironmentId !== 4) {
|
|
if (this.clientEnvironmentId !== 4) {
|