代码更新
This commit is contained in:
@@ -193,7 +193,10 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
|
||||
} else {
|
||||
order_seq = NumberUtil.add(jsonMst.optString("dtl_count"), "1").toString();
|
||||
}
|
||||
|
||||
// 物料明细表
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("md_base_materialLabelDtl");
|
||||
JSONObject materialLabelDtlObj = dtlTab.query("label_code = '" + label_code + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(materialLabelDtlObj)) throw new BadRequestException("条形码已存在!");
|
||||
JSONObject jsonDtl = new JSONObject();
|
||||
jsonDtl.put("label_uuid", jsonMst.optString("label_uuid"));
|
||||
jsonDtl.put("labeldtl_uuid", IdUtil.simpleUUID());
|
||||
@@ -204,7 +207,6 @@ class MaterialLabelServiceImpl implements MaterialLabelService {
|
||||
jsonDtl.put("print_by", SecurityUtils.getCurrentUsername());
|
||||
jsonDtl.put("print_time", now);
|
||||
//新增物料明细表
|
||||
WQLObject dtlTab = WQLObject.getWQLObject("md_base_materialLabelDtl");
|
||||
dtlTab.insert(jsonDtl);
|
||||
//物料主表明细数回显
|
||||
WQLObject mstTab = WQLObject.getWQLObject("md_base_materialLabelMst");
|
||||
|
||||
@@ -148,13 +148,30 @@ export default {
|
||||
this.notify('请选中一条记录!', 'info')
|
||||
return
|
||||
}
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudProduceTask.finish(data).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.queryId()
|
||||
}).cache(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
// 判断是否有完工<加工,弹出提示
|
||||
for (const i in this.$refs.table.selection) {
|
||||
console.log(this.$refs.table.selection[i])
|
||||
if (this.$refs.table.selection[i].finishproduce_qty < this.$refs.table.selection[i].produce_qty) {
|
||||
this.$confirm('完工数量小于加工数量,是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const data = this.$refs.table.selection[0]
|
||||
crudProduceTask.finish(data).then(res => {
|
||||
this.notify('操作成功', 'success')
|
||||
this.queryId()
|
||||
}).cache(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
materialBack() {
|
||||
if (this.$refs.table.selection.length === 0) {
|
||||
|
||||
Reference in New Issue
Block a user