| | |
| | | updateTime: '', |
| | | updateUserName: '' |
| | | }, |
| | | fixtype: 'modi' |
| | | fixtype: 'modi', |
| | | businessId: 0 |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | |
| | | if (data.data == 'add') { |
| | | _this.title = '添加报销审批' |
| | | _this.fixtype = 'add' |
| | | _this.form[0].hide = false |
| | | } |
| | | if (data.data == 'modi') { |
| | | // _this.title = '添加报销审批' |
| | | _this.form[1].value = data.detl.list.templateName |
| | | _this.reimburseId2 = data.detl.list.id |
| | | for (let k in _this.reimburseIds[0]) { |
| | |
| | | _this.form[0].value = data.detl.list.orderId$ |
| | | _this.getOrderId(data.detl.list.orderId$) |
| | | _this.tableData = data.detl.list.detl |
| | | } |
| | | // 出差申请报销 |
| | | if (data.data == 'add2') { |
| | | _this.title = '添加报销审批' |
| | | _this.fixtype = 'add2' |
| | | _this.businessId = data.detl.id |
| | | } |
| | | }) |
| | | |
| | |
| | | } |
| | | |
| | | for (let element of this.orderIdList) { |
| | | if(element.value == this.orderId) { |
| | | if(element.value == this.form[0].value) { |
| | | param.orderId = element.id + '' |
| | | } |
| | | } |
| | |
| | | } |
| | | param.reimburseId = this.reimburseId2 |
| | | param.reimburseOnlineDetls = this.tableData |
| | | // if (param.reimburseId == null || param.reimburseId === '') { |
| | | // uni.showToast({title: '报销类型不能为空', icon: "none", position: 'top'}) |
| | | // return |
| | | // } |
| | | if (param.checkData == '') { |
| | | uni.showToast({title: '是否冲账不能为空', icon: "none", position: 'top'}) |
| | | return |
| | |
| | | } |
| | | console.log(param); |
| | | if (this.fixtype == 'add') { |
| | | this.formAdd(param) |
| | | } else if (this.fixtype == 'add2') { |
| | | param['businessId'] = this.businessId |
| | | this.formAdd(param) |
| | | } else { |
| | | this.formModi(param) |
| | |
| | | data: JSON.stringify(param), |
| | | method: 'POST', |
| | | success(res) { |
| | | console.log(res); |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack({}) |
| | | uni.navigateBack({delta:2}) |
| | | } else if(res.code === 500) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | } |