|
@@ -349,8 +349,26 @@
|
|
|
|
|
|
|
|
<div slot="footer" v-if="type != 'detail'">
|
|
<div slot="footer" v-if="type != 'detail'">
|
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button @click="cancel">取消</el-button>
|
|
|
- <el-button type="primary" @click="confirm('save')">保存</el-button>
|
|
|
|
|
- <el-button type="primary" @click="confirm('submit')">提交</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="$hasPermission('aps:batchingplan:save')"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="confirm('save')"
|
|
|
|
|
+ >保存</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="$hasPermission('aps:batchingplan:saveAndSubmit')"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="confirm('submit')"
|
|
|
|
|
+ >提交</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="$hasPermission('aps:batchingplan:submitAndPublish')"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ @click="confirm('publish')"
|
|
|
|
|
+ >
|
|
|
|
|
+ 提交并发布
|
|
|
|
|
+ </el-button>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<saleOrderPop ref="saleOrderRef" @chooseOrder="chooseOrder"></saleOrderPop>
|
|
<saleOrderPop ref="saleOrderRef" @chooseOrder="chooseOrder"></saleOrderPop>
|
|
@@ -429,6 +447,7 @@
|
|
|
listBomBySalesOrderId,
|
|
listBomBySalesOrderId,
|
|
|
save,
|
|
save,
|
|
|
saveAndSubmit,
|
|
saveAndSubmit,
|
|
|
|
|
+ submitAndPublish,
|
|
|
getById,
|
|
getById,
|
|
|
contactList
|
|
contactList
|
|
|
} from '@/api/materialPlan/index';
|
|
} from '@/api/materialPlan/index';
|
|
@@ -1009,7 +1028,9 @@
|
|
|
console.log(row, 'row 1');
|
|
console.log(row, 'row 1');
|
|
|
data.forEach((e) => {
|
|
data.forEach((e) => {
|
|
|
if (row.detailId == e.id) {
|
|
if (row.detailId == e.id) {
|
|
|
- e.materialList = e.materialList.filter((d) => d.categoryId !== row.categoryId);
|
|
|
|
|
|
|
+ e.materialList = e.materialList.filter(
|
|
|
|
|
+ (d) => d.categoryId !== row.categoryId
|
|
|
|
|
+ );
|
|
|
// e.materialList.splice(idx, 1);
|
|
// e.materialList.splice(idx, 1);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
@@ -1235,6 +1256,9 @@
|
|
|
if (type == 'submit') {
|
|
if (type == 'submit') {
|
|
|
await saveAndSubmit(this.formData);
|
|
await saveAndSubmit(this.formData);
|
|
|
this.$message.success('保存并提交成功!');
|
|
this.$message.success('保存并提交成功!');
|
|
|
|
|
+ } else if (type == 'publish') {
|
|
|
|
|
+ await submitAndPublish(this.formData);
|
|
|
|
|
+ this.$message.success('保存并发布成功!');
|
|
|
} else {
|
|
} else {
|
|
|
await save(this.formData);
|
|
await save(this.formData);
|
|
|
this.$message.success('保存成功!');
|
|
this.$message.success('保存成功!');
|