workInfo.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842
  1. <template>
  2. <view style="background-color: #fff;" v-if="content != null">
  3. <view
  4. style="height: 100rpx;display: flex;align-items: center;justify-content: space-around;border-bottom: 1px solid #ceccca;background-color: #fff;"
  5. v-if="type == 0">
  6. <!-- <u-tabs :list="list1" :current="current" @click="click"></u-tabs> -->
  7. <view class="tab" :class="current==0?'active':''" @click="current = 0">
  8. 基本信息
  9. </view>
  10. <view style="border-left: 1px solid #ceccca;height: 80%;">
  11. </view>
  12. <view class="tab" :class="current==0?'':'active'" @click="current = 1">
  13. 流转记录
  14. </view>
  15. </view>
  16. <swiper style="background-color:#fff ;" :style="{height:type==0?'calc(100vh - 100rpx)':'100vh'}"
  17. :current="current" disable-touch>
  18. <swiper-item>
  19. <view style="height: 100%;overflow: auto;">
  20. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm"
  21. :labelStyle="{fontSize:'32rpx'}" labelWidth="120">
  22. <view v-if="fkFlow == '006'">
  23. <u-form-item label="出差处室:" borderBottom ref="item1">
  24. <view class="content">
  25. {{content.outWorkDept}}
  26. </view>
  27. </u-form-item>
  28. <u-form-item label="出差人:" borderBottom ref="item1">
  29. <view class="content">
  30. {{content.userName}}
  31. </view>
  32. </u-form-item>
  33. <u-form-item label="目的地:" borderBottom ref="item1">
  34. <view class="content">
  35. <view>
  36. {{content.provinceType=='0'?'省内':'省外'}}
  37. </view>
  38. <view style="margin-top: 10rpx;">
  39. {{content.destination}}
  40. </view>
  41. </view>
  42. </u-form-item>
  43. <u-form-item label="起止日期:" borderBottom ref="item1">
  44. <view class="content">
  45. {{content.startTime+' 至 '+content.endTime}}
  46. </view>
  47. </u-form-item>
  48. <u-form-item label="出差事由:" borderBottom ref="item1">
  49. <view class="content">
  50. {{content.reason}}
  51. </view>
  52. </u-form-item>
  53. </view>
  54. <view v-if="fkFlow == '007'">
  55. <u-form-item label="申请人:" borderBottom ref="item1">
  56. <view class="content">
  57. {{content.userName}}
  58. </view>
  59. </u-form-item>
  60. <u-form-item label="邀请单位:" borderBottom ref="item1">
  61. <view class="content">
  62. {{content.inviteUnit}}
  63. </view>
  64. </u-form-item>
  65. <u-form-item label="培训名称:" borderBottom ref="item1">
  66. <view class="content">
  67. {{content.trainName}}
  68. </view>
  69. </u-form-item>
  70. <u-form-item label="目的地:" borderBottom ref="item1">
  71. <view class="content">
  72. {{content.destination}}
  73. </view>
  74. </u-form-item>
  75. <u-form-item label="起止日期:" borderBottom ref="item1">
  76. <view class="content">
  77. {{content.startTime+' 至 '+content.endTime}}
  78. </view>
  79. </u-form-item>
  80. <u-form-item label="授课题目:" borderBottom ref="item1">
  81. <view class="content">
  82. {{content.teacherTitle}}
  83. </view>
  84. </u-form-item>
  85. <u-form-item label="参加人数:" borderBottom ref="item1">
  86. <view class="content">
  87. {{content.numberOfParticipants}}
  88. </view>
  89. </u-form-item>
  90. </view>
  91. <view v-if="fkFlow == '009'">
  92. <u-form-item label="姓名:" borderBottom ref="item1">
  93. <view class="content">
  94. {{content.name}}
  95. </view>
  96. </u-form-item>
  97. <u-form-item label="请(休)假类别:" borderBottom ref="item1">
  98. <uni-data-select v-model="content.leaveTpye" :clear="false" placeholder="请选择下一节点" :localdata="statusList"
  99. disabled=""></uni-data-select>
  100. </u-form-item>
  101. <u-form-item label="起止日期:" borderBottom ref="item1">
  102. <view class="content">
  103. {{content.leaveStartTime+' 至 '+content.leaveEndTime}}
  104. </view>
  105. </u-form-item>
  106. <u-form-item label="请(休)假天数:" borderBottom ref="item1">
  107. <view class="content">
  108. {{content.leaveNumber}}
  109. </view>
  110. </u-form-item>
  111. <u-form-item label="请(休)假事由:" borderBottom ref="item1">
  112. <view class="content">
  113. {{content.leaveReason}}
  114. </view>
  115. </u-form-item>
  116. </view>
  117. <view v-if="fkFlow == '015'">
  118. <u-form-item label="申请人:" borderBottom ref="item1">
  119. <view class="content">
  120. {{content.createBy}}
  121. </view>
  122. </u-form-item>
  123. <u-form-item label="联系电话:" borderBottom ref="item1">
  124. <view class="content">
  125. {{content.phone}}
  126. </view>
  127. </u-form-item>
  128. <u-form-item label="起止日期:" borderBottom ref="item1">
  129. <view class="content">
  130. {{content.startUseTime+' 至 '+content.endUseTime}}
  131. </view>
  132. </u-form-item>
  133. <u-form-item label="用车天数:" borderBottom ref="item1">
  134. <view class="content">
  135. {{content.dayNum}}天
  136. </view>
  137. </u-form-item>
  138. <u-form-item label="乘车人数:" borderBottom ref="item1">
  139. <view class="content">
  140. {{content.carNum}}人
  141. </view>
  142. </u-form-item>
  143. <u-form-item label="目的地:" borderBottom ref="item1">
  144. <view class="content">
  145. {{content.addres}}
  146. </view>
  147. </u-form-item>
  148. <u-form-item label="用途:" borderBottom ref="item1">
  149. <view class="content">
  150. {{content.useMessage}}
  151. </view>
  152. </u-form-item>
  153. </view>
  154. <view v-if="type==0" style="padding-bottom: 40rpx;">
  155. <u-form-item label="下一节点:" borderBottom ref="item1" v-if="overType==false">
  156. <uni-data-select v-model="content.jdindex" :clear="false" placeholder="请选择下一节点" :localdata="list"
  157. @change="change"></uni-data-select>
  158. </u-form-item>
  159. <u-form-item label="下发人员:" borderBottom v-if="DeliveryWay==4" ref="item1"
  160. @click="choosePeo">
  161. <view :style="{color:content.users==null?'rgb(192, 196, 204)':''}">
  162. {{content.users==null?'请选择人员': content.userList}}
  163. </view>
  164. </u-form-item>
  165. <u-form-item label="审批意见:" borderBottom ref="item1" v-if="gdType == false">
  166. <u--textarea v-model="content.reviewMsg" placeholder="请输入审批意见" autoHeight
  167. border="none"></u--textarea>
  168. </u-form-item>
  169. <view v-if="gdType == true">
  170. <u-form-item label="档案分类:" borderBottom ref="item1" @click="chooseGd">
  171. <view :style="{color:content.typeId==null?'rgb(192, 196, 204)':''}">
  172. {{content.typeId==null?'请选择档案分类': content.gdtype}}
  173. </view>
  174. </u-form-item>
  175. </view>
  176. <view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;" v-if="gdType == false">
  177. <u-button type="primary" text="提交" @click="submit" ></u-button>
  178. </view>
  179. <view style="margin-top: 40rpx;padding: 0 20rpx;box-sizing: border-box;" v-if="gdType == true">
  180. <u-button type="primary" text="归档" @click="save" ></u-button>
  181. </view>
  182. <u-button type="error" text="退回" @click="show = true" style="width: calc(100vw - 40rpx);margin-top: 40rpx;" v-if="backType == true"></u-button>
  183. </view>
  184. <view style="padding: 20rpx;box-sizing: border-box;" v-else>
  185. <u-steps :current="lzNum-1" direction="column" dot v-if="record != null">
  186. <view v-for="(v,i) in record" :key="i">
  187. <u-steps-item :error="v.ActionType==2?true:false" :title='v.NDFromT+"("+v.ActionTypeText+")"' v-if="v.ActionType==='28'">
  188. <view slot="desc" style="color: #606266">
  189. <view style="font-size: 28rpx;">
  190. 处理人:{{v.EmpFromT}}
  191. </view>
  192. <view style="font-size: 28rpx;">
  193. 到达时间:{{v.SDT}}
  194. </view>
  195. </view>
  196. </u-steps-item>
  197. <view v-else-if="v.ActionType22 != undefined">
  198. <u-steps-item :error="v.ActionType==2?true:false" v-for="(item,index) in v.ActionType22" :key="index" :title='item.NDFromT+"("+v.ActionTypeText+")"'>
  199. <view slot="desc" style="color:#606266;">
  200. <view style="font-size: 28rpx;">
  201. 处理部门:{{item.NodeData.split("DeptName=")[1]}}
  202. </view>
  203. <view style="font-size: 28rpx;">
  204. 处理人:{{item.Exer.split(',')[1]}}
  205. </view>
  206. <view style="font-size: 28rpx;">
  207. 处理时间:{{item.RDT}}
  208. </view>
  209. <view style="font-size: 28rpx;">
  210. 审核意见:{{item.Msg}}
  211. </view>
  212. </view>
  213. </u-steps-item>
  214. </view>
  215. <u-steps-item :error="v.ActionType==2?true:false" :title='v.NDFromT+"("+v.ActionTypeText+")"' v-else>
  216. <view slot="desc" style="color: #606266">
  217. <view style="font-size: 28rpx;">
  218. 处理部门:{{v.NodeData.split("DeptName=")[1]}}
  219. </view>
  220. <view style="font-size: 28rpx;">
  221. 处理人:{{v.Exer.split(',')[1]}}
  222. </view>
  223. <view style="font-size: 28rpx;">
  224. 处理时间:{{v.RDT}}
  225. </view>
  226. </view>
  227. </u-steps-item>
  228. </view>
  229. </u-steps>
  230. </view>
  231. </u--form>
  232. </view>
  233. </swiper-item>
  234. <swiper-item>
  235. <view
  236. style="padding: 20rpx;box-sizing: border-box;width: 100%;box-sizing: border-box;height: 100%;overflow: auto;">
  237. <u-steps :current="lzNum-1" direction="column" dot v-if="record != null">
  238. <view v-for="(v,i) in record" :key="i">
  239. <u-steps-item :error="v.ActionType==2?true:false" :title='v.NDFromT+"("+v.ActionTypeText+")"' v-if="v.ActionType=='28'">
  240. <view slot="desc" style="color: #606266">
  241. <view style="font-size: 28rpx;">
  242. 处理人:{{v.EmpFromT}}
  243. </view>
  244. <view style="font-size: 28rpx;">
  245. 到达时间:{{v.SDT}}
  246. </view>
  247. </view>
  248. </u-steps-item>
  249. <view v-else-if="v.ActionType22 != undefined">
  250. <u-steps-item :error="v.ActionType==2?true:false" v-for="(item,index) in v.ActionType22" :key="index" :title='item.NDFromT+"("+v.ActionTypeText+")"'>
  251. <view slot="desc" style="color:#606266;">
  252. <view style="font-size: 28rpx;">
  253. 处理部门:{{item.NodeData.split("DeptName=")[1]}}
  254. </view>
  255. <view style="font-size: 28rpx;">
  256. 处理人:{{item.Exer.split(',')[1]}}
  257. </view>
  258. <view style="font-size: 28rpx;">
  259. 处理时间:{{item.RDT}}
  260. </view>
  261. <view style="font-size: 28rpx;">
  262. 审核意见:{{item.Msg}}
  263. </view>
  264. </view>
  265. </u-steps-item>
  266. </view>
  267. <u-steps-item :error="v.ActionType==2?true:false" :title='v.NDFromT+"("+v.ActionTypeText+")"' v-else>
  268. <view slot="desc" style="color: #606266">
  269. <view style="font-size: 28rpx;">
  270. 处理部门:{{v.NodeData.split("DeptName=")[1]}}
  271. </view>
  272. <view style="font-size: 28rpx;">
  273. 处理人:{{v.Exer.split(',')[1]}}
  274. </view>
  275. <view style="font-size: 28rpx;">
  276. 处理时间:{{v.RDT}}
  277. </view>
  278. </view>
  279. </u-steps-item>
  280. </view>
  281. </u-steps>
  282. </view>
  283. </swiper-item>
  284. </swiper>
  285. <u-modal :show="show" title="退回" :closeOnClickOverlay="true" showCancelButton @cancel="close" @close="close" @confirm="back">
  286. <view class="slot-content" style="width: 100%;" >
  287. <u--form labelPosition="left" labelAlign="center" :model="content" ref="uForm1"
  288. :labelStyle="{fontSize:'32rpx'}" labelWidth="100">
  289. <u-form-item label="退回节点:" borderBottom ref="item1">
  290. <uni-data-select v-model="content.returnToNodeID" placeholder="请选择节点" :clear="false"
  291. :localdata="backlist"></uni-data-select>
  292. </u-form-item>
  293. <u-form-item label="退回意见:" borderBottom ref="item1" >
  294. <u--textarea v-model="content.backMsg" placeholder="请输入退回意见" autoHeight
  295. border="none"></u--textarea>
  296. </u-form-item>
  297. </u--form>
  298. </view>
  299. </u-modal>
  300. </view>
  301. </template>
  302. <script>
  303. // import uButton from "../../uni_modules/uview-ui/components/u-button/u-button.vue"
  304. export default {
  305. data() {
  306. return {
  307. current: 0,
  308. content: null,
  309. statusList: [],
  310. //流转记录
  311. record: null,
  312. //待办已办
  313. type: 0,
  314. //节点列表
  315. list: [],
  316. //是否选择下发人员
  317. selectType: 3,
  318. workid: null,
  319. flowNo: null,
  320. id: null,
  321. //tabs
  322. list1: [{
  323. name: '待办内容'
  324. },
  325. {
  326. name: '流转记录'
  327. }
  328. ],
  329. DeliveryWay: null, //判断是否需要审核意见
  330. gd: null, //密级列表
  331. gdType: false, //判断是否是归档
  332. overType: false, //判断是否结束
  333. //上个页面传过来的参数
  334. parameter: null,
  335. fkFlow:null,// 006 中层出差 007 外出授课备案
  336. //退回状态
  337. backType:false,
  338. //退回节点列表
  339. backlist:[],
  340. show:false,
  341. lzNum:0
  342. }
  343. },
  344. onLoad(options) {
  345. let that = this
  346. that.parameter = options
  347. that.fkFlow = options.fkFlow
  348. that.getDicts()
  349. that.getContent(options.workid)
  350. that.getRecord(options.workid)
  351. if (options.nodeName.indexOf('归档') != -1) {
  352. that.gdType = true
  353. }
  354. that.type = options.type
  355. that.workid = options.workid
  356. that.flowNo = options.flowNo
  357. uni.setNavigationBarTitle({
  358. title: options.title
  359. })
  360. // if (options.type == 0) {
  361. // // that.jdList(options.workid, options.flowNo)
  362. // setTimeout(() => {
  363. // this.isOver(options)
  364. // }, 500)
  365. // // this.getjsPeo(options.workid, options.flowNo)
  366. // }
  367. },
  368. onShow() {
  369. uni.$once('query', (query) => {
  370. if (query.a == 1) {
  371. this.content.users = getApp().globalData.peoIdList
  372. this.content.userList = getApp().globalData.peoList
  373. this.$forceUpdate()
  374. } else if (query.a == 2) {
  375. this.content.typeId = getApp().globalData.gdId.split(",")[0]
  376. this.content.gdtype = getApp().globalData.gdId.split(",")[1]
  377. this.$forceUpdate()
  378. }
  379. })
  380. },
  381. methods: {
  382. click(e) {
  383. this.current = e.index
  384. },
  385. //查询收文详情
  386. getContent(id) {
  387. if(this.fkFlow == '006'){
  388. uni.$u.http.get('/system/work/sel/' + id).then(res => {
  389. // console.log(res)
  390. this.content = res.data
  391. this.content.workid = this.workid
  392. if (this.gdType == true) {
  393. this.content.typeId = null //归档分类
  394. this.content.archiveNo = null //档案编号
  395. this.content.archiveFormNo = null
  396. this.content.printNum = null //打印份数
  397. this.content.name = res.data.title //档案名称
  398. this.content.gdtype = null //分类名称
  399. }
  400. if(this.type==0){
  401. this.isOver(this.parameter)
  402. this.getBackNo(this.parameter.nodeId)
  403. }
  404. })
  405. }else if(this.fkFlow == '007'){
  406. uni.$u.http.get('/system/registration/sel/' + id).then(res => {
  407. // console.log(res)
  408. this.content = res.data
  409. this.content.workid = this.workid
  410. if (this.gdType == true) {
  411. this.content.typeId = null //归档分类
  412. this.content.archiveNo = null //档案编号
  413. this.content.archiveFormNo = null
  414. this.content.printNum = null //打印份数
  415. this.content.name = res.data.title //档案名称
  416. this.content.gdtype = null //分类名称
  417. }
  418. if(this.type==0){
  419. this.isOver(this.parameter)
  420. this.getBackNo(this.parameter.nodeId)
  421. }
  422. })
  423. }else if(this.fkFlow == '009'){
  424. uni.$u.http.get('/oa/leave/sel/'+id).then(res=>{
  425. this.content = res.data
  426. this.content.workid = this.workid
  427. if (this.gdType == true) {
  428. this.content.typeId = null //归档分类
  429. this.content.archiveNo = null //档案编号
  430. this.content.archiveFormNo = null
  431. this.content.printNum = null //打印份数
  432. this.content.name = res.data.title //档案名称
  433. this.content.gdtype = null //分类名称
  434. }
  435. if(this.type==0){
  436. this.isOver(this.parameter)
  437. this.getBackNo(this.parameter.nodeId)
  438. }
  439. })
  440. }else if(this.fkFlow == '015'){
  441. uni.$u.http.get('/offcial/car/sel/'+id).then(res=>{
  442. this.content = res.data
  443. this.content.workid = this.workid
  444. if (this.gdType == true) {
  445. this.content.typeId = null //归档分类
  446. this.content.archiveNo = null //档案编号
  447. this.content.archiveFormNo = null
  448. this.content.printNum = null //打印份数
  449. this.content.name = res.data.title //档案名称
  450. this.content.gdtype = null //分类名称
  451. }
  452. if(this.type==0){
  453. this.isOver(this.parameter)
  454. this.getBackNo(this.parameter.nodeId)
  455. }
  456. })
  457. }
  458. },
  459. // 查询请假类型
  460. getDicts() {
  461. uni.$u.http.get('/system/dict/data/type/leave_type').then(res => {
  462. this.statusList = res.data.map((item, index) => {
  463. let obj = {
  464. value: item.dictValue,
  465. id: item.dictValue,
  466. text: item.dictLabel
  467. }
  468. return obj
  469. })
  470. })
  471. },
  472. //保存归档
  473. save(){
  474. if(this.content.typeId == null){
  475. uni.showToast({
  476. title:"请选择归档分类",
  477. icon:"none"
  478. })
  479. }else{
  480. this.content.reviewMsg = "同意"
  481. uni.showLoading({
  482. title:"提交中...",
  483. mask:true
  484. })
  485. uni.$u.http.post("/offcial/archive/save",this.content).then(res=>{
  486. uni.$u.http.get('/jflow/restful/GenerNextStepAllNode', {
  487. params: {
  488. workid:this.parameter.workid,
  489. token: uni.getStorageSync('jtoken'),
  490. flowNo: this.parameter.flowNo,
  491. }
  492. }).then(qwe => {
  493. uni.hideLoading()
  494. uni.showToast({
  495. title:"归档成功",
  496. icon:"none",
  497. mask:true,
  498. duration:2000
  499. })
  500. uni.$emit('query' , {a : 'back'})
  501. setTimeout(()=>{
  502. uni.navigateBack()
  503. },2000)
  504. })
  505. }).catch(res=>{
  506. uni.hideLoading()
  507. uni.showToast({
  508. title:"请稍后重试",
  509. icon:"none"
  510. })
  511. })
  512. }
  513. },
  514. //查询流转记录
  515. getRecord(id) {
  516. uni.$u.http.get('/jflow/restful/getWfGenerWorkList', {
  517. params: {
  518. workID: id,
  519. token: uni.getStorageSync('jtoken')
  520. }
  521. }).then(res => {
  522. // console.log(res)
  523. this.record = res.trackList
  524. for(let i in res.trackList){
  525. if(res.trackList[i].ActionType !== '28'){
  526. if(res.trackList[i].ActionType22 != undefined){
  527. this.lzNum = this.lzNum+res.trackList[i].ActionType22.length
  528. }else{
  529. this.lzNum = this.lzNum + 1
  530. }
  531. }
  532. }
  533. if (this.type == 0) {
  534. // this.content.jdindex = null //下一节点索引
  535. // this.content.nodeId = null //下一节点ID
  536. // this.content.optionName = null //节点名称
  537. this.content.reviewMsg = null //审批意见
  538. this.content.users = null //发送给指定人员
  539. // this.content.toNodeId = null
  540. this.content.userList = null //人员列表
  541. }
  542. })
  543. },
  544. //查询下一步所有节点
  545. jdList(id, flow) {
  546. uni.$u.http.get('/jflow/restful/GenerNextStepNode', {
  547. params: {
  548. workid: id,
  549. token: uni.getStorageSync('jtoken'),
  550. flowNo: flow
  551. }
  552. }).then(res => {
  553. this.id = res[0].NodeID
  554. this.content.jdindex = 0 //下一节点索引
  555. this.DeliveryWay = res[0].DeliveryWay //下一节点状态
  556. this.content.toNodeId = res[0].NodeID //下一节点ID
  557. this.content.nodeId = res[0].NodeID //下一节点ID
  558. this.content.optionName = res[0].Name //节点名称
  559. this.list = res.map((item, index) => {
  560. let obj = {
  561. value: index,
  562. id: item.NodeID,
  563. text: item.Name,
  564. DeliveryWay: item.DeliveryWay
  565. }
  566. return obj
  567. })
  568. })
  569. },
  570. //节点选择
  571. change(e) {
  572. if (e >= 0) {
  573. this.id = this.list[e].id
  574. this.DeliveryWay = this.list[e].DeliveryWay
  575. this.content.toNodeId = this.list[e].id
  576. this.content.nodeId = this.list[e].id
  577. this.content.optionName = this.list[e].text
  578. }
  579. },
  580. //选择人员相关
  581. choosePeo() {
  582. if (this.id == null) {
  583. uni.showToast({
  584. title: "请先选择下一节点",
  585. icon: "none"
  586. })
  587. } else {
  588. uni.navigateTo({
  589. url: `/pages/peoChoose/peoChoose?workid=${this.workid}&flowNo=${this.flowNo}&id=${this.id}`,
  590. })
  591. }
  592. },
  593. //选择归档分类
  594. chooseGd() {
  595. uni.navigateTo({
  596. url: "/pages/file/file"
  597. })
  598. },
  599. //判断是否为最后一步
  600. isOver(v) {
  601. uni.$u.http.get("/jflow/restful/judgeNode", {
  602. params: {
  603. nodeId: v.nodeId
  604. }
  605. }).then(res => {
  606. if (res.msg == "Y") {
  607. this.overType = true
  608. } else {
  609. this.overType = false
  610. this.jdList(v.workid, v.flowNo)
  611. }
  612. })
  613. },
  614. //提交待办
  615. submit() {
  616. if (this.overType == false && this.id == null) {
  617. uni.showToast({
  618. title: "请先选择下一节点",
  619. icon: "none"
  620. })
  621. } else if (this.content.reviewMsg == null) {
  622. uni.showToast({
  623. title: "请填写审核意见",
  624. icon: "none"
  625. })
  626. } else {
  627. uni.showLoading({
  628. title: "提交中...",
  629. mask: true
  630. })
  631. if(this.fkFlow == '009'){
  632. uni.$u.http.post("/oa/leave/sendNextSteep", this.content, {
  633. header: {
  634. // 'content-Type: 'multipart/form-data'
  635. 'content-Type': 'application/x-www-form-urlencoded'
  636. }
  637. }).then(res => {
  638. // console.log(res)
  639. // uni.hideLoading()
  640. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  641. uni.showToast({
  642. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  643. .data.VarAcceptersName,
  644. icon: "none",
  645. mask: true,
  646. duration:3000
  647. })
  648. } else if (res.data.VarAcceptersName == "结束") {
  649. uni.showToast({
  650. title: res.data.Message,
  651. icon: "none",
  652. mask: true,
  653. duration:3000
  654. })
  655. } else {
  656. uni.showToast({
  657. title: res.data.Message.replace(/[@]/g, ""),
  658. icon: "none",
  659. mask: true,
  660. duration:3000
  661. })
  662. }
  663. uni.$emit('query', {
  664. a: 'back'
  665. })
  666. setTimeout(() => {
  667. uni.navigateBack()
  668. }, 2000)
  669. }).catch(res => {
  670. // console.log(res)
  671. uni.hideLoading()
  672. uni.showToast({
  673. title:"请稍后重试",
  674. icon:"none"
  675. })
  676. })
  677. }else{
  678. uni.$u.http.post("/offcial/receive/sendFlowToUsers", this.content, {
  679. header: {
  680. // 'content-Type: 'multipart/form-data'
  681. 'content-Type': 'application/x-www-form-urlencoded'
  682. }
  683. }).then(res => {
  684. // console.log(res)
  685. // uni.hideLoading()
  686. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  687. uni.showToast({
  688. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  689. .data.VarAcceptersName,
  690. icon: "none",
  691. mask: true,
  692. duration:3000
  693. })
  694. } else if (res.data.VarAcceptersName == "结束") {
  695. uni.showToast({
  696. title: res.data.Message,
  697. icon: "none",
  698. mask: true,
  699. duration:3000
  700. })
  701. } else {
  702. uni.showToast({
  703. title: res.data.Message.replace(/[@]/g, ""),
  704. icon: "none",
  705. mask: true,
  706. duration:3000
  707. })
  708. }
  709. uni.$emit('query', {
  710. a: 'back'
  711. })
  712. setTimeout(() => {
  713. uni.navigateBack()
  714. }, 2000)
  715. }).catch(res => {
  716. // console.log(res)
  717. uni.hideLoading()
  718. uni.showToast({
  719. title:"请稍后重试",
  720. icon:"none"
  721. })
  722. })
  723. }
  724. }
  725. },
  726. //查询是否能退回
  727. getBackNo(id){
  728. uni.$u.http.get("/jflow/restful/CurrNodeInfo?currNodeID="+id).then(res=>{
  729. // console.log(res)
  730. if(res[0].ReturnRole != 0){
  731. this.getBackList()
  732. this.backType = true
  733. this.content.returnToNodeID = null
  734. this.content.backMsg = null
  735. }
  736. })
  737. },
  738. //获取退回节点列表
  739. getBackList(){
  740. uni.$u.http.get("/jflow/restful/getReturnWorkNode",{
  741. params:{
  742. workid: this.parameter.workid,
  743. token: uni.getStorageSync('jtoken')
  744. }
  745. }).then(res=>{
  746. this.backlist = res.map((item, index) => {
  747. let obj = {
  748. value: item.No,
  749. id: item.No,
  750. text: item.Name,
  751. }
  752. return obj
  753. })
  754. })
  755. },
  756. //退回上一节点
  757. back(){
  758. if(this.content.returnToNodeID == null){
  759. uni.showToast({
  760. title:"请选择退回节点",
  761. icon:"none"
  762. })
  763. }else if(this.content.backMsg == null){
  764. uni.showToast({
  765. title:"请填写退回意见",
  766. icon:"none"
  767. })
  768. }else{
  769. uni.showLoading({
  770. title:"退回中...",
  771. })
  772. uni.$u.http.get("/offcial/receive/NodeReturnWork",{
  773. params:{
  774. workid: this.parameter.workid,
  775. returnToNodeID: this.content.returnToNodeID,
  776. returnMsg:this.content.backMsg
  777. }
  778. }).then(res=>{
  779. uni.hideLoading()
  780. this.close()
  781. uni.showToast({
  782. title:res,
  783. icon:"none",
  784. duration:2000
  785. })
  786. uni.$emit('query', {
  787. a: 'back'
  788. })
  789. setTimeout(() => {
  790. uni.navigateBack()
  791. }, 2000)
  792. }).catch(error=>{
  793. uni.hideLoading()
  794. uni.showToast({
  795. title:"请稍后重试",
  796. icon:"none"
  797. })
  798. })
  799. }
  800. },
  801. //关闭模态框
  802. close(){
  803. this.content.returnToNodeID = null
  804. this.content.backMsg = null
  805. this.show = false
  806. }
  807. }
  808. }
  809. </script>
  810. <style lang="scss" scoped>
  811. .content {
  812. font-size: 32rpx;
  813. }
  814. .tab {
  815. width: 48%;
  816. height: 100%;
  817. box-sizing: border-box;
  818. display: flex;
  819. align-items: center;
  820. justify-content: center;
  821. }
  822. .active {
  823. color: #2979ff
  824. }
  825. </style>