swMessage.vue 27 KB

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