客户管理,供应商管理查询修改
This commit is contained in:
+24
@@ -1,6 +1,8 @@
|
||||
package com.bms.customer.customerinfo.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -123,4 +125,26 @@ public class BmsCustomer extends BaseEntity
|
||||
/** 删除标记(0正常 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 列表查询用:关键词多行文本(每行一个),对客户编码/名称/对外代码模糊匹配,行间为 OR;非表字段 */
|
||||
private String keywords;
|
||||
|
||||
/** 供 MyBatis 动态 SQL 使用:按行拆分去空白后的关键词列表 */
|
||||
public List<String> getKeywordList()
|
||||
{
|
||||
if (keywords == null || keywords.trim().isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String line : keywords.split("\\r?\\n"))
|
||||
{
|
||||
String s = line.trim();
|
||||
if (!s.isEmpty())
|
||||
{
|
||||
list.add(s);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+23
@@ -1,6 +1,8 @@
|
||||
package com.bms.customer.supplierinfo.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -144,5 +146,26 @@ public class BmsSupplier extends BaseEntity
|
||||
/** 删除标记(0正常 2删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 列表查询用:关键词多行文本(每行一个),对供应商编码/名称/对外代码模糊匹配,行间为 OR;非表字段 */
|
||||
private String keywords;
|
||||
|
||||
/** 供 MyBatis 动态 SQL 使用:按行拆分去空白后的关键词列表 */
|
||||
public List<String> getKeywordList()
|
||||
{
|
||||
if (keywords == null || keywords.trim().isEmpty())
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<String> list = new ArrayList<>();
|
||||
for (String line : keywords.split("\\r?\\n"))
|
||||
{
|
||||
String s = line.trim();
|
||||
if (!s.isEmpty())
|
||||
{
|
||||
list.add(s);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -66,6 +66,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="customerCode != null and customerCode != ''"> and c.customer_code = #{customerCode}</if>
|
||||
<if test="customerName != null and customerName != ''"> and c.customer_name like concat('%', #{customerName}, '%')</if>
|
||||
<if test="customerCodeDw != null and customerCodeDw != ''"> and c.customer_code_dw = #{customerCodeDw}</if>
|
||||
<!-- 关键词多行文本:每行对编码/名称/对外代码模糊匹配,行间为 OR -->
|
||||
<if test="keywordList != null and keywordList.size() > 0">
|
||||
and (
|
||||
<foreach collection="keywordList" item="kw" separator=" or ">
|
||||
(c.customer_code like concat('%', #{kw}, '%')
|
||||
or c.customer_name like concat('%', #{kw}, '%')
|
||||
or c.customer_code_dw like concat('%', #{kw}, '%'))
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="creditCode != null and creditCode != ''"> and c.credit_code = #{creditCode}</if>
|
||||
<if test="customerType != null and customerType != ''"> and c.customer_type = #{customerType}</if>
|
||||
<if test="isEnable != null and isEnable != ''"> and c.is_enable = #{isEnable}</if>
|
||||
|
||||
@@ -60,6 +60,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="supplierCode != null and supplierCode != ''"> and s.supplier_code = #{supplierCode}</if>
|
||||
<if test="supplierName != null and supplierName != ''"> and s.supplier_name like concat('%', #{supplierName}, '%')</if>
|
||||
<if test="supplierCodeDw != null and supplierCodeDw != ''"> and s.supplier_code_dw = #{supplierCodeDw}</if>
|
||||
<!-- 关键词多行文本:每行对编码/名称/对外代码模糊匹配,行间为 OR -->
|
||||
<if test="keywordList != null and keywordList.size() > 0">
|
||||
and (
|
||||
<foreach collection="keywordList" item="kw" separator=" or ">
|
||||
(s.supplier_code like concat('%', #{kw}, '%')
|
||||
or s.supplier_name like concat('%', #{kw}, '%')
|
||||
or s.supplier_code_dw like concat('%', #{kw}, '%'))
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="creditCode != null and creditCode != ''"> and s.credit_code = #{creditCode}</if>
|
||||
<if test="supplierType != null and supplierType != ''"> and s.supplier_type = #{supplierType}</if>
|
||||
<if test="invoiceType != null and invoiceType != ''"> and s.invoice_type = #{invoiceType}</if>
|
||||
|
||||
@@ -1,29 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="客户编码" prop="customerCode">
|
||||
<el-form-item label="关键词" prop="keywords">
|
||||
<el-input
|
||||
v-model="queryParams.customerCode"
|
||||
placeholder="请输入客户编码"
|
||||
v-model="queryParams.keywords"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 4 }"
|
||||
placeholder="客户编码/客户名称/对外代码,一行一个,模糊查询(多行为或者关系)"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customerName">
|
||||
<el-input
|
||||
v-model="queryParams.customerName"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="对外代码" prop="customerCodeDw">
|
||||
<el-input
|
||||
v-model="queryParams.customerCodeDw"
|
||||
placeholder="请输入对外代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 340px;"
|
||||
@keyup.enter.ctrl="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -254,9 +240,7 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
customerCode: undefined,
|
||||
customerName: undefined,
|
||||
customerCodeDw: undefined,
|
||||
keywords: undefined,
|
||||
creditCode: undefined,
|
||||
customerType: undefined,
|
||||
isEnable: undefined,
|
||||
|
||||
@@ -1,28 +1,15 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="供应商编码" prop="supplierCode">
|
||||
<el-form-item label="关键词" prop="keywords">
|
||||
<el-input
|
||||
v-model="queryParams.supplierCode"
|
||||
placeholder="请输入供应商编码"
|
||||
v-model="queryParams.keywords"
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 1, maxRows: 4 }"
|
||||
placeholder="供应商编码/供应商名称/对外代码,一行一个,模糊查询(多行为或者关系)"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商名称" prop="supplierName">
|
||||
<el-input
|
||||
v-model="queryParams.supplierName"
|
||||
placeholder="请输入供应商名称"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="对外代码" prop="supplierCodeDw">
|
||||
<el-input
|
||||
v-model="queryParams.supplierCodeDw"
|
||||
placeholder="请输入对外代码"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
style="width: 340px;"
|
||||
@keyup.enter.ctrl="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@@ -285,9 +272,7 @@ const data = reactive({
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
supplierCode: undefined,
|
||||
supplierName: undefined,
|
||||
supplierCodeDw: undefined,
|
||||
keywords: undefined,
|
||||
creditCode: undefined,
|
||||
supplierType: undefined,
|
||||
invoiceType: undefined,
|
||||
|
||||
Reference in New Issue
Block a user