| | |
| | | |
| | | <view class="floor"> |
| | | <view class="wran">删除</view> |
| | | <view class="default">修改</view> |
| | | <view class="primary" @click="submit()">申请报销</view> |
| | | <view class="default" v-show="settle == 1">修改</view> |
| | | <view class="primary" @click="submit()">{{subTitle}}</view> |
| | | </view> |
| | | </view> |
| | | </template> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | settle: 1, |
| | | subTitle: '申请报销', |
| | | list: [{ |
| | | businessTripReasons: '沟通立库事宜', |
| | | businessTransportation$: '交通工具', |
| | |
| | | }, |
| | | { |
| | | label: "结束日期", |
| | | attribute: "businessStartTimeDay$", |
| | | attribute: "businessEndTimeDay$", |
| | | }, |
| | | |
| | | { |
| | | label: "出差时长", |
| | | attribute: "businessStartTimeDay$", |
| | | attribute: "businessDuration$", |
| | | }, |
| | | { |
| | | label: "出差天数", |
| | | attribute: "businessEndTimeDay$", |
| | | attribute: "businessTripDays$", |
| | | }, |
| | | { |
| | | label: "同行人", |
| | |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('busunessDetl', function(data) { |
| | | _this.list.push(data.data) |
| | | _this.settle = data.data.settle |
| | | if (data.data.settle == 1) { |
| | | _this.subTitle = '审批' |
| | | } |
| | | console.log(data) |
| | | }) |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | if (this.settle == 1) { |
| | | this.approval() |
| | | } else { |
| | | |
| | | } |
| | | }, |
| | | // 审批 |
| | | approval() { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/businessTrip/approval/auth`, |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8' |
| | | }, |
| | | method: 'POST', |
| | | sslVerify: false, |
| | | data: {planId: _this.list[0].id}, |
| | | success(res) { |
| | | res = res.data |
| | | // console.log(res); |
| | | if (res.code === 200) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | setTimeout(()=>{ |
| | | uni.navigateBack({}) |
| | | },1000) |
| | | } else if (res.code === 500) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // 申请报销 |
| | | reimburse() { |
| | | |
| | | }, |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | |
| | | |
| | | </view> |
| | | |
| | | <u-picker :show="reimburseId" :columns="reimburseIds" @confirm="reimburseIdConfirm"></u-picker> |
| | | <u-picker :show="checkData" :columns="checkDatas" @confirm="checkDataConfirm"></u-picker> |
| | | <u-picker :show="reimburseId" :columns="reimburseIds" @confirm="reimburseIdConfirm" @cancel="cancel"></u-picker> |
| | | <u-picker :show="checkData" :columns="checkDatas" @confirm="checkDataConfirm" @cancel="cancel"></u-picker> |
| | | |
| | | <view> |
| | | <!-- 普通弹窗 --> |
| | |
| | | updateTime: '', |
| | | updateUserName: '' |
| | | }, |
| | | type: 'modi' |
| | | } |
| | | }, |
| | | onLoad(option) { |
| | | let _this = this |
| | | this.getOrderId('') |
| | | _this.list = [] |
| | | const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.on('reimburseOnlineDetl', function(data) { |
| | | if (data.data == 'add') { |
| | | _this.title = '添加报销审批' |
| | | _this.type = 'add' |
| | | } |
| | | if (data.data == 'modi') { |
| | | // _this.title = '添加报销审批' |
| | | _this.form[1].value = data.detl.list.templateName |
| | | for (let k in _this.reimburseIds[0]) { |
| | | if (_this.reimburseIds[0][k] == data.detl.list.templateName) { |
| | | _this.form[1].submitVal = k |
| | | } |
| | | } |
| | | _this.form[2].value = data.detl.list.checkData |
| | | _this.form[0].value = data.detl.list.name$ |
| | | _this.getOrderId(data.detl.list.name$) |
| | | _this.tableData = data.detl.list.detl |
| | | } |
| | | }) |
| | | this.getOrderId('') |
| | | |
| | | }, |
| | | methods: { |
| | | addDetl(type) { |
| | |
| | | } |
| | | }, |
| | | getOrderId(condition) { |
| | | console.log(condition); |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/orderQueryName/auth`, |
| | |
| | | uni.showToast({title: '请添加报销明细', icon: "none", position: 'top'}) |
| | | return |
| | | } |
| | | this.formAdd(param) |
| | | if (this.type == 'add') { |
| | | this.formAdd(param) |
| | | } else { |
| | | this.formModi(param) |
| | | } |
| | | |
| | | }, |
| | | formAdd(param) { |
| | | let _this = this |
| | |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | uni.navigateBack({}) |
| | | } else if(res.code === 500) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | formModi(param) { |
| | | let _this = this |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/reimburseOnline/from/modify/auth`, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: JSON.stringify(param), |
| | | method: 'POST', |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | uni.navigateBack({}) |
| | | } else if(res.code === 500) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | }, |
| | | cancel() { |
| | | this.reimburseId = false |
| | | this.checkData = false |
| | | }, |
| | | back() { |
| | | uni.navigateBack({}) |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | goDetl(e) { |
| | | console.log(e); |
| | | // console.log(e); |
| | | uni.navigateTo({ |
| | | url: '/pages/business/goBusiness/reimburseOnlineDetl', |
| | | success: function(res) { |
| | |
| | | } |
| | | } |
| | | _this.list = res.data.records |
| | | console.log(_this.list); |
| | | // console.log(_this.list); |
| | | } |
| | | // _this.list = |
| | | } |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <view style="height: 70rpx;"> |
| | | <view style="height: 100rpx;"> |
| | | |
| | | </view> |
| | | |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | // 审批 |
| | | submit() { |
| | | let _this = this,param = {planld: 13} |
| | | |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/reimburseOnline/approval2/auth`, |
| | | header: { |
| | | 'token': uni.getStorageSync('token'), |
| | | 'content-type': 'application/x-www-form-urlencoded;charset=UTF-8' |
| | | }, |
| | | method: 'POST', |
| | | sslVerify: false, |
| | | data: { planId: 13 }, |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |
| | | |
| | | } else if (res.code === 500) { |
| | | uni.showToast({title: res.msg, icon: "none", position: 'top'}) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | getSetps(id) { |
| | | let _this = this |
| | | uni.request({ |
| | |
| | | }) |
| | | }, |
| | | modiReimburse() { |
| | | let _this = this |
| | | _this.list[0]['detl'] = _this.onlineDetl |
| | | uni.navigateTo({ |
| | | url: '/pages/business/goBusiness/modiReimburseOnlineDetl' |
| | | url: '/pages/business/goBusiness/modiReimburseOnlineDetl', |
| | | success: function(res) { |
| | | res.eventChannel.emit('reimburseOnlineDetl', { |
| | | data: 'modi', |
| | | detl: {list: _this.list[0]} |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | back() { |