dailyWork.vue 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928
  1. <template>
  2. <view style="width: 100vw;height:100vh;">
  3. <view style="height: calc(100% - 104rpx);">
  4. <swiper style="height: 100%;background-color:#F3F4F6 ;" :current="current" disable-touch
  5. @animationfinish="animationfinish">
  6. <swiper-item>
  7. <scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;"
  8. lower-threshold="10" :refresher-enabled="xlList1[0]" :refresher-triggered="xlList2[0]"
  9. @scrolltolower="lower(0)" @refresherrefresh="refresherrefresh(0)"
  10. @refresherrestore="refresherrestore(0)">
  11. <view v-if="title!='督办事项'" class="">
  12. <view style="padding: 20rpx;background-color: #fff;">
  13. <u-search v-model="db.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
  14. :animation="true" @custom="dbsearch" @clear="dbsearch">
  15. </u-search>
  16. </view>
  17. <view v-for="item in dbList" :key="item.WorkID"
  18. style="padding: 20rpx 40rpx;border-bottom: 1px solid #dadada;background-color: #fff;"
  19. @click="getinfo(item)">
  20. <view>
  21. <u--text :lines="1" size="32rpx" :text="item.Title"></u--text>
  22. </view>
  23. <view
  24. style="display: flex;justify-content: space-between;margin-top: 20rpx;color:#909399;font-size: 28rpx;">
  25. <view>{{item.NodeName}}</view>
  26. <view>{{showtime(item.ADT)}}</view>
  27. </view>
  28. </view>
  29. <div style="padding: 10rpx 0;" v-if="dbList.length > 0">
  30. <u-loadmore :status="statusList[0]" />
  31. </div>
  32. <div v-if="dbList.length == 0">
  33. <u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
  34. </div>
  35. </view>
  36. <view v-else class="">
  37. <u-checkbox-group placement="column" @change="changeCheckBox">
  38. <view style="padding: 20rpx;background-color: #fff;">
  39. <u-search v-model="db.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
  40. :animation="true" @custom="dbsearch" @clear="dbsearch">
  41. </u-search>
  42. </view>
  43. <view v-for="item in dbList" :key="item.id"
  44. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;">
  45. <uni-card>
  46. <view class="" style="display: flex;">
  47. <!-- <u-checkbox :disabled="item.submitState!=null" :name="item.id"></u-checkbox> -->
  48. <span
  49. style="font-weight: 700;font-size: 30rpx;margin-left: 40rpx;">{{item.title}}</span>
  50. </view>
  51. <view style='margin:20rpx 40rpx' class="">
  52. <text> 处室及负责人: {{item.departmentHead}}</text>
  53. <br />
  54. <text> 创建时间: {{item.createTime}}</text>
  55. <br />
  56. <text>
  57. 责任处室:{{item.prersonLiable}}</text>
  58. </view>
  59. <view style="display: flex;" class="">
  60. <!-- <u-button v-if="item.submitState==1" @click="handleView(item)"
  61. style="width: 150rpx;" size="small" type="warning">查看</u-button> -->
  62. <u-button @click="handleChuli(item)" style="width: 150rpx;" size="small"
  63. type="primary">处理</u-button>
  64. </view>
  65. </uni-card>
  66. </view>
  67. </u-checkbox-group>
  68. <div style="padding: 10rpx 0;" v-if="dbList.length > 0">
  69. <u-loadmore :status="statusList[0]" />
  70. </div>
  71. <div v-if="dbList.length == 0">
  72. <u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
  73. </div>
  74. </view>
  75. </scroll-view>
  76. </swiper-item>
  77. <swiper-item>
  78. <scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;"
  79. lower-threshold="0" :refresher-enabled="xlList1[1]" :refresher-triggered="xlList2[1]"
  80. @scrolltolower="lower(1)" @refresherrefresh="refresherrefresh(1)"
  81. @refresherrestore="refresherrestore(1)">
  82. <view v-if="this.title!='督办事项'" class="">
  83. <view style="padding: 20rpx;background-color: #fff;">
  84. <u-search v-model="sq.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
  85. :animation="true" @custom="sqsearch" @clear="sqsearch">
  86. </u-search>
  87. </view>
  88. <view v-for="item in sqList" :key="item.WorkID"
  89. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;"
  90. @click="getinfo(item)">
  91. <view>
  92. <u--text :lines="1" size="32rpx" :text="item.Title"></u--text>
  93. </view>
  94. <view
  95. style="display: flex;justify-content: space-between;margin-top: 20rpx;color:#909399;font-size: 28rpx;">
  96. <view>{{item.NodeName}}</view>
  97. <view>{{showtime(item.RDT)}}</view>
  98. </view>
  99. </view>
  100. <div style="padding: 10rpx 0;" v-if="sqList.length > 0">
  101. <u-loadmore :status="statusList[1]" />
  102. </div>
  103. <div v-if="sqList.length == 0">
  104. <u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
  105. </div>
  106. </view>
  107. <view v-else class="">
  108. <view style="padding: 20rpx;background-color: #fff;">
  109. <u-search v-model="sq.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
  110. :animation="true" @custom="sqsearch" @clear="sqsearch">
  111. </u-search>
  112. </view>
  113. <view style="background-color: #fff;" class="">
  114. <u-button v-if="sqList.length != 0" @click="submitDB"
  115. style="width: 150rpx;margin-left:50rpx;" size="small" type="primary">提
  116. 交</u-button>
  117. <u-checkbox-group placement="column" @change="changeCheckBox">
  118. <view v-for="(item,index) in sqList" :key="index"
  119. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;">
  120. <uni-card>
  121. <view class="" style="display: flex;">
  122. <u-checkbox :disabled="item.submitState!=0"
  123. :name="item.id"></u-checkbox>
  124. <span style="font-weight: 700;font-size: 30rpx;">{{item.title}}</span>
  125. </view>
  126. <view style='margin:20rpx 40rpx' class="">
  127. <text> 处室及负责人: {{item.departmentHead}}</text>
  128. <br />
  129. <text> 创建时间: {{item.createTime}}</text>
  130. <br />
  131. <text>
  132. 责任处室:{{item.prersonLiable}}</text>
  133. </view>
  134. <view style="display: flex;" class="">
  135. <u-button v-if="item.submitState==1||item.submitState==3"
  136. @click="handleView(item)" style="width: 150rpx;" size="small"
  137. type="warning">查看</u-button>
  138. <u-button v-if="item.submitState == '2'" @click="handleAgain(item)"
  139. style="width: 150rpx;" size="small" type="primary">再次发起</u-button>
  140. <u-button v-if="item.submitState == '2'" @click="handleGuidang(item)"
  141. style="width: 150rpx;" size="small" type="success">归档</u-button>
  142. </view>
  143. </uni-card>
  144. </view>
  145. </u-checkbox-group>
  146. </view>
  147. <!-- <view v-for="item in sqList" :key="item.WorkID"
  148. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;"
  149. @click="getinfo(item)">
  150. <view>
  151. <u--text :lines="1" size="32rpx" :text="item.Title"></u--text>
  152. </view>
  153. <view
  154. style="display: flex;justify-content: space-between;margin-top: 20rpx;color:#909399;font-size: 28rpx;">
  155. <view>{{item.NodeName}}</view>
  156. <view>{{showtime(item.RDT)}}</view>
  157. </view>
  158. </view> -->
  159. <div style="padding: 10rpx 0;" v-if="sqList.length > 0">
  160. <u-loadmore :status="statusList[1]" />
  161. </div>
  162. <div v-if="sqList.length == 0">
  163. <u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
  164. </div>
  165. <u-modal :show="showGuidang" :showCancelButton='true' @cancel="showGuidang=false"
  166. @confirm="handleGD" title="提示" content='是否确认归档?'></u-modal>
  167. </view>
  168. </scroll-view>
  169. </swiper-item>
  170. <swiper-item>
  171. <scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;"
  172. lower-threshold="0" :refresher-enabled="xlList1[2]" :refresher-triggered="xlList2[2]"
  173. @scrolltolower="lower(2)" @refresherrefresh="refresherrefresh(2)"
  174. @refresherrestore="refresherrestore(2)">
  175. <view style="padding: 20rpx;background-color: #fff;">
  176. <u-search v-model="yb.title" placeholder="请输入标题" :showAction="true" actionText="搜索"
  177. :animation="true" @custom="ybsearch" @clear="ybsearch">
  178. </u-search>
  179. </view>
  180. <view v-for="item in ybList" :key="item.WorkID"
  181. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;"
  182. @click="getinfo(item)">
  183. <view>
  184. <u--text :lines="1" size="32rpx" :text="item.Title"></u--text>
  185. </view>
  186. <view
  187. style="display: flex;justify-content: space-between;margin-top: 20rpx;color:#909399;font-size: 28rpx;">
  188. <view>{{item.NodeName}}</view>
  189. <view>{{showtime(item.RDT)}}</view>
  190. </view>
  191. </view>
  192. <div style="padding: 10rpx 0;" v-if="ybList.length > 0">
  193. <u-loadmore :status="statusList[2]" />
  194. </div>
  195. <div v-if="ybList.length == 0">
  196. <u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
  197. </div>
  198. </scroll-view>
  199. </swiper-item>
  200. <swiper-item>
  201. <scroll-view scroll-y style="width: 100%;height: 100%;overflow: auto;box-sizing: border-box;"
  202. lower-threshold="0" :refresher-enabled="xlList1[3]" :refresher-triggered="xlList2[3]"
  203. @scrolltolower="lower(3)" @refresherrefresh="refresherrefresh(3)"
  204. @refresherrestore="refresherrestore(3)">
  205. <view style="padding: 20rpx;background-color: #fff;">
  206. <u-search v-model="tj.title" placeholder="请输入督办事项" :showAction="true" actionText="搜索"
  207. :animation="true" @custom="tjsearch" @clear="tjsearch">
  208. </u-search>
  209. </view>
  210. <view style="background-color: #fff;" class="">
  211. <u-button v-if="tjList.length != 0" @click="cuibanDB"
  212. style="width: 150rpx;margin-left:50rpx;" size="small" type="success">催办</u-button>
  213. <u-checkbox-group placement="column" @change="changeCheckBox">
  214. <view v-for="(item,index) in tjList" :key="index"
  215. style="padding: 20rpx 40rpx;border-bottom: 1px solid #ceccca;background-color: #fff;">
  216. <uni-card>
  217. <view class="" style="display: flex;">
  218. <u-checkbox :name="item.id"></u-checkbox>
  219. <span style="font-weight: 700;font-size: 30rpx;">{{item.title}}</span>
  220. </view>
  221. <view style='margin:20rpx 40rpx' class="">
  222. <text> 处室及负责人: {{item.departmentHead}}</text>
  223. <br />
  224. <text> 创建时间: {{item.createTime}}</text>
  225. <br />
  226. <text>
  227. 责任处室:{{item.prersonLiable}}</text>
  228. </view>
  229. <view style="display: flex;" class="">
  230. <u-button @click="handleView(item)" style="width: 150rpx;" size="small"
  231. type="warning">查看</u-button>
  232. <!-- <u-button @click="handleEdit(item)" v-if="
  233. item.submitState != null &&
  234. item.isCb != 'Y' &&
  235. item.progressEva != 1
  236. " style="width: 150rpx;" size="small" type="primary">催办</u-button> -->
  237. </view>
  238. </uni-card>
  239. </view>
  240. </u-checkbox-group>
  241. </view>
  242. <div style="padding: 10rpx 0;" v-if="tjList.length > 0">
  243. <u-loadmore :status="statusList[3]" />
  244. </div>
  245. <div v-if="tjList.length == 0">
  246. <u-empty mode="list" icon="/static/list.png" text="暂无内容" textSize="30rpx"></u-empty>
  247. </div>
  248. </scroll-view>
  249. </swiper-item>
  250. </swiper>
  251. </view>
  252. <view v-if="title=='督办事项'" style="height: 100rpx;border-top: 2px solid #dadbde;box-sizing: border-box;">
  253. <u-grid :border="true" :col="showDB==true?3:2">
  254. <u-grid-item @click="click(0)">
  255. <text class="grid-text" :class="current==0?'choose':''">待办</text>
  256. </u-grid-item>
  257. <u-grid-item @click="click(1)">
  258. <text class="grid-text" :class="current==1?'choose':''">{{this.title=='督办事项'?'我发起的':'我申请的'}}</text>
  259. </u-grid-item>
  260. <u-grid-item v-if="title!='督办事项'" @click="click(2)">
  261. <text class="grid-text" :class="current==2?'choose':''">已办</text>
  262. </u-grid-item>
  263. <u-grid-item v-if="title=='督办事项'&&showDB==true" @click="click(3)">
  264. <text class="grid-text" :class="current==3?'choose':''">所有督办</text>
  265. </u-grid-item>
  266. </u-grid>
  267. </view>
  268. <view v-else style="height: 100rpx;border-top: 2px solid #dadbde;box-sizing: border-box;">
  269. <u-grid :border="true" :col="3">
  270. <u-grid-item @click="click(0)">
  271. <text class="grid-text" :class="current==0?'choose':''">待办</text>
  272. </u-grid-item>
  273. <u-grid-item @click="click(1)">
  274. <text class="grid-text" :class="current==1?'choose':''">{{this.title=='督办事项'?'我发起的':'我申请的'}}</text>
  275. </u-grid-item>
  276. <u-grid-item v-if="title!='督办事项'" @click="click(2)">
  277. <text class="grid-text" :class="current==2?'choose':''">已办</text>
  278. </u-grid-item>
  279. <u-grid-item v-if="title=='督办事项'&&showDB==true" @click="click(3)">
  280. <text class="grid-text" :class="current==3?'choose':''">所有督办</text>
  281. </u-grid-item>
  282. </u-grid>
  283. </view>
  284. <u-action-sheet :actions="morelist" :closeOnClickOverlay="true" :closeOnClickAction="true" cancelText="取消"
  285. title="发起" :show="show" @select="selectClick" @close="show = false"></u-action-sheet>
  286. </view>
  287. </template>
  288. <script>
  289. import {
  290. showtime
  291. } from "@/utils/wjw.js"
  292. export default {
  293. data() {
  294. return {
  295. fkFlow: '',
  296. CheckBoxList: [],
  297. //当前待办还是已办
  298. current: 0,
  299. //待办相关
  300. db: {
  301. pageNum: 1,
  302. pageSize: 20,
  303. fkFlow: null,
  304. title: null,
  305. token: uni.getStorageSync('jtoken')
  306. },
  307. dbList: [],
  308. showGuidang: false,
  309. dbSearch: null,
  310. dbTotal: 0,
  311. //已办相关
  312. yb: {
  313. pageNum: 1,
  314. pageSize: 20,
  315. fkFlow: null,
  316. title: null,
  317. token: uni.getStorageSync('jtoken')
  318. },
  319. ybList: [],
  320. ybSearch: null,
  321. ybTotal: 0,
  322. //下拉刷新相关
  323. xlList1: [true, false, false, false],
  324. xlList2: [true, true, true, true],
  325. statusList: ['loadmore', 'loadmore', 'loadmore', 'loadmore'],
  326. //查看事件
  327. showtime: showtime,
  328. //收发文状态
  329. type: null,
  330. //我申请的相关
  331. sq: {
  332. pageNum: 1,
  333. pageSize: 20,
  334. fkFlow: null,
  335. title: null,
  336. token: uni.getStorageSync('jtoken')
  337. },
  338. tj: {
  339. pageNum: 1,
  340. pageSize: 20,
  341. fkFlow: null,
  342. title: null,
  343. orderByColumn: 'createTime',
  344. isAsc: 'Desc',
  345. token: uni.getStorageSync('jtoken')
  346. },
  347. sqList: [],
  348. sqSearch: null,
  349. sqTotal: 0,
  350. //更多展示
  351. show: false,
  352. morelist: [
  353. ],
  354. tjList: [],
  355. checkBoxAll: '',
  356. checkBoxAllList: [],
  357. selectedItems: '',
  358. title: '',
  359. rowItem: null,
  360. showDB: false
  361. }
  362. },
  363. onLoad(options) {
  364. uni.$u.http.get('/getInfo').then(res => {
  365. console.log('res66', res)
  366. res.roles.filter((item) => {
  367. if (item == 'zhoubaoGly') {
  368. this.showDB = true
  369. }
  370. })
  371. })
  372. getApp().globalData.zerenList = null
  373. getApp().globalData.ywListZR = null
  374. this.fkFlow = options.fkFlow
  375. this.db.fkFlow = options.fkFlow
  376. this.yb.fkFlow = options.fkFlow
  377. this.sq.fkFlow = options.fkFlow
  378. this.tj.fkFlow = options.fkFlow
  379. this.type = options.type
  380. this.title = options.title
  381. uni.setNavigationBarTitle({
  382. title: options.title
  383. })
  384. this.getDbList()
  385. if (options.fkFlow == '006') {
  386. this.morelist.push({
  387. name: '中层出差申请'
  388. })
  389. } else if (options.fkFlow == '007') {
  390. this.morelist.push({
  391. name: '外出授课申请'
  392. })
  393. } else if (options.fkFlow == '021') {
  394. this.morelist.push({
  395. name: '请(休)假申请'
  396. })
  397. } else if (options.fkFlow == '015') {
  398. this.morelist.push({
  399. name: '用车申请'
  400. })
  401. } else if (options.fkFlow == '020') {
  402. this.morelist.push({
  403. name: '调班申请'
  404. })
  405. } else if (options.fkFlow == '017') {
  406. this.morelist.push({
  407. name: '用章申请'
  408. })
  409. } else if (options.fkFlow == '018') {
  410. this.morelist.push({
  411. name: '合同用章申请'
  412. })
  413. } else if (options.fkFlow == '016') {
  414. this.morelist.push({
  415. name: '督办事项发起'
  416. })
  417. }
  418. },
  419. onNavigationBarButtonTap(e) {
  420. this.show = true
  421. console.log('e', e)
  422. },
  423. onShow() {
  424. getApp().globalData.peoIdList = []
  425. getApp().globalData.peoList = []
  426. getApp().globalData.peoDeptList = []
  427. uni.$off()
  428. uni.$on('query', (query) => {
  429. if (query.a == 'back') {
  430. setTimeout(() => {
  431. this.db.pageNum = 1
  432. this.dbList = []
  433. this.getDbList()
  434. this.xlList2[this.current] = true
  435. this.yb.pageNum = 1
  436. this.ybList = []
  437. this.getYbList()
  438. this.tj.pageNum = 1
  439. this.tjList = []
  440. this.getTjList()
  441. this.sq.pageNum = 1
  442. this.sqList = []
  443. this.getSqList()
  444. this.selectedItems = null
  445. }, 2000)
  446. }
  447. })
  448. },
  449. methods: {
  450. handleGD() {
  451. let data = {
  452. id: this.rowItem.id,
  453. submitState: '3'
  454. }
  455. let dataGuidang = {
  456. workId: this.rowItem.id,
  457. archiveFormNo: '016'
  458. }
  459. uni.$u.http.put('/offcial/supervision', data).then(res => {
  460. uni.$u.http.post('/offcial/archive/save', dataGuidang).then(res => {
  461. uni.showToast({
  462. title: '归档成功',
  463. icon: 'none'
  464. })
  465. this.showGuidang = false
  466. this.sq.pageNum = 1
  467. this.sqList = []
  468. this.getSqList()
  469. })
  470. })
  471. },
  472. handleGuidang(row) {
  473. console.log('frer', row)
  474. this.showGuidang = true
  475. this.rowItem = row
  476. },
  477. handleAgain(row) {
  478. uni.navigateTo({
  479. url: '/pages/dbZaici/dbZaiCi?id=' + row.id
  480. })
  481. },
  482. handleChuli(row) {
  483. uni.navigateTo({
  484. url: '/pages/dbChuli/dbChuli?fkFlow=' + this.fkFlow + '&id=' + row.id +
  485. '&title=' + '督办事项处理'
  486. })
  487. },
  488. handleEdit(row) {
  489. uni.navigateTo({
  490. url: '/pages/dbDetail/dbDetail?fkFlow=' + this.fkFlow + '&id=' + row.id +
  491. '&title=' + '督办编辑'
  492. })
  493. },
  494. handleView(row) {
  495. console.log('row', row)
  496. uni.navigateTo({
  497. url: '/pages/dbDetail/dbDetail?fkFlow=' + this.fkFlow + '&id=' + row.id +
  498. '&title=' + '督办查看'
  499. })
  500. },
  501. submitDB() {
  502. uni.showLoading({
  503. title: "提交中..."
  504. })
  505. console.log('selectedItems', this.selectedItems)
  506. if (this.selectedItems != '' && this.selectedItems != null) {
  507. uni.$u.http.post('/offcial/supervision/patchStartSupervision/' + this.selectedItems).then(
  508. res => {
  509. console.log('res', res)
  510. uni.showToast({
  511. title: '提交成功',
  512. icon: "none",
  513. mask: true,
  514. duration: 3000
  515. })
  516. uni.hideLoading()
  517. this.selectedItems = null
  518. this.tj.pageNum = 1
  519. this.tjList = []
  520. this.getTjList()
  521. this.sq.pageNum = 1
  522. this.sqList = []
  523. this.getSqList()
  524. }).catch(() => {
  525. uni.hideLoading()
  526. })
  527. } else {
  528. uni.showToast({
  529. title: '请先勾选要提交的督办事项',
  530. icon: "none",
  531. mask: true,
  532. duration: 3000
  533. })
  534. }
  535. },
  536. cuibanDB() {
  537. uni.showLoading({
  538. title: "催办中..."
  539. })
  540. console.log('selectedItems', this.selectedItems)
  541. if (this.selectedItems != '' && this.selectedItems != null) {
  542. uni.$u.http.get('/offcial/supervision/sel/myselfDetail/' + this.selectedItems).then(
  543. res => {
  544. console.log('res', res)
  545. uni.showToast({
  546. title: '催办成功',
  547. icon: "none",
  548. mask: true,
  549. duration: 3000
  550. })
  551. uni.hideLoading()
  552. this.selectedItems = null
  553. this.tj.pageNum = 1
  554. this.tjList = []
  555. this.getTjList()
  556. this.sq.pageNum = 1
  557. this.sqList = []
  558. this.getSqList()
  559. }).catch(() => {
  560. uni.hideLoading()
  561. })
  562. } else {
  563. uni.showToast({
  564. title: '请先勾选要催办的督办事项',
  565. icon: "none",
  566. mask: true,
  567. duration: 3000
  568. })
  569. }
  570. },
  571. changeCheckBox(val) {
  572. console.log('val', val)
  573. // console.log(this.CheckBoxList)
  574. this.selectedItems = val.join(',');
  575. console.log('selectedItems', this.selectedItems)
  576. },
  577. //点击已办待办
  578. click(i) {
  579. if (i == 0) {
  580. this.xlList1[i] = true
  581. this.xlList1[this.current] = false
  582. this.current = i
  583. if (this.dbList.length == 0) {
  584. this.getDbList()
  585. }
  586. } else if (i == 1) {
  587. this.xlList1[i] = true
  588. this.xlList1[this.current] = false
  589. this.current = i
  590. if (this.sqList.length == 0) {
  591. this.getSqList()
  592. }
  593. this.selectedItems = null
  594. } else if (i == 2) {
  595. this.xlList1[i] = true
  596. this.xlList1[this.current] = false
  597. this.current = i
  598. if (this.ybList.length == 0) {
  599. this.getYbList()
  600. }
  601. } else if (i == 3) {
  602. this.xlList1[i] = true
  603. this.xlList1[this.current] = false
  604. this.current = i
  605. if (this.tjList.length == 0) {
  606. this.getTjList()
  607. }
  608. this.selectedItems = null
  609. }
  610. },
  611. getTjList() {
  612. uni.$u.http.get('/offcial/supervision/list', {
  613. params: this.tj
  614. }).then(res => {
  615. uni.hideLoading()
  616. this.tjList = [...this.tjList, ...res.rows]
  617. console.log('tjList', this.tjList)
  618. if (res.total <= this.tj.pageSize) {
  619. this.statusList[0] = "nomore"
  620. } else {
  621. this.statusList[0] = "loadmore"
  622. }
  623. console.log('863',
  624. this.tjList)
  625. this.$forceUpdate()
  626. this.tjTotal = Math.ceil(res.total / this.tj.pageSize)
  627. })
  628. },
  629. //swiper切换
  630. animationfinish(e) {
  631. this.current = e.detail.current;
  632. },
  633. //查询待办列表
  634. getDbList() {
  635. if (this.title == '督办事项') {
  636. uni.$u.http.get('/offcial/supervision/dblist', {
  637. params: this.db
  638. }).then(res => {
  639. uni.hideLoading()
  640. this.dbList = [...this.dbList, ...res.rows]
  641. if (res.total <= this.db.pageSize) {
  642. this.statusList[0] = "nomore"
  643. } else {
  644. this.statusList[0] = "loadmore"
  645. }
  646. this.$forceUpdate()
  647. this.dbTotal = Math.ceil(res.total / this.db.pageSize)
  648. })
  649. } else {
  650. uni.$u.http.get('/jflow/restful/DB_Todolist_FlowNo', {
  651. params: this.db
  652. }).then(res => {
  653. uni.hideLoading()
  654. this.dbList = [...this.dbList, ...res.list]
  655. if (res.total <= this.db.pageSize) {
  656. this.statusList[0] = "nomore"
  657. } else {
  658. this.statusList[0] = "loadmore"
  659. }
  660. this.$forceUpdate()
  661. this.dbTotal = Math.ceil(res.total / this.db.pageSize)
  662. })
  663. }
  664. },
  665. //查询已办列表
  666. getYbList() {
  667. uni.$u.http.get('/jflow/restful/MyJoinOneFlows', {
  668. params: this.yb
  669. }).then(res => {
  670. uni.hideLoading()
  671. this.ybList = [...this.ybList, ...res.list]
  672. if (res.total <= this.yb.pageSize) {
  673. this.statusList[2] = "nomore"
  674. } else {
  675. this.statusList[2] = "loadmore"
  676. }
  677. this.$forceUpdate()
  678. this.ybTotal = Math.ceil(res.total / this.yb.pageSize)
  679. })
  680. },
  681. //查询我申请的列表
  682. getSqList() {
  683. if (this.title == '督办事项') {
  684. uni.$u.http.get('/offcial/supervision/dbfqlist', {
  685. params: {
  686. ...this.sq
  687. },
  688. header: {
  689. 'content-Type': 'application/x-www-form-urlencoded'
  690. },
  691. }).then(res => {
  692. // console.log(res)
  693. uni.hideLoading()
  694. this.sqList = [...this.sqList, ...res.rows]
  695. if (res.total <= this.sq.pageSize) {
  696. this.statusList[1] = "nomore"
  697. } else {
  698. this.statusList[1] = "loadmore"
  699. }
  700. this.$forceUpdate()
  701. this.sqTotal = Math.ceil(res.total / this.sq.pageSize)
  702. })
  703. } else {
  704. uni.$u.http.get('/jflow/restful/DB_MyStartFlowInstanceByFlow', {
  705. params: {
  706. ...this.sq
  707. },
  708. header: {
  709. 'content-Type': 'application/x-www-form-urlencoded'
  710. },
  711. }).then(res => {
  712. // console.log(res)
  713. uni.hideLoading()
  714. this.sqList = [...this.sqList, ...res.list]
  715. if (res.total <= this.sq.pageSize) {
  716. this.statusList[1] = "nomore"
  717. } else {
  718. this.statusList[1] = "loadmore"
  719. }
  720. this.$forceUpdate()
  721. this.sqTotal = Math.ceil(res.total / this.sq.pageSize)
  722. })
  723. }
  724. },
  725. //触底加载
  726. lower(e) {
  727. uni.showLoading({
  728. title: "加载中..."
  729. })
  730. if (e == 0) {
  731. if (this.db.pageNum != this.dbTotal) {
  732. this.db.pageNum++
  733. this.getDbList()
  734. } else {
  735. uni.hideLoading()
  736. this.statusList[e] = "nomore"
  737. this.$forceUpdate()
  738. }
  739. } else if (e == 1) {
  740. if (this.sq.pageNum != this.sqTotal) {
  741. this.sq.pageNum++
  742. this.getSqList()
  743. } else {
  744. uni.hideLoading()
  745. this.statusList[e] = "nomore"
  746. this.$forceUpdate()
  747. }
  748. } else if (e == 2) {
  749. if (this.yb.pageNum != this.ybTotal) {
  750. this.yb.pageNum++
  751. this.getYbList()
  752. } else {
  753. uni.hideLoading()
  754. this.statusList[e] = "nomore"
  755. this.$forceUpdate()
  756. }
  757. } else if (e == 3) {
  758. if (this.tj.pageNum != this.tjTotal) {
  759. this.tj.pageNum++
  760. this.getTjList()
  761. } else {
  762. uni.hideLoading()
  763. this.statusList[e] = "nomore"
  764. this.$forceUpdate()
  765. }
  766. }
  767. },
  768. //下拉刷新
  769. refresherrefresh(e) {
  770. if (e == 0) {
  771. this.xlList2[e] = true
  772. this.db.pageNum = 1
  773. this.dbList = []
  774. this.getDbList()
  775. setTimeout(() => {
  776. this.xlList2[e] = false
  777. this.$forceUpdate()
  778. }, 2000)
  779. } else if (e == 1) {
  780. this.xlList2[e] = true
  781. this.sq.pageNum = 1
  782. this.sqList = []
  783. this.getSqList()
  784. setTimeout(() => {
  785. this.xlList2[e] = false
  786. this.$forceUpdate()
  787. }, 2000)
  788. } else if (e == 2) {
  789. this.xlList2[e] = true
  790. this.yb.pageNum = 1
  791. this.ybList = []
  792. this.getYbList()
  793. setTimeout(() => {
  794. this.xlList2[e] = false
  795. this.$forceUpdate()
  796. }, 2000)
  797. } else if (e == 3) {
  798. this.xlList2[e] = true
  799. this.tj.pageNum = 1
  800. this.tjList = []
  801. this.getTjList()
  802. setTimeout(() => {
  803. this.xlList2[e] = false
  804. this.$forceUpdate()
  805. }, 2000)
  806. }
  807. },
  808. refresherrestore(e) {
  809. },
  810. //待办搜索
  811. dbsearch() {
  812. this.db.pageNum = 1
  813. this.dbList = []
  814. this.getDbList()
  815. },
  816. //已办搜索
  817. ybsearch() {
  818. this.yb.pageNum = 1
  819. this.ybList = []
  820. this.getYbList()
  821. },
  822. //申请搜索
  823. sqsearch() {
  824. this.sq.pageNum = 1
  825. this.sqList = []
  826. this.getSqList()
  827. },
  828. //提交搜索
  829. tjsearch() {
  830. this.tj.pageNum = 1
  831. this.tjList = []
  832. this.getTjList()
  833. },
  834. //查看收文发文详情
  835. getinfo(item) {
  836. console.log('title', item)
  837. uni.navigateTo({
  838. url: "/pages/workInfo/workInfo?workid=" + item.WorkID + '&type=' + this.current +
  839. '&flowNo=' +
  840. this.db.fkFlow + "&title=" + item.Title + "&nodeName=" + item.NodeName +
  841. "&nodeId=" + item
  842. .FK_Node + "&fkFlow=" + this.db.fkFlow
  843. })
  844. },
  845. //点击申请
  846. selectClick() {
  847. if (this.db.fkFlow == '006') {
  848. uni.navigateTo({
  849. url: "/pages/shenqing/shenqing?title=中层出差申请&fkFlow=" + this.db.fkFlow
  850. })
  851. } else if (this.db.fkFlow == '007') {
  852. uni.navigateTo({
  853. url: "/pages/shenqing/shenqing?title=外出授课申请&fkFlow=" + this.db.fkFlow
  854. })
  855. } else if (this.db.fkFlow == '021') {
  856. uni.navigateTo({
  857. url: "/pages/shenqing/shenqing?title=请(休)假申请&fkFlow=" + this.db.fkFlow
  858. })
  859. } else if (this.db.fkFlow == '015') {
  860. uni.navigateTo({
  861. url: "/pages/shenqing/shenqing?title=用车申请&fkFlow=" + this.db.fkFlow
  862. })
  863. } else if (this.db.fkFlow == '020') {
  864. uni.navigateTo({
  865. url: "/pages/shenqing/shenqing?title=调班申请&fkFlow=" + this.db.fkFlow
  866. })
  867. } else if (this.db.fkFlow == '017') {
  868. uni.navigateTo({
  869. url: "/pages/shenqing/shenqing?title=用章申请&fkFlow=" + this.db.fkFlow
  870. })
  871. } else if (this.db.fkFlow == '018') {
  872. uni.navigateTo({
  873. url: "/pages/shenqing/shenqing?title=合同用章申请&fkFlow=" + this.db.fkFlow
  874. })
  875. } else if (this.db.fkFlow == '016') {
  876. uni.navigateTo({
  877. url: "/pages/shenqing/shenqing?title=督办事项发起&fkFlow=" + this.db.fkFlow
  878. })
  879. }
  880. }
  881. }
  882. }
  883. </script>
  884. <style lang="scss" scoped>
  885. .grid-text {
  886. height: 100rpx;
  887. line-height: 100rpx;
  888. font-size: 36rpx;
  889. color: #606266;
  890. /* #ifndef APP-PLUS */
  891. box-sizing: border-box;
  892. /* #endif */
  893. }
  894. .choose {
  895. color: #409EFF
  896. }
  897. .uni-card {
  898. margin: 0 !important;
  899. }
  900. </style>