代码优化
This commit is contained in:
parent
e36dd31294
commit
5c3775bab3
|
|
@ -8,19 +8,18 @@
|
|||
:before-close="handleCloseDialog"
|
||||
width="30%"
|
||||
>
|
||||
<el-form :model="exportParams" label-width="120px">
|
||||
<el-form-item label="导出月份">
|
||||
<el-form :model="exportParams" label-width="120px" :rules="rules">
|
||||
<!-- <el-form-item label="导出月份">
|
||||
<el-date-picker
|
||||
v-model="exportParams.dateMonth"
|
||||
type="month"
|
||||
placeholder="请选择导出月份"
|
||||
value-format="yyyy-MM"
|
||||
/>
|
||||
<!-- 根据后台参数要求,是传递月份数字,还是 XXXX - XX 日期格式 -->
|
||||
<!-- value-format 可设置 M 或 yyyy-M-->
|
||||
</el-form-item>
|
||||
<el-form-item label="费用承担方">
|
||||
<el-checkbox-group v-model="exportParams.costBear">
|
||||
|
||||
</el-form-item> -->
|
||||
<el-form-item label="费用承担方" prop="costBearingParty">
|
||||
<el-checkbox-group v-model="exportParams.costBearingParty">
|
||||
<el-checkbox label="01" name="01" />
|
||||
<el-checkbox label="03" name="03" />
|
||||
</el-checkbox-group>
|
||||
|
|
@ -52,7 +51,12 @@ export default {
|
|||
return {
|
||||
exportParams: {
|
||||
dateMonth: '',
|
||||
costBear: ['01', '03'],
|
||||
costBearingParty: ['01', '03'],
|
||||
},
|
||||
rules: {
|
||||
costBearingParty: [
|
||||
{ required: true, message: '请选择费用承担方' },
|
||||
],
|
||||
},
|
||||
}
|
||||
},
|
||||
|
|
@ -63,7 +67,11 @@ export default {
|
|||
},
|
||||
/** 确定 */
|
||||
handleSubmit() {
|
||||
this.$emit('handleSubmit', this.exportParams)
|
||||
this.refs.formRef.validate((valid) => {
|
||||
if (valid) {
|
||||
this.$emit('handleSubmit', this.exportParams)
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
|
|
|
|||
|
|
@ -277,7 +277,7 @@ export default {
|
|||
return
|
||||
} else if (!row && this.selectList.length > 0) {
|
||||
this.selectList.map((e) => {
|
||||
exportList[0].codeNum += e.codeNum + ','
|
||||
exportList[0].codeNum += e.codeNum + ','
|
||||
})
|
||||
exportList[0].codeNum = exportList[0].codeNum.slice(0, -1)
|
||||
} else {
|
||||
|
|
|
|||
Reference in New Issue