优化
This commit is contained in:
@@ -52,6 +52,13 @@ public class CheckOutBillController {
|
|||||||
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson){
|
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson){
|
||||||
return new ResponseEntity<>(checkOutBillService.getOutBillDtl(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(checkOutBillService.getOutBillDtl(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/queryDtl2")
|
||||||
|
@Log("查询出库单")
|
||||||
|
@ApiOperation("查询出库单")
|
||||||
|
public ResponseEntity<Object> queryDtl2(@RequestParam Map whereJson){
|
||||||
|
return new ResponseEntity<>(checkOutBillService.queryDtl2(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
@Log("删除出库单")
|
@Log("删除出库单")
|
||||||
@ApiOperation("删除出库单")
|
@ApiOperation("删除出库单")
|
||||||
//@PreAuthorize("@el.check('checkoutbill:del')")
|
//@PreAuthorize("@el.check('checkoutbill:del')")
|
||||||
|
|||||||
@@ -60,6 +60,12 @@ public interface CheckOutBillService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONArray getOutBillDtl(Map whereJson);
|
JSONArray getOutBillDtl(Map whereJson);
|
||||||
|
/**
|
||||||
|
* 查询出库单明细
|
||||||
|
* @param whereJson /
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONArray queryDtl2(Map whereJson);
|
||||||
/**
|
/**
|
||||||
* 查询出库单分配明细
|
* 查询出库单分配明细
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
|
|||||||
@@ -114,8 +114,54 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
|
|||||||
str = "(" + str.substring(1) + ")";
|
str = "(" + str.substring(1) + ")";
|
||||||
map.put("source_bill_code", str);
|
map.put("source_bill_code", str);
|
||||||
}
|
}
|
||||||
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "iosdtl2.material_id");
|
JSONObject ret = WQL.getWO("QST_IVT_CHECKOUTBILL2").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "iosdtl2.material_id");
|
||||||
return jo;
|
JSONArray json = ret.getJSONArray("content");
|
||||||
|
JSONArray ja = new JSONArray();
|
||||||
|
for(int i=0;i<json.size();i++){
|
||||||
|
JSONObject jo = json.getJSONObject(i);
|
||||||
|
map.put("material_id", jo.getString("material_id"));
|
||||||
|
map.put("pcsn", jo.getString("pcsn"));
|
||||||
|
map.put("flag", "13");
|
||||||
|
JSONObject jo_now = WQL.getWO("QST_IVT_CHECKOUTBILL2").addParamMap(map).process().uniqueResult(0);
|
||||||
|
if(jo_now!=null){
|
||||||
|
jo.put("sum_real_qty",jo_now.getDouble("sum_real_qty"));
|
||||||
|
}else{
|
||||||
|
jo.put("sum_real_qty","0");
|
||||||
|
}
|
||||||
|
ja.add(jo);
|
||||||
|
}
|
||||||
|
ret.put("content",ja);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray queryDtl2(Map whereJson){
|
||||||
|
HashMap<String, String> map = new HashMap<>(whereJson);
|
||||||
|
map.put("flag", "14");
|
||||||
|
if (StrUtil.isNotEmpty(map.get("username"))) {
|
||||||
|
map.put("username", "%" + map.get("username") + "%");
|
||||||
|
}
|
||||||
|
String begin_time = map.get("begin_time");
|
||||||
|
if (StrUtil.isNotEmpty(begin_time)) {
|
||||||
|
map.put("begin_time", begin_time.substring(0,10));
|
||||||
|
}
|
||||||
|
String end_time = map.get("end_time");
|
||||||
|
if (StrUtil.isNotEmpty(end_time)) {
|
||||||
|
map.put("end_time", end_time.substring(0,10));
|
||||||
|
}
|
||||||
|
String source_bill_code = map.get("source_bill_code");
|
||||||
|
if (StrUtil.isNotEmpty(source_bill_code)) {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
String[] strs = source_bill_code.split(",");
|
||||||
|
for(int i=0;i<strs.length;i++){
|
||||||
|
sb.append(",'" + strs[i] + "'");
|
||||||
|
}
|
||||||
|
String str = sb.toString();
|
||||||
|
str = "(" + str.substring(1) + ")";
|
||||||
|
map.put("source_bill_code", str);
|
||||||
|
}
|
||||||
|
JSONArray ret = WQL.getWO("QST_IVT_CHECKOUTBILL2").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -600,82 +600,6 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
IF 输入.flag = "12"
|
|
||||||
PAGEQUERY
|
|
||||||
SELECT
|
|
||||||
SUM( iosdtl2.real_qty ) AS sum_real_qty,
|
|
||||||
SUM( iosdtl2.plan_qty ) AS sum_plan_qty,
|
|
||||||
iosdtl2.qty_unit_id,
|
|
||||||
iosdtl2.qty_unit_name,
|
|
||||||
iosdtl2.material_name,
|
|
||||||
iosdtl2.material_code,
|
|
||||||
iosdtl2.material_id,
|
|
||||||
iosdtl2.pcsn,
|
|
||||||
iosdtl2.is_active,
|
|
||||||
iosdtl2.ivt_level,
|
|
||||||
iosdtl2.quality_scode
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
iosdtl.material_id,
|
|
||||||
iosdtl.pcsn,
|
|
||||||
iosdtl.quality_scode,
|
|
||||||
iosdtl.ivt_level,
|
|
||||||
iosdtl.is_active,
|
|
||||||
iosdtl.plan_qty,
|
|
||||||
iosdtl.real_qty,
|
|
||||||
iosdtl.qty_unit_id,
|
|
||||||
iosdtl.qty_unit_name,
|
|
||||||
mb.material_name,
|
|
||||||
mb.material_code
|
|
||||||
FROM
|
|
||||||
ST_IVT_IOStorInvDtl iosdtl
|
|
||||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = iosdtl.material_id
|
|
||||||
LEFT JOIN ST_IVT_IOStorInv ios ON ios.iostorinv_id = iosdtl.iostorinv_id
|
|
||||||
LEFT JOIN sys_user user ON ios.input_optid = user.user_id
|
|
||||||
WHERE
|
|
||||||
1 = 1
|
|
||||||
AND ios.is_delete = '0'
|
|
||||||
AND ios.bill_type in ('010301','010302')
|
|
||||||
OPTION 输入.material_code <> ""
|
|
||||||
(mb.material_code like 输入.material_code or mb.material_name like 输入.material_code)
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.username <> ""
|
|
||||||
(user.username like 输入.username or ios.input_optname like 输入.username)
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.pcsn <> ""
|
|
||||||
iosdtl.pcsn like 输入.pcsn
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.source_bill_code <> ""
|
|
||||||
iosdtl.source_bill_code in 输入.source_bill_code
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.begin_time <> ""
|
|
||||||
ios.biz_date >= 输入.begin_time
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.end_time <> ""
|
|
||||||
ios.biz_date <= 输入.end_time
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.bill_type <> ""
|
|
||||||
ios.bill_type = 输入.bill_type
|
|
||||||
ENDOPTION
|
|
||||||
OPTION 输入.stor_id <> ""
|
|
||||||
ios.stor_id = 输入.stor_id
|
|
||||||
ENDOPTION
|
|
||||||
) iosdtl2
|
|
||||||
where 1=1
|
|
||||||
GROUP BY
|
|
||||||
iosdtl2.material_id,
|
|
||||||
iosdtl2.pcsn,
|
|
||||||
iosdtl2.is_active,
|
|
||||||
iosdtl2.ivt_level,
|
|
||||||
iosdtl2.quality_scode,
|
|
||||||
iosdtl2.material_name,
|
|
||||||
iosdtl2.material_code,
|
|
||||||
iosdtl2.qty_unit_id,
|
|
||||||
iosdtl2.qty_unit_name
|
|
||||||
ENDSELECT
|
|
||||||
ENDPAGEQUERY
|
|
||||||
ENDIF
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,281 @@
|
|||||||
|
[交易说明]
|
||||||
|
交易名: 基础点位分页查询
|
||||||
|
所属模块:
|
||||||
|
功能简述:
|
||||||
|
版权所有:
|
||||||
|
表引用:
|
||||||
|
版本经历:
|
||||||
|
|
||||||
|
[数据库]
|
||||||
|
--指定数据库,为空采用默认值,默认为db.properties中列出的第一个库
|
||||||
|
|
||||||
|
[IO定义]
|
||||||
|
#################################################
|
||||||
|
## 表字段对应输入参数
|
||||||
|
#################################################
|
||||||
|
输入.flag TYPEAS s_string
|
||||||
|
输入.bill_status TYPEAS s_string
|
||||||
|
输入.bill_code TYPEAS s_string
|
||||||
|
输入.source_bill_code TYPEAS f_string
|
||||||
|
输入.username TYPEAS s_string
|
||||||
|
输入.create_mode TYPEAS s_string
|
||||||
|
输入.bill_type TYPEAS s_string
|
||||||
|
输入.stor_id TYPEAS s_string
|
||||||
|
输入.iostorinv_id TYPEAS s_string
|
||||||
|
输入.buss_type TYPEAS s_string
|
||||||
|
输入.end_time TYPEAS s_string
|
||||||
|
输入.begin_time TYPEAS s_string
|
||||||
|
输入.material_id TYPEAS s_string
|
||||||
|
输入.material_code TYPEAS s_string
|
||||||
|
输入.quality_scode TYPEAS s_string
|
||||||
|
输入.pcsn TYPEAS s_string
|
||||||
|
输入.ivt_level TYPEAS s_string
|
||||||
|
输入.is_active TYPEAS s_string
|
||||||
|
输入.sect_id TYPEAS s_string
|
||||||
|
输入.io_type TYPEAS s_string
|
||||||
|
输入.iostorinvdtl_id TYPEAS s_string
|
||||||
|
输入.unassign_flag TYPEAS s_string
|
||||||
|
输入.struct_id TYPEAS s_string
|
||||||
|
输入.iostorinvdis_id TYPEAS s_string
|
||||||
|
输入.is_issued TYPEAS s_string
|
||||||
|
输入.remark TYPEAS s_string
|
||||||
|
输入.task_id TYPEAS s_string
|
||||||
|
输入.task_status TYPEAS s_string
|
||||||
|
输入.deptIds TYPEAS f_string
|
||||||
|
[临时表]
|
||||||
|
--这边列出来的临时表就会在运行期动态创建
|
||||||
|
|
||||||
|
[临时变量]
|
||||||
|
--所有中间过程变量均可在此处定义
|
||||||
|
|
||||||
|
[业务过程]
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 1、输入输出检查 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 2、主过程前处理 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
|
||||||
|
##########################################
|
||||||
|
# 3、业务主过程 #
|
||||||
|
##########################################
|
||||||
|
|
||||||
|
IF 输入.flag = "12"
|
||||||
|
PAGEQUERY
|
||||||
|
SELECT
|
||||||
|
SUM( iosdtl2.plan_qty ) AS sum_plan_qty,
|
||||||
|
iosdtl2.qty_unit_id,
|
||||||
|
iosdtl2.qty_unit_name,
|
||||||
|
iosdtl2.material_name,
|
||||||
|
iosdtl2.material_code,
|
||||||
|
iosdtl2.material_id,
|
||||||
|
iosdtl2.pcsn,
|
||||||
|
iosdtl2.is_active,
|
||||||
|
iosdtl2.ivt_level,
|
||||||
|
iosdtl2.quality_scode
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
iosdtl.material_id,
|
||||||
|
iosdtl.pcsn,
|
||||||
|
iosdtl.quality_scode,
|
||||||
|
iosdtl.ivt_level,
|
||||||
|
iosdtl.is_active,
|
||||||
|
iosdtl.plan_qty,
|
||||||
|
iosdtl.real_qty,
|
||||||
|
iosdtl.qty_unit_id,
|
||||||
|
iosdtl.qty_unit_name,
|
||||||
|
mb.material_name,
|
||||||
|
mb.material_code
|
||||||
|
FROM
|
||||||
|
ST_IVT_IOStorInvDtl iosdtl
|
||||||
|
LEFT JOIN md_me_materialbase mb ON mb.material_id = iosdtl.material_id
|
||||||
|
LEFT JOIN ST_IVT_IOStorInv ios ON ios.iostorinv_id = iosdtl.iostorinv_id
|
||||||
|
LEFT JOIN sys_user user ON ios.input_optid = user.user_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND ios.is_delete = '0'
|
||||||
|
AND ios.bill_type in ('010301','010302')
|
||||||
|
OPTION 输入.material_code <> ""
|
||||||
|
(mb.material_code like 输入.material_code or mb.material_name like 输入.material_code)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.username <> ""
|
||||||
|
(user.username like 输入.username or ios.input_optname like 输入.username)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.pcsn <> ""
|
||||||
|
iosdtl.pcsn like 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.source_bill_code <> ""
|
||||||
|
iosdtl.source_bill_code in 输入.source_bill_code
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
ios.biz_date >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
ios.biz_date <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.bill_type <> ""
|
||||||
|
ios.bill_type = 输入.bill_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.stor_id <> ""
|
||||||
|
ios.stor_id = 输入.stor_id
|
||||||
|
ENDOPTION
|
||||||
|
) iosdtl2
|
||||||
|
where 1=1
|
||||||
|
GROUP BY
|
||||||
|
iosdtl2.material_id,
|
||||||
|
iosdtl2.pcsn,
|
||||||
|
iosdtl2.is_active,
|
||||||
|
iosdtl2.ivt_level,
|
||||||
|
iosdtl2.quality_scode,
|
||||||
|
iosdtl2.material_name,
|
||||||
|
iosdtl2.material_code,
|
||||||
|
iosdtl2.qty_unit_id,
|
||||||
|
iosdtl2.qty_unit_name
|
||||||
|
ENDSELECT
|
||||||
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "13"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
sum(FormulaDtl.confirm_qty) AS sum_real_qty
|
||||||
|
FROM
|
||||||
|
PDM_BI_FormulaDtl FormulaDtl
|
||||||
|
LEFT JOIN PDM_BI_Formula Formula ON Formula.formula_id = FormulaDtl.formula_id
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
iosdtl.source_bill_code,
|
||||||
|
iosdtl.material_id,
|
||||||
|
iosdtl.pcsn
|
||||||
|
FROM
|
||||||
|
ST_IVT_IOStorInvDtl iosdtl
|
||||||
|
LEFT JOIN ST_IVT_IOStorInv ios ON ios.iostorinv_id = iosdtl.iostorinv_id
|
||||||
|
LEFT JOIN sys_user USER ON ios.input_optid = USER.user_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND ios.is_delete = '0'
|
||||||
|
AND ios.bill_type IN ( '010301', '010302' )
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
iosdtl.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.username <> ""
|
||||||
|
(user.username like 输入.username or ios.input_optname like 输入.username)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.pcsn <> ""
|
||||||
|
iosdtl.pcsn = 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.source_bill_code <> ""
|
||||||
|
iosdtl.source_bill_code in 输入.source_bill_code
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
ios.biz_date >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
ios.biz_date <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.bill_type <> ""
|
||||||
|
ios.bill_type = 输入.bill_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.stor_id <> ""
|
||||||
|
ios.stor_id = 输入.stor_id
|
||||||
|
ENDOPTION
|
||||||
|
GROUP BY
|
||||||
|
iosdtl.source_bill_code,
|
||||||
|
iosdtl.pcsn,
|
||||||
|
iosdtl.material_id
|
||||||
|
) iosdtl2 ON ( iosdtl2.source_bill_code = Formula.workorder_code AND iosdtl2.material_id = FormulaDtl.material_id AND iosdtl2.pcsn = FormulaDtl.pcsn )
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND FormulaDtl.STATUS = '99'
|
||||||
|
AND Formula.is_delete = '0'
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
FormulaDtl.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.pcsn <> ""
|
||||||
|
FormulaDtl.pcsn = 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "14"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
FormulaDtl.confirm_qty,
|
||||||
|
FormulaDtl.formula_qty,
|
||||||
|
FormulaDtl.seq_no,
|
||||||
|
Formula.formula_code,
|
||||||
|
Formula.workorder_code,
|
||||||
|
FormulaDtl.material_id,
|
||||||
|
mb2.material_name,
|
||||||
|
mb2.material_code,
|
||||||
|
FormulaDtl.pcsn,
|
||||||
|
FormulaDtl.qty_unit_name
|
||||||
|
FROM
|
||||||
|
PDM_BI_FormulaDtl FormulaDtl
|
||||||
|
LEFT JOIN PDM_BI_Formula Formula ON Formula.formula_id = FormulaDtl.formula_id
|
||||||
|
LEFT JOIN md_me_materialbase mb2 ON mb2.material_id = FormulaDtl.material_id
|
||||||
|
INNER JOIN (
|
||||||
|
SELECT
|
||||||
|
iosdtl.source_bill_code,
|
||||||
|
iosdtl.material_id,
|
||||||
|
iosdtl.pcsn
|
||||||
|
FROM
|
||||||
|
ST_IVT_IOStorInvDtl iosdtl
|
||||||
|
LEFT JOIN ST_IVT_IOStorInv ios ON ios.iostorinv_id = iosdtl.iostorinv_id
|
||||||
|
LEFT JOIN sys_user USER ON ios.input_optid = USER.user_id
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND ios.is_delete = '0'
|
||||||
|
AND ios.bill_type IN ( '010301', '010302' )
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
iosdtl.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.username <> ""
|
||||||
|
(user.username like 输入.username or ios.input_optname like 输入.username)
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.pcsn <> ""
|
||||||
|
iosdtl.pcsn = 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.source_bill_code <> ""
|
||||||
|
iosdtl.source_bill_code in 输入.source_bill_code
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
ios.biz_date >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
ios.biz_date <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.bill_type <> ""
|
||||||
|
ios.bill_type = 输入.bill_type
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.stor_id <> ""
|
||||||
|
ios.stor_id = 输入.stor_id
|
||||||
|
ENDOPTION
|
||||||
|
GROUP BY
|
||||||
|
iosdtl.source_bill_code,
|
||||||
|
iosdtl.pcsn,
|
||||||
|
iosdtl.material_id
|
||||||
|
) iosdtl2 ON ( iosdtl2.source_bill_code = Formula.workorder_code AND iosdtl2.material_id = FormulaDtl.material_id AND iosdtl2.pcsn = FormulaDtl.pcsn )
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND FormulaDtl.STATUS = '99'
|
||||||
|
AND Formula.is_delete = '0'
|
||||||
|
OPTION 输入.material_id <> ""
|
||||||
|
FormulaDtl.material_id = 输入.material_id
|
||||||
|
ENDOPTION
|
||||||
|
OPTION 输入.pcsn <> ""
|
||||||
|
FormulaDtl.pcsn = 输入.pcsn
|
||||||
|
ENDOPTION
|
||||||
|
order by Formula.formula_code
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -31,6 +31,15 @@ export function getOutBillDtl(params) {
|
|||||||
params
|
params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function queryDtl2(params) {
|
||||||
|
return request({
|
||||||
|
url: '/api/checkoutbill/queryDtl2',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
export function getOutBillDis(params) {
|
export function getOutBillDis(params) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/checkoutbill/getOutBillDis',
|
url: '/api/checkoutbill/getOutBillDis',
|
||||||
@@ -155,4 +164,4 @@ export function getType() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export default { add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType,backConfirm, getOutBillDisDtl, getType }
|
export default { queryDtl2, add, edit, del, allDiv, allCancel, getOutBillDtl, getOutBillDis, setPoint, getOutBillTask, getStructIvt, manualDiv, confirm, issueTask, finishTask, cancleTaskfinish, getInvTypes, paramByCodeType, schAreaType, backConfirm, getOutBillDisDtl, getType }
|
||||||
|
|||||||
120
mes/qd/src/views/wms/statistics/outStorQuery/ViewDialog.vue
Normal file
120
mes/qd/src/views/wms/statistics/outStorQuery/ViewDialog.vue
Normal file
@@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="明细详情"
|
||||||
|
width="1100px"
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
:data="tableDtl"
|
||||||
|
style="width: 100%;"
|
||||||
|
max-height="400"
|
||||||
|
size="mini"
|
||||||
|
border
|
||||||
|
show-summary
|
||||||
|
:summary-method="getSummaries"
|
||||||
|
:highlight-current-row="true"
|
||||||
|
:header-cell-style="{background:'#f5f7fa',color:'#606266'}"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" min-width="55" align="center" />
|
||||||
|
<el-table-column prop="formula_code" label="配方号" min-width="120" align="center" />
|
||||||
|
<el-table-column prop="seq_no" label="配方序号" align="center" min-width="70" />
|
||||||
|
<el-table-column min-width="120" prop="material_code" label="物料编码" align="center" />
|
||||||
|
<el-table-column min-width="120" prop="material_name" label="物料名称" align="center" />
|
||||||
|
<el-table-column prop="pcsn" label="批次号" align="center" min-width="100" />
|
||||||
|
<el-table-column min-width="70" prop="formula_qty" :formatter="crud.formatNum3" label="计划重量" align="center" />
|
||||||
|
<el-table-column min-width="70" prop="confirm_qty" :formatter="crud.formatNum3" label="实际重量" align="center" />
|
||||||
|
<el-table-column prop="qty_unit_name" label="单位" align="center" min-width="70" />
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import checkoutbill from '@/api/wms/st/core/outbill/checkoutbill'
|
||||||
|
import { crud } from '@crud/crud'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ViewDialog',
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
mixins: [crud()],
|
||||||
|
components: { },
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
rowmst: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
dicts: [],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
tableDtl: [],
|
||||||
|
form: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rowmst: {
|
||||||
|
handler(newValue) {
|
||||||
|
this.form = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
checkoutbill.queryDtl2(this.form).then(res => {
|
||||||
|
this.tableDtl = res
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getSummaries(param) {
|
||||||
|
debugger
|
||||||
|
const { columns, data } = param
|
||||||
|
const sums = []
|
||||||
|
columns.forEach((column, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
sums[index] = '合计'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const values = data.map(item => Number(item[column.property]))
|
||||||
|
if (column.property === 'confirm_qty' || column.property === 'formula_qty') {
|
||||||
|
sums[index] = values.reduce((prev, curr) => {
|
||||||
|
const value = Number(curr)
|
||||||
|
if (!isNaN(value)) {
|
||||||
|
return prev + curr
|
||||||
|
} else {
|
||||||
|
return prev
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
|
sums[index]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return sums
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
this.tableDtl = []
|
||||||
|
this.form = {}
|
||||||
|
this.$emit('AddChanged')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.crud-opts2 {
|
||||||
|
margin-left: auto;
|
||||||
|
padding: 4px 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.createTime"
|
v-model="query.createTime"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
@input="onInput()"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期"
|
end-placeholder="结束日期"
|
||||||
:default-time="['00:00:00', '23:59:59']"
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
@change="crud.toQuery"
|
@input="onInput()"
|
||||||
|
@change="mytoQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="物料">
|
<el-form-item label="物料">
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="工令">
|
<el-form-item label="工令">
|
||||||
<el-input v-model="query.source_bill_code" size="mini" placeholder="工令号" disabled class="input-with-select">
|
<el-input v-model="query.source_bill_code" size="mini" placeholder="工令号" disabled class="input-with-select">
|
||||||
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
<el-button slot="append" icon="el-icon-search" @click="queryMater" />
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -94,8 +94,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission" />
|
||||||
</crudOperation>
|
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table
|
<el-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -110,9 +109,13 @@
|
|||||||
<el-table-column type="index" label="序号" width="50" align="center" />
|
<el-table-column type="index" label="序号" width="50" align="center" />
|
||||||
<el-table-column prop="material_code" label="物料编码" width="150" align="center" />
|
<el-table-column prop="material_code" label="物料编码" width="150" align="center" />
|
||||||
<el-table-column prop="material_name" label="物料名称" width="150" align="center" />
|
<el-table-column prop="material_name" label="物料名称" width="150" align="center" />
|
||||||
<el-table-column min-width="90" prop="pcsn" label="批次号" align="center" />
|
<el-table-column prop="pcsn" min-width="130" label="批次号">
|
||||||
<el-table-column prop="sum_plan_qty" label="计划重量(KG)" :formatter="crud.formatNum3" width="150" align="center" />
|
<template slot-scope="scope">
|
||||||
<el-table-column prop="sum_real_qty" label="实际重量(KG)" :formatter="crud.formatNum3" width="150" align="center" />
|
<el-link type="warning" @click="mytoView(scope.$index, scope.row)">{{ scope.row.pcsn }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="sum_plan_qty" label="计划重量(KG)" :formatter="crud.formatNum3" width="150" align="center" />
|
||||||
|
<el-table-column prop="sum_real_qty" label="实际重量(KG)" :formatter="crud.formatNum3" width="150" align="center" />
|
||||||
<el-table-column prop="quality_scode" label="品质类型" align="center" width="110px" :formatter="quality_scodeFormat" />
|
<el-table-column prop="quality_scode" label="品质类型" align="center" width="110px" :formatter="quality_scodeFormat" />
|
||||||
<el-table-column prop="ivt_level" label="库存等级" align="center" width="100px" :formatter="ivt_levelFormat" />
|
<el-table-column prop="ivt_level" label="库存等级" align="center" width="100px" :formatter="ivt_levelFormat" />
|
||||||
<el-table-column prop="is_active" label="是否可用" align="center" width="110px" :formatter="is_activeFormat" />
|
<el-table-column prop="is_active" label="是否可用" align="center" width="110px" :formatter="is_activeFormat" />
|
||||||
@@ -121,6 +124,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<ViewDialog :dialog-show.sync="viewShow" :rowmst="currentRow" @AddChanged="crud.refresh()"/>
|
||||||
<StructIvt :dialog-show.sync="structshow" @StructIvtClosed="queryTableDtl" />
|
<StructIvt :dialog-show.sync="structshow" @StructIvtClosed="queryTableDtl" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -133,18 +137,19 @@ import crudOperation from '@crud/CRUD.operation'
|
|||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
import crudStorattr from '@/api/wms/basedata/st/storattr'
|
||||||
import Date from '@/utils/datetime'
|
import Date from '@/utils/datetime'
|
||||||
|
import ViewDialog from '@/views/wms/statistics/outStorQuery/ViewDialog'
|
||||||
import StructIvt from '@/views/wms/statistics/outStorQuery/StructIvt'
|
import StructIvt from '@/views/wms/statistics/outStorQuery/StructIvt'
|
||||||
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
|
import crudRawAssist from '@/api/wms/st/core/inbill/rawassist'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'outStorQuery',
|
name: 'OutStorQuery',
|
||||||
components: { StructIvt, crudOperation, rrOperation, pagination },
|
components: { ViewDialog, StructIvt, crudOperation, rrOperation, pagination },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({ title: '生产配粉领料',
|
return CRUD({ title: '生产配粉领料',
|
||||||
props: {
|
props: {
|
||||||
// 每页数据条数
|
// 每页数据条数
|
||||||
size: 20
|
size: 20
|
||||||
},idField: 'iostorinv_id', url: 'api/checkoutbill/queryDtl', crudMethod: { ...checkoutbill },
|
}, idField: 'iostorinv_id', url: 'api/checkoutbill/queryDtl', crudMethod: { ...checkoutbill },
|
||||||
optShow: {
|
optShow: {
|
||||||
add: false,
|
add: false,
|
||||||
edit: false,
|
edit: false,
|
||||||
@@ -162,7 +167,9 @@ export default {
|
|||||||
permission: {
|
permission: {
|
||||||
},
|
},
|
||||||
structshow: false,
|
structshow: false,
|
||||||
|
query_flag: true,
|
||||||
currentRow: null,
|
currentRow: null,
|
||||||
|
viewShow: false,
|
||||||
storlist: [],
|
storlist: [],
|
||||||
billtypelist: []
|
billtypelist: []
|
||||||
}
|
}
|
||||||
@@ -181,12 +188,18 @@ export default {
|
|||||||
this.billtypelist = res
|
this.billtypelist = res
|
||||||
})
|
})
|
||||||
this.crud.query.createTime = [new Date(), new Date()]
|
this.crud.query.createTime = [new Date(), new Date()]
|
||||||
this.crud.toQuery()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onInput() {
|
onInput() {
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
if (this.query_flag) {
|
||||||
|
this.crud.query.begin_time = (new Date()).strftime('%F', 'zh')
|
||||||
|
this.crud.query.end_time = (new Date()).strftime('%F', 'zh')
|
||||||
|
this.query_flag = false
|
||||||
|
}
|
||||||
|
},
|
||||||
async queryMater() {
|
async queryMater() {
|
||||||
this.structshow = true
|
this.structshow = true
|
||||||
},
|
},
|
||||||
@@ -199,16 +212,36 @@ export default {
|
|||||||
is_activeFormat(row, column) {
|
is_activeFormat(row, column) {
|
||||||
return this.dict.label.is_usable[row.is_active]
|
return this.dict.label.is_usable[row.is_active]
|
||||||
},
|
},
|
||||||
|
mytoView(index, row) {
|
||||||
|
this.currentRow = row
|
||||||
|
this.currentRow.stor_id = this.crud.query.stor_id
|
||||||
|
this.currentRow.begin_time = this.crud.query.begin_time
|
||||||
|
this.currentRow.end_time = this.crud.query.end_time
|
||||||
|
this.currentRow.bill_type = this.crud.query.bill_type
|
||||||
|
this.currentRow.source_bill_code = this.crud.query.source_bill_code
|
||||||
|
this.currentRow.username = this.crud.query.username
|
||||||
|
this.viewShow = true
|
||||||
|
},
|
||||||
|
mytoQuery(array1) {
|
||||||
|
if (array1 === null) {
|
||||||
|
this.crud.query.begin_time = ''
|
||||||
|
this.crud.query.end_time = ''
|
||||||
|
} else {
|
||||||
|
this.crud.query.begin_time = array1[0]
|
||||||
|
this.crud.query.end_time = array1[1]
|
||||||
|
}
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
queryTableDtl(rows) {
|
queryTableDtl(rows) {
|
||||||
let devices = ''
|
let devices = ''
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
if ( i === 0 ) {
|
if (i === 0) {
|
||||||
devices = rows[i].workorder_code
|
devices = rows[i].workorder_code
|
||||||
}else{
|
} else {
|
||||||
devices = devices + ',' + rows[i].workorder_code
|
devices = devices + ',' + rows[i].workorder_code
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(rows.length > 0){
|
if (rows.length > 0) {
|
||||||
this.crud.query.source_bill_code = devices
|
this.crud.query.source_bill_code = devices
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user