更新代码
This commit is contained in:
@@ -66,36 +66,4 @@ public class CppointController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("启动")
|
|
||||||
@PostMapping("/changeUsedOn")
|
|
||||||
@ApiOperation("启动")
|
|
||||||
public ResponseEntity<Object> changeUsedOn(@RequestBody JSONArray jsonArray) {
|
|
||||||
cppointService.changeUsed(jsonArray, 1);
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Log("禁用")
|
|
||||||
@PostMapping("/changeUsedOff")
|
|
||||||
@ApiOperation("禁用")
|
|
||||||
public ResponseEntity<Object> changeUsedOff(@RequestBody JSONArray jsonArray) {
|
|
||||||
cppointService.changeUsed(jsonArray, 0);
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/getCppRegionInquery")
|
|
||||||
@Log("入库查询")
|
|
||||||
@ApiOperation("入库查询")
|
|
||||||
//@SaCheckPermission("@el.check('regionio:list')")
|
|
||||||
public ResponseEntity<Object> cppRegionInquery(@RequestParam Map whereJson, Pageable page){
|
|
||||||
return new ResponseEntity<>(cppointService.cppRegionInquery(whereJson,page),HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/getCppRegionOutquery")
|
|
||||||
@Log("出库查询")
|
|
||||||
@ApiOperation("出库查询")
|
|
||||||
//@SaCheckPermission("@el.check('regionio:list')")
|
|
||||||
public ResponseEntity<Object> cppRegionOutquery(@RequestParam Map whereJson, Pageable page){
|
|
||||||
return new ResponseEntity<>(cppointService.cppRegionOutquery(whereJson,page),HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -62,26 +62,4 @@ public interface CppointService {
|
|||||||
*/
|
*/
|
||||||
void deleteAll(Long[] ids);
|
void deleteAll(Long[] ids);
|
||||||
|
|
||||||
/**
|
|
||||||
* 改变是否启用
|
|
||||||
* @param jsonArray
|
|
||||||
* @param i
|
|
||||||
*/
|
|
||||||
void changeUsed(JSONArray jsonArray, int i);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Map<String,Object> cppRegionInquery(Map whereJson, Pageable page);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Map<String,Object> cppRegionOutquery(Map whereJson, Pageable page);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,61 +177,4 @@ public class CppointServiceImpl implements CppointService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 改变是否启用
|
|
||||||
*
|
|
||||||
* @param jsonArray
|
|
||||||
* @param flag
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void changeUsed(JSONArray jsonArray, int flag) {
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("sch_base_CpPoint");
|
|
||||||
for ( int i = 0; i < jsonArray.size(); i++ ) {
|
|
||||||
JSONObject object = jsonArray.getJSONObject(i);
|
|
||||||
if (flag == 1) object.put("is_used", 1);
|
|
||||||
else object.put("is_used", 0);
|
|
||||||
wo.update(object);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> cppRegionInquery(Map whereJson, Pageable page) {
|
|
||||||
JSONObject map = new JSONObject();
|
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("io_type", "0");
|
|
||||||
if (!ObjectUtil.isNull(whereJson.get("bill_code"))) {
|
|
||||||
map.put("bill_code", "%" + whereJson.get("bill_code") + "%");
|
|
||||||
}
|
|
||||||
map.put("bill_status", whereJson.get("bill_status"));
|
|
||||||
map.put("begin_time", whereJson.get("begin_time"));
|
|
||||||
map.put("end_time", whereJson.get("end_time"));
|
|
||||||
JSONObject json = WQL.getWO("SCH_BASE_CPPOINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time asc");
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> cppRegionOutquery(Map whereJson, Pageable page) {
|
|
||||||
JSONObject map = new JSONObject();
|
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("io_type", "1");
|
|
||||||
if (!ObjectUtil.isNull(whereJson.get("bill_code"))) {
|
|
||||||
map.put("bill_code", "%" + whereJson.get("bill_code") + "%");
|
|
||||||
}
|
|
||||||
map.put("bill_status", whereJson.get("bill_status"));
|
|
||||||
map.put("begin_time", whereJson.get("begin_time"));
|
|
||||||
map.put("end_time", whereJson.get("end_time"));
|
|
||||||
JSONObject json = WQL.getWO("SCH_BASE_CPPOINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time asc");
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,30 +99,3 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
IF 输入.flag = "2"
|
|
||||||
PAGEQUERY
|
|
||||||
SELECT
|
|
||||||
regionio.*
|
|
||||||
FROM
|
|
||||||
`st_ivt_regionio` regionio
|
|
||||||
WHERE
|
|
||||||
regionio.io_type = 输入.io_type
|
|
||||||
AND start_region_id IN
|
|
||||||
(
|
|
||||||
SELECT region.region_id FROM sch_base_region region WHERE region.region_code IN ('CPQYA01')
|
|
||||||
)
|
|
||||||
OPTION 输入.bill_code <> ""
|
|
||||||
regionio.bill_code = 输入.bill_code
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.bill_status <> ""
|
|
||||||
regionio.bill_status = 输入.bill_status
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.begin_time <> ""
|
|
||||||
regionio.create_time >= 输入.begin_time
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.end_time <> ""
|
|
||||||
regionio.create_time <= 输入.end_time
|
|
||||||
ENDOPTION
|
|
||||||
ENDSELECT
|
|
||||||
ENDPAGEQUERY
|
|
||||||
ENDIF
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
package org.nl.wms.sch.rest;
|
package org.nl.wms.sch.rest;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -95,4 +96,12 @@ public class PointController {
|
|||||||
public ResponseEntity<Object> getRegion(){
|
public ResponseEntity<Object> getRegion(){
|
||||||
return new ResponseEntity<>(pointService.getRegion(),HttpStatus.OK);
|
return new ResponseEntity<>(pointService.getRegion(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Log("启动与禁用")
|
||||||
|
@PostMapping("/changeUsed")
|
||||||
|
@ApiOperation("启动与禁用")
|
||||||
|
public ResponseEntity<Object> changeUsedOn(@RequestBody JSONObject jsonObject) {
|
||||||
|
pointService.changeUsed(jsonObject);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,4 +84,10 @@ public interface PointService {
|
|||||||
* 获取区域
|
* 获取区域
|
||||||
*/
|
*/
|
||||||
JSONArray getRegion();
|
JSONArray getRegion();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 改变启用状态
|
||||||
|
* @param jsonObject
|
||||||
|
*/
|
||||||
|
void changeUsed(JSONObject jsonObject);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -257,6 +257,24 @@ public class PointServiceImpl implements PointService {
|
|||||||
return resultJSONArray;
|
return resultJSONArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 改变启用状态
|
||||||
|
*
|
||||||
|
* @param jsonObject
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void changeUsed(JSONObject jsonObject) {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("sch_base_Point");
|
||||||
|
JSONArray data = jsonObject.getJSONArray("data");
|
||||||
|
String used = jsonObject.getString("used");
|
||||||
|
for ( int i = 0; i < data.size(); i++ ) {
|
||||||
|
JSONObject object = data.getJSONObject(i);
|
||||||
|
if (used.equals("1")) object.put("is_used", 1);
|
||||||
|
else object.put("is_used", 0);
|
||||||
|
wo.update(object);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//根据重量返回最大的 级数
|
//根据重量返回最大的 级数
|
||||||
public String getLoadSeriesByqty(Double qty) {
|
public String getLoadSeriesByqty(Double qty) {
|
||||||
JSONArray dictArr = WQLObject.getWQLObject("sys_dict_detail").query("dict_id ='108'", "label").getResultJSONArray(0);
|
JSONArray dictArr = WQLObject.getWQLObject("sys_dict_detail").query("dict_id ='108'", "label").getResultJSONArray(0);
|
||||||
|
|||||||
@@ -67,43 +67,4 @@ public class YsapointController {
|
|||||||
return new ResponseEntity<>(HttpStatus.OK);
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("获取快列排")
|
|
||||||
@GetMapping("/blockRowCol/tree")
|
|
||||||
@ApiOperation("获取快列排")
|
|
||||||
public ResponseEntity<Object> arrangementTree() {
|
|
||||||
return new ResponseEntity<>(ysapointService.getArrangementTree(), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Log("启动")
|
|
||||||
@PostMapping("/changeUsedOn")
|
|
||||||
@ApiOperation("启动")
|
|
||||||
public ResponseEntity<Object> changeUsedOn(@RequestBody JSONArray jsonArray) {
|
|
||||||
ysapointService.changeUsed(jsonArray, 1);
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Log("禁用")
|
|
||||||
@PostMapping("/changeUsedOff")
|
|
||||||
@ApiOperation("禁用")
|
|
||||||
public ResponseEntity<Object> changeUsedOff(@RequestBody JSONArray jsonArray) {
|
|
||||||
ysapointService.changeUsed(jsonArray, 0);
|
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/getYsqRegionInquery")
|
|
||||||
@Log("养生区入库查询")
|
|
||||||
@ApiOperation("入库查询")
|
|
||||||
//@SaCheckPermission("@el.check('regionio:list')")
|
|
||||||
public ResponseEntity<Object> ysqRegionInquery(@RequestParam Map whereJson, Pageable page){
|
|
||||||
return new ResponseEntity<>(ysapointService.ysqRegionInquery(whereJson,page),HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
@GetMapping("/getYsqRegionOutquery")
|
|
||||||
@Log("养生区出库查询")
|
|
||||||
@ApiOperation("出库查询")
|
|
||||||
//@SaCheckPermission("@el.check('regionio:list')")
|
|
||||||
public ResponseEntity<Object> ysqRegionOutquery(@RequestParam Map whereJson, Pageable page){
|
|
||||||
return new ResponseEntity<>(ysapointService.ysqRegionOutquery(whereJson,page),HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,32 +64,4 @@ public interface YsapointService {
|
|||||||
*/
|
*/
|
||||||
void deleteAll(Long[] ids);
|
void deleteAll(Long[] ids);
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取块列排树
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
JSONArray getArrangementTree();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 改变启用状态
|
|
||||||
* @param jsonArray
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
void changeUsed(JSONArray jsonArray, Integer flag);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Map<String,Object> ysqRegionInquery(Map whereJson, Pageable page);
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
Map<String,Object> ysqRegionOutquery(Map whereJson, Pageable page);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,13 +46,9 @@ public class YsapointServiceImpl implements YsapointService {
|
|||||||
if (!ObjectUtil.isNull(whereJson.get("point_code"))) {
|
if (!ObjectUtil.isNull(whereJson.get("point_code"))) {
|
||||||
map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
map.put("point_code", "%" + whereJson.get("point_code") + "%");
|
||||||
}
|
}
|
||||||
if (!ObjectUtil.isNull(whereJson.get("locationsOptions"))) {
|
map.put("block_num", whereJson.get("block_num"));
|
||||||
String locationsOptions = whereJson.get("locationsOptions").toString();
|
map.put("row_num", whereJson.get("row_num"));
|
||||||
String[] options = locationsOptions.split("/");
|
map.put("col_num", whereJson.get("col_num"));
|
||||||
map.put("block_num", options[0]);
|
|
||||||
map.put("row_num", options[1]);
|
|
||||||
map.put("col_num", options[2]);
|
|
||||||
}
|
|
||||||
map.put("is_used", whereJson.get("is_used"));
|
map.put("is_used", whereJson.get("is_used"));
|
||||||
map.put("point_status", whereJson.get("point_status"));
|
map.put("point_status", whereJson.get("point_status"));
|
||||||
map.put("vehicle_type", whereJson.get("vehicle_type"));
|
map.put("vehicle_type", whereJson.get("vehicle_type"));
|
||||||
@@ -185,114 +181,4 @@ public class YsapointServiceImpl implements YsapointService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取块列排树
|
|
||||||
*
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public JSONArray getArrangementTree() {
|
|
||||||
/**
|
|
||||||
* [{
|
|
||||||
* label:块
|
|
||||||
* value:
|
|
||||||
* children:[{
|
|
||||||
* label:排
|
|
||||||
* value
|
|
||||||
* children:[{
|
|
||||||
* label:列
|
|
||||||
* value
|
|
||||||
* children:[{
|
|
||||||
*
|
|
||||||
* }]
|
|
||||||
* }]
|
|
||||||
* }]
|
|
||||||
* }]
|
|
||||||
*/
|
|
||||||
JSONArray result = new JSONArray();
|
|
||||||
// 获取所有的块
|
|
||||||
for (int i = 1; i <= 8; i++) {
|
|
||||||
JSONObject block = new JSONObject();
|
|
||||||
block.put("label", i);
|
|
||||||
block.put("value", i);
|
|
||||||
JSONArray rows = new JSONArray();
|
|
||||||
for (int j = 1; j <= 13; j++) {
|
|
||||||
if ( j == 13 && ( i == 7 || i == 8 ) ) break;
|
|
||||||
JSONObject row = new JSONObject();
|
|
||||||
row.put("label", j);
|
|
||||||
row.put("value", j);
|
|
||||||
JSONArray cols = new JSONArray();
|
|
||||||
for (int k = 1; k <= 13; k++) {
|
|
||||||
if ( i < 7 && k > 9) break;
|
|
||||||
JSONObject col = new JSONObject();
|
|
||||||
col.put("label", k);
|
|
||||||
col.put("value", k);
|
|
||||||
cols.add(col);
|
|
||||||
}
|
|
||||||
row.put("children", cols);
|
|
||||||
rows.add(row);
|
|
||||||
}
|
|
||||||
block.put("children", rows);
|
|
||||||
result.add(block);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 改变启用状态
|
|
||||||
*
|
|
||||||
* @param jsonArray
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
|
||||||
public void changeUsed(JSONArray jsonArray, Integer flag) {
|
|
||||||
WQLObject wo = WQLObject.getWQLObject("sch_base_YsaPoint");
|
|
||||||
for ( int i = 0; i < jsonArray.size(); i++ ) {
|
|
||||||
JSONObject object = jsonArray.getJSONObject(i);
|
|
||||||
if (flag == 1) object.put("is_used", 1);
|
|
||||||
else object.put("is_used", 0);
|
|
||||||
wo.update(object);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> ysqRegionInquery(Map whereJson, Pageable page) {
|
|
||||||
JSONObject map = new JSONObject();
|
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("io_type", "0");
|
|
||||||
if (!ObjectUtil.isNull(whereJson.get("bill_code"))) {
|
|
||||||
map.put("bill_code", "%" + whereJson.get("bill_code") + "%");
|
|
||||||
}
|
|
||||||
map.put("bill_status", whereJson.get("bill_status"));
|
|
||||||
map.put("begin_time", whereJson.get("begin_time"));
|
|
||||||
map.put("end_time", whereJson.get("end_time"));
|
|
||||||
JSONObject json = WQL.getWO("SCH_BASE_YSAPOINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time asc");
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param whereJson
|
|
||||||
* @param page
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Map<String, Object> ysqRegionOutquery(Map whereJson, Pageable page) {
|
|
||||||
JSONObject map = new JSONObject();
|
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("io_type", "1");
|
|
||||||
if (!ObjectUtil.isNull(whereJson.get("bill_code"))) {
|
|
||||||
map.put("bill_code", "%" + whereJson.get("bill_code") + "%");
|
|
||||||
}
|
|
||||||
map.put("bill_status", whereJson.get("bill_status"));
|
|
||||||
map.put("begin_time", whereJson.get("begin_time"));
|
|
||||||
map.put("end_time", whereJson.get("end_time"));
|
|
||||||
JSONObject json = WQL.getWO("SCH_BASE_YSAPOINT").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time asc");
|
|
||||||
return json;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,31 +99,3 @@
|
|||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "2"
|
|
||||||
PAGEQUERY
|
|
||||||
SELECT
|
|
||||||
regionio.*
|
|
||||||
FROM
|
|
||||||
`st_ivt_regionio` regionio
|
|
||||||
WHERE
|
|
||||||
regionio.io_type = 输入.io_type
|
|
||||||
AND start_region_id IN
|
|
||||||
(
|
|
||||||
SELECT region.region_id FROM sch_base_region region WHERE region.region_code IN ('YSQA01', 'YSAQKTPQ01')
|
|
||||||
)
|
|
||||||
OPTION 输入.bill_code <> ""
|
|
||||||
regionio.bill_code = 输入.bill_code
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.bill_status <> ""
|
|
||||||
regionio.bill_status = 输入.bill_status
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.begin_time <> ""
|
|
||||||
regionio.create_time >= 输入.begin_time
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.end_time <> ""
|
|
||||||
regionio.create_time <= 输入.end_time
|
|
||||||
ENDOPTION
|
|
||||||
ENDSELECT
|
|
||||||
ENDPAGEQUERY
|
|
||||||
ENDIF
|
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package org.nl.wms.st.bill.rest;
|
||||||
|
|
||||||
|
import org.nl.wms.st.bill.service.RegionIoService;
|
||||||
|
import org.nl.wms.st.inbill.service.dto.RegionioDto;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import io.swagger.annotations.*;
|
||||||
|
import java.util.Map;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2022-10-20
|
||||||
|
**/
|
||||||
|
@RestController
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Api(tags = "区域出入库管理")
|
||||||
|
@RequestMapping("/api/regionio")
|
||||||
|
@Slf4j
|
||||||
|
public class RegionIoController {
|
||||||
|
|
||||||
|
private final RegionIoService regionioService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询1")
|
||||||
|
@ApiOperation("查询1")
|
||||||
|
//@SaCheckPermission("@el.check('regionio:list')")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page){
|
||||||
|
return new ResponseEntity<>(regionioService.queryAll(whereJson,page),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增1")
|
||||||
|
@ApiOperation("新增1")
|
||||||
|
//@SaCheckPermission("@el.check('regionio:add')")
|
||||||
|
public ResponseEntity<Object> create(@Validated @RequestBody RegionioDto dto){
|
||||||
|
regionioService.create(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改1")
|
||||||
|
@ApiOperation("修改1")
|
||||||
|
//@SaCheckPermission("@el.check('regionio:edit')")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody RegionioDto dto){
|
||||||
|
regionioService.update(dto);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除1")
|
||||||
|
@ApiOperation("删除1")
|
||||||
|
//@SaCheckPermission("@el.check('regionio:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Long[] ids) {
|
||||||
|
regionioService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package org.nl.wms.st.bill.service;
|
||||||
|
|
||||||
|
import org.nl.wms.st.inbill.service.dto.RegionioDto;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author lyd
|
||||||
|
* @date 2022-10-20
|
||||||
|
**/
|
||||||
|
public interface RegionIoService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param page 分页参数
|
||||||
|
* @return Map<String,Object>
|
||||||
|
*/
|
||||||
|
Map<String,Object> queryAll(Map whereJson, Pageable page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有数据不分页
|
||||||
|
* @param whereJson 条件参数
|
||||||
|
* @return List<RegionioDto>
|
||||||
|
*/
|
||||||
|
List<RegionioDto> queryAll(Map whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID查询
|
||||||
|
* @param qty_unit_id ID
|
||||||
|
* @return Regionio
|
||||||
|
*/
|
||||||
|
RegionioDto findById(Long qty_unit_id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编码查询
|
||||||
|
* @param code code
|
||||||
|
* @return Regionio
|
||||||
|
*/
|
||||||
|
RegionioDto findByCode(String code);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param dto /
|
||||||
|
*/
|
||||||
|
void create(RegionioDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param dto /
|
||||||
|
*/
|
||||||
|
void update(RegionioDto dto);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Long[] ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
package org.nl.wms.st.bill.service.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description /
|
||||||
|
* @author lyd
|
||||||
|
* @date 2022-10-20
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class RegionIoDto implements Serializable {
|
||||||
|
|
||||||
|
/** 出入单标识 */
|
||||||
|
/** 防止精度丢失 */
|
||||||
|
@JsonSerialize(using= ToStringSerializer.class)
|
||||||
|
private Long iostorinv_id;
|
||||||
|
|
||||||
|
/** 单据编号 */
|
||||||
|
private String bill_code;
|
||||||
|
|
||||||
|
/** 出入类型 */
|
||||||
|
private String io_type;
|
||||||
|
|
||||||
|
/** 物料标识 */
|
||||||
|
private Long material_id;
|
||||||
|
|
||||||
|
/** 批次 */
|
||||||
|
private String pcsn;
|
||||||
|
|
||||||
|
/** 载具编码 */
|
||||||
|
private String vehicle_code;
|
||||||
|
|
||||||
|
/** 数量 */
|
||||||
|
private BigDecimal qty;
|
||||||
|
|
||||||
|
/** 数量单位标识 */
|
||||||
|
/** 防止精度丢失 */
|
||||||
|
@JsonSerialize(using= ToStringSerializer.class)
|
||||||
|
private Long qty_unit_id;
|
||||||
|
|
||||||
|
/** 单据状态 */
|
||||||
|
private String bill_status;
|
||||||
|
|
||||||
|
/** 起始点位编码 */
|
||||||
|
private String start_point_code;
|
||||||
|
|
||||||
|
/** 终点点位编码 */
|
||||||
|
private String end_point_code;
|
||||||
|
|
||||||
|
/** 起始区域 */
|
||||||
|
private String start_region_id;
|
||||||
|
|
||||||
|
/** 终点区域 */
|
||||||
|
private String end_region_id;
|
||||||
|
|
||||||
|
/** 客户标识 */
|
||||||
|
private Long cust_id;
|
||||||
|
|
||||||
|
/** 生成方式 */
|
||||||
|
private String create_mode;
|
||||||
|
|
||||||
|
/** 任务标识 */
|
||||||
|
private Long task_id;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
private Long create_id;
|
||||||
|
|
||||||
|
/** 创建人姓名 */
|
||||||
|
private String create_name;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
private String create_time;
|
||||||
|
|
||||||
|
/** 修改人 */
|
||||||
|
private Long update_optid;
|
||||||
|
|
||||||
|
/** 修改人姓名 */
|
||||||
|
private String update_optname;
|
||||||
|
|
||||||
|
/** 修改时间 */
|
||||||
|
private String update_time;
|
||||||
|
|
||||||
|
/** 确认人 */
|
||||||
|
private Long confirm_optid;
|
||||||
|
|
||||||
|
/** 确认人姓名 */
|
||||||
|
private String confirm_optname;
|
||||||
|
|
||||||
|
/** 确认时间 */
|
||||||
|
private String confirm_time;
|
||||||
|
|
||||||
|
/** 是否删除 */
|
||||||
|
private String is_delete;
|
||||||
|
}
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
package org.nl.wms.st.bill.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.modules.wql.WQL;
|
||||||
|
import org.nl.wms.st.bill.service.RegionIoService;
|
||||||
|
import org.nl.wms.st.inbill.service.dto.RegionioDto;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
|
import org.nl.modules.wql.core.bean.ResultBean;
|
||||||
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
|
import org.nl.modules.wql.util.WqlUtil;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务实现
|
||||||
|
* @author lyd
|
||||||
|
* @date 2022-10-20
|
||||||
|
**/
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
@Slf4j
|
||||||
|
public class RegionIoServiceImpl implements RegionIoService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String,Object> queryAll(Map whereJson, Pageable page){
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("flag", "1");
|
||||||
|
map.put("io_type", whereJson.get("io_type"));
|
||||||
|
map.put("io_region", "(" + whereJson.get("io_region") + ")");
|
||||||
|
if (!ObjectUtil.isNull(whereJson.get("bill_code"))) {
|
||||||
|
map.put("bill_code", "%" + whereJson.get("bill_code") + "%");
|
||||||
|
}
|
||||||
|
map.put("bill_status", whereJson.get("bill_status"));
|
||||||
|
map.put("begin_time", whereJson.get("begin_time"));
|
||||||
|
map.put("end_time", whereJson.get("end_time"));
|
||||||
|
JSONObject json = WQL.getWO("ST_IVT_REGIONIO").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "create_time asc");
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RegionioDto> queryAll(Map whereJson){
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("st_ivt_regionio");
|
||||||
|
JSONArray arr = wo.query().getResultJSONArray(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(arr)) return arr.toJavaList(RegionioDto.class);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RegionioDto findById(Long qty_unit_id) {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("st_ivt_regionio");
|
||||||
|
JSONObject json = wo.query("qty_unit_id = '" + qty_unit_id + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(json)){
|
||||||
|
return json.toJavaObject( RegionioDto.class);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RegionioDto findByCode(String code) {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("st_ivt_regionio");
|
||||||
|
JSONObject json = wo.query("code ='" + code + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(json)){
|
||||||
|
return json.toJavaObject( RegionioDto.class);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void create(RegionioDto dto) {
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
dto.setQty_unit_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
|
dto.setCreate_id(currentUserId);
|
||||||
|
dto.setCreate_name(nickName);
|
||||||
|
dto.setUpdate_optid(currentUserId);
|
||||||
|
dto.setUpdate_optname(nickName);
|
||||||
|
dto.setUpdate_time(now);
|
||||||
|
dto.setCreate_time(now);
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("st_ivt_regionio");
|
||||||
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
|
wo.insert(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void update(RegionioDto dto) {
|
||||||
|
RegionioDto entity = this.findById(dto.getQty_unit_id());
|
||||||
|
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||||
|
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
|
||||||
|
String now = DateUtil.now();
|
||||||
|
dto.setUpdate_time(now);
|
||||||
|
dto.setUpdate_optid(currentUserId);
|
||||||
|
dto.setUpdate_optname(nickName);
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("st_ivt_regionio");
|
||||||
|
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
|
||||||
|
wo.update(json);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void deleteAll(Long[] ids) {
|
||||||
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("st_ivt_regionio");
|
||||||
|
for (Long qty_unit_id: ids) {
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("qty_unit_id", String.valueOf(qty_unit_id));
|
||||||
|
param.put("is_delete", "1");
|
||||||
|
param.put("update_optid", currentUserId);
|
||||||
|
param.put("update_optname", nickName);
|
||||||
|
param.put("update_time", now);
|
||||||
|
wo.update(param);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 库存查询
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.io_region TYPEAS f_string
|
||||||
|
输入.begin_time TYPEAS s_string
|
||||||
|
输入.end_time TYPEAS s_string
|
||||||
|
输入.bill_code TYPEAS s_string
|
||||||
|
输入.bill_status TYPEAS s_string
|
||||||
|
输入.io_type TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
IF 输入.flag = "1"
|
||||||
|
PAGEQUERY
|
||||||
|
SELECT
|
||||||
|
regionio.*
|
||||||
|
FROM
|
||||||
|
`st_ivt_regionio` regionio
|
||||||
|
WHERE
|
||||||
|
regionio.io_type = 输入.io_type
|
||||||
|
AND
|
||||||
|
start_region_id IN
|
||||||
|
(
|
||||||
|
SELECT region.region_id FROM sch_base_region region WHERE region.region_code IN 输入.io_region
|
||||||
|
)
|
||||||
|
OPTION 输入.bill_code <> ""
|
||||||
|
regionio.bill_code = 输入.bill_code
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.bill_status <> ""
|
||||||
|
regionio.bill_status = 输入.bill_status
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
regionio.create_time >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
regionio.create_time <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
@@ -52,4 +52,13 @@ export function getRegion() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion }
|
|
||||||
|
export function changeUsed(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/point/changeUsed',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del, changeActive, findPoints, getPoint, getRegion, changeUsed }
|
||||||
|
|||||||
@@ -48,4 +48,5 @@ export function getPointTypeSelectById(id) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default { add, edit, del, changeActive, getPointStatusSelectById, getPointTypeSelectById }
|
export default { add, edit, del, changeActive, getPointStatusSelectById, getPointTypeSelectById }
|
||||||
|
|||||||
27
lms/nladmin-ui/src/api/wms/st/bill.js
Normal file
27
lms/nladmin-ui/src/api/wms/st/bill.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/regionio',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/regionio/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/regionio',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
@@ -134,6 +134,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import crudBill from '@/api/wms/st/bill'
|
||||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -147,7 +148,13 @@ export default {
|
|||||||
dicts: ['io_type', 'st_bill_status'],
|
dicts: ['io_type', 'st_bill_status'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '养生区入库管理', url: 'api/cppoint/getCppRegionInquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
return CRUD({
|
||||||
|
title: '养生区入库管理',
|
||||||
|
url: 'api/regionio',
|
||||||
|
idField: 'qty_unit_id',
|
||||||
|
sort: 'qty_unit_id,desc',
|
||||||
|
crudMethod: { ...crudBill }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -168,6 +175,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
this.query.io_type = '1'
|
||||||
|
this.query.io_region = "'CPQYA01'"
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,29 +126,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" >
|
<crudOperation :permission="permission" />
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
size="mini"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-circle-check"
|
|
||||||
slot="right"
|
|
||||||
:disabled="crud.selections.length === 0"
|
|
||||||
@click="changeEnableOn(crud.selections)"
|
|
||||||
>
|
|
||||||
启用
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
icon="el-icon-circle-close"
|
|
||||||
slot="right"
|
|
||||||
:disabled="crud.selections.length === 0"
|
|
||||||
@click="changeEnableOff(crud.selections)">
|
|
||||||
禁用
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||||
@@ -311,18 +289,6 @@ export default {
|
|||||||
},
|
},
|
||||||
hand(value) {
|
hand(value) {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
|
||||||
changeEnableOn(data) {
|
|
||||||
crudCppoint.changeUsedOn(data).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeEnableOff(data) {
|
|
||||||
crudCppoint.changeUsedOff(data).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import crudBill from '@/api/wms/st/bill'
|
||||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -147,7 +148,13 @@ export default {
|
|||||||
dicts: ['io_type', 'st_bill_status'],
|
dicts: ['io_type', 'st_bill_status'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '成品区出库管理', url: 'api/cppoint/getCppRegionOutquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
return CRUD({
|
||||||
|
title: '成品区出库管理',
|
||||||
|
url: 'api/regionio',
|
||||||
|
idField: 'qty_unit_id',
|
||||||
|
sort: 'qty_unit_id,desc',
|
||||||
|
crudMethod: { ...crudBill }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -168,6 +175,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
this.query.io_type = '2'
|
||||||
|
this.query.io_region = "'CPQYA01'"
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,19 +24,5 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function changeUsedOn(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/cppoint/changeUsedOn',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function changeUsedOff(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/cppoint/changeUsedOff',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default { add, edit, del, changeUsedOn, changeUsedOff }
|
export default { add, edit, del }
|
||||||
|
|||||||
@@ -88,27 +88,43 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="是否启用">
|
<el-form-item label="是否启用">
|
||||||
<el-select
|
<el-switch
|
||||||
v-model="query.is_used"
|
v-model="query.is_used"
|
||||||
clearable
|
active-value="0"
|
||||||
size="mini"
|
inactive-value="1"
|
||||||
placeholder="是否启用"
|
active-color="#C0CCDA"
|
||||||
class="filter-item"
|
inactive-color="#409EFF"
|
||||||
@change="hand"
|
@change="hand"
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in dict.is_used"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
/>
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<rrOperation />
|
<rrOperation />
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" />
|
<crudOperation :permission="permission" >
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
slot="right"
|
||||||
|
:disabled="crud.selections.length === 0"
|
||||||
|
@click="changeUsed(crud.selections, 1)"
|
||||||
|
>
|
||||||
|
启用
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-circle-close"
|
||||||
|
slot="right"
|
||||||
|
:disabled="crud.selections.length === 0"
|
||||||
|
@click="changeUsed(crud.selections, 0)">
|
||||||
|
禁用
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
@@ -280,7 +296,6 @@ export default {
|
|||||||
download: false,
|
download: false,
|
||||||
reset: true
|
reset: true
|
||||||
},
|
},
|
||||||
|
|
||||||
crudMethod: { ...crudPoint }
|
crudMethod: { ...crudPoint }
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -374,6 +389,15 @@ export default {
|
|||||||
this.pointTypesList = res
|
this.pointTypesList = res
|
||||||
console.log(res)
|
console.log(res)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
changeUsed(data, flag) { // 更改启用状态
|
||||||
|
const param = {}
|
||||||
|
param.data = data
|
||||||
|
param.used = flag
|
||||||
|
crudPoint.changeUsed(param).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,13 +20,34 @@
|
|||||||
@keyup.enter.native="crud.toQuery"
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="块-排-列">
|
<el-form-item label="块">
|
||||||
<el-cascader
|
<el-input
|
||||||
|
v-model="query.block_num"
|
||||||
clearable
|
clearable
|
||||||
v-model="locations"
|
size="mini"
|
||||||
:options="locationsOptions"
|
style="width: 185px;"
|
||||||
placeholder="请选择标签"
|
placeholder="块"
|
||||||
@change="hand"
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排">
|
||||||
|
<el-input
|
||||||
|
v-model="query.row_num"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
style="width: 185px;"
|
||||||
|
placeholder="排"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="列">
|
||||||
|
<el-input
|
||||||
|
v-model="query.col_num"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
style="width: 185px;"
|
||||||
|
placeholder="列"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="点位状态">
|
<el-form-item label="点位状态">
|
||||||
@@ -105,29 +126,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission" >
|
<crudOperation :permission="permission" />
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
size="mini"
|
|
||||||
type="primary"
|
|
||||||
icon="el-icon-circle-check"
|
|
||||||
slot="right"
|
|
||||||
:disabled="crud.selections.length === 0"
|
|
||||||
@click="changeEnableOn(crud.selections)"
|
|
||||||
>
|
|
||||||
启用
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
class="filter-item"
|
|
||||||
size="mini"
|
|
||||||
type="danger"
|
|
||||||
icon="el-icon-circle-close"
|
|
||||||
slot="right"
|
|
||||||
:disabled="crud.selections.length === 0"
|
|
||||||
@click="changeEnableOff(crud.selections)">
|
|
||||||
禁用
|
|
||||||
</el-button>
|
|
||||||
</crudOperation>
|
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
||||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="120px">
|
||||||
@@ -280,13 +279,8 @@ export default {
|
|||||||
is_lock: [
|
is_lock: [
|
||||||
{ required: true, message: '是否锁定不能为空', trigger: 'blur' }
|
{ required: true, message: '是否锁定不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
},
|
|
||||||
locations: [],
|
|
||||||
locationsOptions: []
|
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
created() {
|
|
||||||
this.getLocationsOptions()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
@@ -299,23 +293,6 @@ export default {
|
|||||||
this.query.locationsOptions = this.locations[0] + '/' + this.locations[1] + '/' + this.locations[2]
|
this.query.locationsOptions = this.locations[0] + '/' + this.locations[1] + '/' + this.locations[2]
|
||||||
}
|
}
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
|
||||||
getLocationsOptions() {
|
|
||||||
crudYsapoint.arrangementTree().then(res => {
|
|
||||||
this.locationsOptions = res
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeEnableOn(data) {
|
|
||||||
crudYsapoint.changeUsedOn(data).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
|
||||||
changeEnableOff(data) {
|
|
||||||
crudYsapoint.changeUsedOff(data).then(res => {
|
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,26 +24,4 @@ export function edit(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function arrangementTree() {
|
export default { add, edit, del }
|
||||||
return request({
|
|
||||||
url: 'api/ysapoint/blockRowCol/tree',
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function changeUsedOn(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/ysapoint/changeUsedOn',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
export function changeUsedOff(data) {
|
|
||||||
return request({
|
|
||||||
url: 'api/ysapoint/changeUsedOff',
|
|
||||||
method: 'post',
|
|
||||||
data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export default { add, edit, del, arrangementTree, changeUsedOn, changeUsedOff }
|
|
||||||
|
|||||||
@@ -134,6 +134,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import crudBill from '@/api/wms/st/bill'
|
||||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -147,7 +148,7 @@ export default {
|
|||||||
dicts: ['io_type', 'st_bill_status'],
|
dicts: ['io_type', 'st_bill_status'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '养生区入库管理', url: 'api/ysapoint/getYsqRegionInquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
return CRUD({ title: '养生区入库管理', url: 'api/regionio', idField: 'qty_unit_id', sort: 'qty_unit_id,desc', crudMethod: { ...crudBill }})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -168,6 +169,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
this.query.io_type = '1'
|
||||||
|
this.query.io_region = "'YSQA01', 'YSAQKTPQ01'"
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,6 +134,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import crudBill from '@/api/wms/st/bill'
|
||||||
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
@@ -147,7 +148,13 @@ export default {
|
|||||||
dicts: ['io_type', 'st_bill_status'],
|
dicts: ['io_type', 'st_bill_status'],
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '养生区入库管理', url: 'api/ysapoint/getYsqRegionOutquery', idField: 'qty_unit_id', sort: 'qty_unit_id,desc'})
|
return CRUD({
|
||||||
|
title: '养生区入库管理',
|
||||||
|
url: 'api/regionio',
|
||||||
|
idField: 'qty_unit_id',
|
||||||
|
sort: 'qty_unit_id,desc',
|
||||||
|
crudMethod: { ...crudBill }
|
||||||
|
})
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -168,6 +175,8 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
this.query.io_type = '2'
|
||||||
|
this.query.io_region = "'YSQA01', 'YSAQKTPQ01'"
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user