my_task.vue 32 KB

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