diff --git a/src/api/modules/mer_admin.js b/src/api/modules/mer_admin.js index 57c12e7..4d5ea89 100644 --- a/src/api/modules/mer_admin.js +++ b/src/api/modules/mer_admin.js @@ -52,6 +52,18 @@ export const mer_admin = { getProductCategory: () => { return $http.get(`/merchant-api/product/category/list?shopId=${JSON.parse(sessionStorage.getItem('userInfo')).shopId}`); }, + //上架或下架 + putOnShelvesProducts: (data) => { + return $http.post(`/merchant-api/product/batch/update/status`, data); + }, + //批量删除商品 + BatchDeleteProducts: (data) => { + return $http.post(`/merchant-api/product/batch/delete`, data); + }, + //打折扣 + setDiscounts: (data) => { + return $http.post(`merchant-api/activity/save`, data); + }, //获取销售单位 getSaleUnit: (data) => { return $http.request({ url: `/merchant-api/product/unit/list`, method: 'get', params: data }); diff --git a/src/views/modules/product/index.vue b/src/views/modules/product/index.vue index 6d1af91..195ff10 100644 --- a/src/views/modules/product/index.vue +++ b/src/views/modules/product/index.vue @@ -29,7 +29,6 @@ placeholder="商品搜索" > - 查询 { + console.log("111"); this.$api.mer_admin.BatchDeleteProducts(integers).then((res) => { this.$refs.oTable.reload(); }); diff --git a/src/views/modules/product/popup/add-or-update.vue b/src/views/modules/product/popup/add-or-update.vue index f8fa261..7bc1cac 100644 --- a/src/views/modules/product/popup/add-or-update.vue +++ b/src/views/modules/product/popup/add-or-update.vue @@ -187,16 +187,7 @@ export default { productIntroducePhoto: "", productPhotoList: [], productPlace: "", - productSpecificationList: [ - { - attributeValue: "默认", - costPrice: 20, - salePrice: 30, - stockNum: 10, - weight: 1, - volume: 0.3, - }, - ], + productSpecificationList: [], productUnit: "", productVideo: "", shelfLife: "", @@ -657,9 +648,10 @@ export default { v-model={this.place} onChange={change} options={this.$api.mer_admin.getCityOptions()} - {...{ + props={{ props: { - checkStrictly: true, + label: "name", + value: "name", }, }} clearable diff --git a/src/views/modules/product/popup/add-price.vue b/src/views/modules/product/popup/add-price.vue index 8178a1c..f8802e6 100644 --- a/src/views/modules/product/popup/add-price.vue +++ b/src/views/modules/product/popup/add-price.vue @@ -9,7 +9,7 @@ :modalHandles="modalHandles" > { - if (this.tableData.length == 1) { + if (this.modalData.specType == 0) { this.$api.mer_admin .saveProductBase(this.modalData) .then((res) => { diff --git a/src/views/modules/product/popup/add-specifications.vue b/src/views/modules/product/popup/add-specifications.vue index 15b1c23..45c715a 100644 --- a/src/views/modules/product/popup/add-specifications.vue +++ b/src/views/modules/product/popup/add-specifications.vue @@ -91,7 +91,6 @@ export default { //监控对象数据 tableData: [], //表格属性 - //表格属性 tableProp: { height: "auto", border: true, @@ -399,6 +398,8 @@ export default { disabled: () => this.tableData.length <= 0, // submit: true, handle: () => { + let volume = "" //重量 + let weight = "" //体积 let salePrice = ""; //价格范围 let stockNum = ""; //库存范围 let minSalePrice = Math.min.apply( diff --git a/src/views/modules/product/popup/add-stock.vue b/src/views/modules/product/popup/add-stock.vue index e88c7ae..063216f 100644 --- a/src/views/modules/product/popup/add-stock.vue +++ b/src/views/modules/product/popup/add-stock.vue @@ -9,7 +9,7 @@ :modalHandles="modalHandles" > { - if (this.tableData.length == 1) { + if (this.modalData.specType == 0) { this.$api.mer_admin .saveProductBase(this.modalData) .then((res) => {