pengyh hai 1 ano
pai
achega
79bd683f3a

+ 4 - 4
src/api/activityOrder.js

@@ -10,11 +10,11 @@ export function listPageV2(data) {
 }
 
 //导出
-export function pageExport(data, name) {
-  return postBlob({
+export function pageExport(params) {
+  return request({
     url: '/promotion/activity/export',
-    data,
-    name
+	method: 'get',
+    params
   })
 }
 

+ 9 - 3
src/views/mallManagement/activityOrder/detail.vue

@@ -98,7 +98,7 @@
 			        v-for="(it, idx) in item.answer"
 			        :key="idx"
 			        @click="clickOption(index, idx)">
-			        <el-image class="image" :src="it.option_files[0].url" mode="aspectFill"></el-image>
+			        <el-image class="image" :src="returnUrl(it)" mode="aspectFill"></el-image>
 			        <div class="text">{{it.option_value}}</div>
 			      </div>
 			    </div>
@@ -115,7 +115,7 @@
 			  </div>
 			  <div class="input-container" v-else-if="item.type == 3">
 			    <div class="label"><span v-if="item.isRequire">*</span>{{item.question}}</div>
-				<el-input type="text" v-model="item.inputValue" :maxlength="item.answer[0].option_limit" :disabled="formType!=0" :placeholder="`请输入${item.question}`"></el-input>
+				<el-input type="text" v-model="item.inputValue" show-word-limit :maxlength="item.answer[0].option_limit" :disabled="formType!=0" :placeholder="`请输入${item.question}`"></el-input>
 			  </div>
 			  <div class="input-container" v-else>
 			    <div class="label"><span v-if="item.isRequire">*</span>{{item.question}}</div><br/>
@@ -218,7 +218,13 @@
 				}
 			};
 		},
-		computed: {},
+		computed: {
+			returnUrl(){
+				return function(it){
+					return it.option_files.length > 0?it.option_files[0].url:''
+				}
+			}
+		},
 		created() {
 			if(this.id){
 				this.getDetail()

+ 73 - 4
src/views/mallManagement/activityOrder/index.vue

@@ -2,7 +2,7 @@
 	<div class="page">
 		<template-page v-if="!formDialog" ref="pageRef" :get-list="getList" :table-attributes="tableAttributes"
 			:table-events="tableEvents" :operationColumnWidth="80" :options-evens-group="optionsEvensGroup"
-			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()" :exportList="exportList">
+			:moreParameters="moreParameters" :column-parsing="columnParsing" :operation="operation()">
 			<div slot="moreSearch">
 				<el-radio-group v-model="status" size="mini" @change="changeType">
 					<el-radio-button label="ING">继续跟进</el-radio-button>
@@ -15,7 +15,7 @@
 		<div class="detail" v-if="formDialog">
 			<detail :id="id" :activeId="activeId" @back="backList" :formType="formDialogType" :title="'活动单' + formDialogTitles[formDialogType]"></detail>
 		</div>
-		<!-- 选择商品 -->
+		<!-- 批量跟进 -->
 		<el-dialog title="批量跟进" :visible.sync="isShow" width="50%" :close-on-click-modal="false" :modal-append-to-body="false" @close="formData = {status: 'END',remark: ''}">
 			<el-form ref="formData" :model="formData" label-width="110px" size="small" label-position="left">
 				<el-row :gutter="20" justify="start">
@@ -39,6 +39,29 @@
 				<el-button size="mini" @click="formConfirm()" type="primary">确定</el-button>
 			</div>
 		</el-dialog>
+		<!-- 导出 -->
+		<el-dialog title="选择导出日期" :visible.sync="isShowDate" width="50%" :close-on-click-modal="false" :modal-append-to-body="false" @close="formData1.date = []">
+			<el-form ref="formData1" :model="formData1" label-width="110px" size="small" label-position="left">
+				<el-row :gutter="20" justify="start">
+					<el-col :span="24">
+						<el-form-item label="提交日期范围" prop="date" :rules="[{ required: true, message: `请选择日期`, trigger: 'change' }]">
+							<el-date-picker
+							      v-model="formData1.date"
+							      type="daterange"
+								  value-format="yyyy-MM-dd"
+							      range-separator="至"
+							      start-placeholder="开始日期"
+							      end-placeholder="结束日期">
+							</el-date-picker>
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<div class="footer">
+				<el-button size="mini" @click="isShowDate = false">取消</el-button>
+				<el-button size="mini" @click="formConfirm1()" type="primary">确定</el-button>
+			</div>
+		</el-dialog>
 	</div>
 </template>
 
@@ -77,9 +100,13 @@ export default {
 			activeId: '',
 			promotion_questionnaire_id: '',
 			isShow: false,
+			isShowDate: false,
 			formData: {
 				status: 'END',
 				remark: ''
+			},
+			formData1: {
+				date: []
 			}
 		}
 	},
@@ -101,6 +128,13 @@ export default {
 						}),
 					]
 				],
+				[
+					[
+						this.optionsEvensAuth("exp", {
+							click: this.openDate
+						}),
+					]
+				],
 			]
 		},
 		// 更多参数
@@ -137,9 +171,27 @@ export default {
 			}
 		},
 		// 列表导出函数
-		exportList: pageExport,
+		// exportList: pageExport,
 		// 表格列解析渲染数据更改
 		columnParsing(item, defaultData) {
+			if (item.jname === 'startTime') {
+				defaultData.render = (h, { row, index, column }) => {
+					return (
+						<div style="padding:0 6px;cursor: pointer;">
+							{row.startTime.substring(0,10)}
+						</div>
+					)
+				}
+			}
+			if (item.jname === 'endTime') {
+				defaultData.render = (h, { row, index, column }) => {
+					return (
+						<div style="padding:0 6px;cursor: pointer;">
+							{row.endTime.substring(0,10)}
+						</div>
+					)
+				}
+			}
 			return defaultData
 		},
 		selectable(row, index) {
@@ -149,7 +201,9 @@ export default {
 		selectionChange(data) {
 			this.recordSelected = data
 		},
-
+		openDate(){
+			this.isShowDate = true
+		},
 		operation() {
 			return this.operationBtn({
 				followUp: {
@@ -208,6 +262,21 @@ export default {
 				}
 			})	
 		},
+		//确认导出
+		formConfirm1() {
+			this.$refs.formData1.validate((valid, invalidFields, errLabels) => {
+				if (valid) {
+					pageExport({
+						statDate: this.formData1.date[0] + ' 00:00:00',
+						endDate: this.formData1.date[1] + ' 23:59:59'
+					}).then(res => {
+						this.isShowDate = false
+						this.$refs?.formData1?.resetFields()
+						this.$message({ type: 'success', message: '导出成功!' })
+					})
+				}
+			})	
+		},
 	}
 }
 </script>