chenrui 10 mesiacov pred
rodič
commit
0e3b5b277d

+ 6 - 6
src/components/index.less

@@ -51,7 +51,7 @@
   }
 }
 .ant-btn-primary.button-primary[disabled],.ant-btn-primary.button-info[disabled],.ant-btn-primary.button-warning[disabled],.ant-btn-primary.button-geekblue[disabled],.ant-btn-primary.button-purple[disabled]{
-   color: rgba(255, 255, 255, 0.5);
+   color: rgba(255, 255, 255, 0.6);
  }
 .ant-btn-primary.button-success {
   background-color: #11b116;
@@ -278,11 +278,11 @@
       user-select: auto !important;
     }
   }
-  input:disabled{
-    opacity: 1!important;
-    color: #fff!important;
-    -webkit-text-fill-color: #fff!important;
-  }
+  // input:disabled{
+  //   opacity: 1!important;
+  //   color: #fff!important;
+  //   -webkit-text-fill-color: #fff!important;
+  // }
   .ant-table-row{
     td{
       > div:not(.ant-table-row-expand-icon):empty::after{

+ 12 - 7
src/views/promotionRulesManagement/promotionManagement/chooseProductsModal.vue

@@ -127,6 +127,10 @@ export default {
         return []
       }
     },
+    itemSn: {
+      type: String,
+      default: ''
+    },
     zIndex: { // 层级
       type: [String, Number],
       default: 1000
@@ -158,16 +162,16 @@ export default {
       loading: false, //  表格加载中
       columns: [
         { title: '序号', dataIndex: 'no', width: 60, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', align: 'center' },
-        { title: '产品名称', dataIndex: 'name', align: 'center', width: '18%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', align: 'center', width: '12%' },
+        { title: '产品名称', dataIndex: 'name', align: 'left', width: '18%', ellipsis: true, customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'origCode', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '终端价', dataIndex: 'terminalPrice', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '终端价', dataIndex: 'terminalPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         // { title: '市级价', dataIndex: 'cityPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         // { title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '品牌', dataIndex: 'productBrandName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
-        { title: '包装数', scopedSlots: { customRender: 'productQty' }, align: 'center' },
-        { title: '单位', dataIndex: 'unit', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } }
+        { title: '品牌', dataIndex: 'productBrandName', align: 'center', width: '8%', ellipsis: true, customRender: function (text) { return text || '--' } },
+        { title: '产品分类', scopedSlots: { customRender: 'productType' }, align: 'center' },
+        { title: '包装数', scopedSlots: { customRender: 'productQty' }, width: '6%', align: 'center' },
+        { title: '单位', dataIndex: 'unit', align: 'center', width: '6%', ellipsis: true, customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -176,6 +180,7 @@ export default {
         const params = Object.assign(parameter, this.queryParam)
         params.hideProductSnList = this.chooseData
         params.productTypeSnList = this.chooseType
+        params.promoActiveSn = this.itemSn
         return queryWaitingProductPage(params).then(res => {
           let data
           if (res.status == 200) {

+ 13 - 8
src/views/promotionRulesManagement/promotionManagement/edit.vue

@@ -249,7 +249,7 @@
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item class="productName" label="券适用范围" prop="ruleName">
+              <a-form-model-item class="productName" label="券适用范围" prop="range">
                 全部产品
               </a-form-model-item>
             </a-col>
@@ -283,13 +283,13 @@
               </a-form-model-item>
             </a-col>
             <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
-              <a-form-model-item label="返券产品" prop="ruleName">
+              <a-form-model-item label="返券产品" prop="range">
                 <div class="productInfo flex-center">
                   <div>
                     返券金额<a-input-number
                       v-model="sellForm.ruleValue"
                       style="margin:0 5px;"
-                      :min="0.01"
+                      :min="0"
                       :step="1"
                       :precision="2"
                       :max="99999999"
@@ -354,6 +354,7 @@
     <chooseProduct
       ref="chooseProduct"
       :chooseType="chooseTypeList"
+      :itemSn="$route.params.sn"
       :openModal="showProModal"
       @ok="addProductSuccess"
       @close="closeProductModal"></chooseProduct>
@@ -415,7 +416,8 @@ export default {
         validEndDate: undefined, // 券失效时间
         validDays: undefined, // 券有效期天数
         dealerEditFlag: '0', // 加盟商编辑 1是 0否
-        publishFlag: '0' // 是否发布
+        publishFlag: '0', // 是否发布
+        range: '1'
       },
       time: [], // 有效期
       dateFormat: 'YYYY-MM-DD', // 有效期时间格式
@@ -442,7 +444,8 @@ export default {
         ruleBaseType: [{ required: true, message: '请选择生成方式', trigger: 'change' }],
         validType: [{ required: true, message: '请选择券有效期类型', trigger: 'change' }],
         publishFlag: [{ required: true, message: '请选择是否发布', trigger: 'change' }],
-        dealerEditFlag: [{ required: true, message: '请选择加盟商是否可编辑', trigger: 'change' }]
+        dealerEditFlag: [{ required: true, message: '请选择加盟商是否可编辑', trigger: 'change' }],
+        range: [{ required: true, message: '请选择', trigger: 'blur' }]
       }
     }
   },
@@ -530,6 +533,7 @@ export default {
       const _this = this
       if (_this.form.contentType === 'LINK') {
         _this.form.content = _this.form.contentLink
+        _this.sellForm.range = '1'
         // 验证组件必填项
         _this.$refs.ruleForm.validate(valid => {
           if (valid) {
@@ -669,7 +673,8 @@ export default {
         validEndDate: undefined, // 券失效时间
         validDays: undefined, // 券有效期天数
         dealerEditFlag: '0', // 加盟商编辑 1是 0否
-        publishFlag: '0' // 是否发布
+        publishFlag: '0', // 是否发布
+        range: '1'
       }
       this.isShowNextStep = false
       this.isDisabled = false
@@ -726,8 +731,8 @@ export default {
     },
     // 批量添加
     handleBatchAdd () {
-      if (!this.sellForm.ruleValue || (this.sellForm.ruleValue && this.sellForm.ruleValue != 0)) {
-        this.$message.warning('请输入返券金额!')
+      if (!this.sellForm.ruleValue) {
+        this.$message.warning('请输入返券金额(必须大于0)!')
         return
       }
       this.$refs.chooseProduct.editMorePrice(this.sellForm.ruleValue)

+ 3 - 3
src/views/promotionRulesManagement/promotionManagement/list.vue

@@ -18,7 +18,7 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="促销状态">
                 <v-select
-                  v-model="queryParam.state"
+                  v-model="queryParam.publishState"
                   ref="saleStatus"
                   id="promotion-saleStatus"
                   code="PROMO_STATE"
@@ -182,7 +182,7 @@ export default {
         endDate: undefined,
         name: '',
         showFlag: undefined,
-        state: undefined
+        publishState: undefined
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -302,7 +302,7 @@ export default {
       this.queryParam.endDate = undefined
       this.queryParam.name = ''
       this.queryParam.showFlag = undefined
-      this.queryParam.state = undefined
+      this.queryParam.publishState = undefined
       this.$refs.table.refresh(true)
     },
     // 促销发布

+ 15 - 24
src/views/promotionRulesManagement/promotionManagement/productTable.vue

@@ -29,7 +29,7 @@
         </template>
         <template slot="ruleValue" slot-scope="text,record">
           <a-input-number
-            :min="0.01"
+            :min="0"
             :step="1"
             :precision="2"
             :max="99999999"
@@ -80,13 +80,13 @@ export default {
       queryParam: {},
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'productCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'origCode', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '活动价', scopedSlots: { customRender: 'price' }, width: '12%', align: 'center' },
-        { title: '返券金额', scopedSlots: { customRender: 'ruleValue' }, width: '12%', align: 'center' },
-        { title: '参考终端价', dataIndex: 'terminalPrice', width: '12%', align: 'center', customRender: text => { return ((text || text == 0) ? this.toThousands(text) : '--') } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
+        { title: '原厂编码', dataIndex: 'origCode', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '活动价', scopedSlots: { customRender: 'price' }, width: '10%', align: 'right' },
+        { title: '返券金额', scopedSlots: { customRender: 'ruleValue' }, width: '10%', align: 'right' },
+        { title: '参考终端价', dataIndex: 'terminalPrice', width: '10%', align: 'right', customRender: text => { return ((text || text == 0) ? this.toThousands(text) : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -150,23 +150,14 @@ export default {
     // 删除
     handleDel (row) {
       const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '点击确定,该内容将会被删除,不可再恢复!',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          // let ids=[]
-          // ids.push(row.id)
-          deleteBatch([row.id]).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
+      _this.spinning = true
+      deleteBatch([row.id]).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
         }
       })
     },