feat(客户管理): 新增税号字段并优化客户信息展示

feat(订单管理): 增加宽度和厚度公差字段,优化销售员选择方式

feat(合同管理): 新增合同管理模块及相关API接口

refactor(文件列表): 重构文件列表组件样式和布局

fix(QRCode): 修复内容为空时仍触发生成的bug

perf(线圈管理): 优化用户列表加载条件,减少不必要请求

style(代码): 移除多余的空行和注释代码
This commit is contained in:
砂糖
2026-03-31 11:16:48 +08:00
parent b7d8463198
commit aca10bcd45
13 changed files with 793 additions and 168 deletions

View File

@@ -6,65 +6,45 @@
<div style="font-weight: 900;">客户列表</div>
<!-- 搜索区域 -->
<div style="display: flex; align-items: center; gap: 5px; margin-top: 10px;">
<el-input
style="flex: 1;"
prefix-icon="el-icon-search"
placeholder="输入客户编码搜索"
v-model="queryParams.customerCode"
@change="getCustomerList"
clearable
></el-input>
<el-input style="flex: 1;" prefix-icon="el-icon-search" placeholder="输入客户编码搜索"
v-model="queryParams.customerCode" @change="getCustomerList" clearable></el-input>
<el-button icon="el-icon-search" @click="toggleQuery"></el-button>
<el-button type="primary" icon="el-icon-plus" style="margin-left: 0;" @click="handleAdd"></el-button>
</div>
<!-- 高级查询区域 -->
<div v-show="showQuery" style="display: flex; align-items: center; gap: 5px; margin-top: 10px;">
<el-select
style="width: 100px;"
v-model="queryParams.industry"
placeholder="客户行业"
clearable
@change="getCustomerList"
>
<el-option
v-for="item in dict.type.customer_industry"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<div v-show="showQuery"
style="display: flex; align-items: center; gap: 5px; margin-top: 10px; flex-wrap: wrap;">
<el-select style="width: 100px;" v-model="queryParams.industry" placeholder="客户行业" clearable
@change="getCustomerList">
<el-option v-for="item in dict.type.customer_industry" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
<el-select
style="width: 100px;"
v-model="queryParams.customerLevel"
placeholder="客户等级"
clearable
@change="getCustomerList"
>
<el-option
v-for="item in dict.type.customer_level"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select style="width: 100px;" v-model="queryParams.customerLevel" placeholder="客户等级" clearable
@change="getCustomerList">
<el-option v-for="item in dict.type.customer_level" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
<el-input style="width: 100px;" v-model="queryParams.contactPerson" placeholder="联系人" clearable
@change="getCustomerList" />
<el-input style="width: 180px;" v-model="queryParams.address" placeholder="客户地址" clearable
@change="getCustomerList" />
<el-input style="width: 180px;" v-model="queryParams.companyName" placeholder="客户公司" clearable
@change="getCustomerList" />
<el-input style="width: 180px;" v-model="queryParams.taxNumber" placeholder="税号" clearable
@change="getCustomerList" />
</div>
<!-- 客户列表 -->
<div>
<KLPList
:listData="customerList"
listKey="customerId"
:loading="customerLoading"
field1="customerCode"
field2="companyName"
field4="contactPerson"
field5="contactWay"
@item-click="handleItemClick"
>
<KLPList :listData="customerList" listKey="customerId" :loading="customerLoading" field1="customerCode"
field2="companyName" field4="contactPerson" field5="contactWay" @item-click="handleItemClick">
<template slot="actions" slot-scope="{ item }">
<el-button type="danger" size="mini" @click="handleDelete(item)" icon="el-icon-delete"></el-button>
</template>
</KLPList>
</div>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getCustomerList" />
</el-col>
<!-- 右侧内容区域 -->
@@ -72,28 +52,17 @@
<el-tabs v-model="activeTab" type="border-card" v-if="currentCustomer && currentCustomer.customerId">
<!-- 客户详情标签页 -->
<el-tab-pane label="客户详情" name="detail">
<CustomerDetail
:customer="currentCustomer"
:dict="dict"
/>
<CustomerDetail :customer="currentCustomer" :dict="dict" />
</el-tab-pane>
<!-- 客户编辑标签页 -->
<el-tab-pane label="信息编辑" name="edit">
<CustomerEdit
:customer="currentCustomer"
:dict="dict"
:update-loading="updateLoading"
@detail-change="handleDetailChange"
@save-change="handleSaveChange"
/>
<CustomerEdit :customer="currentCustomer" :dict="dict" :update-loading="updateLoading"
@detail-change="handleDetailChange" @save-change="handleSaveChange" />
</el-tab-pane>
<!-- 历史订单标签页 -->
<el-tab-pane label="历史订单" name="transaction">
<div>
<CustomerOrder
:customer="currentCustomer"
:dict="dict"
/>
<CustomerOrder :customer="currentCustomer" :dict="dict" />
</div>
</el-tab-pane>
</el-tabs>
@@ -116,40 +85,30 @@
<el-form-item label="联系方式" prop="contactWay">
<el-input v-model="form.contactWay" placeholder="请输入联系方式" />
</el-form-item>
<el-form-item label="税号" prop="taxNumber">
<el-input v-model="form.taxNumber" placeholder="请输入税号" />
</el-form-item>
<el-form-item label="所属行业" prop="industry">
<el-select v-model="form.industry" placeholder="请选择所属行业" clearable>
<el-option
v-for="item in dict.type.customer_industry"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item in dict.type.customer_industry" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="客户等级" prop="customerLevel">
<el-select v-model="form.customerLevel" placeholder="请选择客户等级" clearable>
<el-option
v-for="item in dict.type.customer_level"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-option v-for="item in dict.type.customer_level" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="客户地址" prop="address">
<ChinaAreaSelect
v-model="form.address"
placeholder="请选择客户地址"
/>
<ChinaAreaSelect v-model="form.address" placeholder="请选择客户地址" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注" />
</el-form-item>
<el-form-item label="银行信息" prop="transactionRecords">
<JSONTableInput
v-model="form.bankInfo"
:columns="[{ prop: 'bankName', label: '银行名称' }, { prop: 'bankAccount', label: '银行账号' }]"
/>
<JSONTableInput v-model="form.bankInfo"
:columns="[{ prop: 'bankName', label: '银行名称' }, { prop: 'bankAccount', label: '银行账号' }]" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@@ -190,7 +149,7 @@ export default {
customerLevel: '',
customerCode: '',
pageNum: 1,
pageSize: 1000
pageSize: 10
},
total: 0,
activeTab: 'detail',