Commit b8fba10e by zhangxw

员工导入导出修改

1 parent f28d57d2
...@@ -310,7 +310,7 @@ export default { ...@@ -310,7 +310,7 @@ export default {
let routerQuery = this.routerQuery let routerQuery = this.routerQuery
getNoRelateStaffListApi({ sceneType: this.routerQuery?.sceneType, currentPage: 1, pageSize: 9999 }).then(res => { getNoRelateStaffListApi({ sceneType: this.routerQuery?.sceneType, currentPage: 1, pageSize: 9999 }).then(res => {
// 需过滤当前员工 // 需过滤当前员工
let index = res?.list.findIndex(val => val.staffUuid = routerQuery?.staffUuid) let index = res?.list.findIndex(val => val.staffUuid == routerQuery?.staffUuid)
if (index > -1) res.list?.splice(index, 1) if (index > -1) res.list?.splice(index, 1)
this.staffList = res?.list || [] this.staffList = res?.list || []
}) })
......
...@@ -102,21 +102,23 @@ ...@@ -102,21 +102,23 @@
:is-visible="exportFileVisible" :is-visible="exportFileVisible"
@closeDialog="handleExport" @closeDialog="handleExport"
@confirmDialog="handleConfirmExport" @confirmDialog="handleConfirmExport"
width="480px"> width="580px">
<slot> <slot>
<el-form :model="exportFileForm" <el-form :model="exportFileForm"
ref="exportFileRuleForm" ref="exportFileRuleForm"
label-width="140px"> label-width="140px"
:rules="exportFormRules">
<el-form-item label="选择导出月份:" prop="exportMonth"> <el-form-item label="选择导出月份:" prop="exportMonth">
<el-date-picker <el-date-picker
v-model="exportFileForm.exportMonth" v-model="exportFileForm.exportMonth"
class="wid_280"
type="month" type="month"
placeholder="选择月" placeholder="选择月"
:picker-options="beforeRangePickerOptions"> :picker-options="beforeRangePickerOptions">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="选择园区店:" prop="exportYqMerchantId"> <el-form-item label="选择园区店:" prop="exportYqMerchantId">
<el-select class="merchant-select" v-model="exportFileForm.exportYqMerchantId" multiple collapse-tags clearable> <el-select class="wid_280" v-model="exportFileForm.exportYqMerchantId" multiple collapse-tags filterable clearable>
<el-option v-for="(item, index) in yqMerchantList" :key="index" :label="item.merchantName" :value="item.merchantId"></el-option> <el-option v-for="(item, index) in yqMerchantList" :key="index" :label="item.merchantName" :value="item.merchantId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -158,6 +160,9 @@ export default { ...@@ -158,6 +160,9 @@ export default {
exportYqMerchantId: [], exportYqMerchantId: [],
exportMonth: '' exportMonth: ''
}, },
exportFormRules: {
exportMonth: [{ required: true, message: '请选择导出月份', trigger: 'blur' }]
},
fileRules: { fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }] fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
}, },
...@@ -380,11 +385,16 @@ export default { ...@@ -380,11 +385,16 @@ export default {
this.$refs.exportFileRuleForm && this.$refs.exportFileRuleForm.resetFields() this.$refs.exportFileRuleForm && this.$refs.exportFileRuleForm.resetFields()
}, },
handleConfirmExport() { handleConfirmExport() {
this.$refs['exportFileRuleForm'].validate(valid => {
if (valid) {
var params = { var params = {
yqMerchantIds: this.exportFileForm?.exportYqMerchantId,
dataMonthStr: this.exportFileForm?.exportMonth ? Util.dateFormate(this.exportFileForm?.exportMonth, 'YYYY-MM') : '', dataMonthStr: this.exportFileForm?.exportMonth ? Util.dateFormate(this.exportFileForm?.exportMonth, 'YYYY-MM') : '',
sceneType: this.sceneType sceneType: this.sceneType
} }
this.exportFileForm?.exportYqMerchantId?.forEach((val, index) => {
let merchantId = `yqMerchantIds[${index}]`
params[merchantId] = val
})
params.method = 'dj.api.businessSchool.staff.exportAsync' params.method = 'dj.api.businessSchool.staff.exportAsync'
const list = [ const list = [
...this.dowloadList, ...this.dowloadList,
...@@ -396,6 +406,10 @@ export default { ...@@ -396,6 +406,10 @@ export default {
} }
] ]
this.actionSetDownloadList({ list, type: 'dowloadList' }) this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleExport()
}
})
}, },
// 绩效配置 // 绩效配置
handlePerformance(row) { handlePerformance(row) {
...@@ -510,7 +524,7 @@ export default { ...@@ -510,7 +524,7 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
::v-deep .merchant-select{ ::v-deep .wid_280{
width: 220px; width: 280px !important;
} }
</style> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!