From 58ccb59a71db5be8f2f50127079359b72fcf2adb Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 1 Jun 2018 17:37:12 +0800 Subject: [PATCH 1/2] auto commit per hour --- src/api/api_customer_product.js | 2 +- .../customer/customerProductCreateModal.vue | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/api/api_customer_product.js b/src/api/api_customer_product.js index 327c623..6c44d25 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/views/customer/customerProductCreateModal.vue b/src/views/customer/customerProductCreateModal.vue index 6cec031..7cb6294 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: { -- Gitee From 5d2425a665ac127f6e988291558674a178ac2636 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 4 Jun 2018 13:48:50 +0800 Subject: [PATCH 2/2] auto commit per hour --- src/api/api_customer_progress.js | 3 + .../customer/customerProgressCreateModal.vue | 85 +++++++++++++++---- .../customer/customerProgressEditModal.vue | 47 +++++++++- .../customer/customerProgressPaperModal.vue | 47 +++++++++- src/views/customer/detail.vue | 11 ++- 5 files changed, 167 insertions(+), 26 deletions(-) diff --git a/src/api/api_customer_progress.js b/src/api/api_customer_progress.js index 73c2241..3b4f66c 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/customerProgressCreateModal.vue b/src/views/customer/customerProgressCreateModal.vue index 0b9315d..86cda44 100644 --- a/src/views/customer/customerProgressCreateModal.vue +++ b/src/views/customer/customerProgressCreateModal.vue @@ -2,37 +2,90 @@ -
添加用户进程
+ width="720px" + :before-close="handleCloseModal"> +
+ + + + + + + + + + + + + + + +
- - 取消 - 确定 + 取消 + 确定