feat(wms,crm,cost): 完成多模块功能更新与优化
1. 新增发货单明细统计接口调用 2. 移除成本页面复制配置按钮 3. 隐藏CRM合同订单编辑标签页 4. 优化发货单页面订单编号自动补全功能 5. 新增钢卷管理发货计划筛选与批量移单功能
This commit is contained in:
@@ -56,6 +56,11 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="queryParams.remark" placeholder="请输入备注" clearable
|
||||
@keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@@ -178,7 +183,25 @@
|
||||
<!-- 如果没有绑定订单,这里是使用手机号字段来存储手填的订单编号 -->
|
||||
<el-form-item label="订单编号" prop="principalPhone" v-if="!form.orderId">
|
||||
<div style="display: flex; gap: 10px; align-items: center;">
|
||||
<el-input v-model="form.principalPhone" placeholder="请输入订单编号" style="flex: 1;" />
|
||||
<el-autocomplete
|
||||
v-model="form.principalPhone"
|
||||
:fetch-suggestions="queryOrderSuggestions"
|
||||
placeholder="请输入订单编号"
|
||||
style="flex: 1;"
|
||||
value-key="orderCode"
|
||||
@select="onOrderAutoSelect"
|
||||
clearable
|
||||
:highlight-first-item="true"
|
||||
popper-class="order-autocomplete-popper"
|
||||
>
|
||||
<template slot-scope="{ item }">
|
||||
<div class="order-suggestion-item">
|
||||
<span class="suggestion-code">{{ item.orderCode }}</span>
|
||||
<span class="suggestion-company">{{ item.companyName }}</span>
|
||||
<span class="suggestion-salesman">{{ item.salesman }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
<el-button type="primary" size="small" @click="bindOrder">绑定订单</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -344,6 +367,8 @@ export default {
|
||||
// 订单搜索关键词
|
||||
orderQuery: '',
|
||||
orderId: '',
|
||||
// 订单自动补全
|
||||
orderSuggestLoading: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@@ -645,6 +670,52 @@ export default {
|
||||
this.form.principal = row.salesman;
|
||||
this.orderDialogVisible = false;
|
||||
},
|
||||
/** 订单编号自动补全 */
|
||||
queryOrderSuggestions(queryString, callback) {
|
||||
if (!queryString || queryString.trim() === '') {
|
||||
callback([]);
|
||||
return;
|
||||
}
|
||||
this.orderSuggestLoading = true;
|
||||
listOrder({ pageNum: 1, pageSize: 10, keyword: queryString }).then(response => {
|
||||
const suggestions = (response.rows || []).map(item => ({
|
||||
...item,
|
||||
value: item.orderCode
|
||||
}));
|
||||
this.orderSuggestLoading = false;
|
||||
callback(suggestions);
|
||||
}).catch(() => {
|
||||
this.orderSuggestLoading = false;
|
||||
callback([]);
|
||||
});
|
||||
},
|
||||
/** 自动补全选择订单 */
|
||||
onOrderAutoSelect(item) {
|
||||
const existing = this.deliveryWaybillList.find(
|
||||
d => d.orderId === item.orderId || d.orderCode === item.orderCode
|
||||
);
|
||||
if (existing) {
|
||||
this.$confirm(
|
||||
`订单"${item.orderCode}"已绑定在发货单"${existing.waybillName}"中,确定继续绑定?`,
|
||||
'提示',
|
||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }
|
||||
).then(() => {
|
||||
this.doBindOrder(item);
|
||||
}).catch(() => {
|
||||
this.form.principalPhone = item.orderCode;
|
||||
});
|
||||
} else {
|
||||
this.doBindOrder(item);
|
||||
}
|
||||
},
|
||||
/** 执行订单绑定并填写信息 */
|
||||
doBindOrder(item) {
|
||||
this.form.orderId = item.orderId;
|
||||
this.form.orderCode = item.orderCode;
|
||||
this.form.consigneeUnit = item.companyName;
|
||||
this.form.principal = item.salesman;
|
||||
this.form.principalPhone = item.orderCode;
|
||||
},
|
||||
/** 打印发货单 */
|
||||
handlePrint(row, printType) {
|
||||
this.loading = true;
|
||||
@@ -856,4 +927,58 @@ export default {
|
||||
::v-deep .el-pagination {
|
||||
margin-top: 6px !important;
|
||||
}
|
||||
|
||||
.order-suggestion-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.suggestion-code {
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.suggestion-company {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.suggestion-salesman {
|
||||
color: #409eff;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.order-autocomplete-popper {
|
||||
min-width: 380px !important;
|
||||
}
|
||||
|
||||
.order-autocomplete-popper .order-suggestion-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 4px 0;
|
||||
}
|
||||
|
||||
.order-autocomplete-popper .suggestion-code {
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.order-autocomplete-popper .suggestion-company {
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.order-autocomplete-popper .suggestion-salesman {
|
||||
color: #409eff;
|
||||
font-size: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user