diff --git a/klp-ui/src/api/crm/customer.js b/klp-ui/src/api/crm/customer.js
index 5a25a60e..4a9b97de 100644
--- a/klp-ui/src/api/crm/customer.js
+++ b/klp-ui/src/api/crm/customer.js
@@ -42,3 +42,19 @@ export function delCustomer(customerId) {
method: 'delete'
})
}
+
+// 查询该客户相关的配卷情况
+export function listCoilByCustomerId(customerId) {
+ return request({
+ url: '/crm/orderItem/coils/customer/' + customerId,
+ method: 'get'
+ })
+}
+
+// 查询该项目相关的订单异议和财务信息
+export function listFinanceByCustomerId(customerId) {
+ return request({
+ url: '/crm/orderItem/customerFinance/' + customerId,
+ method: 'get'
+ })
+}
\ No newline at end of file
diff --git a/klp-ui/src/components/ChinaAreaSelect/index.js b/klp-ui/src/components/ChinaAreaSelect/index.js
index 283aa378..2e2a106b 100644
--- a/klp-ui/src/components/ChinaAreaSelect/index.js
+++ b/klp-ui/src/components/ChinaAreaSelect/index.js
@@ -47,12 +47,17 @@ function formatAreaText(value) {
return { standard, custom };
}
- // 非组合格式(纯标准地址/纯自定义地址)→ 默认归为standard
- return { standard: trimVal, custom: '' };
+ // 非组合格式(纯任意字符串)→ 归为custom
+ return { standard: '', custom: trimVal };
}
// ========== 场景3:输入是对象 → 格式化为组合字符串 ==========
if (typeof value === 'object' && !Array.isArray(value)) {
+ // 处理空对象
+ if (Object.keys(value).length === 0) {
+ return '[]()';
+ }
+
const { standard = '', custom = '' } = value;
// 转字符串并去空格
const standardStr = String(standard).trim();
@@ -71,11 +76,19 @@ function formatAreaText(value) {
*/
function formatAreaTextEnhanced(value, keyType = 'name') {
// 先调用基础版解析/格式化
- const result = formatAreaText(value);
+ let result = formatAreaText(value);
- // 如果是解析模式(返回对象)且keyType为name,转换code为name
+ // 如果是解析模式(返回对象)且keyType为name,检查是否为代码输入
if (typeof result === 'object' && keyType === 'name') {
- result.standard = convertCodeToName(result.standard);
+ // 检查custom是否可能是代码(不包含中文)
+ if (result.custom && !/[\u4e00-\u9fa5]/.test(result.custom)) {
+ // 尝试转换code为name
+ const convertedName = convertCodeToName(result.custom);
+ // 如果转换成功(返回非空字符串),则将其移到standard字段
+ if (convertedName) {
+ result = { standard: convertedName, custom: '' };
+ }
+ }
}
return result;
diff --git a/klp-ui/src/components/ChinaAreaSelect/index.vue b/klp-ui/src/components/ChinaAreaSelect/index.vue
index ab219741..14f2c545 100644
--- a/klp-ui/src/components/ChinaAreaSelect/index.vue
+++ b/klp-ui/src/components/ChinaAreaSelect/index.vue
@@ -26,6 +26,7 @@
+
+
\ No newline at end of file
diff --git a/klp-ui/src/components/FileUpload/index.vue b/klp-ui/src/components/FileUpload/index.vue
index 9958b1b5..f6fbffce 100644
--- a/klp-ui/src/components/FileUpload/index.vue
+++ b/klp-ui/src/components/FileUpload/index.vue
@@ -32,19 +32,31 @@
{{ getFileName(file.name) }}
+ 预览
删除
+
+
+
diff --git a/klp-ui/src/components/KLPService/CustomerSelect/index.vue b/klp-ui/src/components/KLPService/CustomerSelect/index.vue
index df170a1e..0ce3c7c7 100644
--- a/klp-ui/src/components/KLPService/CustomerSelect/index.vue
+++ b/klp-ui/src/components/KLPService/CustomerSelect/index.vue
@@ -1,6 +1,6 @@
-
-
+
+
@@ -13,6 +13,14 @@
value: {
type: String,
default: ''
+ },
+ bindField: {
+ type: String,
+ default: 'customerId'
+ },
+ style: {
+ type: Object,
+ default: () => ({})
}
},
computed: {
@@ -22,6 +30,12 @@
},
set(value) {
this.$emit('input', value);
+ // 找到对应的客户信息
+ const customer = this.customerList.find(item => item[this.bindField] === value);
+ // 触发 change 事件,传递客户信息
+ if (customer) {
+ this.$emit('change', customer);
+ }
}
}
},
@@ -37,7 +51,7 @@
methods: {
remoteSearchCustomer(query) {
this.customerLoading = true;
- listCustomer({ name: query, pageNum: 1, pageSize: 10 }).then(response => {
+ listCustomer({ companyName: query, pageNum: 1, pageSize: 10 }).then(response => {
this.customerList = response.rows;
}).finally(() => {
this.customerLoading = false;
diff --git a/klp-ui/src/views/aps/planSheet/PlanDetailForm.vue b/klp-ui/src/views/aps/planSheet/PlanDetailForm.vue
index 1e3a5a9e..769306bd 100644
--- a/klp-ui/src/views/aps/planSheet/PlanDetailForm.vue
+++ b/klp-ui/src/views/aps/planSheet/PlanDetailForm.vue
@@ -7,9 +7,14 @@
订单信息
-
- {{ formData.orderId ? formData.orderCode : '选择订单' }}
-
+
+ {{ formData.orderId ? formData.orderCode : '选择订单' }}
+
+
+ 查看附件
+
@@ -207,12 +212,8 @@
-
+
@@ -250,14 +251,26 @@
+
+
+
+
+
@@ -265,8 +278,9 @@
+
+
\ No newline at end of file
diff --git a/klp-ui/src/views/crm/order/index.vue b/klp-ui/src/views/crm/order/index.vue
index ff75ec6b..2eb761ce 100644
--- a/klp-ui/src/views/crm/order/index.vue
+++ b/klp-ui/src/views/crm/order/index.vue
@@ -102,28 +102,28 @@
+
+
+
+
+
-
-
+
-
-
-
-
+
-
-
-
-
+
+
item.contractId === contractId)
if (contract) {
+ console.log(contract)
this.form.contractCode = contract.contractNo
+ this.form.deliveryDate = contract.deliveryDate
+ this.form.customerId = contract.customerId
}
},
@@ -284,7 +291,7 @@ export default {
orderId: undefined,
orderCode: undefined,
orderType: ORDER_TYPE['正式订单'],
- customerId: undefined,
+ customerId: this.customerId,
orderAmount: undefined,
salesman: undefined,
deliveryDate: undefined,
diff --git a/klp-ui/src/views/wms/coil/components/AbnormalForm.vue b/klp-ui/src/views/wms/coil/components/AbnormalForm.vue
index 5a26cc38..68589610 100644
--- a/klp-ui/src/views/wms/coil/components/AbnormalForm.vue
+++ b/klp-ui/src/views/wms/coil/components/AbnormalForm.vue
@@ -73,12 +73,12 @@ export default {
{ required: true, message: '请选择位置', trigger: 'change' }
],
startPosition: [
- { required: true, message: '请输入开始位置', trigger: 'blur' },
- // { type: 'number', message: '请输入数字', trigger: 'blur' }
+ { required: true, message: '请输入开始位置', trigger: ['blur', 'change'] },
+ { validator: this.validateStartPosition, trigger: ['blur', 'change'] }
],
endPosition: [
- { required: true, message: '请输入结束位置', trigger: 'blur' },
- // { type: 'number', message: '请输入数字', trigger: 'blur' }
+ { required: true, message: '请输入结束位置', trigger: ['blur', 'change'] },
+ { validator: this.validateEndPosition, trigger: ['blur', 'change'] }
],
defectCode: [
{ required: true, message: '请选择缺陷代码', trigger: 'change' }
@@ -102,14 +102,19 @@ export default {
methods: {
/** 表单验证 */
validate(callback) {
+ if (this.formData.startPosition > this.formData.endPosition) {
+ this.$message.error('开始位置必须小于结束位置');
+ return false;
+ }
return this.$refs.form.validate(callback);
},
/** 重置表单 */
resetFields() {
this.$refs.form.resetFields();
+ const currentCoilId = this.formData.coilId;
this.formData = {
abnormalId: undefined,
- coilId: undefined,
+ coilId: currentCoilId,
position: undefined,
startPosition: undefined,
endPosition: undefined,
@@ -124,6 +129,22 @@ export default {
if (this.formData.startPosition && this.formData.endPosition) {
this.formData.length = this.formData.endPosition - this.formData.startPosition;
}
+ },
+ /** 校验开始位置 */
+ validateStartPosition(rule, value, callback) {
+ if (value <= 0) {
+ callback(new Error('开始位置必须为正数'));
+ } else {
+ callback();
+ }
+ },
+ /** 校验结束位置 */
+ validateEndPosition(rule, value, callback) {
+ if (value <= 0) {
+ callback(new Error('结束位置必须为正数'));
+ } else {
+ callback();
+ }
}
}
};
diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue
index 96ec8526..40c8bbed 100644
--- a/klp-ui/src/views/wms/coil/panels/base.vue
+++ b/klp-ui/src/views/wms/coil/panels/base.vue
@@ -48,8 +48,8 @@
-
-
+
diff --git a/klp-ui/src/views/wms/warehouse/record.vue b/klp-ui/src/views/wms/warehouse/record.vue
index e68e9bc6..89dd57bf 100644
--- a/klp-ui/src/views/wms/warehouse/record.vue
+++ b/klp-ui/src/views/wms/warehouse/record.vue
@@ -28,6 +28,8 @@
重置
+
+
@@ -71,14 +73,27 @@
+
+
+
+ 操作记录趋势
+
+
+
+
-
- 操作记录趋势
-
-
+
+
+
+
+
+ {{ scope.row.totalWeight.toFixed(2) }}
+
+
+
@@ -212,6 +227,8 @@ export default {
totalWeight: 0,
warehouseCount: 0
},
+ // 操作人汇总数据
+ userSummaryData: [],
// 图表实例
trendChart: null,
pieChart: null,
@@ -258,7 +275,7 @@ export default {
this.queryParams.createEndTime = this.queryParams.createTimeRange[1];
}
// 移除分页参数,获取全部数据
- const params = { ...this.queryParams, pageNum:1, pageSize: 10000 };
+ const params = { ...this.queryParams, pageNum: 1, pageSize: 10000 };
listCoilWarehouseOperationLog(params).then(response => {
this.allData = response.rows;
@@ -296,6 +313,26 @@ export default {
});
this.stats.warehouseCount = warehouseIds.size;
+ // 按操作人汇总数据
+ const userMap = {};
+ this.allData.forEach(item => {
+ const user = item.createBy || '未知';
+ if (!userMap[user]) {
+ userMap[user] = {
+ createBy: user,
+ coilCount: 0,
+ totalWeight: 0
+ };
+ }
+ userMap[user].coilCount++;
+ if (item.coil && item.coil.netWeight) {
+ userMap[user].totalWeight += parseFloat(item.coil.netWeight);
+ }
+ });
+
+ // 转换为数组并按操作卷数降序排序
+ this.userSummaryData = Object.values(userMap).sort((a, b) => b.coilCount - a.coilCount);
+
// 更新图表数据
this.updateCharts();
},