my_task.vue 30 KB

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