feat(crm): 新增客户管理相关组件和功能
新增客户信息展示、编辑组件及订单管理功能 优化客户详情页布局和交互体验 重构订单管理模块,增加客户关联功能
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-empty v-if="!orderId" description="未选中订单" />
|
||||
<div>
|
||||
<el-empty v-if="!orderId || orderId == ''" description="未选中订单" />
|
||||
|
||||
<!-- <el-empty v-else-if="!orderItemList.length" description="暂无订单明细" /> -->
|
||||
|
||||
<div v-else>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-if="editable">新增</el-button>
|
||||
<el-button type="primary" plain icon="el-icon-refresh" size="mini" @click="getList">刷新</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -18,7 +19,7 @@
|
||||
<el-table-column label="特殊要求" align="center" prop="specialRequire" />
|
||||
<el-table-column label="明细金额" align="center" prop="itemAmount" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" v-if="editable">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
@@ -68,9 +69,12 @@ export default {
|
||||
name: "OrderItem",
|
||||
props: {
|
||||
orderId: {
|
||||
type: [String, undefined],
|
||||
required: true
|
||||
}
|
||||
},
|
||||
editable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -98,7 +102,7 @@ export default {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: this.orderId,
|
||||
orderId: undefined,
|
||||
productType: undefined,
|
||||
specRequire: undefined,
|
||||
productNum: undefined,
|
||||
@@ -132,10 +136,10 @@ export default {
|
||||
watch: {
|
||||
orderId: {
|
||||
handler(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
// if (newVal !== oldVal) {
|
||||
this.queryParams.orderId = newVal;
|
||||
this.getList();
|
||||
}
|
||||
// }
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
@@ -199,7 +203,7 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加正式订单明细";
|
||||
this.title = "添加订单明细";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@@ -210,7 +214,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改正式订单明细";
|
||||
this.title = "修改订单明细";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
||||
Reference in New Issue
Block a user