| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- <template>
- <view>
- <uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="受理巡点检工单" @clickLeft="back"></uni-nav-bar>
- <view class="page-bottom-padding">
- <template v-if="worksheetInfo">
- <CellTip title="基本信息"> </CellTip>
- <DetailMain :detailsInfo="tourTallyDetailFn(worksheetInfo)"></DetailMain>
- </template>
- </view>
- <button class="btn-submit" @click="bindSubmit" :loading="loading">
- 受理
- </button>
- <!-- <view class="btn-submit" @click="bindSubmit">
- 受 理
- </view> -->
- </view>
- </template>
- <script>
- import {
- get,
- postJ
- } from "@/utils/api.js"
- import {
- tourTallyDetailFn
- } from '@/utils/common.js'
- import DetailMain from '@/components/DetailMain.vue'
- import TurnSendList from '@/components/TurnSendList.vue'
- import CellTip from '@/components/CellTip.vue'
- import CellInfo from '@/components/CellInfo.vue'
- export default {
- components: {
- DetailMain,
- TurnSendList,
- CellTip,
- CellInfo
- },
- data() {
- return {
- pageId: '',
- loading: false,
- worksheetInfo: null,
- tourTallyDetailFn,
- executorInfo: null,
- redeployCause: ''
- }
- },
- onLoad(options) {
- this.pageId = options.id;
- this.getInfo();
- },
- methods: {
- getInfo() {
- get(this.apiUrl + "/patrol/order/getDetail/" + this.pageId).then(res => {
- this.worksheetInfo = res.data;
- })
- },
- bindSubmit() {
- this.loading = true
- get(this.apiUrl + "/patrol/order/receiveOrder/" + this.pageId).then(res => {
- uni.showToast({
- title: "受理成功",
- icon: "none"
- })
- setTimeout(() => {
- this.loading = false
- uni.redirectTo({
- url: "../order/order"
- })
- }, 2000)
- })
- // if(!this.executorInfo || !this.executorInfo.executorId){
- // uni.showToast({
- // title:'请选择转派人员',
- // icon:'none'
- // })
- // return
- // }
- // if(!this.redeployCause){
- // uni.showToast({
- // title:'请输入转派原因',
- // icon:'none'
- // })
- // return
- // }
- // let data = {
- // recipient: {id:this.executorInfo.executorId,name:this.executorInfo.executorName},
- // redeployCause: this.redeployCause,
- // worksheetId: this.worksheetInfo.code,
- // }
- // postJ(this.apiUrl+ "/api/feature/worksheet/redeploy",data).then(res=>{
- // setTimeout(()=>{
- // this.back(2)
- // },2000)
- // uni.showToast({
- // title:'转派成功',
- // })
- // }).catch(err=>{
- // uni.showToast({
- // title:err.message || '转派失败',
- // icon:'none'
- // })
- // })
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- input {
- text-align: right;
- color: $uni-text-color-grey;
- font-size: $uni-font-size-base;
- }
- </style>
|