chenrui 1 год назад
Родитель
Сommit
0a64b381cb

+ 80 - 13
src/views/promotionRulesManagement/dealerPromotions/list.vue

@@ -5,17 +5,17 @@
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
                 <rangeDate ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="促销名称/简称">
                 <a-input id="promotionList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入促销名称/简称"/>
               </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="发布状态">
                 <v-select
                   v-model="queryParam.enabledFlag"
@@ -26,7 +26,7 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="5" :sm="24">
+            <a-col :md="6" :sm="24">
               <a-form-item label="活动状态">
                 <v-select
                   v-model="queryParam.state"
@@ -38,7 +38,19 @@
                 ></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="4" :sm="24">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建人">
+                <v-select
+                  v-model="queryParam.state"
+                  ref="state"
+                  id="promotionList-state"
+                  code="PROMOTION_STATE"
+                  placeholder="请选择创建人"
+                  allowClear
+                ></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
               <span class="table-page-search-submitButtons">
                 <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="promotionList-refresh">查询</a-button>
                 <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="promotionList-reset">重置</a-button>
@@ -130,7 +142,7 @@
             <a-button
               size="small"
               type="link"
-              v-if="$hasPermissions('B_editTime')&&(record.state == 'NOT_START' || record.state=='RUNNING')"
+              v-if="$hasPermissions('B_editTime')&&(record.state == 'NOT_START' || record.state=='RUNNING' ||record.state == 'IS_OVER')"
               @click="handleTime(record)"
               class="button-info"
               id="promotionList-edit-btn">促销时间变更</a-button>
@@ -148,7 +160,12 @@
               @click="handleDel(record)"
               class="button-error"
               id="promotionList-del-btn">删除</a-button>
-            <div v-if="record.state == 'IS_OVER'">--</div>
+            <a-button
+              size="small"
+              type="link"
+              @click="openCopyModal = true"
+              class="button-info"
+              id="promotionList-edit-btn">复制</a-button>
           </template>
         </s-table>
       </a-spin>
@@ -187,6 +204,34 @@
           >审核通过</a-button>
         </div>
       </a-modal>
+      <!-- 复制弹窗 -->
+      <a-modal
+        closable
+        v-model="openCopyModal"
+        :footer="null"
+        width="416px"
+        centered>
+        <div class="copyContent">
+          <p>提示:</p>
+          <p>复制选择的促销活动,将在列表生成一条相同的【待提交】的促销活动,可进行编辑!</p>
+          <p>是否确认生成?</p>
+          <p>附件无法复制,请重新上传</p>
+        </div>
+        <!-- 按钮 -->
+        <div class="copyBtn">
+          <a-button
+            id="copyModal-cancel"
+            class="button-cancel"
+            @click="closeAuditModal"
+            style="margin-right: 15px;">取消</a-button>
+          <a-button
+            type="primary"
+            id="copyModal-save"
+            class="button-primary"
+            @click="handleAuditModal"
+          >确定</a-button>
+        </div>
+      </a-modal>
     </a-card>
   </div>
 </template>
@@ -253,7 +298,8 @@ export default {
         })
       },
       itemSn: null, // 经销商促销活动SN
-      openAuditModal: false // 审核弹窗
+      openAuditModal: false, // 审核弹窗,
+      openCopyModal: false // 复制弹窗
     }
   },
   methods: {
@@ -405,6 +451,7 @@ export default {
       this.$refs.rangeDate.resetDate()
       this.$refs.table.refresh(true)
     },
+
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -418,7 +465,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 240
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   watch: {
@@ -457,10 +504,30 @@ export default {
     .joinCustomer{
       cursor:pointer;
     }
-    .tableBtnSet{
-     display: flex;
-     align-items: center;
-     justify-content: space-between;
+  }
+  .copyContent{
+    margin:30px 10px 20px;
+    p{
+      margin-bottom:6px !important;
+      font-size:14px;
+    }
+    p:last-child{
+        font-size:12px;
+        color:#666;
+        text-align:right;
+    }
+  }
+  .copyBtn{
+    text-align:center;
+    button{
+      width: 45%;
+      height:40px;
+      line-height:40px;
     }
   }
+  .tableBtnSet{
+   display: flex;
+   align-items: center;
+   justify-content: space-between;
+  }
 </style>

+ 23 - 2
src/views/promotionRulesManagement/promotionManagement/lookUpCustomersModal.vue

@@ -60,6 +60,15 @@
           <template slot="address" slot-scope="text, record">
             {{ record.provinceName }}/{{ record.cityName }}/{{ record.districtName }}
           </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              @click="handleDel(record)"
+              class="button-error"
+              id="customersList-del-btn">删除</a-button>
+          </template>
         </s-table>
       </a-card>
       <div class="btn-cont">
@@ -134,8 +143,12 @@ export default {
       isPrice: false, //  仅显示盈亏
       openPrintModal: false,
       nowType: null,
-      printerType: 'NEEDLE', //  打印机类型
-      columns: [
+      printerType: 'NEEDLE' //  打印机类型
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
         { title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
         { title: '地区', scopedSlots: { customRender: 'address' }, width: '20%', align: 'center', ellipsis: true },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -144,9 +157,17 @@ export default {
         { title: '商户类型', dataIndex: 'dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ]
+      if (this.snObj && this.snObj.dealerSnList && this.snObj.dealerSnList.length > 0) {
+        arr.push({ title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' })
+      }
+      return arr
     }
   },
   methods: {
+    // 删除改变状态
+    handleDel () {
+
+    },
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : ''
       this.queryParam.citySn = val[1] ? val[1] : ''