fwMessage.vue 29 KB

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