fix:库存标签打印,工单查询条件失效,出入库记录分页失效
This commit is contained in:
@@ -4,7 +4,6 @@ package org.nl.wms.warehouse_manage.record.service.impl;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.nl.common.base.ResponseData;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.warehouse_manage.record.service.IStIvtStructivtflowService;
|
||||
import org.nl.wms.warehouse_manage.record.service.dao.StIvtStructivtflow;
|
||||
@@ -28,9 +27,12 @@ public class StIvtStructivtflowServiceImpl extends ServiceImpl<StIvtStructivtflo
|
||||
|
||||
@Override
|
||||
public Object pageQuery(StructIvtFlowQuery query, PageQuery pageQuery) {
|
||||
Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPage() + 1, pageQuery.getSize());
|
||||
page.setOrderBy("id DESC");
|
||||
List<Map> mst_detail = this.baseMapper.getPageQuery(query, pageQuery);
|
||||
return mst_detail;
|
||||
com.baomidou.mybatisplus.extension.plugins.pagination.Page<Map> result =
|
||||
new com.baomidou.mybatisplus.extension.plugins.pagination.Page<>(pageQuery.getPage() + 1, pageQuery.getSize(), page.getTotal());
|
||||
result.setRecords(mst_detail);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,25 @@
|
||||
package org.nl.wms.welding_manage.service.work_order.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.wms.welding_manage.service.work_order.dao.WorkOrderDao;
|
||||
|
||||
@Data
|
||||
public class WorkOrderQuery extends BaseQuery<WorkOrderDao> {
|
||||
|
||||
private String order_code;
|
||||
private String product_name;
|
||||
private String bom_code;
|
||||
private String work_area;
|
||||
private Integer status;
|
||||
|
||||
@Override
|
||||
public void paramMapping() {
|
||||
doP.put("order_code", QParam.builder().k(new String[]{"order_code"}).type(QueryTEnum.LK).build());
|
||||
doP.put("product_name", QParam.builder().k(new String[]{"product_name"}).type(QueryTEnum.LK).build());
|
||||
doP.put("bom_code", QParam.builder().k(new String[]{"bom_code"}).type(QueryTEnum.LK).build());
|
||||
doP.put("work_area", QParam.builder().k(new String[]{"work_area"}).type(QueryTEnum.LK).build());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ export default {
|
||||
crudWorkOrder.getItem(order).then(result => {
|
||||
this.bomList = result.data || []
|
||||
this.detailVisible = true
|
||||
}).catch(error => {
|
||||
}).catch(() => {
|
||||
this.bomList = []
|
||||
}).finally(() => {
|
||||
this.detailLoading = false
|
||||
|
||||
@@ -110,7 +110,6 @@ import curdStructIvtFlow from './curdStructIvtFlow'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = {
|
||||
@@ -132,7 +131,7 @@ const defaultForm = {
|
||||
export default {
|
||||
dicts: [],
|
||||
name: 'StructIvtFlow',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
components: { pagination, crudOperation, rrOperation },
|
||||
statusEnums: ['TASK_TYPE'],
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
|
||||
@@ -333,20 +333,16 @@ export default {
|
||||
return
|
||||
}
|
||||
const materialCode = this.printRow.material_code || ''
|
||||
const materialName = this.printRow.material_name || ''
|
||||
const warehouseCode = this.printRow.stor_code || ''
|
||||
const date = this.formatPrintDate(new Date())
|
||||
let html = '<!DOCTYPE html><html><head><meta charset="utf-8"><style>'
|
||||
html += '*{margin:0;padding:0;box-sizing:border-box}'
|
||||
html += 'body{font-family:"Microsoft YaHei",Arial,sans-serif;padding:10px}'
|
||||
html += '.label{page-break-after:always;padding:10px;text-align:center}'
|
||||
html += '.label{position:relative;width:280px;min-height:300px;page-break-after:always;padding:18px 12px 24px;text-align:center;margin:0 auto}'
|
||||
html += '.label:last-child{page-break-after:auto}'
|
||||
html += 'h3{text-align:center;font-size:14px;margin-bottom:6px}'
|
||||
html += 'table{width:463px;border-collapse:collapse;margin:0 auto;min-height:224px}'
|
||||
html += 'td{padding:5px;border:2px solid #333;font-size:16px;line-height:1.3}'
|
||||
html += '.lbl{width:25%;text-align:right;background:#f9f9f9}'
|
||||
html += '.val{width:45%;text-align:left;word-break:break-all}'
|
||||
html += '.qr{width:30%;text-align:center;vertical-align:middle}'
|
||||
html += '.qr{display:block;width:220px;height:220px;margin:0 auto 12px}'
|
||||
html += '.material-code{font-size:20px;font-weight:600;line-height:1.3;word-break:break-all}'
|
||||
html += '.date{position:absolute;right:8px;bottom:6px;color:#b8b8b8;font-size:10px}'
|
||||
html += '@media print{@page{size:auto;margin:5mm}}'
|
||||
html += '</style></head><body>'
|
||||
for (const label of labels) {
|
||||
@@ -354,14 +350,9 @@ export default {
|
||||
const qrText = materialCode + ':' + label.quantity + ':' + serial + ':' + warehouseCode
|
||||
const imgSrc = await QRCode.toDataURL(qrText, { width: 300 })
|
||||
html += '<div class="label">'
|
||||
html += '<h3>库存标签</h3><table>'
|
||||
html += '<tr><td class="lbl">物料编码</td><td class="val">' + this.escapePrintValue(materialCode) + '</td><td class="qr" rowspan="6"><img src="' + imgSrc + '" width="150" height="150"></td></tr>'
|
||||
html += '<tr><td class="lbl">物料名称</td><td class="val">' + this.escapePrintValue(materialName) + '</td></tr>'
|
||||
html += '<tr><td class="lbl">数量</td><td class="val">' + this.escapePrintValue(label.quantity) + '</td></tr>'
|
||||
html += '<tr><td class="lbl">序号</td><td class="val">' + this.escapePrintValue(serial) + '</td></tr>'
|
||||
html += '<tr><td class="lbl">日期</td><td class="val">' + date + '</td></tr>'
|
||||
html += '<tr><td class="lbl">仓库编码</td><td class="val">' + this.escapePrintValue(warehouseCode) + '</td></tr>'
|
||||
html += '</table></div>'
|
||||
html += '<img class="qr" src="' + imgSrc + '" width="220" height="220">'
|
||||
html += '<div class="material-code">' + this.escapePrintValue(materialCode) + '</div>'
|
||||
html += '<span class="date">' + date + '</span></div>'
|
||||
}
|
||||
html += '</body></html>'
|
||||
doc.open()
|
||||
@@ -369,9 +360,7 @@ export default {
|
||||
doc.close()
|
||||
},
|
||||
formatPrintDate(date) {
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return date.getFullYear() + '-' + month + '-' + day
|
||||
return (date.getMonth() + 1) + '/' + date.getDate()
|
||||
},
|
||||
doPrint() {
|
||||
const iframe = this.$refs.printIframe
|
||||
|
||||
Reference in New Issue
Block a user