| 
					
				 | 
			
			
				@@ -147,7 +147,36 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 新增/编辑弹窗--> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <add-modal v-drag :itemSn="itemSn" :openModal="openModal" @ok="handleOk" @close="openModal=false" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     <!-- 促销时间变更 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <edit-active-end-time v-drag :openModal="editEndModal" @ok="handleEditOk" @close="editEndModal=false" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <edit-active-end-time ref="editTime" v-drag :openModal="editEndModal" @ok="$refs.table.refresh()" @close="editEndModal=false" /> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <!-- 审核弹窗 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <a-modal 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :closable="false" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      v-model="openAuditModal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      :footer="null" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      width="416px" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      centered> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div style="display:flex;margin:30px 0 20px 20px;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-icon type="question-circle" :style="{fontSize:'23px',color:'#faad14'}"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <div style="margin-left:10px;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <p style="font-size:16px;font-wight:bold;">提示</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          <p>请点击下方按钮确认操作?</p> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <!-- 按钮 --> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      <div style="text-align: right;"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          id="auditModal-cancel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          class="button-cancel" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          @click="closeAuditModal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          style="margin-right: 15px;">审核不通过</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        <a-button 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          type="primary" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          id="auditModal-save" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          class="button-primary" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+          @click="handleAuditModal" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        >审核通过</a-button> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      </div> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    </a-modal> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   </a-card> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </template> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -161,7 +190,6 @@ import rangeDate from '@/views/common/rangeDate.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 // import chooseDepartUserModal from './chooseDepartUserModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import editActiveEndTime from './editActiveEndTime.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import reportModal from '@/views/common/reportModal.vue' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { hdExportExcel } from '@/libs/exportExcel' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import supplier from '@/views/common/supplier.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import warehouse from '@/views/common/chooseWarehouse.js' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { dealerPromotionList, dealerPromotionDel, modifyEnabledFlag, promotionAudit, promotionIsOver } from '@/api/promotion' 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -175,10 +203,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       disabled: false, //  查询、重置按钮是否可操作 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       openModal: false, // 新增弹框是否显示 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       openCustomerModal: false, // 参与客户弹窗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      editEndModal: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      editEndModal: false, // 更改促销时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       openDetailModal: false, // 详情弹窗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      showExport: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      exportLoading: false, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       tableHeight: 0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       // 查询参数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       queryParam: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -192,9 +218,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '促销名称', scopedSlots: { customRender: 'promotionName' }, width: '14%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销简称', dataIndex: 'description', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '促销时间', scopedSlots: { customRender: 'promotionTime' }, width: '15%', align: 'center' }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '参与客户', scopedSlots: { customRender: 'joinCustomers' }, width: '12%', align: 'center', ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        { title: '促销描述', dataIndex: 'description', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { title: '促销描述', dataIndex: 'content', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '活动状态', dataIndex: 'stateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '发布状态', scopedSlots: { customRender: 'releaseStatus' }, width: '9%', align: 'center', ellipsis: true }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -217,9 +244,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           return data 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      itemSnSh: null, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       itemSn: null, // 经销商促销活动SN 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      auditTime: null// 审核时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      openAuditModal: false // 审核弹窗 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   methods: { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -232,19 +258,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.beginDate = date[0] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam.endDate = date[1] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    //  导出 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleExport () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      _this.$store.state.app.curActionPermission = 'B_promotionListExport' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      _this.exportLoading = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      hdExportExcel(sparePartsReturnExportDetail, _this.queryParam, '采购退货', function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        _this.exportLoading = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        _this.showExport = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        _this.$store.state.app.curActionPermission = '' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //  新增 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleAdd () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.itemSn = null 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -292,20 +305,14 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 审核 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleCheck (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        title: '提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        content: '请点击下方按钮确认操作?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        cancelText: '审核不通过', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        okText: '审核通过', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        closable: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.handleAudit({ promotionSn: row.promotionSn, auditFlag: 1 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        onCancel (e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.handleAudit({ promotionSn: row.promotionSn, auditFlag: 0 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.itemSn = row.promotionSn 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      _this.openAuditModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleAuditModal () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.handleAudit({ promotionSn: this.itemSn, auditFlag: 1 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    closeAuditModal () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.handleAudit({ promotionSn: this.itemSn, auditFlag: 0 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleAudit (ajaxData) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -314,17 +321,23 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				           _this.$refs.table.refresh() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.itemSn = null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.openAuditModal = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 促销时间变更 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleTime () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    handleTime (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.editEndModal = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      const showData = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sn: row.promotionSn, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        name: row.title, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        timeStart: row.promotionDateStart, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        timeEnd: row.promotionDateEnd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      this.$refs.editTime.setData(showData) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleEditOk () {}, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 终止 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     handleEnd (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       const _this = this 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -346,27 +359,6 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    // 再次提交 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    handleResubmit (row) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      const _this = this 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      this.$confirm({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        title: '操作提示', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        content: '系统将自动生成一个新的采购退货单,新单据中的产品申退数量将以最大可用库存为准,最大可用库存为0时,系统将强制删除已选的对应产品。您可以对新单据进行编辑、提交等操作,原单据保持不变,确认操作吗?', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        centered: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        onOk () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          _this.spinning = true 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          againSubmit({ sparePartsReturnSn: row.sparePartsReturnSn }).then(res => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (res.status == 200) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.$message.success(res.message) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.$refs.table.refresh() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-              _this.spinning = false 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-          }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 关闭采购退货详情弹框 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     closeDetailModal () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.itemSn = null 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -398,10 +390,8 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.queryParam = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         beginDate: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         endDate: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        sparePartsReturnNo: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        supplierSn: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        returnReason: undefined, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        warehouseSn: undefined, // 仓库 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        title: '', 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        publishStatus: undefined, // 发布状态 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         state: undefined 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				       this.$refs.rangeDate.resetDate() 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -451,13 +441,10 @@ export default { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </script> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-<style lang="less"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+<style lang="less" scoped> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   .promotionList-wrap{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     .nameBox{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      padding:0 5px; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    .common{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-      color: rgba(0, 0, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 </style> 
			 |