Commit 7638654b authored by chenzj's avatar chenzj

工单组合的逻辑修改

parent 8187ccd6
......@@ -45,6 +45,17 @@ export function batchAddCombination(data) {
})
}
// 新增生产组合单
export function batchAddCombinations(data) {
return request({
url: '/pro/combination/batchAdd2',
method: 'post',
data: data
})
}
// 修改生产组合单
export function updateCombination(data) {
......
......@@ -592,7 +592,7 @@ import { genCode } from "@/api/system/autocode/rule";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { getToken } from "@/utils/auth";
import { addCombination, batchAddCombination } from "@/api/mes/pro/combination";
import { addCombination, batchAddCombination,batchAddCombinations } from "@/api/mes/pro/combination";
import CombinationInfos from "@/views/mes/pro/combination/infos.vue";
import { batchAddArrange, delArrange } from "@/api/mes/pro/arrange";
import ArrangeInfo from "@/views/mes/pro/arrange/info.vue";
......@@ -916,11 +916,42 @@ export default {
batchAddCombination(params).then(response => {
if (response && response.length > 0) {
if(response[0]=='0'){
this.$modal
.confirm(
'生产规格书的印张长度或者模数是空的,是否继续组合?'
)
.then(function () {
return batchAddCombinations(params);
})
.then(responses => {
this.combOpen = true
this.combinationCodes = responses
this.$modal.msgSuccess("新增组合单成功1");
})
.catch(() => {
});
}else{
this.combOpen = true
this.combinationCodes = response
this.$modal.msgSuccess("新增组合单成功");
} else {
this.$modal.msgError("新增组合单失败,组合规则不同,不允许组合!");
this.$modal.msgSuccess("新增组合单成功2");
}
} else{
this.$modal
.confirm(
'的最大米数、最大印张数没有设置,是否继续组合?'
)
.then(function () {
return batchAddCombinations(params);
})
.then(responses => {
this.combOpen = true
this.combinationCodes = responses
this.$modal.msgSuccess("新增组合单成功12");
})
.catch(() => {
});
}
this.getList();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment