|
@@ -168,17 +168,33 @@ export default {
|
|
|
},
|
|
|
pageInit () {
|
|
|
this.$nextTick(() => {
|
|
|
- this.attachList = []
|
|
|
- this.form.expenseAccountFilesList = ''
|
|
|
- this.$refs.attachList.setFileList('')
|
|
|
- this.$refs.ruleForm.resetFields()
|
|
|
- this.expenseTypes = []
|
|
|
+ this.retsetForm()
|
|
|
if (this.expenseAccountSn) { // 编辑页
|
|
|
this.getDetail()
|
|
|
this.title = '编辑费用报销单'
|
|
|
+ }else{
|
|
|
+ this.title = '新增费用报销单'
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ retsetForm(){
|
|
|
+ this.form = {
|
|
|
+ applyPersonSn: undefined, // 申请人
|
|
|
+ applyDepartmentSn: undefined, // 申请部门
|
|
|
+ expenseType: undefined, // 费用类型1
|
|
|
+ expenseType2: undefined, // 费用类型2
|
|
|
+ expenseTypeName: undefined, // 费用类型1
|
|
|
+ expenseTypeName2: undefined, // 费用类型2
|
|
|
+ expenseDate: moment().locale('zh-cn').format('YYYY-MM'), // 费用产生月
|
|
|
+ title: '', // 主题
|
|
|
+ content: '' // 费用说明
|
|
|
+ }
|
|
|
+ this.attachList = []
|
|
|
+ this.form.expenseAccountFilesList = ''
|
|
|
+ this.$refs.attachList.setFileList('')
|
|
|
+ this.$refs.ruleForm.resetFields()
|
|
|
+ this.expenseTypes = []
|
|
|
+ },
|
|
|
// 申请人员
|
|
|
employeeChange (v, r) {
|
|
|
if (r.departmentSn) {
|
|
@@ -287,6 +303,8 @@ export default {
|
|
|
this.opened = newValue
|
|
|
if (newValue) {
|
|
|
this.pageInit()
|
|
|
+ }else{
|
|
|
+ this.retsetForm()
|
|
|
}
|
|
|
},
|
|
|
itemSn (a, b) {
|