my_task.vue 30 KB

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