my_task.vue 30 KB

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