diff --git a/src/api/api_customer_product.js b/src/api/api_customer_product.js index 327c6238f12d5e13e902f3aee778a0d6709d2124..6c44d250c6213e607b399357111c07f85a6313b3 100644 --- a/src/api/api_customer_product.js +++ b/src/api/api_customer_product.js @@ -9,7 +9,7 @@ export default { return API.POST(`/api/customerProduct/${id}`, params) }, createMulti:(id,params) => { - return API.POST(`/api/customerProduct/mutli/${id}`, params) + return API.POST(`/api/customerProduct/multi/${id}`, params) }, // edit: (id,params) => { // return API.PUT(`/api/customerProduct/${id}`, params) diff --git a/src/api/api_customer_progress.js b/src/api/api_customer_progress.js index 73c2241240c5c3608fd1926ac80d9cbb6acdca5d..3b4f66cbda838cd8f27cab0aff0825640ccad46c 100644 --- a/src/api/api_customer_progress.js +++ b/src/api/api_customer_progress.js @@ -9,6 +9,9 @@ export default { find:()=>{ return API.GET(`/api/customerProgress`) }, + add:(params)=>{ + return API.POST('/api/customerProgress', params) + }, queryPaper: params => { return API.GET('/api/customerProgress') }, diff --git a/src/views/customer/customerProductCreateModal.vue b/src/views/customer/customerProductCreateModal.vue index 6cec031e101219be1b53eca5404e1481541b60bb..7cb6294a5f85b8a8dd9c90769bddedd654fce4c7 100644 --- a/src/views/customer/customerProductCreateModal.vue +++ b/src/views/customer/customerProductCreateModal.vue @@ -28,18 +28,18 @@ return { name: '', visible: false, - selectItems:[] + selectItems: [] }; }, props: { - customerId:{ - type:Number, + customerId: { + type: Number, }, showModal: { default: false }, - productList:{ - default:()=>[] + productList: { + default: () => [] }, handleCloseModal: { type: Function @@ -47,9 +47,15 @@ }, methods: { handleConfirmModal: function () { - - API_Customer_Product.createMulti(this.customerId,) - this.handleCloseModal(); + API_Customer_Product.createMulti(this.customerId, this.selectItems) + .then((res) => { + if (res.code === 0) { + this.$message.success('添加用户产品成功'); + this.handleCloseModal(); + } else { + this.$message.success('添加用户产品失败', res.msg ? `:${res.msg}` : ''); + } + }); } }, watch: { diff --git a/src/views/customer/customerProgressCreateModal.vue b/src/views/customer/customerProgressCreateModal.vue index 0b9315d883555df75a30dfb58aeda305b07502b9..86cda4492d80c7d9ca6963ef6557dcef7a6df250 100644 --- a/src/views/customer/customerProgressCreateModal.vue +++ b/src/views/customer/customerProgressCreateModal.vue @@ -2,37 +2,90 @@ - 添加用户进程 + width="720px" + :before-close="handleCloseModal"> + + + + + + + + + + + + + + + + + - - 取消 - 确定 + 取消 + 确定