add:c出入库单参数非空校验
This commit is contained in:
@@ -30,7 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
@ServletComponentScan
|
@ServletComponentScan
|
||||||
@EnableTransactionManagement
|
@EnableTransactionManagement
|
||||||
@MapperScan("org.nl.**.mapper")
|
@MapperScan("org.nl.**.mapper")
|
||||||
//@EnableDynamicTp
|
@EnableDynamicTp
|
||||||
public class AppRun implements CommandLineRunner {
|
public class AppRun implements CommandLineRunner {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(AppRun.class, args);
|
SpringApplication.run(AppRun.class, args);
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public class SecurityUtils {
|
|||||||
* @return 权限列表
|
* @return 权限列表
|
||||||
*/
|
*/
|
||||||
public static List<String> getCurrentUserPermissions() {
|
public static List<String> getCurrentUserPermissions() {
|
||||||
JSONObject json = (JSONObject) StpUtil.getExtra("loginInfo");
|
JSONObject json =JSONObject.parseObject(String.valueOf(StpUtil.getExtra("loginInfo")));
|
||||||
JSONArray permissions = json.getJSONArray("permissions");
|
JSONArray permissions = json.getJSONArray("permissions");
|
||||||
if (permissions.size() > 0) {
|
if (permissions.size() > 0) {
|
||||||
return permissions.toJavaList(String.class);
|
return permissions.toJavaList(String.class);
|
||||||
|
|||||||
@@ -71,6 +71,12 @@ public class GroupDickInStorageTask extends AbstractTask {
|
|||||||
if (CollectionUtils.isEmpty(item)){
|
if (CollectionUtils.isEmpty(item)){
|
||||||
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"组盘信息不存在");
|
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"组盘信息不存在");
|
||||||
}
|
}
|
||||||
|
SchBaseTask schBaseTask = iSchBaseTaskService.getOne(new QueryWrapper<SchBaseTask>()
|
||||||
|
.eq("vehicle_code", vehicle_code).select("task_code")
|
||||||
|
.lt("status",StatusEnum.FORM_STATUS.code("完成")));
|
||||||
|
if (schBaseTask!=null){
|
||||||
|
throw new BadRequestException("申请任务失败:载具"+vehicle_code+"已经存任务"+schBaseTask.getTask_code());
|
||||||
|
}
|
||||||
JSONObject mstJ = (JSONObject) JSONObject.toJSON(mst);
|
JSONObject mstJ = (JSONObject) JSONObject.toJSON(mst);
|
||||||
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
MdPbVehicleMaterVo vehicleMater = item.get(0);
|
||||||
mstJ.put("stor_code", vehicleMater.getStor_code());
|
mstJ.put("stor_code", vehicleMater.getStor_code());
|
||||||
|
|||||||
@@ -44,17 +44,20 @@ public class StIvtIostorinvOutController {
|
|||||||
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(result), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@PostMapping("delete")
|
@PostMapping("delete")
|
||||||
|
@Log("删除出库单")
|
||||||
public ResponseEntity<Object> delete(@RequestBody List<String> ids) {
|
public ResponseEntity<Object> delete(@RequestBody List<String> ids) {
|
||||||
iStIvtIostorinvService.removeByIds(ids);
|
iStIvtIostorinvService.removeByIds(ids);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
@PostMapping
|
@PostMapping
|
||||||
|
@Log("创建出库单")
|
||||||
public ResponseEntity<Object> save(@RequestBody JSONObject form) {
|
public ResponseEntity<Object> save(@RequestBody JSONObject form) {
|
||||||
iStIvtIostorinvService.save(form);
|
iStIvtIostorinvService.save(form);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
|
@Log("更新出库单")
|
||||||
public ResponseEntity<Object> update(@RequestBody JSONObject form) {
|
public ResponseEntity<Object> update(@RequestBody JSONObject form) {
|
||||||
iStIvtIostorinvService.update(form);
|
iStIvtIostorinvService.update(form);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
@@ -72,6 +75,7 @@ public class StIvtIostorinvOutController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/outDecision")
|
@PostMapping("/outDecision")
|
||||||
|
@Log("出库单明细分配")
|
||||||
public ResponseEntity<Object> outDecision(@RequestBody JSONObject dtl) {
|
public ResponseEntity<Object> outDecision(@RequestBody JSONObject dtl) {
|
||||||
String vechicle_codes = iStIvtIostorinvService.outDispense(dtl);
|
String vechicle_codes = iStIvtIostorinvService.outDispense(dtl);
|
||||||
return new ResponseEntity<>(vechicle_codes,HttpStatus.OK);
|
return new ResponseEntity<>(vechicle_codes,HttpStatus.OK);
|
||||||
@@ -83,6 +87,7 @@ public class StIvtIostorinvOutController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping("/cancelDecision")
|
@PostMapping("/cancelDecision")
|
||||||
|
@Log("出库单取消分配")
|
||||||
public ResponseEntity<Object> cancelDecision(@RequestBody JSONObject dtl) {
|
public ResponseEntity<Object> cancelDecision(@RequestBody JSONObject dtl) {
|
||||||
iStIvtIostorinvService.canceldispense(dtl);
|
iStIvtIostorinvService.canceldispense(dtl);
|
||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
@@ -95,6 +100,7 @@ public class StIvtIostorinvOutController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/taskOpen")
|
@PostMapping("/taskOpen")
|
||||||
|
@Log("出库单作业下发")
|
||||||
public ResponseEntity<Object> taskOpen(@RequestBody JSONObject dtl) {
|
public ResponseEntity<Object> taskOpen(@RequestBody JSONObject dtl) {
|
||||||
iStIvtIostorinvService.taskOpen(dtl);
|
iStIvtIostorinvService.taskOpen(dtl);
|
||||||
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
return new ResponseEntity<>(TableDataInfo.build(),HttpStatus.OK);
|
||||||
|
|||||||
@@ -283,8 +283,6 @@ export default {
|
|||||||
measureunit.getSelect().then(res => {
|
measureunit.getSelect().then(res => {
|
||||||
this.unitDict = res.content
|
this.unitDict = res.content
|
||||||
})
|
})
|
||||||
console.log(this.id)
|
|
||||||
console.log(2222222)
|
|
||||||
if (this.id !== '' && this.id !== null && this.id !== undefined) {
|
if (this.id !== '' && this.id !== null && this.id !== undefined) {
|
||||||
crudProductIn.getIosInvDtl(this.id).then(res => {
|
crudProductIn.getIosInvDtl(this.id).then(res => {
|
||||||
this.tableData = res
|
this.tableData = res
|
||||||
@@ -319,6 +317,25 @@ export default {
|
|||||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
let itemDtl = this.tableData[i];
|
||||||
|
if (!itemDtl.unit_id) {
|
||||||
|
this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!itemDtl.stor_code) {
|
||||||
|
this.crud.notify('仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!itemDtl.pcsn) {
|
||||||
|
this.crud.notify('物料批次不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!itemDtl.qty) {
|
||||||
|
this.crud.notify('物料出库数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
this.form.item = this.tableData
|
this.form.item = this.tableData
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
placeholder="车间"
|
placeholder="车间"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
style="width: 120px"
|
style="width: 120px"
|
||||||
|
@change="areaChange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in statusEnum.PRODUCT_AREA"
|
v-for="item in statusEnum.PRODUCT_AREA"
|
||||||
@@ -330,6 +331,15 @@ export default {
|
|||||||
this.nowrow = row
|
this.nowrow = row
|
||||||
this.materShow = true
|
this.materShow = true
|
||||||
},
|
},
|
||||||
|
|
||||||
|
areaChange(val){
|
||||||
|
if (this.tableData.length>0) {
|
||||||
|
this.tableData.forEach(a=>{
|
||||||
|
this.$set(a.form_data, 'product_area', val)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
[CRUD.HOOK.beforeSubmit]() {
|
[CRUD.HOOK.beforeSubmit]() {
|
||||||
// 提交前校验
|
// 提交前校验
|
||||||
if (this.tableData.length === 0) {
|
if (this.tableData.length === 0) {
|
||||||
@@ -344,6 +354,25 @@ export default {
|
|||||||
this.crud.notify('车间不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('车间不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
let itemDtl = this.tableData[i];
|
||||||
|
if (!itemDtl.unit_id) {
|
||||||
|
this.crud.notify('单位不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!itemDtl.stor_code) {
|
||||||
|
this.crud.notify('仓库不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!itemDtl.pcsn) {
|
||||||
|
this.crud.notify('物料批次不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!itemDtl.qty) {
|
||||||
|
this.crud.notify('物料出库数量不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
this.form.item = this.tableData
|
this.form.item = this.tableData
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -370,6 +399,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$set(data.form_data,a.value,item)
|
this.$set(data.form_data,a.value,item)
|
||||||
})
|
})
|
||||||
|
this.$set(data.form_data,'product_area',this.form.form_data.product_area)
|
||||||
this.tableData.splice(-1, 0, data)
|
this.tableData.splice(-1, 0, data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ export default {
|
|||||||
sort: 'id,desc',
|
sort: 'id,desc',
|
||||||
crudMethod: {...crudFormData},
|
crudMethod: {...crudFormData},
|
||||||
optShow: {
|
optShow: {
|
||||||
add: true,
|
add: false,
|
||||||
reset: true
|
reset: true
|
||||||
},
|
},
|
||||||
query: {
|
query: {
|
||||||
@@ -291,14 +291,22 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
if (val.length === 1) {
|
if (val.length > 1) {
|
||||||
this.task_flag = false
|
|
||||||
this.dis_flag = false
|
|
||||||
this.currentRow = row
|
|
||||||
} else {
|
|
||||||
this.task_flag = true
|
this.task_flag = true
|
||||||
this.dis_flag = true
|
this.dis_flag = true
|
||||||
this.currentRow = null
|
this.currentRow = null
|
||||||
|
} else {
|
||||||
|
this.currentRow = val[0]
|
||||||
|
if (this.currentRow.status == '10' || this.currentRow.status == '13'){
|
||||||
|
this.dis_flag = false
|
||||||
|
}else {
|
||||||
|
this.dis_flag = true
|
||||||
|
}
|
||||||
|
if (this.currentRow.status == '13'){
|
||||||
|
this.task_flag = false
|
||||||
|
}else {
|
||||||
|
this.task_flag = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user