my_task.vue 31 KB

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