my_task.vue 30 KB

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