swMessage.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882
  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. console.log(res.data)
  361. this.content.workid = id
  362. if (this.gdType == true) {
  363. this.content.typeId = null //归档分类
  364. this.content.levels = null //密级
  365. this.content.archiveNo = null //档案编号
  366. this.content.archiveFormNo = null
  367. this.content.printNum = null //打印份数
  368. this.content.name = res.data.title //档案名称
  369. this.content.gdtype = null //分类名称
  370. }
  371. if(this.type==0){
  372. this.isOver(this.parameter)
  373. this.getBackNo(this.parameter.nodeId)
  374. }
  375. if(this.parameter.nodeId == 308 || this.parameter.nodeId == 1208){
  376. this.content.toEmps = null //移交人员
  377. // this.content.toEmpsPeo = null //移交人员
  378. this.content.yjMsg = null //移交信息
  379. this.yjType = true
  380. }
  381. this.statusList.forEach(item => {
  382. if (item.dictValue == res.data.emergencyDegree) {
  383. this.content.status = item.dictLabel
  384. }
  385. })
  386. this.wjType.forEach(item=>{
  387. if (item.dictValue == res.data.receiveType) {
  388. this.content.wjtype = item.dictLabel
  389. }
  390. })
  391. })
  392. },
  393. // 查询字典数据详细 紧急程度
  394. getDicts() {
  395. uni.$u.http.get('/system/dict/data/type/urgent_type').then(res => {
  396. this.statusList = res.data
  397. })
  398. },
  399. // 查询字典数据详细 文件类型
  400. getWjType() {
  401. uni.$u.http.get('/system/dict/data/type/sw_open_type').then(res => {
  402. this.wjType = res.data
  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. getRecord(id) {
  420. uni.$u.http.get('/jflow/restful/getWfGenerWorkList', {
  421. params: {
  422. workID: id,
  423. token: uni.getStorageSync('jtoken')
  424. }
  425. }).then(res => {
  426. // console.log(res)
  427. this.record = res.trackList
  428. for(let i in res.trackList){
  429. if(res.trackList[i].ActionType !== '28'){
  430. if(res.trackList[i].ActionType22 != undefined){
  431. this.lzNum = this.lzNum+res.trackList[i].ActionType22.length
  432. }else{
  433. this.lzNum = this.lzNum + 1
  434. }
  435. }
  436. }
  437. if (this.type == 0) {
  438. // this.content.jdindex = null
  439. // this.content.nodeId = null
  440. // this.content.optionName = null
  441. this.content.reviewMsg = null //审批意见
  442. this.content.users = null //发送给指定人员
  443. this.content.userList = null //人员列表
  444. // this.id = this.list[0].id
  445. // this.content.jdindex = 0 //下一节点索引
  446. // this.DeliveryWay = this.list[0].DeliveryWay //下一节点状态
  447. // this.content.toNodeId = this.list[0].id //下一节点ID
  448. // this.content.nodeId = this.list[0].id //下一节点ID
  449. // this.content.optionName = this.list[0].text //节点名称
  450. }
  451. })
  452. },
  453. //查询下一步所有节点
  454. jdList(id, flow) {
  455. uni.$u.http.get('/jflow/restful/GenerNextStepAllNode', {
  456. params: {
  457. workid: id,
  458. token: uni.getStorageSync('jtoken'),
  459. flowNo: flow
  460. }
  461. }).then(res => {
  462. this.id = res[0].NodeID
  463. this.content.jdindex = 0 //下一节点索引
  464. this.DeliveryWay = res[0].DeliveryWay //下一节点状态
  465. this.content.toNodeId = res[0].NodeID //下一节点ID
  466. this.content.nodeId = res[0].NodeID //下一节点ID
  467. this.content.optionName = res[0].Name //节点名称
  468. this.list = res.map((item, index) => {
  469. let obj = {
  470. value: index,
  471. id: item.NodeID,
  472. text: item.Name,
  473. DeliveryWay: item.DeliveryWay
  474. }
  475. return obj
  476. })
  477. })
  478. },
  479. //节点选择
  480. change(e) {
  481. if (e >= 0) {
  482. this.id = this.list[e].id
  483. this.DeliveryWay = this.list[e].DeliveryWay
  484. this.content.toNodeId = this.list[e].id
  485. this.content.nodeId = this.list[e].id
  486. this.content.optionName = this.list[e].text
  487. }
  488. },
  489. //选择人员相关
  490. choosePeo() {
  491. if (this.id == null) {
  492. uni.showToast({
  493. title: "请先选择下一节点",
  494. icon: "none"
  495. })
  496. } else {
  497. uni.navigateTo({
  498. url: `/pages/peoChoose/peoChoose?workid=${this.workid}&flowNo=${this.flowNo}&id=${this.id}`,
  499. })
  500. }
  501. },
  502. //选择归档分类
  503. chooseGd() {
  504. uni.navigateTo({
  505. url: "/pages/file/file"
  506. })
  507. },
  508. //判断是否为最后一步
  509. isOver(v) {
  510. uni.$u.http.get("/jflow/restful/judgeNode", {
  511. params: {
  512. nodeId: v.nodeId
  513. }
  514. }).then(res => {
  515. // console.log(res)
  516. if (res.msg == "Y") {
  517. this.overType = true
  518. } else {
  519. this.overType = false
  520. this.jdList(v.workid, v.flowNo)
  521. }
  522. })
  523. },
  524. //提交待办
  525. submit() {
  526. if (this.overType == false && this.id == null) {
  527. uni.showToast({
  528. title: "请先选择下一节点",
  529. icon: "none"
  530. })
  531. } else if (this.content.users == null && this.DeliveryWay == 4) {
  532. uni.showToast({
  533. title: "请选择人员",
  534. icon: "none"
  535. })
  536. } else if (this.content.reviewMsg == null) {
  537. uni.showToast({
  538. title: "请填写审核意见",
  539. icon: "none"
  540. })
  541. } else {
  542. uni.showLoading({
  543. title: "提交中...",
  544. mask: true
  545. })
  546. uni.$u.http.post("/offcial/receive/sendFlowToUsers", this.content, {
  547. header: {
  548. // 'content-Type: 'multipart/form-data'
  549. 'content-Type': 'application/x-www-form-urlencoded'
  550. }
  551. }).then(res => {
  552. // console.log(res)
  553. if (res.data.VarAcceptersName != "" && res.data.VarAcceptersName != "结束") {
  554. uni.showToast({
  555. title: "已发送到" + res.data.VarToNodeName + "节点,接收人:" + res
  556. .data.VarAcceptersName,
  557. icon: "none",
  558. mask: true,
  559. duration:2000
  560. })
  561. } else if (res.data.VarAcceptersName == "结束") {
  562. uni.showToast({
  563. title: res.data.Message,
  564. icon: "none",
  565. mask: true,
  566. duration:2000
  567. })
  568. } else {
  569. uni.showToast({
  570. title: res.data.Message.replace(/[@]/g, ""),
  571. icon: "none",
  572. mask: true,
  573. duration:2000
  574. })
  575. }
  576. uni.$emit('query', {
  577. a: 'back'
  578. })
  579. setTimeout(() => {
  580. uni.navigateBack()
  581. }, 2000)
  582. }).catch(res => {
  583. uni.hideLoading()
  584. })
  585. }
  586. },
  587. //保存归档
  588. save() {
  589. // if (this.content.levels == null) {
  590. // uni.showToast({
  591. // title: "请选择密级",
  592. // icon: "none"
  593. // })
  594. // } else
  595. if (this.content.archiveNo == null) {
  596. uni.showToast({
  597. title: "请填写档案编号",
  598. icon: "none"
  599. })
  600. } else if (this.content.typeId == null) {
  601. uni.showToast({
  602. title: "请选择归档分类",
  603. icon: "none"
  604. })
  605. } else if (this.content.printNum == null || this.content.printNum<1 || this.content.printNum % 1 != 0) {
  606. uni.showToast({
  607. title: "请填写打印份数",
  608. icon: "none"
  609. })
  610. } else {
  611. this.content.reviewMsg = "同意"
  612. uni.showLoading({
  613. title: "提交中...",
  614. mask: true
  615. })
  616. uni.$u.http.post("/offcial/archive/save", this.content).then(res => {
  617. uni.$u.http.get('/jflow/restful/GenerNextStepAllNode', {
  618. params: {
  619. workid: this.parameter.workid,
  620. token: uni.getStorageSync('jtoken'),
  621. flowNo: this.parameter.flowNo,
  622. }
  623. }).then(qwe => {
  624. uni.hideLoading()
  625. uni.showToast({
  626. title: "归档成功",
  627. icon: "none",
  628. mask: true,
  629. duration:2000
  630. })
  631. uni.$emit('query', {
  632. a: 'back'
  633. })
  634. setTimeout(() => {
  635. uni.navigateBack()
  636. }, 2000)
  637. })
  638. }).catch(res => {
  639. uni.hideLoading()
  640. })
  641. }
  642. },
  643. //下载附件
  644. downLoad(v){
  645. let that = this
  646. uni.navigateTo({
  647. url:"/pages/office/office?url="+getApp().globalData.saveUrl+v
  648. })
  649. // uni.showLoading({
  650. // title:"打开中...",
  651. // })
  652. // if(that.list3.indexOf(v) == -1){
  653. // uni.downloadFile({
  654. // url:getApp().globalData.saveUrl+v,
  655. // success: function(res) {
  656. // if (res.statusCode === 200) {
  657. // that.list3.push(v)
  658. // that.list2.push(res.tempFilePath)
  659. // uni.openDocument({
  660. // filePath: res.tempFilePath,
  661. // success: function (res) {
  662. // uni.hideLoading();
  663. // }
  664. // });
  665. // }else{
  666. // uni.hideLoading()
  667. // uni.showToast({
  668. // title:"下载失败",
  669. // icon:'none'
  670. // })
  671. // }
  672. // },fail:function(){
  673. // uni.hideLoading()
  674. // uni.showToast({
  675. // title:"下载失败",
  676. // icon:'none'
  677. // })
  678. // }
  679. // });
  680. // }else{
  681. // uni.openDocument({
  682. // filePath: that.list2[that.list3.indexOf(v)],
  683. // success: function (res) {
  684. // uni.hideLoading();
  685. // }
  686. // });
  687. // }
  688. },
  689. //查询是否能退回
  690. getBackNo(id){
  691. uni.$u.http.get("/jflow/restful/CurrNodeInfo?currNodeID="+id).then(res=>{
  692. if(res[0].ReturnRole != 0){
  693. this.getBackList()
  694. this.backType = true
  695. this.content.returnToNodeID = null
  696. this.content.backMsg = null
  697. }
  698. })
  699. },
  700. //获取退回节点列表
  701. getBackList(){
  702. uni.$u.http.get("/jflow/restful/getReturnWorkNode",{
  703. params:{
  704. workid: this.parameter.workid,
  705. token: uni.getStorageSync('jtoken')
  706. }
  707. }).then(res=>{
  708. this.backlist = res.map((item, index) => {
  709. let obj = {
  710. value: item.No,
  711. id: item.No,
  712. text: item.Name,
  713. }
  714. return obj
  715. })
  716. })
  717. },
  718. //退回上一节点
  719. back(){
  720. if(this.content.returnToNodeID == null){
  721. uni.showToast({
  722. title:"请选择退回节点",
  723. icon:"none"
  724. })
  725. }else if(this.content.backMsg == null){
  726. uni.showToast({
  727. title:"请填写退回意见",
  728. icon:"none"
  729. })
  730. }else{
  731. uni.showLoading({
  732. title:"退回中...",
  733. })
  734. uni.$u.http.get("/offcial/receive/NodeReturnWork",{
  735. params:{
  736. workid: this.parameter.workid,
  737. returnToNodeID: this.content.returnToNodeID,
  738. returnMsg:this.content.backMsg
  739. }
  740. }).then(res=>{
  741. uni.hideLoading()
  742. this.close()
  743. uni.showToast({
  744. title:res,
  745. icon:"none",
  746. duration:2000
  747. })
  748. uni.$emit('query', {
  749. a: 'back'
  750. })
  751. setTimeout(() => {
  752. uni.navigateBack()
  753. }, 2000)
  754. }).catch(error=>{
  755. uni.hideLoading()
  756. uni.showToast({
  757. title:"请稍后重试",
  758. icon:"none"
  759. })
  760. })
  761. }
  762. },
  763. //关闭模态框
  764. close(){
  765. this.content.returnToNodeID = null
  766. this.content.backMsg = null
  767. this.show = false
  768. },
  769. //关闭模态框
  770. close1(){
  771. this.content.toEmps = null
  772. this.content.yjMsg = null
  773. this.yjShow = false
  774. },
  775. //移交
  776. yijiao(){
  777. if(this.content.toEmps == null){
  778. uni.showToast({
  779. title:"请选择移交人员",
  780. icon:"none"
  781. })
  782. }else if(this.content.yjMsg == null){
  783. uni.showToast({
  784. title:"请填写移交信息",
  785. icon:"none"
  786. })
  787. }else{
  788. uni.showLoading({
  789. title:"移交中...",
  790. })
  791. uni.$u.http.get("/jflow/restful/Node_Shift",{
  792. params:{
  793. workid: this.parameter.workid,
  794. toEmps: this.content.toEmps,
  795. msg:this.content.yjMsg
  796. }
  797. }).then(res=>{
  798. uni.hideLoading()
  799. if(res.msg.indexOf('err') != -1){
  800. uni.showToast({
  801. title:res.msg,
  802. icon:"none",
  803. duration:2000
  804. })
  805. }else{
  806. this.close1()
  807. uni.showToast({
  808. title:res.msg.split('@')[0],
  809. icon:"none",
  810. duration:2000
  811. })
  812. uni.$emit('query', {
  813. a: 'back'
  814. })
  815. setTimeout(() => {
  816. uni.navigateBack()
  817. }, 2000)
  818. }
  819. }).catch(error=>{
  820. uni.hideLoading()
  821. uni.showToast({
  822. title:error.msg.split('@')[1],
  823. icon:"none"
  824. })
  825. })
  826. }
  827. },
  828. //查询移交人员
  829. getYjPeo(){
  830. uni.$u.http.get('/jflow/restful/selectDpPersons').then(res=>{
  831. console.log(res)
  832. this.yjPeoList = res.Emps.map((item, index) => {
  833. let obj = {
  834. value: item.no,
  835. id: item.no,
  836. text: item.name,
  837. }
  838. return obj
  839. })
  840. })
  841. }
  842. }
  843. }
  844. </script>
  845. <style lang="scss" scoped>
  846. .content {
  847. font-size: 32rpx;
  848. }
  849. .tab {
  850. width: 48%;
  851. height: 100%;
  852. box-sizing: border-box;
  853. display: flex;
  854. align-items: center;
  855. justify-content: center;
  856. }
  857. .active {
  858. color: #2979ff
  859. }
  860. ::v-deep .u-modal{
  861. overflow:visible ;
  862. }
  863. ::v-deep .u-popup__content{
  864. overflow: visible !important;
  865. }
  866. </style>