feat(crm): 新增客户管理相关组件和功能
新增客户信息展示、编辑组件及订单管理功能 优化客户详情页布局和交互体验 重构订单管理模块,增加客户关联功能
This commit is contained in:
@@ -132,7 +132,10 @@
|
||||
<el-input v-model="form.orderCode" placeholder="请输入订单编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户" prop="customerId">
|
||||
<el-input v-model="form.customerId" placeholder="请输入客户" />
|
||||
<!-- <el-input v-model="form.customerId" placeholder="请输入客户" /> -->
|
||||
<el-select v-model="form.customerId" placeholder="请选择客户">
|
||||
<el-option v-for="item in customerList" :key="item.customerId" :label="item.customerCode" :value="item.customerId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单总金额" prop="orderAmount">
|
||||
<el-input v-model="form.orderAmount" placeholder="请输入订单总金额" />
|
||||
@@ -162,6 +165,7 @@
|
||||
|
||||
<script>
|
||||
import { listOrder, getOrder, delOrder, addOrder, updateOrder } from "@/api/crm/order";
|
||||
import { listCustomer } from "@/api/crm/customer";
|
||||
import OrderDetailList from '@/views/crm/components/OrderDetail.vue'
|
||||
import { ORDER_TYPE } from "../js/enum";
|
||||
|
||||
@@ -213,11 +217,14 @@ export default {
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
},
|
||||
orderId: '',
|
||||
customerList: [],
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getCustomerList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询正式订单主列表 */
|
||||
@@ -229,6 +236,12 @@ export default {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 查询客户列表 */
|
||||
getCustomerList() {
|
||||
listCustomer({ pageNum: 1, pageSize: 1000 }).then(response => {
|
||||
this.customerList = response.rows;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
@@ -236,6 +249,7 @@ export default {
|
||||
},
|
||||
// 行点击事件
|
||||
handleRowClick(row) {
|
||||
console.log(row, '行点击')
|
||||
this.orderId = row.orderId;
|
||||
},
|
||||
handleApprove(row) {
|
||||
@@ -301,7 +315,7 @@ export default {
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加正式订单主";
|
||||
this.title = "添加预订单";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
@@ -312,7 +326,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改正式订单主";
|
||||
this.title = "修改预订单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
|
||||
Reference in New Issue
Block a user