瀏覽代碼

钉钉审批+促销活动bug

chenrui 7 月之前
父節點
當前提交
1207643364

+ 2 - 2
src/views/easyPassManagement/promotionalActivities/addPromotionModal.vue

@@ -218,7 +218,7 @@ export default {
     // 参与经销商 change
     changeDealerScope (val) {
       const _this = this
-      if (_this.typeVal === 'edit') {
+      if (_this.itemSn && _this.itemSn.length > 0) {
         if (_this.chooseProductNum > 0) {
           _this.$confirm({
             title: '提示',
@@ -254,7 +254,7 @@ export default {
     // 部分经销商  选择经销商成功
     addDealerOk (list) {
       const _this = this
-      if (_this.typeVal === 'edit') {
+      if (_this.itemSn && _this.itemSn.length > 0) {
         const hasEq = list.filter(item => !this.chooseDealerList.map(k => k.dealerSn).includes(item.dealerSn))
         if (hasEq.length > 0 && _this.chooseProductNum > 0) {
           _this.$confirm({

+ 30 - 12
src/views/easyPassManagement/promotionalActivities/edit.vue

@@ -25,20 +25,19 @@
         <div v-if="form">
           <a-descriptions :column="{ xs: 2, sm: 3, md: 3}">
             <a-descriptions-item label="促销名称">{{ form.promoName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="促销类型">{{ form.promoTypeDictValue || '--' }}</a-descriptions-item>
             <a-descriptions-item label="促销时间">
               {{ form.promoStartDate }}{{ form.promoStartDate?' ~ ':'' }}{{ form.promoEndDate }}
             </a-descriptions-item>
             <a-descriptions-item label="排序">{{ form.sort || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="加盟商开关权限">{{ form.dealerOpenFlag=='0'?'否':'是' }}</a-descriptions-item>
             <a-descriptions-item span="3" label="参与经销商" v-if="form.allDealerFlag=='1'">全部经销商</a-descriptions-item>
             <a-descriptions-item span="3" label="参与经销商" v-else>
               <span v-if="!form.shopPromoDealerList||(form.shopPromoDealerList&&form.shopPromoDealerList.length==0)">--</span>
-              <a-tag v-else v-for="con in form.shopPromoDealerList" :id="'promotionEdit-dealerSn'+con.dealerSn" :key="con.dealerSn">
-                {{ con.dealerName }}
-              </a-tag>
+              <div v-else @click="handleSee">共<span class="link-bule">{{ form.shopPromoDealerList.length }}</span>个</div>
             </a-descriptions-item>
-            <a-descriptions-item span="3" label="封面图片"><img :src="form.imageUrl" alt="图片走丢了" width="60" height="60" /></a-descriptions-item>
+            <a-descriptions-item span="3" label="封面图片"><img @click="handleCheckImg" :src="form.imageUrl" alt="图片走丢了" width="60" height="60" /></a-descriptions-item>
             <a-descriptions-item span="3" label="促销描述">{{ form.description || '--' }}</a-descriptions-item>
-            <a-descriptions-item label="加盟商开关权限">{{ form.dealerOpenFlag=='0'?'否':'是' }}</a-descriptions-item>
           </a-descriptions>
         </div>
       </a-card>
@@ -232,20 +231,20 @@
         style="padding: 0 60px;">保存</a-button>
     </div>
     <!-- 添加产品 -->
-    <chooseProduct
-      ref="chooseProduct"
-      :openModal="showProModal"
-      @ok="addProductSuccess"
-      @close="closeProductModal"></chooseProduct>
+    <chooseProduct ref="chooseProduct" :openModal="showProModal" @ok="addProductSuccess" @close="closeProductModal"></chooseProduct>
     <!--编辑  促销活动  基础信息    -->
     <add-promotion-modal
       ref="promotionAddModal"
       :openModal="openAddModal"
-      typeVal="edit"
+      :typeVal="form.promoType"
       :chooseProductNum="form.productNum"
       :itemSn="$route.params.sn"
       @close="openAddModal=false"
       @ok="promotionAddOk" ></add-promotion-modal>
+    <!-- 参与经销商 -->
+    <lookUp-customers-modal ref="lookUpCustomers" :openModal="openCustomerModal" @close="openCustomerModal = false"></lookUp-customers-modal>
+    <!-- 封面展示 -->
+    <imgShowModal v-drag ref="checkedImg" :openModal="openCheckedImgModal" @close="openCheckedImgModal=false"></imgShowModal>
   </div>
 </template>
 
@@ -258,12 +257,14 @@ import Editor from '@/components/WEeditor'
 import productTable from './productTable'
 import chooseProduct from './chooseProductsModal.vue'
 import addPromotionModal from './addPromotionModal'
+import lookUpCustomersModal from './lookUpCustomersModal'
+import imgShowModal from '@/views/easyPassManagement/shoppingManagement/imgShowModal'
 // 接口
 import { saveChooseProduct, saveShopPromo, shopPromoDetail } from '@/api/shopPromo'
 export default {
   name: 'ProductBrandEditModal',
   mixins: [commonMixin],
-  components: { VSelect, Upload, Editor, productTable, chooseProduct, addPromotionModal },
+  components: { VSelect, Upload, Editor, productTable, chooseProduct, addPromotionModal, lookUpCustomersModal, imgShowModal },
   data () {
     return {
       spinning: false,
@@ -277,6 +278,7 @@ export default {
       pageType: undefined, // 促销类型
       showDetail: true, // 是否显示基础信息
       openAddModal: false, // 基础信息编辑弹窗
+      openCheckedImgModal: false, // 查看图片弹窗
       // 链接配置内容
       form: {
         promoType: undefined, // 促销类型
@@ -309,6 +311,7 @@ export default {
       timeLimit: [], // 有效期
       promotionName: '', // 促销名称
       showProModal: false, // 打开产品弹窗
+      openCustomerModal: false, // 打开参与经销商弹窗
       // 表单验证规则
       rules: {
         rangeList: [{ required: true, message: '请选择促销产品', trigger: 'change' }],
@@ -321,6 +324,21 @@ export default {
     }
   },
   methods: {
+    // 查看封面图片
+    handleCheckImg () {
+      this.openCheckedImgModal = true
+      const _this = this
+      _this.$nextTick(() => {
+        _this.$refs.checkedImg.pageInit(this.form.imageUrl)
+      })
+    },
+    // 查看参与经销商
+    handleSee () {
+      this.openCustomerModal = true
+      this.$nextTick(() => {
+        this.$refs.lookUpCustomers.pageInit({ dealerSnList: this.form.dealerSnList || undefined })
+      })
+    },
     // 编辑
     handleEdit () {
       this.openAddModal = true

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

@@ -270,7 +270,7 @@ export default {
     handleCustomers (row) {
       this.openCustomerModal = true
       this.$nextTick(() => {
-        this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList ? row.dealerSnList : undefined, promoSn: row.promoSn })
+        this.$refs.lookUpCustomers.pageInit({ dealerSnList: row.dealerSnList ? row.dealerSnList : undefined })
       })
     },
     //

+ 37 - 7
src/views/easyPassManagement/promotionalActivities/lookUpCustomersModal.vue

@@ -57,9 +57,35 @@
           :rowClassName="(record, index) => record.checkProfitLossQty < 0 ? 'redBg-row':''"
           bordered>
           <!-- 地区 -->
-          <template slot="address" slot-scope="text, record">
-            <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">{{ record.dealerEntity.provinceName }}/{{ record.dealerEntity.cityName }}/{{ record.dealerEntity.districtName }}</span>
-            <span v-else>--</span>
+          <template slot="address" slot-scope="text, record" >
+            <div v-if="queryParam.bannerSn">
+              <span v-if="record.dealerEntity&&record.dealerEntity.provinceName">{{ record.dealerEntity.provinceName }}/{{ record.dealerEntity.cityName }}/{{ record.dealerEntity.districtName }}</span>
+              <span v-else>--</span>
+            </div>
+            <div v-else>
+              <span v-if="record.provinceName">{{ record.provinceName }}/{{ record.cityName }}/{{ record.districtName }}</span>
+              <span v-else>--</span>
+            </div>
+          </template>
+          <!-- 商户类型 -->
+          <template slot="businessType" slot-scope="text, record" >
+            <div v-if="queryParam.bannerSn">
+              <span v-if="record.dealerEntity&&record.dealerEntity.dealerTypeDictValue">{{ record.dealerEntity.dealerTypeDictValue }}</span>
+              <span v-else>--</span>
+            </div>
+            <div v-else>
+              {{ record.dealerTypeDictValue||'--' }}
+            </div>
+          </template>
+          <!-- 商户级别 -->
+          <template slot="businessLevel" slot-scope="text, record" >
+            <div v-if="queryParam.bannerSn">
+              <span v-if="record.dealerEntity&&record.dealerEntity.dealerLevelDictValue">{{ record.dealerEntity.dealerLevelDictValue }}</span>
+              <span v-else>--</span>
+            </div>
+            <div v-else>
+              {{ record.dealerLevelDictValue||'--' }}
+            </div>
           </template>
         </s-table>
       </a-card>
@@ -81,6 +107,7 @@ import AreaList from '@/views/common/areaList.js'
 // 接口
 import { dealerExport } from '@/api/promoTerminal'
 import { shopBannerSeeDealer, shopBannerExport } from '@/api/shopBanner'
+import { queryDealerPageList } from '@/api/dealer'
 export default {
   name: 'LookUpCustomersModal',
   components: { STable, ProductType, subarea, AreaList },
@@ -116,7 +143,8 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
-        return shopBannerSeeDealer(params).then(res => {
+        const ajaxName = this.queryParam.bannerSn ? shopBannerSeeDealer : queryDealerPageList
+        return ajaxName(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -137,8 +165,8 @@ export default {
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '经销商名称', dataIndex: 'dealerName', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商户类型', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerEntity.dealerTypeDictValue', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '商户类型', scopedSlots: { customRender: 'businessType' }, width: '15%', align: 'center' },
+        { title: '商户级别', scopedSlots: { customRender: 'businessLevel' }, width: '15%', align: 'center' }
       ]
     }
   },
@@ -181,7 +209,9 @@ export default {
       const _this = this
       _this.exportLoading = true
       _this.spinning = true
-      hdExportExcel(shopBannerExport, _this.queryParam, '首页轮播图参与经销商列表导出', function () {
+      const ajaxExportName = this.queryParam.bannerSn ? shopBannerExport : dealerExport
+      const exportName = this.queryParam.bannerSn ? '首页轮播图参与经销商列表导出' : '促销活动参与经销商列表导出'
+      hdExportExcel(ajaxExportName, _this.queryParam, exportName, function () {
         _this.exportLoading = false
         _this.spinning = false
         _this.showExport = true

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -113,7 +113,7 @@
                 <td style="padding:5px 0;">{{ spitem.processTaskType||'' }}</td>
                 <td style="padding:5px 0;">{{ spitem.approvalStateDictValue||'' }}</td>
                 <td style="padding:5px 0;">{{ spitem.approvalOpinion||'' }}</td>
-                <td style="padding:5px 0;">{{ spitem.attachmentNames!= '0' ? '请在钉钉中查看附件内容' : '--' }}</td>
+                <td style="padding:5px 0;">{{ spitem.attachmentNames|| '--' }}</td>
                 <td style="padding:5px 0;">{{ spitem.approvalTime||'' }}</td>
               </tr></tbody>
           </table>

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/verifyModal.vue

@@ -54,7 +54,7 @@ export default {
         { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 1 - 1
src/views/financialManagement/financialCollection/verifyModal.vue

@@ -54,7 +54,7 @@ export default {
         { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 1 - 1
src/views/purchasingManagement/purchaseReturn/reviewProgressModal.vue

@@ -59,7 +59,7 @@ export default {
         { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 1 - 1
src/views/salesReturnManagement/billOfLading/detail.vue

@@ -214,7 +214,7 @@ export default {
         { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 1 - 1
src/views/salesReturnManagement/billOfLading/verifyModal.vue

@@ -54,7 +54,7 @@ export default {
         { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {

+ 1 - 1
src/views/salesReturnManagement/salesReturn/auditDetail.vue

@@ -48,7 +48,7 @@ export default {
         { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
       list: []
     }