导出表格页面
This commit is contained in:
parent
49cb9c82ba
commit
9746034b71
|
@ -218,12 +218,6 @@
|
|||
icon="el-icon-mouse"
|
||||
@click="handleOpen(scope.row)"
|
||||
>后台</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-mouse"
|
||||
@click="export1(scope.row)"
|
||||
>导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -386,33 +380,12 @@
|
|||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="open1" width="800px" append-to-body>
|
||||
<el-form ref="form1" :model="form1" label-width="150px">
|
||||
<el-form-item label="导出时段" prop="start_time">
|
||||
<el-date-picker
|
||||
v-model="timeRange1"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
:picker-options="pickerOptions"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
align="right">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitExport">确 定</el-button>
|
||||
<el-button @click="cancel1">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import { listStore, changeReturnVisitStatus, getMtUrl, changeSelfDeliveryStatus, getStoreConfig, updateStoreConfig, refresh, getStoreStatistics,nowIntegral,handleExport } from "@/api/business/store";
|
||||
import { listStore, changeReturnVisitStatus, getMtUrl, changeSelfDeliveryStatus, getStoreConfig, updateStoreConfig, refresh, getStoreStatistics,nowIntegral } from "@/api/business/store";
|
||||
import { listSaleA} from "@/api/business/sale";
|
||||
|
||||
export default {
|
||||
|
@ -440,7 +413,6 @@ export default {
|
|||
nowIntegral: 0,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
open1: false,
|
||||
|
||||
// 是否显示弹出层(数据权限)
|
||||
openDataScope: false,
|
||||
|
@ -466,11 +438,7 @@ export default {
|
|||
returnVisitStatus: undefined,
|
||||
selfDeliveryStatus: 1
|
||||
},
|
||||
queryParams1: {
|
||||
id: undefined,
|
||||
expStartTime: undefined,
|
||||
expEndTime: undefined
|
||||
},
|
||||
|
||||
saleList: [],
|
||||
timeRange: ['00:00:00','23:59:59'],
|
||||
timeRange1: undefined,
|
||||
|
@ -492,9 +460,6 @@ export default {
|
|||
timeRange: [
|
||||
{ required: true, message: "运营时间不能为空", trigger: "blur" }
|
||||
],
|
||||
timeRange1: [
|
||||
{ required: true, message: "时间不能为空", trigger: "blur" }
|
||||
],
|
||||
quota: [
|
||||
{ required: true, message: "限额不能为空", trigger: "blur" }
|
||||
]
|
||||
|
@ -593,21 +558,14 @@ export default {
|
|||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
cancel1() {
|
||||
this.open1 = false;
|
||||
this.reset1();
|
||||
},
|
||||
|
||||
// 取消按钮(数据权限)
|
||||
cancelDataScope() {
|
||||
this.openDataScope = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset1() {
|
||||
this.timeRange1 = ['',''];
|
||||
this.form1= {};
|
||||
this.resetForm("form1");
|
||||
},
|
||||
|
||||
reset() {
|
||||
if (this.$refs.menu != undefined) {
|
||||
this.$refs.menu.setCheckedKeys([]);
|
||||
|
@ -686,12 +644,7 @@ export default {
|
|||
}
|
||||
});
|
||||
},
|
||||
export1(row) {
|
||||
this.form1.id = row.id;
|
||||
this.open1 = true;
|
||||
|
||||
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
const data = this.form
|
||||
|
@ -711,24 +664,7 @@ this.form1.id = row.id;
|
|||
}
|
||||
});
|
||||
},
|
||||
submitExport: function() {
|
||||
if(this.timeRange1==undefined || this.timeRange1.length == 0){
|
||||
this.$modal.msgSuccess("请填写时段!");
|
||||
return
|
||||
}
|
||||
this.form1.exportStartTime = this.timeRange1[0]
|
||||
this.form1.exportEndTime = this.timeRange1[1]
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
this.queryParams1.expStartTime = this.form1.exportStartTime;
|
||||
this.queryParams1.expEndTime = this.form1.exportEndTime;
|
||||
this.queryParams1.id = this.form1.id;
|
||||
this.handleExport(this.queryParams1);
|
||||
|
||||
this.cancel1();
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$modal.confirm('是否确认删除解绑编号为"' + row.storeCode + '"的店铺?').then(function() {
|
||||
|
@ -751,12 +687,6 @@ this.form1.id = row.id;
|
|||
|
||||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport(data) {
|
||||
this.download('business/store/export', {
|
||||
...this.queryParams1
|
||||
}, `export_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -198,6 +198,12 @@
|
|||
icon="el-icon-mouse"
|
||||
@click="handleOpen(scope.row)"
|
||||
>设置</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-mouse"
|
||||
@click="export1(scope.row)"
|
||||
>导出</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -339,6 +345,28 @@
|
|||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="open1" width="800px" append-to-body>
|
||||
<el-form ref="form1" :model="form1" label-width="150px">
|
||||
<el-form-item label="导出时段" prop="start_time">
|
||||
<el-date-picker
|
||||
v-model="timeRange1"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="至"
|
||||
:picker-options="pickerOptions"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
align="right">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitExport">确 定</el-button>
|
||||
<el-button @click="cancel1">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -365,6 +393,12 @@ export default {
|
|||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
open1: false,
|
||||
queryParams1: {
|
||||
id: undefined,
|
||||
expStartTime: undefined,
|
||||
expEndTime: undefined
|
||||
},
|
||||
// 店铺表格数据
|
||||
storeList: [],
|
||||
// 弹出层标题
|
||||
|
@ -423,6 +457,9 @@ export default {
|
|||
timeRange: [
|
||||
{ required: true, message: "运营时间不能为空", trigger: "blur" }
|
||||
],
|
||||
timeRange1: [
|
||||
{ required: true, message: "时间不能为空", trigger: "blur" }
|
||||
],
|
||||
quota: [
|
||||
{ required: true, message: "限额不能为空", trigger: "blur" }
|
||||
]
|
||||
|
@ -503,6 +540,15 @@ export default {
|
|||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
cancel1() {
|
||||
this.open1 = false;
|
||||
this.reset1();
|
||||
},
|
||||
reset1() {
|
||||
this.timeRange1 = ['',''];
|
||||
this.form1= {};
|
||||
this.resetForm("form1");
|
||||
},
|
||||
// 取消按钮(数据权限)
|
||||
cancelDataScope() {
|
||||
this.openDataScope = false;
|
||||
|
@ -562,6 +608,28 @@ export default {
|
|||
// this.open = true;
|
||||
// this.title = "添加角色";
|
||||
},
|
||||
export1(row) {
|
||||
this.form1.id = row.id;
|
||||
this.open1 = true;
|
||||
},
|
||||
submitExport: function() {
|
||||
if(this.timeRange1==undefined || this.timeRange1.length == 0){
|
||||
this.$modal.msgSuccess("请填写时段!");
|
||||
return
|
||||
}
|
||||
this.form1.exportStartTime = this.timeRange1[0]
|
||||
this.form1.exportEndTime = this.timeRange1[1]
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
this.queryParams1.expStartTime = this.form1.exportStartTime;
|
||||
this.queryParams1.expEndTime = this.form1.exportEndTime;
|
||||
this.queryParams1.id = this.form1.id;
|
||||
this.handleExport(this.queryParams1);
|
||||
|
||||
this.cancel1();
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
|
@ -619,10 +687,10 @@ export default {
|
|||
});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
handleExport(data) {
|
||||
this.download('business/store/export', {
|
||||
...this.queryParams
|
||||
}, `role_${new Date().getTime()}.xlsx`)
|
||||
...this.queryParams1
|
||||
}, `export_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue