chenrui пре 8 месеци
родитељ
комит
b6ef8617eb

+ 25 - 16
src/components/Select/index.js

@@ -14,7 +14,8 @@ export default {
   data () {
     return {
       dataList: [],
-      placeholderText: ''
+      placeholderText: '',
+      origDataList: []
     }
   },
   props: Object.assign({}, Select.props, {
@@ -32,27 +33,20 @@ export default {
     },
     notIn: {
       type: Array,
-      default: function(){
+      default: function () {
         return []
       }
     }
   }),
   created () {
-    const _this = this
-    // console.log(_this.code, '_this.code')
-    getLookUpData({
-      pageNo: 1,
-      pageSize: 1000,
-      lookupCode: _this.code,
-      isEnable: _this.isEnable ? 1 : undefined
-    }).then(res => {
-      if (res.status == 200) {
-        _this.dataList = res.data.list.filter(item => _this.notIn.indexOf(item.code)<0)
-      }
-    })
+    this.getDataList()
+  },
+  watch: {
+    notIn (newVal, oldVal) {
+      this.getDataList()
+    }
   },
   methods: {
-
     /**
      * 获取当前所有的option 数据
      * @returns options data
@@ -60,6 +54,21 @@ export default {
     getOptionDatas () {
       return _.cloneDeep(this.dataList)
     },
+    getDataList () {
+      const _this = this
+      // console.log(_this.code, '_this.code')
+      getLookUpData({
+        pageNo: 1,
+        pageSize: 1000,
+        lookupCode: _this.code,
+        isEnable: _this.isEnable ? 1 : undefined
+      }).then(res => {
+        if (res.status == 200) {
+          _this.origDataList = res.data.list
+          _this.dataList = res.data.list.filter(item => _this.notIn.indexOf(item.code) < 0)
+        }
+      })
+    },
     // 根据code 获取名称
     getNameByCode (code) {
       const a = this.dataList.find(item => {
@@ -95,7 +104,7 @@ export default {
         this.$emit('change', obj.target.value, _.find(this.dataList, ['code', obj.target.value]))
       }
     }
-    if(this.showType === 'radio'){
+    if (this.showType === 'radio') {
       return (
         <a-radio-group vModel={props.value} {...{ props, on: radioOn }} >
           {

+ 1 - 1
src/config/router.config.js

@@ -3721,7 +3721,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:bizType',
                 name: 'carouselImageEdit',
                 component: () => import(/* webpackChunkName: "easyPassManagement" */ '@/views/easyPassManagement/homepageCarouselImg/edit.vue'),
                 meta: {

+ 3 - 3
src/views/easyPassManagement/homepageCarouselImg/edit.vue

@@ -280,9 +280,6 @@ export default {
           _this.$refs.imageSet.setFileList(res.data.imageUrl)
           _this.form = res.data
           _this.form.time = [res.data.bannerStartDate, res.data.bannerEndDate]
-          if (_this.form.bizType && _this.form.bizType === 'SHOP_PROMO') {
-            _this.notShowSel.splice(0, 1)
-          }
         }
       })
     },
@@ -372,6 +369,9 @@ export default {
     pageInit () {
       if (this.$route.params.sn) {
         this.getDetail()
+        if (this.$route.params.bizType && this.$route.params.bizType === 'SHOP_PROMO') {
+          this.notShowSel.splice(0, 1)
+        }
       }
     }
   },

+ 1 - 1
src/views/easyPassManagement/homepageCarouselImg/list.vue

@@ -189,7 +189,7 @@ export default {
       if (!row) {
         this.$router.push({ name: 'carouselImageAdd' })
       } else {
-        this.$router.push({ name: 'carouselImageEdit', params: { sn: row.bannerSn } })
+        this.$router.push({ name: 'carouselImageEdit', params: { sn: row.bannerSn, bizType: row.bizType } })
       }
     },
     //  创建时间  change

+ 15 - 1
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -464,7 +464,21 @@ export default {
             // 获取产品列表 有分页
             this.$refs.chooseProductList.pageInit()
           } else {
-            this.$message.warning(res.data)
+            this.$confirm({
+              title: '提示',
+              content: res.data,
+              centered: true,
+              okText: '知道了',
+              cancelText: '取消', // 将cancelText设置为空字符串或去掉该属性可以隐藏取消按钮
+              cancelButtonProps: {
+                style: {
+                  display: 'none' // 通过设置样式隐藏取消按钮
+                }
+              },
+              onOk () {
+                console.log('知道了')
+              }
+            })
           }
         }
       })

+ 0 - 1
src/views/easyPassManagement/promotionalActivities/productTable.vue

@@ -56,7 +56,6 @@
         <!-- 特价价格-->
         <template slot="specialOffer" slot-scope="text,record">
           <a-input-number
-            :min="0.01"
             :step="1"
             :precision="2"
             :max="99999999"