my_task.vue 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996
  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. console.log(data)
  445. console.log(that.taskInfo)
  446. if (res.data.data.records.length == 0 && this.pages == 1 && this.statusFlag ==
  447. 3 ||
  448. res.data.data.records.length == 0 && this.pages == 1 && this
  449. .statusFlag == 1 ||
  450. res.data.data.records.length == 0 && this.pages == 1 && this
  451. .statusFlag == 5||
  452. res.data.data.records.length == 0 && this.pages == 1 && this
  453. .statusFlag == 7) {
  454. console.log()
  455. this.taskInfo = []
  456. }
  457. //采购信息
  458. if (data.length > 0) {
  459. if (pages==1) {
  460. that.taskInfo = data
  461. } else {
  462. that.taskInfo = that.taskInfo.concat(data)
  463. }
  464. } else {
  465. if (that.pages > 1) {
  466. that.pages -= 1
  467. }
  468. that.isLoadMore = false
  469. that.loadStatus = 'nomore'
  470. }
  471. console.log(that.taskInfo)
  472. for (var i = 0; i < this.taskInfo.length; i++) {
  473. let _str = this.taskInfo[i]
  474. // let a = this.getRoles()
  475. // if (_str.messageContent.indexOf("您发起") > -1) {
  476. // _str.showRow = false
  477. // } else {
  478. // _str.showRow = true;
  479. // }
  480. // if(_str.businessType=='TRADE'){
  481. // _str.showRow = false
  482. // }.split(' ')[0]
  483. this.taskInfo[i].department = this.taskInfo[i].messageTitle
  484. // if (this.taskInfo[i].messageContent.split(' ').length > 1) {
  485. // this.taskInfo[i].messageContent = this.taskInfo[i].messageContent.split(' ')[1]
  486. // }
  487. if (this.taskInfo[i].businessType == 'WAREHOUSE') {
  488. if (this.taskInfo[i].businessCode == 'INOUTTASK-TASK-APPROVE') {
  489. this.taskInfo[i].messageTitle = '出入库任务'
  490. }
  491. } else if (this.taskInfo[i].businessType == 'acquisition') {
  492. if (this.taskInfo[i].businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
  493. this.taskInfo[i].messageTitle = '付款管理'
  494. }
  495. } else if (this.taskInfo[i].businessType == 'REPORT') {
  496. if (this.taskInfo[i].businessCode == 'PROCUREMENT-CLOSE-REPORT') {
  497. this.taskInfo[i].messageTitle = '采购平仓统计'
  498. }
  499. if (this.taskInfo[i].businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
  500. this.taskInfo[i].messageTitle = '采购入库统计'
  501. }
  502. if (this.taskInfo[i].businessCode == 'SALE-CLOSE-REPORT') {
  503. this.taskInfo[i].messageTitle = '销售平仓统计'
  504. }
  505. if (this.taskInfo[i].businessCode == 'SALE-RECEIPT-REPORT') {
  506. this.taskInfo[i].messageTitle = '销售入库统计'
  507. }
  508. if (this.taskInfo[i].businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
  509. this.taskInfo[i].messageTitle = '运输结算统计'
  510. }
  511. } else if (this.taskInfo[i].businessType == 'PROCUREMENT') {
  512. if (this.taskInfo[i].businessCode == 'PROCUREMENT-ORDER-APPROVE') {
  513. this.taskInfo[i].messageTitle = '采购订单'
  514. }
  515. } else if (this.taskInfo[i].businessType == 'SALE') {
  516. if (this.taskInfo[i].businessCode == 'SALE-ORDER-APPROVE') {
  517. this.taskInfo[i].messageTitle = '销售订单'
  518. }
  519. } else if (this.taskInfo[i].businessType == 'PROCUREMENT') {
  520. if (this.taskInfo[i].businessCode == 'PROCUREMENT-PRICE-APPROVE') {
  521. this.taskInfo[i].messageTitle = '仓库设置'
  522. }
  523. } else if (this.taskInfo[i].businessType == 'Tran') {
  524. if (this.taskInfo[i].businessCode == 'YUNJIA-TRAN-APPROVE') {
  525. this.taskInfo[i].messageTitle = '运费设置'
  526. }
  527. } else if (this.taskInfo[i].businessType == 'ACQ') {
  528. if (this.taskInfo[i].businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') {
  529. this.taskInfo[i].messageTitle = '收购信息审核'
  530. }
  531. } else if (this.taskInfo[i].businessType == 'TRADE') {
  532. if (this.taskInfo[i].businessCode == 'TRADE-WAREHOUSE-REPORT') {
  533. this.taskInfo[i].messageTitle = '贸易服务审核'
  534. }
  535. }
  536. }
  537. if (res.data.data.records.length == 0) {
  538. that.isSole = true
  539. } else {
  540. that.isSole = false
  541. }
  542. uni.hideLoading()
  543. } else {
  544. uni.hideLoading()
  545. uni.showToast({
  546. title: "系统异常,请联系管理员",
  547. icon: 'none',
  548. duration: 2000
  549. })
  550. }
  551. }).catch(res => {
  552. uni.hideLoading()
  553. uni.showToast({
  554. title: "Session失效,请重新登录",
  555. icon: 'none',
  556. duration: 2000
  557. })
  558. })
  559. },
  560. tabcarchange(statusFlag) {
  561. this.statusFlag = statusFlag
  562. this.pages = 1
  563. this.taskInfo=[]
  564. this.getIndexBuyData(statusFlag)
  565. },
  566. navToDetailPage(item) {
  567. uni.setStorageSync('taskContent',item.messageContent)
  568. if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
  569. uni.navigateTo({
  570. url: '/pages/task/procurement_details?id=' + item.businessId + "&isShowbtn=true"
  571. })
  572. } else if (item.businessCode == 'SALE-ORDER-APPROVE') {
  573. uni.navigateTo({
  574. url: '/pages/task/sale_details?id=' + item.businessId + "&isShowbtn=true"
  575. })
  576. } else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
  577. uni.navigateTo({
  578. url: '/pages/task/audit/salecontract?id=' + item.businessId + "&isShowbtn=true"
  579. })
  580. }
  581. else if (item.businessCode == 'JIAYOU-SHENHE-APPROVE') {
  582. uni.navigateTo({
  583. url: '/pages/task/audit/refuel?id=' + item.businessId + "&isShowbtn=true"
  584. })
  585. }else if (item.businessCode == 'DAISHOU-CONTRACT-APPROVE') {
  586. uni.navigateTo({
  587. url: '/pages/task/audit/daishou_details?id=' + item.businessId + "&isShowbtn=true"
  588. })
  589. } else if (item.businessCode == 'DAICHU-CONTRACT-APPROVE') {
  590. uni.navigateTo({
  591. url: '/pages/task/audit/daichu_details?id=' + item.businessId + "&isShowbtn=true"
  592. })
  593. } else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
  594. uni.navigateTo({
  595. url: '/pages/task/audit/purchasecontract?id=' + item.businessId + "&isShowbtn=true"
  596. })
  597. }else if (item.businessCode == 'SHOU-CONTRACT-APPROVE') {
  598. uni.navigateTo({
  599. url: '/pages/task/audit/acquisitioncontract?id=' + item.businessId + "&isShowbtn=true"
  600. })
  601. } else if (item.businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
  602. uni.navigateTo({
  603. url: '/pages/task/procurement_report_details?id=' + item.businessId + "&isShowbtn=true"
  604. })
  605. } else if (item.businessCode == 'PROCUREMENT-CLOSE-REPORT') {
  606. uni.navigateTo({
  607. url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
  608. })
  609. } else if (item.businessCode == 'SALE-RECEIPT-REPORT') {
  610. uni.navigateTo({
  611. url: '/pages/task/sale_report_details?id=' + item.businessId + "&isShowbtn=true"
  612. })
  613. } else if (item.businessCode == 'SALE-CLOSE-REPORT') {
  614. uni.navigateTo({
  615. url: '/pages/task/sale_close_details?id=' + item.businessId + "&isShowbtn=true"
  616. })
  617. } else if (item.businessCode == 'PROCUREMENT-PRICE-APPROVE') {
  618. if (this.statusFlag == 1) {
  619. uni.navigateTo({
  620. url: `/pages/task/audit/warehouse_approval?id=${item.businessId}&isShowbtn=true`
  621. })
  622. } else {
  623. uni.navigateTo({
  624. url: '/pages/task/audit/warehouse_details?id=' + item.businessId + "&isShowbtn=true"
  625. })
  626. }
  627. } else if (item.businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
  628. if (this.statusFlag == 1) {
  629. uni.navigateTo({
  630. url: `/pages/task/audit/acquisition_settlement_approval?vesselId=${item.vesselId}&id=${item.businessId}`
  631. })
  632. } else {
  633. uni.navigateTo({
  634. url: '/pages/task/audit/acquisition_settlement_details?id=' + item.businessId +
  635. '&isShowbtn=true'
  636. })
  637. }
  638. } else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
  639. if (this.statusFlag == 1) {
  640. uni.navigateTo({
  641. url: `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId +
  642. "&isShowbtn=true"
  643. })
  644. } else {
  645. uni.navigateTo({
  646. url: `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId +
  647. "&isShowbtn=true"
  648. })
  649. }
  650. } else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
  651. if (this.statusFlag == 1) {
  652. uni.navigateTo({
  653. url: `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId +
  654. "&isShowbtn=true"
  655. })
  656. } else {
  657. uni.navigateTo({
  658. url: `/pages/task/audit/purchase_settlement_details?id=` + item.businessId +
  659. "&isShowbtn=true"
  660. })
  661. }
  662. } else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
  663. if (this.statusFlag == 1) {
  664. uni.navigateTo({
  665. url: `/pages/task/audit/freight_settlement_approval?id=` + item.businessId +
  666. "&isShowbtn=true"
  667. })
  668. } else {
  669. uni.navigateTo({
  670. url: `/pages/task/audit/freight_settlement_details?id=` + item.businessId +
  671. '&compId=' + this
  672. .pcUserInfo.compId + "&isShowbtn=true"
  673. })
  674. }
  675. }
  676. else if (item.businessCode == 'GENERAL-AUDIT-APPROVE') {
  677. uni.navigateTo({
  678. url: `/pages/task/audit/universalityAudit?id=` + item.businessId
  679. })
  680. }
  681. else if (item.businessCode == 'FEIYONGYUNFEI-APPROVE') {
  682. if (this.statusFlag == 1) {
  683. uni.navigateTo({
  684. url: `/pages/task/audit/freight_settlement_approvalcopy?id=` + item.businessId +
  685. "&isShowbtn=true"
  686. })
  687. } else {
  688. uni.navigateTo({
  689. url: `/pages/task/audit/freight_settlement_detailscopy?id=` + item.businessId +
  690. '&compId=' + this
  691. .pcUserInfo.compId + "&isShowbtn=true"
  692. })
  693. }
  694. }else if (item.businessCode == 'YUNJIA-TRAN-APPROVE') {
  695. if (this.statusFlag == 1) {
  696. uni.navigateTo({
  697. url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
  698. "&isShowbtn=true"
  699. })
  700. } else {
  701. uni.navigateTo({
  702. url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
  703. "&isShowbtn=true"
  704. })
  705. }
  706. } else if (item.businessCode == 'TRAN-TEAM-APPROVE') {
  707. if (this.statusFlag == 1) {
  708. uni.navigateTo({
  709. url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
  710. "&isShowbtn=true"
  711. })
  712. } else {
  713. uni.navigateTo({
  714. url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
  715. "&isShowbtn=true"
  716. })
  717. }
  718. } else if (item.businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') {
  719. if (this.statusFlag == 1) {
  720. uni.navigateTo({
  721. url: `/pages/task/audit/acquisition_information_approval?id=` + item.businessId +
  722. "&isShowbtn=true"
  723. })
  724. } else {
  725. uni.navigateTo({
  726. url: `/pages/task/audit/acquisition_information_details?id=` + item.businessId +
  727. "&isShowbtn=true"
  728. })
  729. }
  730. } else if (item.businessCode == 'BUKA-APPROVE') {
  731. if (this.statusFlag == 1) {
  732. uni.navigateTo({
  733. url: `/pages/task/audit/supp_clock_approve?id=` + item.businessId +
  734. "&isShowbtn=true"
  735. })
  736. } else {
  737. uni.navigateTo({
  738. url: `/pages/task/audit/supp_clock_details?id=` + item.businessId +
  739. "&isShowbtn=true"
  740. })
  741. }
  742. } else if (item.businessCode == 'QINGJIA-APPROVE') {
  743. if (this.statusFlag == 1) {
  744. uni.navigateTo({
  745. url: `/pages/task/audit/leave_approve?id=` + item.businessId +
  746. "&isShowbtn=true"
  747. })
  748. } else {
  749. uni.navigateTo({
  750. url: `/pages/task/audit/leave_details?id=` + item.businessId +
  751. "&isShowbtn=true"
  752. })
  753. }
  754. } else if (item.businessCode == 'TRADE-WAREHOUSE-REPORT') {
  755. if (this.statusFlag == 1) {
  756. uni.navigateTo({
  757. url: `/pages/task/audit/tradeServices_audit?id=` + item.businessId
  758. })
  759. } else {
  760. uni.navigateTo({
  761. url: `/pages/task/audit/tradeServices_audit_approval?id=` + item.businessId
  762. })
  763. }
  764. } else if (item.businessCode == 'WAREHOUSING-ORDER-APPROVE') {
  765. if (this.statusFlag == 1) {
  766. uni.navigateTo({
  767. url: `/pages/task/audit/warehouse_warrant?id=` + item.businessId
  768. })
  769. } else {
  770. uni.navigateTo({
  771. url: `/pages/task/audit/warehouse_warrant_detail?id=` + item.businessId
  772. })
  773. }
  774. } else if (item.businessCode == 'FEIYONGGUANLI-APPROVE') {
  775. if (this.statusFlag == 1) {
  776. uni.navigateTo({
  777. url: `/pages/task/audit/charge_against_revenue?id=` + item.businessId
  778. })
  779. } else {
  780. uni.navigateTo({
  781. url: `/pages/task/audit/charge_against_revenue_detail?id=` + item.businessId
  782. })
  783. }
  784. } else if (item.businessCode == 'COLLECTION-WAREHOUSING-RECORD') {
  785. if (this.statusFlag == 1) {
  786. uni.navigateTo({
  787. url: `/pages/task/audit/collection_business_approval?id=` + item.businessId +
  788. "&isShowbtn=true"
  789. })
  790. } else {
  791. uni.navigateTo({
  792. url: `/pages/task/audit/collection_business_details?id=` + item.businessId +
  793. "&isShowbtn=true"
  794. })
  795. }
  796. }
  797. if (item.taskType == "入库任务") {
  798. if (item.statusFlag == 3) {
  799. uni.navigateTo({
  800. url: `/pageD/warehousings/warehousingDetails?id=${item.id}&isShowbtn=true`
  801. })
  802. } else {
  803. uni.navigateTo({
  804. 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`
  805. })
  806. }
  807. } else if (item.taskType == "出库任务") {
  808. if (item.statusFlag == 3) {
  809. uni.navigateTo({
  810. url: `/pageD/warehousings/ex_warehouse_detail?id=${item.id}&isShowbtn=true`
  811. })
  812. } else {
  813. uni.navigateTo({
  814. 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`
  815. })
  816. }
  817. }
  818. }
  819. }
  820. }
  821. </script>
  822. <style lang="scss" scoped>
  823. .content {
  824. padding-bottom: 50rpx;
  825. }
  826. .tag {
  827. background: #F5F6F9;
  828. padding: 5px;
  829. color: #333333;
  830. display: inline-flex;
  831. font-size: 22rpx;
  832. border-radius: 3px;
  833. margin: 3px;
  834. }
  835. .introduce-section {
  836. // background: red;
  837. }
  838. .introduce-section .title_b .title-tip {
  839. font-size: 13px;
  840. height: 40px;
  841. line-height: 40px;
  842. flex: 2.5;
  843. }
  844. .introduce-section .title_b .title {
  845. font-size: 13px;
  846. height: 40px;
  847. flex: 2.5;
  848. }
  849. .introduce-section .title_b .title-tip-b {
  850. flex: 1;
  851. font-size: 13px;
  852. color: #878C9C;
  853. height: 40px;
  854. line-height: 40px;
  855. }
  856. .introduce-section .title {
  857. justify-content: space-between;
  858. align-items: flex-start;
  859. }
  860. .introduce-section .title text {
  861. font-size: 28rpx;
  862. }
  863. .introduce-section .title .title-tip {
  864. flex: 1;
  865. font-size: 28rpx;
  866. color: #FE6430;
  867. font-weight: 500;
  868. height: 50px;
  869. line-height: 50px;
  870. border-bottom: 1px solid #EEEEEE;
  871. }
  872. .introduce-section .title .title-tip-a {
  873. flex: 1;
  874. font-size: 15px;
  875. color: #AFB3BF;
  876. font-weight: 500;
  877. height: 50px;
  878. line-height: 50px;
  879. border-bottom: 1px solid #EEEEEE;
  880. }
  881. .introduce-section .guess-item {
  882. border-radius: 10rpx;
  883. background: #fff;
  884. padding: 32rpx;
  885. margin: 20rpx;
  886. }
  887. .line {
  888. display: inline-block;
  889. padding: 5px;
  890. position: relative;
  891. font-size: 17px;
  892. }
  893. .line.active {
  894. font-size: 19px;
  895. font-weight: 900;
  896. }
  897. .line.active:after {
  898. content: '';
  899. display: block;
  900. position: absolute;
  901. width: 18px;
  902. left: 50%;
  903. transform: translateX(-50%);
  904. bottom: 0;
  905. border-bottom: 3px solid #22C572;
  906. }
  907. /deep/.u-action-active {
  908. margin-right: 6px;
  909. }
  910. .content1-top {
  911. background: white;
  912. padding: 20rpx 20rpx 0 20rpx;
  913. border-radius: 0 0 30rpx 30rpx;
  914. }
  915. .search-form {
  916. margin-bottom: 20rpx;
  917. }
  918. .title-row1 {
  919. font-size: 34rpx;
  920. font-weight: 600;
  921. }
  922. .row2 {
  923. margin-top: 55rpx;
  924. }
  925. .top2 {
  926. display: flex;
  927. align-items: center;
  928. justify-content: space-between;
  929. .right {
  930. display: flex;
  931. align-items: center;
  932. .right-contrent1 {
  933. margin: 20rpx;
  934. }
  935. }
  936. }
  937. .company {
  938. // position: fixed;
  939. // right: 0;
  940. // top: 18%;
  941. background: url('../../static/img/qiyebeijing.png');
  942. background-size: 100% 100%;
  943. text-align:right;
  944. font-size: 11px;
  945. padding-bottom: 5px;
  946. padding-right: 10px;
  947. width:60%;
  948. margin-right:-10px;
  949. border-radius: 40rpx 0 0 40rpx;
  950. }
  951. .company .icon {
  952. position: relative;
  953. top: 4px;
  954. }
  955. </style>