fwMessage.vue 25 KB

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