Commit ba772f8a authored by tanjunxin's avatar tanjunxin

fix: 追加组合单接口修改

parent c827d6c2
...@@ -39,7 +39,7 @@ export function addCombination(data) { ...@@ -39,7 +39,7 @@ export function addCombination(data) {
// 新增生产组合单 // 新增生产组合单
export function batchAddCombination(data) { export function batchAddCombination(data) {
return request({ return request({
url: '/pro/combination/batchAdd', url: '/pro/combination/insert',
method: 'post', method: 'post',
data: data data: data
}) })
......
...@@ -278,19 +278,20 @@ export default { ...@@ -278,19 +278,20 @@ export default {
}, },
methods: { methods: {
async handleCombination() { async handleCombination() {
let params = [] let params = {
combinationCode: this.combinationCode,
workorderList: []
}
let shouldExit = false; let shouldExit = false;
this.selectedRows.forEach((item, index) => { this.selectedRows.forEach((item, index) => {
console.log(item);
if (item.combinationCode != '' && item.combinationCode != null) { if (item.combinationCode != '' && item.combinationCode != null) {
this.$modal.msgWarning(`${item.workorderCode}生产单已绑定组合单,不能再绑定!`); this.$modal.msgWarning(`${item.workorderCode}生产单已绑定组合单,不能再绑定!`);
shouldExit = true shouldExit = true
} }
params.push({ params["workorderList"].push({
combinationSort: index,
workorderId: item.workorderId, workorderId: item.workorderId,
workorderCode: item.workorderCode, workorderCode: item.workorderCode
salesOrderId: 0,
combinationCode: this.combinationCode
}) })
}); });
if (!shouldExit) { if (!shouldExit) {
......
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