my_task.vue 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. <template name="task">
  2. <view class="content">
  3. <view class="content1-top">
  4. <view class="search-form round">
  5. <u-search placeholder-color='#AFB3BF' search-icon-color='#AFB3BF' bg-color='#F5F6F9'
  6. placeholder="请输入任务日期或任务标题" v-model="keyword" @search="searchKeyWord()"
  7. @custom="searchKeyWord()"></u-search>
  8. </view>
  9. <view style='justify-content: space-between;' class='flex'>
  10. <view ></view>
  11. <view class="company">
  12. <image class='icon' style='width:19px;height:19px;' src="../../static/img/icon_qiye@3x.png"
  13. mode=""></image> {{compName}}
  14. </view>
  15. </view>
  16. <view class="top2">
  17. <view class="left">
  18. <view @click='tabcarchange(1)' class='line' :class='statusFlag==1?"active":""'>未完成</view>
  19. <view @click='tabcarchange(3)' class='line' :class='statusFlag==3?"active":""'>已完成</view>
  20. <view @click='tabcarchange(5)' class='line' :class='statusFlag==5?"active":""'>已发起</view>
  21. <view @click='tabcarchange(7)' class='line' :class='statusFlag==7?"active":""'>抄送</view>
  22. </view>
  23. <view class="right">
  24. <!-- <view class="right-contrent1">逐条审核</view>
  25. <u-switch v-model="checked" active-color="#22C572" inactive-color="#eee" size='40'></u-switch> -->
  26. </view>
  27. </view>
  28. </view>
  29. <view class="introduce-section">
  30. <view v-for="(item, index) in taskInfo" :key="index" @click="navToDetailPage(item)">
  31. <view class="guess-item">
  32. <view class="title flex align-item-center">
  33. <view>
  34. <view v-if='statusFlag==1' class="title-row1">待审批
  35. <text v-if='item.vesselId'>({{item.vesselId}})</text>
  36. </view>
  37. <view v-if='statusFlag==3' class="title-row1">已审批
  38. <text v-if='item.vesselId'>({{item.vesselId}})</text>
  39. </view>
  40. <view style='font-size:12px;color:#878C9C;'>{{item.createDate}}</view>
  41. </view>
  42. <text v-if='statusFlag==1' style='color:#FE6430;'>{{item.messageTitle}}</text>
  43. <text v-if='statusFlag==3' style='color:#AFB3BF;'>{{item.messageTitle}}</text>
  44. <text v-if='statusFlag==5' style='color:#AFB3BF;'>{{item.messageTitle}}</text>
  45. </view>
  46. <view class="flex title_b">
  47. <view style='color:#878C9C;' class="title row2">
  48. {{item.messageContent}}
  49. </view>
  50. </view>
  51. <u-tag :text="item.taskType" type="success" v-if="item.taskType == '出库任务'" />
  52. <u-tag :text="item.taskType" type="primary" v-if="item.taskType == '入库任务'" />
  53. </view>
  54. </view>
  55. <view v-show="isSole">
  56. <uni-load-more :status="loadStatus"></uni-load-more>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. import {
  63. mapState
  64. } from 'vuex';
  65. export default {
  66. name: "task",
  67. data() {
  68. return {
  69. PageCur: "task",
  70. taskInfo: [],
  71. checked: false,
  72. pages: 1, //页数
  73. limit: 10, //每次取条目数
  74. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  75. isLoadMore: false, //是否加载中
  76. isSole: false,
  77. showTran: true,
  78. scrollTop: 0,
  79. isContent: true,
  80. statusFlag: 1,
  81. current: 1,
  82. pcUserInfo: {},
  83. warehouseInOutInfo: {
  84. pageSize: 10,
  85. currentPage: 1
  86. },
  87. data: {},
  88. keyword: "",
  89. copyTaskInfo: [],
  90. pcUserInfo:{}
  91. };
  92. },
  93. onBackPress(e) {
  94. if (uni.getStorageSync("everyTask")) {
  95. uni.switchTab({
  96. url: '/pages/user/user'
  97. });
  98. return true
  99. }
  100. },
  101. onPullDownRefresh() {
  102. this.getIndexBuyData(1,this.keyword)
  103. setTimeout(function () {
  104. uni.stopPullDownRefresh();
  105. }, 1000);
  106. },
  107. watch: {
  108. checked(val) {
  109. uni.setStorageSync("everyTask", this.checked)
  110. },
  111. taskInfo: function(val) {
  112. this.copyTaskInfo = this.$u.deepClone(this.taskInfo);
  113. //添加跳转链接
  114. for (let i = 0; i < this.copyTaskInfo.length; i++) {
  115. let item = this.copyTaskInfo[i]
  116. if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
  117. item.itemUrl = '/pages/task/procurement_details?id=' + item.businessId
  118. } else if (item.businessCode == 'SALE-ORDER-APPROVE') {
  119. item.itemUrl = '/pages/task/sale_details?id=' + item.businessId
  120. } else if (item.businessCode == 'DAISHOU-CONTRACT-APPROVE') {
  121. item.itemUrl = '/pages/task/audit/daishou_details?id=' + item.businessId
  122. } else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
  123. item.itemUrl = '/pages/task/audit/salecontract?id=' + item.businessId
  124. } else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
  125. item.itemUrl = '/pages/task/audit/purchasecontract?id=' + item.businessId
  126. } else if (item.businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
  127. item.itemUrl = '/pages/task/procurement_report_details?id=' + item.businessId
  128. } else if (item.businessCode == 'PROCUREMENT-CLOSE-REPORT') {
  129. item.itemUrl = '/pages/task/procurement_close_details?id=' + item.businessId
  130. } else if (item.businessCode == 'SALE-RECEIPT-REPORT') {
  131. item.itemUrl = '/pages/task/sale_report_details?id=' + item.businessId
  132. } else if (item.businessCode == 'SALE-CLOSE-REPORT') {
  133. item.itemUrl = '/pages/task/sale_close_details?id=' + item.businessId
  134. } else if (item.businessCode == 'PROCUREMENT-PRICE-APPROVE') {
  135. if (this.statusFlag == 1) {
  136. item.itemUrl = `/pages/task/audit/warehouse_approval?id=${item.businessId}`
  137. } else {
  138. item.itemUrl = '/pages/task/audit/warehouse_details/?id=' + item.businessId
  139. }
  140. } else if (item.businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
  141. if (this.statusFlag == 1) {
  142. item.itemUrl = `/pages/task/audit/acquisition_settlement_approval?id=${item.businessId}`
  143. } else {
  144. item.itemUrl = '/pages/task/audit/acquisition_settlement_details/?id=' + item.businessId
  145. }
  146. } else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
  147. if (this.statusFlag == 1) {
  148. item.itemUrl = `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId
  149. } else {
  150. item.itemUrl = `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId
  151. }
  152. } else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
  153. if (this.statusFlag == 1) {
  154. item.itemUrl = `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId
  155. } else {
  156. item.itemUrl = `/pages/task/audit/purchase_settlement_details?id=` + item.businessId
  157. }
  158. } else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
  159. if (this.statusFlag == 1) {
  160. item.itemUrl = `/pages/task/audit/freight_settlement_approval?id=` + item.businessId
  161. } else {
  162. item.itemUrl = `/pages/task/audit/freight_settlement_details?id=` + item.businessId +
  163. '&compId=' + this
  164. .pcUserInfo.compId
  165. }
  166. } else if (item.businessCode == 'YUNJIA-TRAN-APPROVE') {
  167. if (this.statusFlag == 1) {
  168. item.itemUrl = `/pages/task/audit/freight_setting_approval?id=` + item.businessId
  169. } else {
  170. item.itemUrl = `/pages/task/audit/freight_setting_details?id=` + item.businessId
  171. }
  172. } else if (item.businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') { //库点收购
  173. if (this.statusFlag == 1) {
  174. item.itemUrl = `/pages/task/audit/acquisition_information_approval?id=` + item.businessId
  175. } else {
  176. item.itemUrl = `/pages/task/audit/acquisition_information_details?id=` + item.businessId
  177. }
  178. } else if (item.businessCode == 'TRADE-WAREHOUSE-REPORT') { //贸易服务
  179. if (this.statusFlag == 1) {
  180. item.itemUrl = `/pages/task/audit/tradeServices_audit?id=` + item.businessId
  181. } else {
  182. item.itemUrl = `/pages/task/audit/tradeServices_audit_approval?id=` + item.businessId
  183. }
  184. } else if (item.businessCode == 'COLLECTION-WAREHOUSING-RECORD') {
  185. if (this.statusFlag == 1) {
  186. item.itemUrl = `/pages/task/audit/collection_business_approval?id=` + item.businessId
  187. } else {
  188. item.itemUrl = `/pages/task/audit/collection_business_details?id=` + item.businessId
  189. }
  190. }
  191. if (item.taskType == "入库任务") {
  192. if (item.statusFlag == 3) {
  193. item.itemUrl = `/pageD/warehousings/warehousingDetails?id=${item.id}`
  194. } else {
  195. item.itemUrl =
  196. `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}`
  197. }
  198. } else if (item.taskType == "出库任务") {
  199. if (item.statusFlag == 3) {
  200. item.itemUrl = `/pageD/warehousings/ex_warehouse_detail?id=${item.id}`
  201. } else {
  202. item.itemUrl =
  203. `/pageD/warehousings/ex_warehouse?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&consignee=${item.consignee}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&boxNo=${item.boxNo}&titleNo=${item.titleNo}`
  204. }
  205. }
  206. }
  207. uni.setStorageSync("copyTaskInfo", this.copyTaskInfo)
  208. }
  209. },
  210. computed: {
  211. ...mapState(['hasLogin', 'userInfo'])
  212. },
  213. onShow() {
  214. var that =this
  215. that.compName = uni.getStorageSync('compName1')
  216. if(this.statusFlag==1){
  217. this.taskInfo=[]
  218. this.pages=1
  219. this.getIndexBuyData(1,this.keyword)
  220. }
  221. // this.warehouseInOutInfo.phone = this.userInfo.phone
  222. },
  223. onLoad() {
  224. this.pcUserInfo = uni.getStorageSync("pcUserInfo")
  225. if (uni.getStorageSync("everyTask") == true) {
  226. this.checked = true
  227. } else {
  228. this.checked = false
  229. }
  230. this.pages = 1
  231. this.warehouseInOutInfo.currentPage = 1
  232. this.data.currentPage = 1
  233. this.taskInfo = []
  234. this.pcUserInfo = uni.getStorageSync("pcUserInfo")
  235. this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
  236. if (res.data.data == "INVALID") {
  237. uni.showModal({
  238. title: '提示',
  239. content: '当前登入信息验证失败,是否重新登录?',
  240. showCancel: true,
  241. confirmText: '登录',
  242. success: (e) => {
  243. if (e.confirm) {
  244. uni.navigateTo({
  245. url: '/pages/public/login'
  246. })
  247. }
  248. },
  249. fail: () => {},
  250. complete: () => {}
  251. })
  252. } else {
  253. this.getIndexBuyData()
  254. }
  255. })
  256. },
  257. onReachBottom() { //上拉触底函数
  258. // if (this.statusFlag == 3) {
  259. if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
  260. this.pages += 1
  261. if (this.statusFlag == 1) {
  262. this.warehouseInOutInfo.currentPage += 1
  263. } else {
  264. this.data.currentPage += 1
  265. }
  266. this.getIndexBuyData(1,this.keyword)
  267. }
  268. // }
  269. },
  270. // onLoad(options) {
  271. // this.getIndexBuyData()
  272. // },
  273. filters: {
  274. formatDate(date) {
  275. var date = new Date(date)
  276. var time = new Date()
  277. var newdate = ''
  278. if (time.getMonth() + 1 >= 10) {
  279. newdate = time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate()
  280. } else {
  281. newdate = time.getFullYear() + '-0' + (time.getMonth() + 1) + '-' + time.getDate()
  282. }
  283. //把时间戳改为yyyy-MM-dd格式
  284. //判断是否今天
  285. var datatime = ''
  286. if (date.getMonth() + 1 >= 10) {
  287. datatime = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
  288. } else {
  289. datatime = date.getFullYear() + '-0' + (date.getMonth() + 1) + '-' + date.getDate()
  290. }
  291. if (datatime == newdate) {
  292. var h = date.getHours();
  293. h = h < 10 ? '0' + h : h;
  294. var m = date.getMinutes();
  295. m = m < 10 ? '0' + m : m;
  296. var s = date.getSeconds();
  297. s = s < 10 ? '0' + s : s;
  298. return h + ':' + m + ':' + s;
  299. } else {
  300. if (date.getMonth() + 1 >= 10) {
  301. return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate()
  302. } else {
  303. return date.getFullYear() + '-0' + (date.getMonth() + 1) + '-' + date.getDate()
  304. }
  305. }
  306. let o = {
  307. 'Y': date.getFullYear(),
  308. 'M+': date.getMonth() + 1,
  309. 'd+': date.getDate(),
  310. }
  311. },
  312. },
  313. methods: {
  314. // getRoles(){
  315. // let _rolesList = uni.getStorageSync('rolesList')
  316. // let _list = ['','']
  317. // for(let i = 0;i<_list.length;i++){
  318. // for(let k = 0;k<_rolesList.length;k++){
  319. // if(_list[i]==_rolesList[k]){
  320. // return true
  321. // }
  322. // }
  323. // }
  324. // return false
  325. // },
  326. change(status) {
  327. console.log(status);
  328. },
  329. searchKeyWord() {
  330. this.pages=1
  331. if (!this.keyword) {
  332. this.$api.msg('关键字不能为空')
  333. }
  334. this.getIndexBuyData(1,this.keyword)
  335. // uni.showLoading({
  336. // title: "正在加载"
  337. // })
  338. // this.$api.doRequest('get', '/warehouseInOutInfo/selectInfoByKeyWord', this.warehouseInOutInfo).then(
  339. // res => {
  340. // if (res.data.code == 200) {
  341. // this.taskInfo = res.data.data
  342. // uni.hideLoading()
  343. // } else {
  344. // uni.showToast({
  345. // title: res.data.message,
  346. // icon: 'none',
  347. // duration: 2000
  348. // })
  349. // uni.hideLoading(this.taskInfo, "信息")
  350. // }
  351. // }).catch(res => {
  352. // uni.showToast({
  353. // title: res.data.message,
  354. // icon: 'none',
  355. // duration: 2000
  356. // })
  357. // uni.hideLoading()
  358. // })
  359. },
  360. getIndexBuyData(status,searchKeyword) {
  361. const that = this
  362. var pages = that.pages
  363. var limit = that.limit
  364. var url = ''
  365. uni.showLoading({
  366. title: "正在加载"
  367. })
  368. var data = {}
  369. if (this.statusFlag == 1) {
  370. data.searchKeyword = searchKeyword
  371. data.currentPage = pages
  372. data.pageSize = limit
  373. url = '/newNoticeTask/query/noticeTasks'
  374. } else if (this.statusFlag == 3) {
  375. data.currentPage = pages
  376. data.pageSize = limit
  377. data.roleId = this.userInfo.roleIds
  378. data.userId = this.userInfo.id
  379. data.searchKeyword = searchKeyword
  380. url = '/commonUser/query/findHisPageNoticeTasks'
  381. }
  382. else if (this.statusFlag == 5) {
  383. data.currentPage = pages
  384. data.pageSize = limit
  385. data.roleId = this.userInfo.roleIds
  386. data.createUserId = this.userInfo.id
  387. data.searchKeyword = searchKeyword
  388. url = '/commonUser/query/findHisPageNoticeTasksMy'
  389. }
  390. else if (this.statusFlag == 7) {
  391. data.currentPage = pages
  392. data.pageSize = limit
  393. data.acceptId = this.userInfo.phone
  394. data.compId = this.pcUserInfo.compId
  395. data.searchKeyword = searchKeyword
  396. url = '/noticeCopyInfo/getNotice'
  397. }
  398. //this.warehouseInOutInfo.status = this.status
  399. this.$api.doRequest('get', url, data).then(res => {
  400. if (res.data.code == 200) {
  401. let data = res.data.data.records
  402. //采购信息
  403. if (data.length > 0) {
  404. if (pages==1) {
  405. that.taskInfo = data
  406. } else {
  407. that.taskInfo = that.taskInfo.concat(data)
  408. }
  409. } else {
  410. if (that.pages > 1) {
  411. that.pages -= 1
  412. }
  413. that.isLoadMore = false
  414. that.loadStatus = 'nomore'
  415. }
  416. for (var i = 0; i < this.taskInfo.length; i++) {
  417. let _str = this.taskInfo[i]
  418. // let a = this.getRoles()
  419. // if (_str.messageContent.indexOf("您发起") > -1) {
  420. // _str.showRow = false
  421. // } else {
  422. // _str.showRow = true;
  423. // }
  424. // if(_str.businessType=='TRADE'){
  425. // _str.showRow = false
  426. // }.split(' ')[0]
  427. this.taskInfo[i].department = this.taskInfo[i].messageTitle
  428. // if (this.taskInfo[i].messageContent.split(' ').length > 1) {
  429. // this.taskInfo[i].messageContent = this.taskInfo[i].messageContent.split(' ')[1]
  430. // }
  431. if (this.taskInfo[i].businessType == 'WAREHOUSE') {
  432. if (this.taskInfo[i].businessCode == 'INOUTTASK-TASK-APPROVE') {
  433. this.taskInfo[i].messageTitle = '出入库任务'
  434. }
  435. } else if (this.taskInfo[i].businessType == 'acquisition') {
  436. if (this.taskInfo[i].businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
  437. this.taskInfo[i].messageTitle = '付款管理'
  438. }
  439. } else if (this.taskInfo[i].businessType == 'REPORT') {
  440. if (this.taskInfo[i].businessCode == 'PROCUREMENT-CLOSE-REPORT') {
  441. this.taskInfo[i].messageTitle = '采购平仓统计'
  442. }
  443. if (this.taskInfo[i].businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
  444. this.taskInfo[i].messageTitle = '采购入库统计'
  445. }
  446. if (this.taskInfo[i].businessCode == 'SALE-CLOSE-REPORT') {
  447. this.taskInfo[i].messageTitle = '销售平仓统计'
  448. }
  449. if (this.taskInfo[i].businessCode == 'SALE-RECEIPT-REPORT') {
  450. this.taskInfo[i].messageTitle = '销售入库统计'
  451. }
  452. if (this.taskInfo[i].businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
  453. this.taskInfo[i].messageTitle = '运输结算统计'
  454. }
  455. } else if (this.taskInfo[i].businessType == 'PROCUREMENT') {
  456. if (this.taskInfo[i].businessCode == 'PROCUREMENT-ORDER-APPROVE') {
  457. this.taskInfo[i].messageTitle = '采购订单'
  458. }
  459. } else if (this.taskInfo[i].businessType == 'SALE') {
  460. if (this.taskInfo[i].businessCode == 'SALE-ORDER-APPROVE') {
  461. this.taskInfo[i].messageTitle = '销售订单'
  462. }
  463. } else if (this.taskInfo[i].businessType == 'PROCUREMENT') {
  464. if (this.taskInfo[i].businessCode == 'PROCUREMENT-PRICE-APPROVE') {
  465. this.taskInfo[i].messageTitle = '仓库设置'
  466. }
  467. } else if (this.taskInfo[i].businessType == 'Tran') {
  468. if (this.taskInfo[i].businessCode == 'YUNJIA-TRAN-APPROVE') {
  469. this.taskInfo[i].messageTitle = '运费设置'
  470. }
  471. } else if (this.taskInfo[i].businessType == 'ACQ') {
  472. if (this.taskInfo[i].businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') {
  473. this.taskInfo[i].messageTitle = '收购信息审核'
  474. }
  475. } else if (this.taskInfo[i].businessType == 'TRADE') {
  476. if (this.taskInfo[i].businessCode == 'TRADE-WAREHOUSE-REPORT') {
  477. this.taskInfo[i].messageTitle = '贸易服务审核'
  478. }
  479. }
  480. }
  481. if (res.data.data.records.length == 0) {
  482. that.isSole = true
  483. } else {
  484. that.isSole = false
  485. }
  486. if (res.data.data.records.length == 0 && this.data.currentPage == 1 && this.statusFlag ==
  487. 3 ||
  488. res.data.data.records.length == 0 && this.warehouseInOutInfo.currentPage == 1 && this
  489. .statusFlag == 1 ||
  490. res.data.data.records.length == 0 && this.warehouseInOutInfo.currentPage == 1 && this
  491. .statusFlag == 5) {
  492. console.log()
  493. this.taskInfo = []
  494. }
  495. uni.hideLoading()
  496. } else {
  497. uni.hideLoading()
  498. uni.showToast({
  499. title: "系统异常,请联系管理员",
  500. icon: 'none',
  501. duration: 2000
  502. })
  503. }
  504. }).catch(res => {
  505. uni.hideLoading()
  506. uni.showToast({
  507. title: "Session失效,请重新登录",
  508. icon: 'none',
  509. duration: 2000
  510. })
  511. })
  512. },
  513. tabcarchange(statusFlag) {
  514. this.statusFlag = statusFlag
  515. this.pages = 1
  516. this.getIndexBuyData(statusFlag)
  517. },
  518. navToDetailPage(item) {
  519. uni.setStorageSync('taskContent',item.messageContent)
  520. if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
  521. uni.navigateTo({
  522. url: '/pages/task/procurement_details?id=' + item.businessId + "&isShowbtn=true"
  523. })
  524. } else if (item.businessCode == 'SALE-ORDER-APPROVE') {
  525. uni.navigateTo({
  526. url: '/pages/task/sale_details?id=' + item.businessId + "&isShowbtn=true"
  527. })
  528. } else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
  529. uni.navigateTo({
  530. url: '/pages/task/audit/salecontract?id=' + item.businessId + "&isShowbtn=true"
  531. })
  532. }
  533. else if (item.businessCode == 'JIAYOU-SHENHE-APPROVE') {
  534. uni.navigateTo({
  535. url: '/pages/task/audit/refuel?id=' + item.businessId + "&isShowbtn=true"
  536. })
  537. }else if (item.businessCode == 'DAISHOU-CONTRACT-APPROVE') {
  538. uni.navigateTo({
  539. url: '/pages/task/audit/daishou_details?id=' + item.businessId + "&isShowbtn=true"
  540. })
  541. } else if (item.businessCode == 'DAICHU-CONTRACT-APPROVE') {
  542. uni.navigateTo({
  543. url: '/pages/task/audit/daichu_details?id=' + item.businessId + "&isShowbtn=true"
  544. })
  545. } else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
  546. uni.navigateTo({
  547. url: '/pages/task/audit/purchasecontract?id=' + item.businessId + "&isShowbtn=true"
  548. })
  549. }else if (item.businessCode == 'SHOU-CONTRACT-APPROVE') {
  550. uni.navigateTo({
  551. url: '/pages/task/audit/acquisitioncontract?id=' + item.businessId + "&isShowbtn=true"
  552. })
  553. } else if (item.businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
  554. uni.navigateTo({
  555. url: '/pages/task/procurement_report_details?id=' + item.businessId + "&isShowbtn=true"
  556. })
  557. } else if (item.businessCode == 'PROCUREMENT-CLOSE-REPORT') {
  558. uni.navigateTo({
  559. url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
  560. })
  561. } else if (item.businessCode == 'SALE-RECEIPT-REPORT') {
  562. uni.navigateTo({
  563. url: '/pages/task/sale_report_details?id=' + item.businessId + "&isShowbtn=true"
  564. })
  565. } else if (item.businessCode == 'SALE-CLOSE-REPORT') {
  566. uni.navigateTo({
  567. url: '/pages/task/sale_close_details?id=' + item.businessId + "&isShowbtn=true"
  568. })
  569. } else if (item.businessCode == 'PROCUREMENT-PRICE-APPROVE') {
  570. if (this.statusFlag == 1) {
  571. uni.navigateTo({
  572. url: `/pages/task/audit/warehouse_approval?id=${item.businessId}&isShowbtn=true`
  573. })
  574. } else {
  575. uni.navigateTo({
  576. url: '/pages/task/audit/warehouse_details?id=' + item.businessId + "&isShowbtn=true"
  577. })
  578. }
  579. } else if (item.businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
  580. if (this.statusFlag == 1) {
  581. uni.navigateTo({
  582. url: `/pages/task/audit/acquisition_settlement_approval?vesselId=${item.vesselId}&id=${item.businessId}`
  583. })
  584. } else {
  585. uni.navigateTo({
  586. url: '/pages/task/audit/acquisition_settlement_details?id=' + item.businessId +
  587. '&isShowbtn=true'
  588. })
  589. }
  590. } else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
  591. if (this.statusFlag == 1) {
  592. uni.navigateTo({
  593. url: `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId +
  594. "&isShowbtn=true"
  595. })
  596. } else {
  597. uni.navigateTo({
  598. url: `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId +
  599. "&isShowbtn=true"
  600. })
  601. }
  602. } else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
  603. if (this.statusFlag == 1) {
  604. uni.navigateTo({
  605. url: `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId +
  606. "&isShowbtn=true"
  607. })
  608. } else {
  609. uni.navigateTo({
  610. url: `/pages/task/audit/purchase_settlement_details?id=` + item.businessId +
  611. "&isShowbtn=true"
  612. })
  613. }
  614. } else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
  615. if (this.statusFlag == 1) {
  616. uni.navigateTo({
  617. url: `/pages/task/audit/freight_settlement_approval?id=` + item.businessId +
  618. "&isShowbtn=true"
  619. })
  620. } else {
  621. uni.navigateTo({
  622. url: `/pages/task/audit/freight_settlement_details?id=` + item.businessId +
  623. '&compId=' + this
  624. .pcUserInfo.compId + "&isShowbtn=true"
  625. })
  626. }
  627. }
  628. else if (item.businessCode == 'GENERAL-AUDIT-APPROVE') {
  629. uni.navigateTo({
  630. url: `/pages/task/audit/universalityAudit?id=` + item.businessId
  631. })
  632. }
  633. else if (item.businessCode == 'FEIYONGYUNFEI-APPROVE') {
  634. if (this.statusFlag == 1) {
  635. uni.navigateTo({
  636. url: `/pages/task/audit/freight_settlement_approvalcopy?id=` + item.businessId +
  637. "&isShowbtn=true"
  638. })
  639. } else {
  640. uni.navigateTo({
  641. url: `/pages/task/audit/freight_settlement_detailscopy?id=` + item.businessId +
  642. '&compId=' + this
  643. .pcUserInfo.compId + "&isShowbtn=true"
  644. })
  645. }
  646. }else if (item.businessCode == 'YUNJIA-TRAN-APPROVE') {
  647. if (this.statusFlag == 1) {
  648. uni.navigateTo({
  649. url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
  650. "&isShowbtn=true"
  651. })
  652. } else {
  653. uni.navigateTo({
  654. url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
  655. "&isShowbtn=true"
  656. })
  657. }
  658. } else if (item.businessCode == 'TRAN-TEAM-APPROVE') {
  659. if (this.statusFlag == 1) {
  660. uni.navigateTo({
  661. url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
  662. "&isShowbtn=true"
  663. })
  664. } else {
  665. uni.navigateTo({
  666. url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
  667. "&isShowbtn=true"
  668. })
  669. }
  670. } else if (item.businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') {
  671. if (this.statusFlag == 1) {
  672. uni.navigateTo({
  673. url: `/pages/task/audit/acquisition_information_approval?id=` + item.businessId +
  674. "&isShowbtn=true"
  675. })
  676. } else {
  677. uni.navigateTo({
  678. url: `/pages/task/audit/acquisition_information_details?id=` + item.businessId +
  679. "&isShowbtn=true"
  680. })
  681. }
  682. } else if (item.businessCode == 'BUKA-APPROVE') {
  683. if (this.statusFlag == 1) {
  684. uni.navigateTo({
  685. url: `/pages/task/audit/supp_clock_approve?id=` + item.businessId +
  686. "&isShowbtn=true"
  687. })
  688. } else {
  689. uni.navigateTo({
  690. url: `/pages/task/audit/supp_clock_details?id=` + item.businessId +
  691. "&isShowbtn=true"
  692. })
  693. }
  694. } else if (item.businessCode == 'QINGJIA-APPROVE') {
  695. if (this.statusFlag == 1) {
  696. uni.navigateTo({
  697. url: `/pages/task/audit/leave_approve?id=` + item.businessId +
  698. "&isShowbtn=true"
  699. })
  700. } else {
  701. uni.navigateTo({
  702. url: `/pages/task/audit/leave_details?id=` + item.businessId +
  703. "&isShowbtn=true"
  704. })
  705. }
  706. } else if (item.businessCode == 'TRADE-WAREHOUSE-REPORT') {
  707. if (this.statusFlag == 1) {
  708. uni.navigateTo({
  709. url: `/pages/task/audit/tradeServices_audit?id=` + item.businessId
  710. })
  711. } else {
  712. uni.navigateTo({
  713. url: `/pages/task/audit/tradeServices_audit_approval?id=` + item.businessId
  714. })
  715. }
  716. } else if (item.businessCode == 'WAREHOUSING-ORDER-APPROVE') {
  717. if (this.statusFlag == 1) {
  718. uni.navigateTo({
  719. url: `/pages/task/audit/warehouse_warrant?id=` + item.businessId
  720. })
  721. } else {
  722. uni.navigateTo({
  723. url: `/pages/task/audit/warehouse_warrant_detail?id=` + item.businessId
  724. })
  725. }
  726. } else if (item.businessCode == 'FEIYONGGUANLI-APPROVE') {
  727. if (this.statusFlag == 1) {
  728. uni.navigateTo({
  729. url: `/pages/task/audit/charge_against_revenue?id=` + item.businessId
  730. })
  731. } else {
  732. uni.navigateTo({
  733. url: `/pages/task/audit/charge_against_revenue_detail?id=` + item.businessId
  734. })
  735. }
  736. } else if (item.businessCode == 'COLLECTION-WAREHOUSING-RECORD') {
  737. if (this.statusFlag == 1) {
  738. uni.navigateTo({
  739. url: `/pages/task/audit/collection_business_approval?id=` + item.businessId +
  740. "&isShowbtn=true"
  741. })
  742. } else {
  743. uni.navigateTo({
  744. url: `/pages/task/audit/collection_business_details?id=` + item.businessId +
  745. "&isShowbtn=true"
  746. })
  747. }
  748. }
  749. if (item.taskType == "入库任务") {
  750. if (item.statusFlag == 3) {
  751. uni.navigateTo({
  752. url: `/pageD/warehousings/warehousingDetails?id=${item.id}&isShowbtn=true`
  753. })
  754. } else {
  755. uni.navigateTo({
  756. url: `/pageD/warehousings/warehousings?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&startWeight=${item.startWeight}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&warehouseName=${item.warehouseName}&addressUrl=${item.addressUrl}&inOutDate=${item.inOutDate}&binNumber=${item.binNumber}&isShowbtn=true`
  757. })
  758. }
  759. } else if (item.taskType == "出库任务") {
  760. if (item.statusFlag == 3) {
  761. uni.navigateTo({
  762. url: `/pageD/warehousings/ex_warehouse_detail?id=${item.id}&isShowbtn=true`
  763. })
  764. } else {
  765. uni.navigateTo({
  766. url: `/pageD/warehousings/ex_warehouse?id=${item.id}&goodsName=${item.goodsName}&contractNo=${item.contractNo}&consignee=${item.consignee}&carNo=${item.carNo}&tranCarNo=${item.tranCarNo}&boxNo=${item.boxNo}&titleNo=${item.titleNo}&isShowbtn=true`
  767. })
  768. }
  769. }
  770. }
  771. }
  772. }
  773. </script>
  774. <style lang="scss" scoped>
  775. .content {
  776. padding-bottom: 50rpx;
  777. }
  778. .tag {
  779. background: #F5F6F9;
  780. padding: 5px;
  781. color: #333333;
  782. display: inline-flex;
  783. font-size: 22rpx;
  784. border-radius: 3px;
  785. margin: 3px;
  786. }
  787. .introduce-section {
  788. // background: red;
  789. }
  790. .introduce-section .title_b .title-tip {
  791. font-size: 13px;
  792. height: 40px;
  793. line-height: 40px;
  794. flex: 2.5;
  795. }
  796. .introduce-section .title_b .title {
  797. font-size: 13px;
  798. height: 40px;
  799. flex: 2.5;
  800. }
  801. .introduce-section .title_b .title-tip-b {
  802. flex: 1;
  803. font-size: 13px;
  804. color: #878C9C;
  805. height: 40px;
  806. line-height: 40px;
  807. }
  808. .introduce-section .title {
  809. justify-content: space-between;
  810. align-items: flex-start;
  811. }
  812. .introduce-section .title text {
  813. font-size: 28rpx;
  814. }
  815. .introduce-section .title .title-tip {
  816. flex: 1;
  817. font-size: 28rpx;
  818. color: #FE6430;
  819. font-weight: 500;
  820. height: 50px;
  821. line-height: 50px;
  822. border-bottom: 1px solid #EEEEEE;
  823. }
  824. .introduce-section .title .title-tip-a {
  825. flex: 1;
  826. font-size: 15px;
  827. color: #AFB3BF;
  828. font-weight: 500;
  829. height: 50px;
  830. line-height: 50px;
  831. border-bottom: 1px solid #EEEEEE;
  832. }
  833. .introduce-section .guess-item {
  834. border-radius: 10rpx;
  835. background: #fff;
  836. padding: 32rpx;
  837. margin: 20rpx;
  838. }
  839. .line {
  840. display: inline-block;
  841. padding: 5px;
  842. position: relative;
  843. font-size: 17px;
  844. }
  845. .line.active {
  846. font-size: 19px;
  847. font-weight: 900;
  848. }
  849. .line.active:after {
  850. content: '';
  851. display: block;
  852. position: absolute;
  853. width: 18px;
  854. left: 50%;
  855. transform: translateX(-50%);
  856. bottom: 0;
  857. border-bottom: 3px solid #22C572;
  858. }
  859. /deep/.u-action-active {
  860. margin-right: 6px;
  861. }
  862. .content1-top {
  863. background: white;
  864. padding: 20rpx 20rpx 0 20rpx;
  865. border-radius: 0 0 30rpx 30rpx;
  866. }
  867. .search-form {
  868. margin-bottom: 20rpx;
  869. }
  870. .title-row1 {
  871. font-size: 34rpx;
  872. font-weight: 600;
  873. }
  874. .row2 {
  875. margin-top: 55rpx;
  876. }
  877. .top2 {
  878. display: flex;
  879. align-items: center;
  880. justify-content: space-between;
  881. .right {
  882. display: flex;
  883. align-items: center;
  884. .right-contrent1 {
  885. margin: 20rpx;
  886. }
  887. }
  888. }
  889. .company {
  890. // position: fixed;
  891. // right: 0;
  892. // top: 18%;
  893. background: url('../../static/img/qiyebeijing.png');
  894. background-size: 100% 100%;
  895. text-align:right;
  896. font-size: 11px;
  897. padding-bottom: 5px;
  898. padding-right: 10px;
  899. width:60%;
  900. margin-right:-10px;
  901. border-radius: 40rpx 0 0 40rpx;
  902. }
  903. .company .icon {
  904. position: relative;
  905. top: 4px;
  906. }
  907. </style>