my_task.vue 32 KB

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