fwMessage.vue 24 KB

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