chenrui 9 månader sedan
förälder
incheckning
f9d9871d06
1 ändrade filer med 5 tillägg och 4 borttagningar
  1. 5 4
      src/views/easyPassManagement/shoppingProducts/list.vue

+ 5 - 4
src/views/easyPassManagement/shoppingProducts/list.vue

@@ -134,7 +134,7 @@ import productType from '@/views/common/productType.js'
 import productBrand from '@/views/common/productBrand.js'
 import chooseProduct from '@/views/easyPassManagement/shoppingManagement/chooseProductsModal'
 // 接口
-import { shopProductList, saveBatchProductExcel, shopProductDel, shopProductUpdateStatus, queryProductSnList } from '@/api/shopProduct'
+import { shopProductList, saveBatchProductExcel, shopProductDel, shopProductUpdateStatus, queryProductSnList, saveBatchProduct } from '@/api/shopProduct'
 export default {
   name: 'ShoppingProductsList',
   mixins: [commonMixin],
@@ -240,7 +240,7 @@ export default {
           price: item.terminalPrice
         }
       })
-      _this.hanldeOk(newList)
+      _this.hanldeOk(newList, 'chooseProduct')
     },
     // 关闭选择弹窗
     closeProductModal () {
@@ -251,10 +251,11 @@ export default {
       this.openGuideModal = true
     },
     // 导入产品成功
-    hanldeOk (list) {
+    hanldeOk (list, typeVal) {
       const _this = this
       _this.spinning = true
-      saveBatchProductExcel(list).then(res => {
+      const ajaxName = (typeVal && typeVal === 'chooseProduct') ? saveBatchProduct : saveBatchProductExcel
+      ajaxName(list).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$nextTick(() => {