my_task.vue 30 KB

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