Commit b8fba10e by zhangxw

员工导入导出修改

1 parent f28d57d2
......@@ -310,7 +310,7 @@ export default {
let routerQuery = this.routerQuery
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)
this.staffList = res?.list || []
})
......
......@@ -102,21 +102,23 @@
:is-visible="exportFileVisible"
@closeDialog="handleExport"
@confirmDialog="handleConfirmExport"
width="480px">
width="580px">
<slot>
<el-form :model="exportFileForm"
ref="exportFileRuleForm"
label-width="140px">
label-width="140px"
:rules="exportFormRules">
<el-form-item label="选择导出月份:" prop="exportMonth">
<el-date-picker
v-model="exportFileForm.exportMonth"
class="wid_280"
type="month"
placeholder="选择月"
:picker-options="beforeRangePickerOptions">
</el-date-picker>
</el-form-item>
<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-select>
</el-form-item>
......@@ -158,6 +160,9 @@ export default {
exportYqMerchantId: [],
exportMonth: ''
},
exportFormRules: {
exportMonth: [{ required: true, message: '请选择导出月份', trigger: 'blur' }]
},
fileRules: {
fileName: [{ required: true, message: '请上传文件', trigger: 'change' }]
},
......@@ -380,22 +385,31 @@ export default {
this.$refs.exportFileRuleForm && this.$refs.exportFileRuleForm.resetFields()
},
handleConfirmExport() {
var params = {
yqMerchantIds: this.exportFileForm?.exportYqMerchantId,
dataMonthStr: this.exportFileForm?.exportMonth ? Util.dateFormate(this.exportFileForm?.exportMonth, 'YYYY-MM') : '',
sceneType: this.sceneType
}
params.method = 'dj.api.businessSchool.staff.exportAsync'
const list = [
...this.dowloadList,
{
name: '',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
this.$refs['exportFileRuleForm'].validate(valid => {
if (valid) {
var params = {
dataMonthStr: this.exportFileForm?.exportMonth ? Util.dateFormate(this.exportFileForm?.exportMonth, 'YYYY-MM') : '',
sceneType: this.sceneType
}
this.exportFileForm?.exportYqMerchantId?.forEach((val, index) => {
let merchantId = `yqMerchantIds[${index}]`
params[merchantId] = val
})
params.method = 'dj.api.businessSchool.staff.exportAsync'
const list = [
...this.dowloadList,
{
name: '',
exportParam: JSON.stringify(params),
status: 'waiting',
timeid: new Date().getTime()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
this.handleExport()
}
]
this.actionSetDownloadList({ list, type: 'dowloadList' })
})
},
// 绩效配置
handlePerformance(row) {
......@@ -510,7 +524,7 @@ export default {
text-overflow: ellipsis;
white-space: nowrap;
}
::v-deep .merchant-select{
width: 220px;
::v-deep .wid_280{
width: 280px !important;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!