| | |
| | | <view class="container"> |
| | | <view style="height: 16rpx;"></view> |
| | | <view class="card" v-for="(item,index) in form"> |
| | | <view class="card-select" v-show="item.inputType != 'table'" style="width: 100%;"> |
| | | <view class="card-select" v-show="item.inputType != 'table' && !item.hide" style="width: 100%;"> |
| | | <view class="flex"> |
| | | <view class="card-required" v-show="item.required">*</view> |
| | | <view >{{item.name}}</view> |
| | |
| | | ], |
| | | radiovalue2: '', |
| | | form: [ |
| | | {name: '项目名',placeholder: '请选择',inputType: 'chose',type: 'orderId',value: '',submitVal: ''}, |
| | | {name: '项目名',placeholder: '请选择',inputType: 'chose',type: 'orderId',value: '',submitVal: '',hide: true}, |
| | | {name: '报销类型',placeholder: '请选择',required:true,inputType: 'select',type: 'reimburseId',value: '',submitVal: ''}, |
| | | {name: '是否冲账',placeholder: '请选择',required:true,inputType: 'select',type: 'checkData',value: '',submitVal: ''}, |
| | | {name: '报销明细',placeholder: '请选择',inputType: 'table'} |
| | |
| | | dataRule: [ |
| | | {occupation: ''} |
| | | ], |
| | | reimburseId2: 0, |
| | | reimburseId: false, |
| | | reimburseIds: [['项目未完成','项目已完成在质保期内','非项目型报销','其他']], |
| | | checkData: 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]) { |
| | | if (_this.reimburseIds[0][k] == data.detl.list.templateName) { |
| | | _this.form[1].submitVal = k |
| | |
| | | |
| | | ] |
| | | } |
| | | |
| | | for (let element of this.orderIdList) { |
| | | if(element.value == this.orderId) { |
| | | param.orderId = element.id + '' |
| | |
| | | param.checkData = k.value |
| | | } |
| | | } |
| | | param.reimburseId = this.reimburseId2 |
| | | param.reimburseOnlineDetls = this.tableData |
| | | if (param.reimburseId == null || param.reimburseId === '') { |
| | | uni.showToast({title: '报销类型不能为空', icon: "none", position: 'top'}) |
| | | return |
| | | } |
| | | // 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 |
| | |
| | | uni.showToast({title: '请添加报销明细', icon: "none", position: 'top'}) |
| | | return |
| | | } |
| | | console.log(this.fixtype); |
| | | console.log(param); |
| | | if (this.fixtype == 'add') { |
| | | this.formAdd(param) |
| | | } else { |
| | |
| | | data: JSON.stringify(param), |
| | | method: 'POST', |
| | | success(res) { |
| | | console.log(res); |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack({}) |