my_task.vue 32 KB

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