lilei 1 년 전
부모
커밋
c43301a2e1
2개의 변경된 파일46개의 추가작업 그리고 15개의 파일을 삭제
  1. 3 0
      src/components/Table/index.js
  2. 43 15
      src/views/salesManagement/salesQueryNew/edit.vue

+ 3 - 0
src/components/Table/index.js

@@ -235,6 +235,9 @@ export default {
         })
       }
     },
+    addRowData(data){
+      this.localDataSource.push(data)
+    },
     initTotalList (columns) {
       const totalList = []
       columns && columns instanceof Array && columns.forEach(column => {

+ 43 - 15
src/views/salesManagement/salesQueryNew/edit.vue

@@ -40,14 +40,15 @@
       v-for="item in activeList" 
       :key="item.activeId" 
       >
-        <div slot="title" style="display: inline-block;width:80%;">
-            <div>
-              <strong style="margin-right:10px;font-size:14px;">{{item.activeName}}</strong> ({{item.activeDesc}})
-              <span style="margin-left:10px;color:#00aaff;cursor: pointer;"  @click="(event) => {showDesc(event, item.activeId)}">
-                <a-icon title="查看活动详情" type="eye"/> 详情
-              </span>
-            </div>
-          </div>
+        <div slot="title" style="display: inline-block;width:100%;">
+          <strong style="margin-right:10px;font-size:14px;">{{item.activeName}}</strong> ({{item.activeDesc}})
+          <span style="margin-left:20px;color:#00aaff;cursor: pointer;"  @click="(event) => {showDesc(event, item.activeId)}">
+            <a-icon title="查看活动详情" type="eye"/> 活动详情
+          </span>
+          <span style="margin:0 20px;color:#ff0800;cursor: pointer;" @click="(event) => {disabledActive(event, item.activeId)}">
+            <a-icon title="禁用活动" type="disconnect"/> 禁用活动
+          </span>
+        </div>
         <div slot="extra" @click="tooglePanel(item)" style="cursor: pointer;">{{ item.isActive ? '收起' : '展开' }} <a-icon type="caret-right" :rotate="item.isActive ? 90 : 0"/> </div>
         <div v-show="item.isActive" style="padding: 10px;">
           <productList :ref="'productList-'+item.activeId" :id="item.activeId" @openCpModal="openProductModal" :detailData="detailData" :warehouseSn="warehouseSn" :salesBillSn="salesBillSn"></productList>
@@ -149,7 +150,8 @@ export default {
       showDetail: false,
       showCpModal: false,
       cpModalType: '0',
-      cpCurRefId: ''
+      cpCurRefId: '',
+      disabledActiveOption: null
     }
   },
   computed: {
@@ -256,17 +258,43 @@ export default {
         }
       })
     },
-    // 展开收缩查询
-    showSearch(e,id){
-      e.stopPropagation()
-      const row = this.$refs['productList-'+id][0]
-      row&&row.showSearch()
-    },
+    // 展开收缩活动详情
     showDesc(e,id){
       e.stopPropagation()
       const row = this.$refs['productList-'+id][0]
       row&&row.showDesc()
     },
+    // 禁用活动
+    disabledActive(e,id){
+      const _this = this
+      this.$confirm({
+        title: '禁用活动?',
+        centered: true,
+        content: <div>
+          <div>禁用规则后,将无法享受该活动规则优惠</div>
+          <div style="padding:10px 0;">
+            <aRadioGroup vModel={_this.disabledActiveOption}>
+              <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="1">
+                删除规则中相关产品
+              </aRadio>
+              <aRadio style="display:block;height: '30px';lineHeight: '30px';padding:5px 0;" value="2">
+                移出规则中相关产品
+              </aRadio>
+            </aRadioGroup>
+          </div>
+        </div>,
+        onOk() {
+           console.log(_this.disabledActiveOption)
+        },
+        onCancel() {
+          _this.disabledActiveOption = null
+        },
+      });
+    },
+    changeDaOpt(e){
+      console.log(e)
+      this.disabledActiveOption = e.target.value
+    },
     // 获取活动列表
     getActive(){
       this.activeList = [