|
|
|
@ -30,7 +30,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item class="customer-item" label="新卷数量:"> |
|
|
|
<el-input v-model="pageData.newRollQty" style="width: 80px;" ></el-input> |
|
|
|
<el-input v-model="pageData.newRollQty" @blur="checkValidQty" style="width: 80px;" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
@ -41,7 +41,7 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer" style="margin-top: -20px;"> |
|
|
|
<el-button type="primary" @click="">确 定</el-button> |
|
|
|
<el-button type="primary" @click="warnMergeSfdcRollsConfirm">确 定</el-button> |
|
|
|
<el-button type="primary" @click="closeDialog">关闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
@ -51,6 +51,8 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
getMergeRollPageData, |
|
|
|
checkMergeSfdcRoll,/*校验是否合并卷*/ |
|
|
|
processMergeSfdcRoll,/*执行合并卷的操作*/ |
|
|
|
} from "@/api/yieldReport/com_merge_roll.js"; |
|
|
|
export default { |
|
|
|
name: "com_merge_roll", |
|
|
|
@ -148,6 +150,119 @@ export default { |
|
|
|
this.$emit('update:visible', false); |
|
|
|
}, |
|
|
|
|
|
|
|
/*检验良品的总数量*/ |
|
|
|
checkValidQty() { |
|
|
|
//首先判断数值是否通过判断 |
|
|
|
let newRollQty = this.pageData.newRollQty; |
|
|
|
if (newRollQty == null || newRollQty == '') { |
|
|
|
this.$message.error('请输入新卷数量!'); |
|
|
|
this.pageData.newRollQty = 0;//重新赋值 |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (newRollQty <= 0 || !Number.isInteger(newRollQty)) { |
|
|
|
this.$message.error('新卷数量必须是大于零的整数!'); |
|
|
|
this.pageData.newRollQty = 0;//重新赋值 |
|
|
|
return false; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
/*执行是否需要提示的操作*/ |
|
|
|
warnMergeSfdcRollsConfirm() { |
|
|
|
let requestData = { |
|
|
|
'site': this.pageData.site, |
|
|
|
'orderNo': this.pageData.orderNo, |
|
|
|
'itemNo': this.pageData.itemNo, |
|
|
|
'seqNo': this.pageData.seqNo, |
|
|
|
'rollNo': this.pageData.rollNo, |
|
|
|
'rollQty': this.pageData.rollQty, |
|
|
|
'newRollNo': this.pageData.newRollNo, |
|
|
|
'newRollQty': this.pageData.newRollQty, |
|
|
|
'userId': this.scheduleData.userName, |
|
|
|
'operatorId': this.pageData.operatorId, |
|
|
|
'newRollFlag': false |
|
|
|
}; |
|
|
|
//先校验当前的卷 |
|
|
|
checkMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else if (data.resultMap.resultCode == 300) { |
|
|
|
let msg = data.resultMap.resultMsg; |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
//校验参与合并的新卷 |
|
|
|
requestData.newRollFlag = true; |
|
|
|
checkMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else if (data.resultMap.resultCode == 300) { |
|
|
|
let msg = data.resultMap.resultMsg; |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
//执行合并卷的操作 |
|
|
|
processMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
//执行合并卷的操作 |
|
|
|
processMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
//校验通过的情况 |
|
|
|
} else { |
|
|
|
//校验参与合并的新卷 |
|
|
|
requestData.newRollFlag = true; |
|
|
|
checkMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else if (data.resultMap.resultCode == 300) { |
|
|
|
let msg = data.resultMap.resultMsg; |
|
|
|
this.$confirm(msg, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
//执行合并卷的操作 |
|
|
|
processMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
//执行合并卷的操作 |
|
|
|
processMergeSfdcRoll(requestData).then(({data}) => { |
|
|
|
if (data.code == 500) { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
created() { |
|
|
|
|