swMessage.vue 25 KB

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