83 lines
2.3 KiB
Vue
83 lines
2.3 KiB
Vue
<template>
|
|
<view class="pad-x50 pad-zy30">
|
|
<view class="disac fon36 pad-sx30">调查情况</view>
|
|
<view class="disjcac">
|
|
<view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;">
|
|
<textarea class="col9 fon30" v-model="findings" style="height: 272rpx;" placeholder="请输入调查结果"></textarea>
|
|
</view>
|
|
</view>
|
|
<view class="disac fon36 pad-sx30">处理结果</view>
|
|
<view class="disjcac">
|
|
<view class="disjbac radius30 width100 pad-sx20 pad-zy30" style="border: 2rpx solid #d9d9d9;box-sizing: border-box;">
|
|
<textarea class="col9 fon30" v-model="results" style="height: 272rpx;" placeholder="请输入处理结果"></textarea>
|
|
</view>
|
|
</view>
|
|
<view class="disjbac mar-s70">
|
|
<view @tap="submitEv(id,0)" class="enter-btn disjcac" style="width: 45%;margin: 0;">立即提交</view>
|
|
<view @tap="submitEv(id,1)" class="enter-btn disjcac" style="width: 45%;margin: 0;color: #000000;background-color: #e5e5e5;border-color: #d9d9d9;">无效</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
findings:'', //调查结果
|
|
results:'', //处理结果
|
|
flag:true,
|
|
id:0, //工单id
|
|
}
|
|
},
|
|
onLoad(op) {
|
|
if(op.id) this.id = op.id;
|
|
},
|
|
methods: {
|
|
// 提交或取消
|
|
submitEv(id,type){
|
|
if(this.checkEmpty() && this.flag){
|
|
this.flag = false;
|
|
let params = {
|
|
opinion_id:id,
|
|
desc:this.findings,
|
|
result:this.results,
|
|
invalid:type
|
|
}
|
|
this.$requst.post('opinion/worker-handle',params).then(res => {
|
|
if(res.code==0){
|
|
this.$toolAll.tools.showToast('提交成功');
|
|
// 返回
|
|
uni.navigateBack({
|
|
delta:2
|
|
})
|
|
} else {
|
|
this.$toolAll.tools.showToast(res.msg);
|
|
}
|
|
uni.hideLoading();
|
|
this.isLoading = true;
|
|
setTimeout(()=>{
|
|
this.flag = true;
|
|
},2000)
|
|
})
|
|
}
|
|
},
|
|
|
|
// 验证表单
|
|
checkEmpty(){
|
|
let result = false;
|
|
if(!this.findings) {
|
|
this.$toolAll.tools.showToast('请填写调查结果');
|
|
} else if(!this.results) {
|
|
this.$toolAll.tools.showToast('请填写处理结果');
|
|
} else {
|
|
result = true;
|
|
}
|
|
return result;
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
</style>
|