Browse Source

opt:整理判断相关业务代码,去除启用的代码

master
zds 4 months ago
parent
commit
e02d3ff026
  1. 61
      lms/nladmin-system/src/main/java/org/nl/wms/st/instor/rest/CheckController.java
  2. 35
      lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/CheckService.java
  3. 267
      lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/CheckServiceImpl.java
  4. 168
      lms/nladmin-ui/src/views/wms/st/inStor/check/CheckDialog.vue
  5. 2
      lms/nladmin-ui/src/views/wms/st/inStor/check/RepairDialog.vue
  6. 50
      lms/nladmin-ui/src/views/wms/st/inStor/check/check.js

61
lms/nladmin-system/src/main/java/org/nl/wms/st/instor/rest/CheckController.java

@ -24,48 +24,35 @@ public class CheckController {
@GetMapping
@Log("查询盘点单")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(checkService.pageQuery(whereJson, page), HttpStatus.OK);
}
@GetMapping("/getDtlView")
@Log("查询盘点单明细详情")
public ResponseEntity<Object> getDtlView(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(checkService.getDtlView(whereJson, page), HttpStatus.OK);
}
@GetMapping("/getExceptionDispose")
@Log("查询盘点单明细异常")
public ResponseEntity<Object> getExceptionDispose(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(checkService.getExceptionDispose(whereJson, page), HttpStatus.OK);
}
@GetMapping("/getOutBillDtl")
@Log("查询移库单")
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson) {
return new ResponseEntity<>(checkService.getOutBillDtl(whereJson), HttpStatus.OK);
}
@GetMapping("/getOutBillDtl2")
@Log("查询盘点单明细2")
public ResponseEntity<Object> getOutBillDtl2(@RequestParam Map whereJson) {
return new ResponseEntity<>(checkService.getOutBillDtl2(whereJson), HttpStatus.OK);
}
@GetMapping("/getOutBillDis")
@Log("查询移库单")
public ResponseEntity<Object> getOutBillDis(@RequestParam Map whereJson) {
return new ResponseEntity<>(checkService.getOutBillDis(whereJson), HttpStatus.OK);
}
@Log("删除移库单")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
checkService.deleteAll(ids);
@ -74,7 +61,6 @@ public class CheckController {
@PutMapping
@Log("修改盘点单")
public ResponseEntity<Object> update(@RequestBody JSONObject whereJson) {
checkService.update(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
@ -82,7 +68,6 @@ public class CheckController {
@PostMapping()
@Log("新增盘点单")
public ResponseEntity<Object> insertDtl(@RequestBody JSONObject whereJson) {
checkService.insertDtl(whereJson);
return new ResponseEntity<>(HttpStatus.CREATED);
@ -90,7 +75,6 @@ public class CheckController {
@PostMapping("/allInsert")
@Log("新增全部在库木箱")
public ResponseEntity<Object> allInsert(@RequestBody JSONObject whereJson) {
checkService.allInsert(whereJson);
return new ResponseEntity<>(HttpStatus.CREATED);
@ -98,59 +82,17 @@ public class CheckController {
@GetMapping("/getStructIvt")
@Log("查询可盘点库存")
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(checkService.getStructIvt(whereJson, page), HttpStatus.OK);
}
@PostMapping("/confirm")
@Log("盘点确定")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
checkService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@GetMapping("/getInvTypes")
@Log("查询单据字段")
public ResponseEntity<Object> getInvTypes() {
return new ResponseEntity<>(checkService.getInvTypes(), HttpStatus.OK);
}
@PostMapping("/handdown")
@Log("移库单手动下发")
public ResponseEntity<Object> handdown(@RequestBody JSONObject whereJson) {
checkService.handdown(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/saveCheck")
@Log("盘点保存")
public ResponseEntity<Object> saveCheck(@RequestBody JSONObject whereJson) {
checkService.saveCheck(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/process0")
@Log("财务为准")
public ResponseEntity<Object> process0(@RequestBody JSONObject whereJson) {
checkService.process0(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@PostMapping("/process1")
@Log("实物为准")
public ResponseEntity<Object> process1(@RequestBody JSONObject whereJson) {
checkService.process1(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@GetMapping(value = "/download")
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
checkService.download(checkService.getOutBillDtl(whereJson), response);
@ -158,7 +100,6 @@ public class CheckController {
@PostMapping("/disposeConfirm")
@Log("处理确认")
public ResponseEntity<Object> disposeConfirm(@RequestBody JSONObject whereJson) {
checkService.disposeConfirm(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
@ -166,7 +107,6 @@ public class CheckController {
@PostMapping("/confirmBtn")
@Log("强制确认")
public ResponseEntity<Object> confirmBtn(@RequestBody JSONObject whereJson) {
checkService.confirmBtn(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
@ -174,7 +114,6 @@ public class CheckController {
@PostMapping("/repairSubmit")
@Log("补录明细")
public ResponseEntity<Object> repairSubmit(@RequestBody JSONObject whereJson) {
checkService.repairSubmit(whereJson);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);

35
lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/CheckService.java

@ -60,13 +60,6 @@ public interface CheckService {
JSONArray getOutBillDtl2(Map whereJson);
/**
* 查询出库单明细
*
* @param whereJson /
* @return
*/
JSONArray getOutBillDis(Map whereJson);
/**
* 修改出库单
@ -90,20 +83,6 @@ public interface CheckService {
*/
void confirm(JSONObject whereJson);
/**
* 查询单据字段
*
* @return
*/
JSONArray getInvTypes();
/**
* 移库单手动下发
*
* @param whereJson /
*/
void handdown(JSONObject whereJson);
/**
* 盘点保存
*
@ -111,20 +90,6 @@ public interface CheckService {
*/
void saveCheck(JSONObject whereJson);
/**
* 财务为准
*
* @param whereJson /
*/
void process0(JSONObject whereJson);
/**
* 财务为准
*
* @param whereJson /
*/
void process1(JSONObject whereJson);
/**
* 导出
*

267
lms/nladmin-system/src/main/java/org/nl/wms/st/instor/service/impl/CheckServiceImpl.java

@ -17,14 +17,10 @@ import org.nl.modules.wql.WQL;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.modules.wql.util.WqlUtil;
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
import org.nl.wms.st.inbill.service.StorPublicService;
import org.nl.wms.st.instor.service.CheckService;
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.*;
@ -37,14 +33,10 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
@Slf4j
public class CheckServiceImpl implements CheckService {
@Autowired
private StorPublicService storPublicService;
@Override
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
WQLObject dtlTab = WQLObject.getWQLObject("st_ivt_checkdtl");
HashMap<String, String> map = new HashMap<>(whereJson);
map.put("flag", "1");
if (StrUtil.isNotEmpty(map.get("check_code"))) {
@ -223,30 +215,6 @@ public class CheckServiceImpl implements CheckService {
}
}
/**
* 根据传进来的载具物料明细查询载具所有库存记录并生成移库明细
*
* @param rows
*/
@Transactional(rollbackFor = Exception.class)
void insertDtlByRows(JSONObject jo_mst, ArrayList<HashMap> rows) {
//明细表
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
//定义需要需要插入的库存集合
HashSet<String> set = new HashSet<>();
for (int i = 0; i < rows.size(); i++) {
HashMap<String, String> row = rows.get(i);
set.add(row.get("struct_id"));
String checkdtl_id = IdUtil.getSnowflake(1, 1).nextId() + "";
row.put("checkdtl_id", checkdtl_id);
row.put("check_code", jo_mst.getString("check_code"));
row.put("check_id", jo_mst.getString("check_id"));
row.put("seq_no", (i + 1) + "");
row.put("is_down", "0");
wo_dtl.insert(row);
}
}
@Override
public JSONArray getOutBillDtl(Map whereJson) {
@ -283,15 +251,6 @@ public class CheckServiceImpl implements CheckService {
return jo;
}
@Override
public JSONArray getOutBillDis(Map whereJson) {
whereJson.put("flag", "4");
JSONArray jo = WQL.getWO("QST_IVT_CHECK")
.addParamMap((HashMap) whereJson)
.process()
.getResultJSONArray(0);
return jo;
}
@Override
@Transactional(rollbackFor = Exception.class)
@ -422,61 +381,6 @@ public class CheckServiceImpl implements CheckService {
wo_mst.update(jsonMst);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void handdown(JSONObject whereJson) {
//移库单主表
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
//移库单明细表
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_MoveInvDtl");
//任务表
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task");
HandMoveStorAcsTask handMoveStorAcsTask = new HandMoveStorAcsTask();
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
String moveinv_id = whereJson.getString("moveinv_id");
//查询当前移库单所有载具的任务
JSONArray ja = WQL.getWO("QST_IVT_HANDMOVESTOR")
.addParam("flag", "4")
.addParam("moveinv_id", moveinv_id)
.process().getResultJSONArray(0);
if (ja.size() == 0) {
throw new BadRequestException("当前移库单无可下发任务!");
}
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
String task_id = jo.getString("task_id");
String taskdtl_id = whereJson.getString("taskdtl_id");
JSONObject result = handMoveStorAcsTask.notifyAcs(taskdtl_id);
if (ObjectUtil.isNotEmpty(result)) {
String status = result.getString("status");
if ("200".equals(status)) {
HashMap<String, String> map = new HashMap<>();
//更新分配表
map.put("is_issued", "1");
wo_dtl.update(map, "is_issued='0' and task_id='" + task_id + "'");
//更新任务为已下发
map.put("task_status", "02");
map.put("update_optid", currentUserId + "");
map.put("update_optname", nickName);
map.put("update_time", now);
wo_Task.update(map, "task_status='01' and taskdtl_id='" + taskdtl_id + "'");
} else {
throw new BadRequestException("任务下发失败,请稍后重试!");
}
} else {
throw new BadRequestException("任务下发失败,请稍后重试!");
}
}
HashMap<String, String> map = new HashMap<>();
map.put("bill_status", "20");
wo_mst.update(map, "moveinv_id='" + moveinv_id + "'");
}
@Override
public void saveCheck(JSONObject whereJson) {
//主表
@ -534,177 +438,6 @@ public class CheckServiceImpl implements CheckService {
wo_mst.update(jo_mst);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void process0(JSONObject whereJson) {
//主表
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_CheckMst");
//明细表
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
JSONObject form = whereJson.getJSONObject("form");
JSONObject row = whereJson.getJSONObject("row");
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
JSONObject jo_mst = wo_mst.query("status <>'99' and check_id='" + form.getString("check_id") + "'").uniqueResult(0);
if (jo_mst == null) {
throw new BadRequestException("盘点单状态异常!");
}
row.put("status", "07");
row.put("process_optid", currentUserId);
row.put("process_type", "0");
row.put("is_process", "1");
row.put("process_time", now);
wo_dtl.update(row);
JSONArray ja = wo_dtl.query("status in ('99','07') and check_id='" + form.getString("check_id") + "'").getResultJSONArray(0);
//说明全部确认
if (ja.size() == jo_mst.getInteger("dtl_num")) {
HashMap<String, String> mapdtl = new HashMap<>();
mapdtl.put("status", "99");
wo_dtl.update(mapdtl, "check_id='" + form.getString("check_id") + "'");
jo_mst.put("status", "99");
jo_mst.put("confirm_optid", currentUserId);
jo_mst.put("confirm_optname", nickName);
jo_mst.put("confirm_time", now);
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
//锁定起点点位、仓位
JSONObject from_start = new JSONObject();
from_start.put("lock_type", "00");
from_start.put("struct_id", jo.getString("struct_id"));
storPublicService.updateStructAndPoint(from_start);
}
}
wo_mst.update(jo_mst);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void process1(JSONObject whereJson) {
//主表
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_CheckMst");
//明细表
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_CheckDtl");
//明细表
WQLObject wo_dis = WQLObject.getWQLObject("ST_IVT_CheckDtlDis");
JSONObject form = whereJson.getJSONObject("row");
JSONArray rows = whereJson.getJSONArray("rows");
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
JSONObject jo_mst = wo_mst.query("status <>'99' and check_id='" + form.getString("check_id") + "'").uniqueResult(0);
if (jo_mst == null) {
throw new BadRequestException("盘点单状态异常!");
}
HashMap<String, String> map = new HashMap<>();
map.put("status", "07");
map.put("process_optid", currentUserId + "");
map.put("process_type", "1");
map.put("is_process", "1");
map.put("process_time", now);
wo_dtl.update(map, "status not in('07','99') and storagevehicle_code='" + form.getString("storagevehicle_code") + "' and check_id='" + form.getString("check_id") + "'");
for (int i = 0; i < rows.size(); i++) {
JSONObject jo = rows.getJSONObject(i);
String checkdtldis_id = IdUtil.getSnowflake(1, 1).nextId() + "";
jo.put("checkdtldis_id", checkdtldis_id);
jo.put("check_id", jo_mst.getString("check_id"));
jo.put("check_code", jo_mst.getString("check_code"));
jo.put("sect_id", form.getString("sect_id"));
jo.put("struct_id", form.getString("struct_id"));
jo.put("struct_name", form.getString("struct_name"));
jo.put("sect_name", form.getString("sect_name"));
wo_dis.insert(jo);
}
//判断是否要生成损单
JSONArray ja_sun = WQL.getWO("QST_IVT_CHECK")
.addParam("storagevehicle_code", form.getString("storagevehicle_code"))
.addParam("check_id", form.getString("check_id"))
.addParam("flag", "6")
.process()
.getResultJSONArray(0);
if (ja_sun.size() > 0) {
JSONObject mapMst = new JSONObject();
mapMst.put("mol_inv_type", "42");
mapMst.put("create_mode", "02");
mapMst.put("mol_type", "0");
mapMst.put("stor_id", ja_sun.getJSONObject(0).getString("stor_id"));
mapMst.put("sect_id", ja_sun.getJSONObject(0).getString("sect_id"));
mapMst.put("sect_name", ja_sun.getJSONObject(0).getString("sect_name"));
mapMst.put("struct_id", ja_sun.getJSONObject(0).getString("struct_id"));
mapMst.put("struct_name", ja_sun.getJSONObject(0).getString("struct_name"));
mapMst.put("tableData", ja_sun);
}
//判断是否要生成溢单
JSONArray ja_yi = WQL.getWO("QST_IVT_CHECK")
.addParam("storagevehicle_code", form.getString("storagevehicle_code"))
.addParam("check_id", form.getString("check_id"))
.addParam("flag", "5")
.process()
.getResultJSONArray(0);
if (ja_yi.size() > 0) {
JSONObject mapMst = new JSONObject();
mapMst.put("mol_inv_type", "42");
mapMst.put("create_mode", "02");
mapMst.put("mol_type", "1");
mapMst.put("stor_id", ja_yi.getJSONObject(0).getString("stor_id"));
mapMst.put("sect_id", ja_yi.getJSONObject(0).getString("sect_id"));
mapMst.put("sect_name", ja_yi.getJSONObject(0).getString("sect_name"));
mapMst.put("struct_id", ja_yi.getJSONObject(0).getString("struct_id"));
mapMst.put("struct_name", ja_yi.getJSONObject(0).getString("struct_name"));
mapMst.put("tableData", ja_yi);
}
JSONArray ja = wo_dtl.query("status in ('99','07') and check_id='" + form.getString("check_id") + "'").getResultJSONArray(0);
//说明全部确认
if (ja.size() == jo_mst.getInteger("dtl_num")) {
HashMap<String, String> mapdtl = new HashMap<>();
mapdtl.put("status", "99");
wo_dtl.update(mapdtl, "check_id='" + form.getString("check_id") + "'");
jo_mst.put("status", "99");
jo_mst.put("confirm_optid", currentUserId);
jo_mst.put("confirm_optname", nickName);
jo_mst.put("confirm_time", now);
for (int i = 0; i < ja.size(); i++) {
JSONObject jo = ja.getJSONObject(i);
//锁定起点点位、仓位
JSONObject from_start = new JSONObject();
from_start.put("lock_type", "00");
from_start.put("struct_id", jo.getString("struct_id"));
storPublicService.updateStructAndPoint(from_start);
}
//确认损益单
JSONArray ja_sunyi = WQL.getWO("QST_IVT_CHECK")
.addParam("check_code", form.getString("check_code"))
.addParam("flag", "7")
.process()
.getResultJSONArray(0);
for (int i = 0; i < ja_sunyi.size(); i++) {
JSONObject jo = ja_sunyi.getJSONObject(i);
}
}
wo_mst.update(jo_mst);
}
@Override
public JSONArray getInvTypes() {
//查询单据字段类型
JSONArray ja = WQL.getWO("ST_PUB_QUERY_01")
.addParam("flag", "4")
.process()
.getResultJSONArray(0);
return ja;
}
@Override
public void download(JSONArray rows, HttpServletResponse response) throws IOException {
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");

168
lms/nladmin-ui/src/views/wms/st/inStor/check/CheckDialog.vue

@ -72,17 +72,6 @@
<span class="crud-opts-right2">
<!--左侧插槽-->
<slot name="left" />
<!-- <el-button
slot="left"
class="filter-item"
type="primary"
icon="el-icon-plus"
size="mini"
:disabled="add_flag"
@click="addrow"
>
新增一行
</el-button>-->
</span>
</div>
@ -95,7 +84,7 @@
border
:highlight-current-row="true"
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
@current-change="handleCurrentChange"
@selection-change="crud.selectionChangeHandler"
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="sect_name" label="盘点库区" align="center" width="120px" />
@ -132,18 +121,10 @@
<el-input v-model="scope.row.remark" size="mini" style="width: 250px" />
</template>
</el-table-column>
<!-- <el-table-column align="center" label="操作" width="160" fixed="right">
<template scope="scope">
<el-button :disabled="isCanDel(scope.$index, scope.row,1)" type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="deleteRow(scope.$index, tableData)" />
<el-button v-show="!scope.row.edit" :disabled="isCanDel(scope.$index, scope.row,2)" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button v-show="scope.row.edit" :disabled="isCanDel(scope.$index, scope.row,2)" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
</template>
</el-table-column>-->
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<!-- <el-button type="primary" @click="saveCheck">保存</el-button>-->
<el-button type="primary" @click="submitCheck">确认</el-button>
</span>
<DtlViewDialog :dialog-show.sync="dtlViewShow" :open-param="paramDtlView"/>
@ -177,11 +158,7 @@ export default {
return {
dialogVisible: false,
paramDtlView: '',
materShow: false,
dtlViewShow: false,
add_flag: true,
nowrow: null,
nowindex: '',
storlist: [],
form: {
check_id: '',
@ -228,134 +205,9 @@ export default {
close() {
this.$emit('AddChanged')
},
handleCurrentChange(current) {
if (current !== null) {
this.nowrow = current
const num = parseFloat(current.base_qty)
if (num > 0) {
this.add_flag = false
} else {
this.add_flag = true
}
} else {
this.nowrow = null
this.add_flag = true
}
},
isCanDel(index, row, type) {
if (type === 1) {
if (row.status === '1') {
return false
} else {
return true
}
}
},
isShow(index, row, type) {
const num = parseFloat(row.base_qty)
if (type === 1) {
if (row.status > '3') {
return false
} else {
if (num > 0) {
return false
} else {
if (row.edit) {
return false
} else {
return true
}
}
}
} else if (type === 2) {
if (row.status > '2') {
return false
} else {
if (row.edit) {
return false
} else {
return true
}
}
} else if (type === 3) {
if (row.status > '3') {
return true
} else {
if (num > 0) {
return true
} else {
if (row.edit) {
return true
} else {
return false
}
}
}
} else if (type === 4) {
if (row.status > '2') {
return true
} else {
if (row.edit) {
return true
} else {
return false
}
}
}
},
setForm(row) {
this.dialogVisible = true
this.form = row
},
bill_statusFormat(row, column) {
return this.dict.label.check_dtl_status[row.status]
},
check_resultFormat(row, column) {
return this.dict.label.check_result[row.check_result]
},
addrow() {
if (this.nowrow === null) {
this.crud.notify('请先选中一条已存在的库存明细!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
this.tableData.push({ check_id: this.form.check_id, check_code: this.form.check_code, checkdtl_id: '', sect_id: this.nowrow.sect_id, sect_name: this.nowrow.sect_name, struct_id: this.nowrow.struct_id, struct_name: this.nowrow.struct_name, storagevehicle_id: this.nowrow.storagevehicle_id, storagevehicle_code: this.nowrow.storagevehicle_code, status: '01', material_id: '', material_name: '', base_qty: '0', qty_unit_id: '42', qty_unit_name: '桶', is_down: '0', fac_qty: '', check_result: '0', edit: false })
this.form.dtl_num = this.tableData.length
},
tableChanged2(row) {
for (let i = 0; i < this.tableData.length; i++) {
if ((this.tableData[i].material_id === row.material_id) && (this.tableData[i].storagevehicle_code === this.nowrow.storagevehicle_code) && (this.tableData[i].struct_id === this.nowrow.struct_id)) {
this.crud.notify('不允许货位、载具、物料同时相同!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
this.nowrow.material_id = row.material_id
this.nowrow.material_code = row.material_code
this.nowrow.material_name = row.material_name
this.tableData.splice(this.nowindex, 1, this.nowrow) // splice
},
handleEdit(index, row) {
//
if (!row.edit) {
const num = parseFloat(row.base_qty)
const fac_qty = parseFloat(row.fac_qty)
if (num <= 0 && fac_qty <= 0) {
this.crud.notify('不允许新增明细,盘点数量为0!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
if (!row.material_id) {
this.crud.notify('物料不可为空!', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
}
row.edit = !row.edit
this.tableData.splice(index, 1, row) // splice
},
deleteRow(index, rows) {
rows.splice(index, 1)
this.nowindex = ''
this.nowrow = null
this.form.detail_count = this.tableData.length
},
submitCheck() {
check.confirm({ 'row': this.form, 'rows': this.tableData }).then(res => {
this.dialogVisible = false
@ -363,21 +215,6 @@ export default {
this.crud.notify('操作成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
})
},
saveCheck() {
if (this.tableData.length === 0) {
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
return false
}
for (let i = 0; i < this.tableData.length; i++) {
if (!this.tableData[i].edit) {
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
return false
}
}
check.saveCheck({ 'row': this.form, 'rows': this.tableData }).then(res => {
this.dialogVisible = false
})
},
openDtlView(row) {
this.paramDtlView = row.storagevehicle_code
this.dtlViewShow = true
@ -397,7 +234,4 @@ export default {
margin-left: auto;
padding: 4px 4px;
}
.input-with-select {
background-color: #fff;
}
</style>

2
lms/nladmin-ui/src/views/wms/st/inStor/check/RepairDialog.vue

@ -37,7 +37,7 @@ import CRUD, { header, presenter } from '@crud/crud'
import check from '@/views/wms/st/inStor/check/check'
export default {
name: 'ProcessDialog',
name: 'RepairDialog',
mixins: [presenter(), header()],
props: {
dialogShow: {

50
lms/nladmin-ui/src/views/wms/st/inStor/check/check.js

@ -38,26 +38,6 @@ export function getOutBillDtl2(params) {
params
})
}
export function getOutBillDis(params) {
return request({
url: '/api/check/getOutBillDis',
method: 'get',
params
})
}
export function getInvTypes() {
return request({
url: '/api/check/getInvTypes',
method: 'get'
})
}
export function insertDtl(data) {
return request({
url: '/api/check/insertDtl',
method: 'post',
data
})
}
export function getStructIvt(params) {
return request({
url: '/api/check/getStructIvt',
@ -73,34 +53,6 @@ export function confirm(data) {
data
})
}
export function handdown(data) {
return request({
url: '/api/check/handdown',
method: 'post',
data
})
}
export function saveCheck(data) {
return request({
url: '/api/check/saveCheck',
method: 'post',
data
})
}
export function process0(data) {
return request({
url: '/api/check/process0',
method: 'post',
data
})
}
export function process1(data) {
return request({
url: '/api/check/process1',
method: 'post',
data
})
}
export function disposeConfirm(data) {
return request({
url: '/api/check/disposeConfirm',
@ -129,4 +81,4 @@ export function repairSubmit(data) {
data
})
}
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, getInvTypes, saveCheck, process0, getOutBillDis, process1, disposeConfirm, allInsert, confirmBtn, repairSubmit }
export default { add, edit, del, getOutBillDtl, getStructIvt, getOutBillDtl2, confirm, disposeConfirm, allInsert, confirmBtn, repairSubmit }

Loading…
Cancel
Save