opt:优化出入库单管理查询页面

This commit is contained in:
zhangzq
2024-04-01 20:14:47 +08:00
parent 7d82ab6a53
commit af449f7ba1
3 changed files with 110 additions and 26 deletions

View File

@@ -90,27 +90,17 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
if (StrUtil.isNotEmpty(map.get("io_type"))) {
map.put("io_type", map.get("io_type"));
}
if (StrUtil.isNotEmpty(map.get("is_upload"))) {
map.put("is_upload", map.get("is_upload"));
}
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
map.put("pcsn", "%" + map.get("pcsn") + "%");
}
if (StrUtil.isNotEmpty(map.get("material_code"))) {
map.put("material_code", "%" + map.get("material_code") + "%");
}
map.put("flag", "12");
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "bill_code desc");
JSONArray json = jo.getJSONArray("content");
map.put("flag", "01");
JSONArray jo2 = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).process().getResultJSONArray(1);
if(jo2.size()!=0){
JSONObject jo3 = jo2.getJSONObject(0);
jo3.put("bill_code","合计");
json.add(jo3);
}else{
JSONObject jo3 = new JSONObject();
jo3.put("stor_name","合计");
json.add(jo3);
}
jo.put("content",json);
return jo;
}

View File

@@ -29,6 +29,7 @@
输入.material_code TYPEAS s_string
输入.quality_scode TYPEAS s_string
输入.pcsn TYPEAS s_string
输入.is_upload TYPEAS s_string
输入.ivt_level TYPEAS s_string
输入.is_active TYPEAS s_string
输入.sect_id TYPEAS s_string
@@ -670,6 +671,87 @@
ENDQUERY
ENDIF
IF 输入.flag = "12"
PAGEQUERY
SELECT
supp.supp_name,
mst.iostorinv_id,
mst.bill_code,
mst.buss_type,
mst.io_type,
mst.bill_type,
mst.bill_status,
mst.stor_name,
mst.biz_date,
create_mode,
material_code,
material_name,
dtl.pcsn,
plan_qty,
assign_qty,
unassign_qty,
quality_scode,
ivt_level,
is_active,
dtl.qty_unit_name,
IF(is_upload='0','否','是') as is_upload,
mst.upload_time,sys_user.nick_name as input_optname,mst.input_time,mst.confirm_time
FROM
st_ivt_iostorinvdtl dtl
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
LEFT JOIN sys_user on mst.input_optid = sys_user.user_id
left join md_me_materialbase mb on dtl.material_id=mb.material_id
left join PCS_RC_ReceiveDtl on dtl.material_id=PCS_RC_ReceiveDtl.material_id and dtl.pcsn = PCS_RC_ReceiveDtl.pcsn
LEFT JOIN PCS_IF_PurchaseOrderProc proc ON proc.id = PCS_RC_ReceiveDtl.source_billdtl_id
LEFT JOIN MD_CS_SUPPLIERBASE supp ON proc.vend_id = supp.ext_id
where 1=1
and mst.is_delete='0'
OPTION 输入.bill_code <> ""
mst.bill_code like 输入.bill_code
ENDOPTION
OPTION 输入.io_type <> ""
mst.io_type = 输入.io_type
ENDOPTION
OPTION 输入.buss_type <> ""
mst.buss_type like 输入.buss_type
ENDOPTION
OPTION 输入.bill_type <> ""
mst.bill_type = 输入.bill_type
ENDOPTION
OPTION 输入.stor_id <> ""
mst.stor_id = 输入.stor_id
ENDOPTION
OPTION 输入.deptIds <> ""
mst.sysdeptid in 输入.deptIds
ENDOPTION
OPTION 输入.create_mode <> ""
mst.create_mode = 输入.create_mode
ENDOPTION
OPTION 输入.is_upload <> ""
mst.is_upload = 输入.is_upload
ENDOPTION
OPTION 输入.quality_scode <> ""
dtl.quality_scode = 输入.quality_scode
ENDOPTION
OPTION 输入.pcsn <> ""
dtl.pcsn like 输入.pcsn
ENDOPTION
OPTION 输入.material_code <> ""
(mb.material_code like 输入.material_code or mb.material_name like 输入.material_code)
ENDOPTION
OPTION 输入.bill_status <> ""
mst.bill_status = 输入.bill_status
ENDOPTION
OPTION 输入.begin_time <> ""
mst.input_time >= 输入.begin_time
ENDOPTION
OPTION 输入.end_time <> ""
mst.input_time <= 输入.end_time
ENDOPTION
ENDSELECT
ENDPAGEQUERY
ENDIF

View File

@@ -199,27 +199,30 @@
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="bill_code" width="130" label="订单编码" />
<el-table-column label="供应商" align="center" prop="supp_name" width="150" />
<el-table-column prop="bill_code" width="130" label="出入库单编码" />
<el-table-column :formatter="stateFormat" width="100" prop="bill_status" label="单据状态" />
<el-table-column prop="stor_name" label="仓库" width="100" />
<el-table-column prop="io_type" label="出入库类型" :formatter="ioFormat" min-width="100" />
<el-table-column prop="bill_type" :formatter="bill_typeFormat" min-width="120" label="业务类型" />
<el-table-column width="135" prop="biz_date" label="业务日期" />
<el-table-column :formatter="create_modeFormat" prop="create_mode" label="生成方式" width="100" />
<el-table-column label="明细数" align="center" prop="detail_count" width="100" />
<el-table-column label="总重量" align="center" prop="total_qty" width="100">
<template slot-scope="scope">
{{ fun(scope.row.total_qty) }}
</template>
</el-table-column>
<el-table-column prop="material_code" label="物料编码" align="center" min-width="110px" />
<el-table-column prop="material_name" label="物料名称" align="center" min-width="150"/>
<el-table-column prop="pcsn" label="批次号" align="center" min-width="120" />
<el-table-column prop="plan_qty" label="重量" :formatter="crud.formatNum3" align="center" min-width="100" />
<el-table-column prop="assign_qty" label="已分配重量" :formatter="crud.formatNum3" align="center" min-width="100" />
<el-table-column prop="unassign_qty" label="未分配重量" :formatter="crud.formatNum3" align="center" min-width="100" />
<el-table-column label="是否回传" align="center" prop="is_upload" width="150" />
<el-table-column prop="quality_scode" label="品质类型" min-width="80" align="center" :formatter="quality_scodeFormat" />
<el-table-column prop="ivt_level" label="库存等级" align="center" min-width="80" :formatter="ivt_levelFormat" />
<el-table-column prop="is_active" label="是否可用" align="center" min-width="80" :formatter="is_activeFormat" />
<el-table-column prop="qty_unit_name" label="单位" align="center" min-width="100" />
<el-table-column label="制单人" align="center" prop="input_optname" />
<el-table-column label="制单时间" align="center" prop="input_time" width="150" />
<el-table-column label="修改人" align="center" prop="update_optname" />
<el-table-column label="修改时间" align="center" prop="update_time" width="150" />
<el-table-column label="确认人" align="center" prop="confirm_optname" width="150" />
<el-table-column label="确认时间" align="center" prop="confirm_time" width="150" />
<el-table-column label="回传人" align="center" prop="upload_optname" width="150" />
<el-table-column label="回传时间" align="center" prop="upload_time" width="150" />
</el-table>
<!--分页组件-->
<pagination />
@@ -260,7 +263,7 @@ export default {
},
mixins: [presenter(), header(), crud()],
// 数据字典
dicts: ['ST_QUALITY_SCODE', 'io_bill_status', 'ST_CREATE_MODE', 'io_type', 'is_upload'],
dicts: ['ST_QUALITY_SCODE', 'io_bill_status', 'ST_CREATE_MODE', 'io_type', 'is_upload','is_usable', 'ST_IVT_LEVEL','ST_QUALITY_SCODE'],
data() {
return {
height: document.documentElement.clientHeight - 180 + 'px;',
@@ -344,6 +347,15 @@ export default {
this.work_flag = false
}
},
ivt_levelFormat(row) {
return this.dict.label.ST_IVT_LEVEL[row.ivt_level]
},
quality_scodeFormat(row) {
return this.dict.label.ST_QUALITY_SCODE[row.quality_scode]
},
is_activeFormat(row) {
return this.dict.label.is_usable[row.is_active]
},
ioTypeChange(value) {
if (value === '1') {
crudRawAssist.getType({ 'io_code': '', 'io_flag': '01' }).then(res => {