فهرست منبع

经销商促销 添加删除终止功能
轮胎统计报表 修改标题

chenrui 11 ماه پیش
والد
کامیت
5f0ddbf628

+ 3 - 2
src/views/promotionRulesManagement/dealerPromotions/detail.vue

@@ -22,9 +22,10 @@
           <a-descriptions-item label="参与客户" v-if="detailData.dealerScope!='ALL_DEALER'"><div @click="handleSee">共<span class="link-bule">{{ detailData.dealerQty }}</span>个</div></a-descriptions-item>
           <a-descriptions-item label="参与客户" v-else>全部客户</a-descriptions-item>
           <a-descriptions-item label="活动订单起订金额(元)">{{ detailData.minOrderFlag ==='0'?'不限':detailData.minOrderAmount?toThousands(detailData.minOrderAmount):'--' }}</a-descriptions-item>
-          <a-descriptions-item label="活动经费上限(元)" :span="2">{{ detailData.upperLimitFlag ==='0'?'不限':detailData.upperLimitAmount? toThousands(detailData.upperLimitAmount):'--' }}</a-descriptions-item>
+          <a-descriptions-item label="活动经费上限(元)">{{ detailData.upperLimitFlag ==='0'?'不限':detailData.upperLimitAmount? toThousands(detailData.upperLimitAmount):'--' }}</a-descriptions-item>
+          <a-descriptions-item label="终止说明">{{ detailData.desc||'--' }}</a-descriptions-item>
           <a-descriptions-item label="促销描述" :span="3">
-            <div class="descItem">{{ detailData.content || '' }}</div>
+            <div class="descItem">{{ detailData.content || '--' }}</div>
           </a-descriptions-item>
           <a-descriptions-item label="附件" :span="3">
             <div class="attachmentBox" v-if="detailData.attachmentList&&detailData.attachmentList.length>0">

+ 119 - 0
src/views/promotionRulesManagement/dealerPromotions/endDescModal.vue

@@ -0,0 +1,119 @@
+<template>
+  <a-modal
+    centered
+    class="endDescription-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    title="提示"
+    @cancel="isShow=false"
+    :width="500">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="margin-bottom: 20px;font-weight: bold;margin-left:20px;">确定要终止该促销吗?</div>
+      <a-form-model
+        id="endDescription-form"
+        ref="ruleForm"
+        :model="form"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="促销名称" prop="name">
+          <span>{{ form.name }}</span>
+        </a-form-model-item>
+        <a-form-model-item label="终止说明" prop="newTimeEnd">
+          <a-input v-model="form.desc" type="textarea" placeholder="请输入终止说明(最多50字符)" :maxLength="50"/>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button id="endDescription-modal-back" @click="isShow = false">取消</a-button>
+        <a-button style="margin-left: 15px;" type="primary" id="endDescription-modal-save" @click="handleSave">确定</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+// 接口
+import { promotionIsOver } from '@/api/promotion'
+export default {
+  name: 'EndDescModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    itemObj: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      // form 表单label布局
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      // 提交参数
+      form: {
+        sn: undefined,
+        name: '',
+        desc: undefined
+      }
+    }
+  },
+  methods: {
+    //  确定终止
+    handleSave () {
+      const _this = this
+      _this.spinning = true
+      promotionIsOver({ sn: this.form.sn }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.isShow = false
+        }
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.form = {
+          sn: undefined,
+          name: '',
+          desc: undefined
+        }
+      } else {
+        if (this.itemObj) {
+          this.form = { ...this.form, ...this.itemObj }
+        }
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .endDescription-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+
+</style>

+ 18 - 21
src/views/promotionRulesManagement/dealerPromotions/list.vue

@@ -182,6 +182,8 @@
       <add-modal v-drag :itemSn="itemSn" :openModal="openModal" @ok="handleOk" @close="openModal=false" />
       <!-- 促销时间变更 -->
       <edit-active-end-time ref="editTime" v-drag :openModal="editEndModal" @ok="$refs.table.refresh()" @close="editEndModal=false" />
+      <!-- 终止促销 -->
+      <end-desc-modal v-drag :openModal="openEndActivityModal" @ok="$refs.table.refresh()" :itemObj="endObj" @close="closeEndActivityModal" ></end-desc-modal>
       <!-- 审核弹窗 -->
       <a-modal
         closable
@@ -248,7 +250,8 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import addModal from './addModal.vue'
-import lookUpCustomersModal from './lookUpCustomersModal' 
+import lookUpCustomersModal from './lookUpCustomersModal'
+import endDescModal from './endDescModal'
 import rangeDate from '@/views/common/rangeDate.vue'
 import creatorList from '@/views/common/creatorList.vue'
 import editActiveEndTime from './editActiveEndTime.vue'
@@ -260,7 +263,7 @@ import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAu
 export default {
   name: 'PromotionManagementList',
   mixins: [commonMixin],
-  components: { STable, supplier, VSelect, rangeDate, warehouse, lookUpCustomersModal, addModal, editActiveEndTime, creatorList, custList },
+  components: { STable, supplier, VSelect, rangeDate, warehouse, lookUpCustomersModal, endDescModal, addModal, editActiveEndTime, creatorList, custList },
   data () {
     this.handleAuditModal = debounce(this.handleAuditModal, 800)
     return {
@@ -319,7 +322,9 @@ export default {
       itemPromotionSn: '',
       itemStatusType: '',
       chooseDealerArr: [], // 所选择经销商列表
-      loadingAudit: false
+      loadingAudit: false,
+      endObj: null, // 终止促销数据
+      openEndActivityModal: false// 打开终止促销弹窗
     }
   },
   methods: {
@@ -465,24 +470,16 @@ export default {
     },
     // 终止
     handleEnd (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确定要终止该促销?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          promotionIsOver({ sn: row.promotionSn }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
-        }
-      })
+      this.endObj = {
+        sn: row.promotionSn,
+        name: row.title,
+        desc: row.desc || undefined
+      }
+      this.openEndActivityModal = true
+    },
+    closeEndActivityModal () {
+      this.openEndActivityModal = false
+      this.endObj = null
     },
     // 关闭采购退货详情弹框
     closeDetailModal () {

+ 3 - 1
src/views/reportData/tireSalesReport/detailList.vue

@@ -334,7 +334,9 @@ export default {
       this.showOutDetail = true
       const titObj = {
         tit: row.dealerEntity.dealerName,
-        code: row.productEntity.code
+        code: row.productEntity.code,
+        origCode: row.productEntity.origCode,
+        size: row.productEntity.size
       }
       this.$nextTick(() => {
         this.$refs.outDetail.getAjaxData(params, titObj)

+ 1 - 1
src/views/reportData/tireSalesReport/outDetailModal.vue

@@ -86,7 +86,7 @@ export default {
     getAjaxData (obj, titObj) {
       this.queryParam = obj
       if (titObj && Object.keys(titObj).length != 0) {
-        this.titleInfo = titObj.tit + '(产品编码:' + titObj.code + ')'
+        this.titleInfo = titObj.tit + '(产品编码:' + titObj.code + ',原厂编码:' + (titObj.origCode || '--') + ',产品尺寸:' + (titObj.size || '--') + ')'
       } else {
         this.titleInfo = '出库明细'
       }