my_task.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  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.vesselId == "点击切换任务状态")
  580. {
  581. let data = {}
  582. data.id = item.id
  583. this.$api.doRequest('get', '/newNoticeTask/confirmFee',data).then(res => {
  584. console.log(res)
  585. if (res.data.code == 200) {
  586. this.getIndexBuyData(1,this.keyword)
  587. uni.showToast({
  588. title: "确认成功",
  589. icon: 'none',
  590. duration: 2000
  591. })
  592. } else {
  593. uni.showToast({
  594. title: "系统异常,请联系管理员",
  595. icon: 'none',
  596. duration: 2000
  597. })
  598. }
  599. })
  600. }
  601. else if (item.businessCode == 'PROCUREMENT-ORDER-APPROVE') {
  602. uni.navigateTo({
  603. url: '/pages/task/procurement_details?id=' + item.businessId + "&isShowbtn=true"
  604. })
  605. } else if (item.businessCode == 'SALE-ORDER-APPROVE') {
  606. uni.navigateTo({
  607. url: '/pages/task/sale_details?id=' + item.businessId + "&isShowbtn=true"
  608. })
  609. } else if (item.businessCode == 'SALE-CONTRACT-APPROVE') {
  610. uni.navigateTo({
  611. url: '/pages/task/audit/salecontract?id=' + item.businessId + "&isShowbtn=true"
  612. })
  613. }
  614. else if (item.businessCode == 'JIAYOU-SHENHE-APPROVE') {
  615. uni.navigateTo({
  616. url: '/pages/task/audit/refuel?id=' + item.businessId + "&isShowbtn=true"
  617. })
  618. }else if (item.businessCode == 'DAISHOU-CONTRACT-APPROVE') {
  619. uni.navigateTo({
  620. url: '/pages/task/audit/daishou_details?id=' + item.businessId + "&isShowbtn=true"
  621. })
  622. } else if (item.businessCode == 'DAICHU-CONTRACT-APPROVE') {
  623. uni.navigateTo({
  624. url: '/pages/task/audit/daichu_details?id=' + item.businessId + "&isShowbtn=true"
  625. })
  626. } else if (item.businessCode == 'BUY-CONTRACT-APPROVE') {
  627. uni.navigateTo({
  628. url: '/pages/task/audit/purchasecontract?id=' + item.businessId + "&isShowbtn=true"
  629. })
  630. }else if (item.businessCode == 'SHOU-CONTRACT-APPROVE') {
  631. uni.navigateTo({
  632. url: '/pages/task/audit/acquisitioncontract?id=' + item.businessId + "&isShowbtn=true"
  633. })
  634. } else if (item.businessCode == 'PROCUREMENT-RECEIPT-REPORT') {
  635. uni.navigateTo({
  636. url: '/pages/task/procurement_report_details?id=' + item.businessId + "&isShowbtn=true"
  637. })
  638. } else if (item.businessCode == 'PROCUREMENT-CLOSE-REPORT') {
  639. uni.navigateTo({
  640. url: '/pages/task/procurement_close_details?id=' + item.businessId + "&isShowbtn=true"
  641. })
  642. } else if (item.businessCode == 'SALE-RECEIPT-REPORT') {
  643. uni.navigateTo({
  644. url: '/pages/task/sale_report_details?id=' + item.businessId + "&isShowbtn=true"
  645. })
  646. } else if (item.businessCode == 'SALE-CLOSE-REPORT') {
  647. uni.navigateTo({
  648. url: '/pages/task/sale_close_details?id=' + item.businessId + "&isShowbtn=true"
  649. })
  650. } else if (item.businessCode == 'PROCUREMENT-PRICE-APPROVE') {
  651. if (this.statusFlag == 1) {
  652. uni.navigateTo({
  653. url: `/pages/task/audit/warehouse_approval?id=${item.businessId}&isShowbtn=true`
  654. })
  655. } else {
  656. uni.navigateTo({
  657. url: '/pages/task/audit/warehouse_details?id=' + item.businessId + "&isShowbtn=true"
  658. })
  659. }
  660. } else if (item.businessCode == 'PAYMENT-MANAGEMENT-APPROVE') {
  661. if (this.statusFlag == 1) {
  662. uni.navigateTo({
  663. url: `/pages/task/audit/acquisition_settlement_approval?vesselId=${item.vesselId}&id=${item.businessId}`
  664. })
  665. } else {
  666. uni.navigateTo({
  667. url: '/pages/task/audit/acquisition_settlement_details?id=' + item.businessId +
  668. '&isShowbtn=true'
  669. })
  670. }
  671. } else if (item.businessCode == 'INOUTTASK-TASK-APPROVE') {
  672. if (this.statusFlag == 1) {
  673. uni.navigateTo({
  674. url: `/pages/task/audit/Issueandreceipt_task_approval?id=` + item.businessId +
  675. "&isShowbtn=true"
  676. })
  677. } else {
  678. uni.navigateTo({
  679. url: `/pages/task/audit/Issueandreceipt_task_details?id=` + item.businessId +
  680. "&isShowbtn=true"
  681. })
  682. }
  683. } else if (item.businessCode == 'STOCK-PROCUREMENT-RECEIPT-REPORT') {
  684. if (this.statusFlag == 1) {
  685. uni.navigateTo({
  686. url: `/pages/task/audit/purchase_settlement_approval?id=` + item.businessId +
  687. "&isShowbtn=true"
  688. })
  689. } else {
  690. uni.navigateTo({
  691. url: `/pages/task/audit/purchase_settlement_details?id=` + item.businessId +
  692. "&isShowbtn=true"
  693. })
  694. }
  695. } else if (item.businessCode == 'TRANSPORTATION-SETTLEMENT-REPORT') {
  696. if (this.statusFlag == 1) {
  697. uni.navigateTo({
  698. url: `/pages/task/audit/freight_settlement_approval?id=` + item.businessId +
  699. "&isShowbtn=true"
  700. })
  701. } else {
  702. uni.navigateTo({
  703. url: `/pages/task/audit/freight_settlement_details?id=` + item.businessId +
  704. '&compId=' + this
  705. .pcUserInfo.compId + "&isShowbtn=true"
  706. })
  707. }
  708. }
  709. else if (item.businessCode == 'GENERAL-AUDIT-APPROVE') {
  710. uni.navigateTo({
  711. url: `/pages/task/audit/universalityAudit?id=` + item.businessId
  712. })
  713. }
  714. else if (item.businessCode == 'FEIYONGYUNFEI-APPROVE') {
  715. if (this.statusFlag == 1) {
  716. uni.navigateTo({
  717. url: `/pages/task/audit/freight_settlement_approvalcopy?id=` + item.businessId +
  718. "&isShowbtn=true"
  719. })
  720. } else {
  721. uni.navigateTo({
  722. url: `/pages/task/audit/freight_settlement_detailscopy?id=` + item.businessId +
  723. '&compId=' + this
  724. .pcUserInfo.compId + "&isShowbtn=true"
  725. })
  726. }
  727. }else if (item.businessCode == 'YUNJIA-TRAN-APPROVE') {
  728. if (this.statusFlag == 1) {
  729. uni.navigateTo({
  730. url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
  731. "&isShowbtn=true"
  732. })
  733. } else {
  734. uni.navigateTo({
  735. url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
  736. "&isShowbtn=true"
  737. })
  738. }
  739. } else if (item.businessCode == 'TRAN-TEAM-APPROVE') {
  740. if (this.statusFlag == 1) {
  741. uni.navigateTo({
  742. url: `/pages/task/audit/freight_setting_approval?id=` + item.businessId +
  743. "&isShowbtn=true"
  744. })
  745. } else {
  746. uni.navigateTo({
  747. url: `/pages/task/audit/freight_setting_details?id=` + item.businessId +
  748. "&isShowbtn=true"
  749. })
  750. }
  751. } else if (item.businessCode == 'ACQUISITION-SETTLEMENT-APPRPVE') {
  752. if (this.statusFlag == 1) {
  753. uni.navigateTo({
  754. url: `/pages/task/audit/acquisition_information_approval?id=` + item.businessId +
  755. "&isShowbtn=true"
  756. })
  757. } else {
  758. uni.navigateTo({
  759. url: `/pages/task/audit/acquisition_information_details?id=` + item.businessId +
  760. "&isShowbtn=true"
  761. })
  762. }
  763. } else if (item.businessCode == 'BUKA-APPROVE') {
  764. if (this.statusFlag == 1) {
  765. uni.navigateTo({
  766. url: `/pages/task/audit/supp_clock_approve?id=` + item.businessId +
  767. "&isShowbtn=true"
  768. })
  769. } else {
  770. uni.navigateTo({
  771. url: `/pages/task/audit/supp_clock_details?id=` + item.businessId +
  772. "&isShowbtn=true"
  773. })
  774. }
  775. } else if (item.businessCode == 'QINGJIA-APPROVE') {
  776. if (this.statusFlag == 1) {
  777. uni.navigateTo({
  778. url: `/pages/task/audit/leave_approve?id=` + item.businessId +
  779. "&isShowbtn=true"
  780. })
  781. } else {
  782. uni.navigateTo({
  783. url: `/pages/task/audit/leave_details?id=` + item.businessId +
  784. "&isShowbtn=true"
  785. })
  786. }
  787. } else if (item.businessCode == 'TRADE-WAREHOUSE-REPORT') {
  788. if (this.statusFlag == 1) {
  789. uni.navigateTo({
  790. url: `/pages/task/audit/tradeServices_audit?id=` + item.businessId
  791. })
  792. } else {
  793. uni.navigateTo({
  794. url: `/pages/task/audit/tradeServices_audit_approval?id=` + item.businessId
  795. })
  796. }
  797. } else if (item.businessCode == 'WAREHOUSING-ORDER-APPROVE') {
  798. if (this.statusFlag == 1) {
  799. uni.navigateTo({
  800. url: `/pages/task/audit/warehouse_warrant?id=` + item.businessId
  801. })
  802. } else {
  803. uni.navigateTo({
  804. url: `/pages/task/audit/warehouse_warrant_detail?id=` + item.businessId
  805. })
  806. }
  807. } else if (item.businessCode == 'FEIYONGGUANLI-APPROVE') {
  808. if (this.statusFlag == 1) {
  809. uni.navigateTo({
  810. url: `/pages/task/audit/charge_against_revenue?id=` + item.businessId + '&vesselId=' + item.vesselId
  811. })
  812. } else {
  813. uni.navigateTo({
  814. url: `/pages/task/audit/charge_against_revenue_detail?id=` + item.businessId
  815. })
  816. }
  817. } else if (item.businessCode == 'COLLECTION-WAREHOUSING-RECORD') {
  818. if (this.statusFlag == 1) {
  819. uni.navigateTo({
  820. url: `/pages/task/audit/collection_business_approval?id=` + item.businessId +
  821. "&isShowbtn=true"
  822. })
  823. } else {
  824. uni.navigateTo({
  825. url: `/pages/task/audit/collection_business_details?id=` + item.businessId +
  826. "&isShowbtn=true"
  827. })
  828. }
  829. }
  830. else if (item.businessCode == 'WAREHOUSING-XSZY-APPROVE') {
  831. if (this.statusFlag == 1) {
  832. uni.navigateTo({
  833. url: `/pages/task/audit/sales_shift?id=` + item.businessId
  834. })
  835. } else {
  836. uni.navigateTo({
  837. url: `/pages/task/audit/sales_shift?id=` + item.businessId
  838. })
  839. }
  840. }
  841. if (item.taskType == "入库任务") {
  842. if (item.statusFlag == 3) {
  843. uni.navigateTo({
  844. url: `/pageD/warehousings/warehousingDetails?id=${item.id}&isShowbtn=true`
  845. })
  846. } else {
  847. uni.navigateTo({
  848. 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`
  849. })
  850. }
  851. } else if (item.taskType == "出库任务") {
  852. if (item.statusFlag == 3) {
  853. uni.navigateTo({
  854. url: `/pageD/warehousings/ex_warehouse_detail?id=${item.id}&isShowbtn=true`
  855. })
  856. } else {
  857. uni.navigateTo({
  858. 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`
  859. })
  860. }
  861. }
  862. }
  863. }
  864. }
  865. </script>
  866. <style lang="scss" scoped>
  867. .content {
  868. padding-bottom: 50rpx;
  869. }
  870. .tag {
  871. background: #F5F6F9;
  872. padding: 5px;
  873. color: #333333;
  874. display: inline-flex;
  875. font-size: 22rpx;
  876. border-radius: 3px;
  877. margin: 3px;
  878. }
  879. .introduce-section {
  880. // background: red;
  881. }
  882. .introduce-section .title_b .title-tip {
  883. font-size: 13px;
  884. height: 40px;
  885. line-height: 40px;
  886. flex: 2.5;
  887. }
  888. .introduce-section .title_b .title {
  889. font-size: 13px;
  890. height: 40px;
  891. flex: 2.5;
  892. }
  893. .introduce-section .title_b .title-tip-b {
  894. flex: 1;
  895. font-size: 13px;
  896. color: #878C9C;
  897. height: 40px;
  898. line-height: 40px;
  899. }
  900. .introduce-section .title {
  901. justify-content: space-between;
  902. align-items: flex-start;
  903. }
  904. .introduce-section .title text {
  905. font-size: 28rpx;
  906. }
  907. .introduce-section .title .title-tip {
  908. flex: 1;
  909. font-size: 28rpx;
  910. color: #FE6430;
  911. font-weight: 500;
  912. height: 50px;
  913. line-height: 50px;
  914. border-bottom: 1px solid #EEEEEE;
  915. }
  916. .introduce-section .title .title-tip-a {
  917. flex: 1;
  918. font-size: 15px;
  919. color: #AFB3BF;
  920. font-weight: 500;
  921. height: 50px;
  922. line-height: 50px;
  923. border-bottom: 1px solid #EEEEEE;
  924. }
  925. .introduce-section .guess-item {
  926. border-radius: 10rpx;
  927. background: #fff;
  928. padding: 32rpx;
  929. margin: 20rpx;
  930. }
  931. .line {
  932. display: inline-block;
  933. padding: 5px;
  934. position: relative;
  935. font-size: 17px;
  936. }
  937. .line.active {
  938. font-size: 19px;
  939. font-weight: 900;
  940. }
  941. .line.active:after {
  942. content: '';
  943. display: block;
  944. position: absolute;
  945. width: 18px;
  946. left: 50%;
  947. transform: translateX(-50%);
  948. bottom: 0;
  949. border-bottom: 3px solid #22C572;
  950. }
  951. /deep/.u-action-active {
  952. margin-right: 6px;
  953. }
  954. .content1-top {
  955. background: white;
  956. padding: 20rpx 20rpx 0 20rpx;
  957. border-radius: 0 0 30rpx 30rpx;
  958. }
  959. .search-form {
  960. margin-bottom: 20rpx;
  961. }
  962. .title-row1 {
  963. font-size: 34rpx;
  964. font-weight: 600;
  965. }
  966. .row2 {
  967. margin-top: 55rpx;
  968. }
  969. .top2 {
  970. display: flex;
  971. align-items: center;
  972. justify-content: space-between;
  973. .right {
  974. display: flex;
  975. align-items: center;
  976. .right-contrent1 {
  977. margin: 20rpx;
  978. }
  979. }
  980. }
  981. .company {
  982. // position: fixed;
  983. // right: 0;
  984. // top: 18%;
  985. background: url('../../static/img/qiyebeijing.png');
  986. background-size: 100% 100%;
  987. text-align:right;
  988. font-size: 11px;
  989. padding-bottom: 5px;
  990. padding-right: 10px;
  991. width:60%;
  992. margin-right:-10px;
  993. border-radius: 40rpx 0 0 40rpx;
  994. }
  995. .company .icon {
  996. position: relative;
  997. top: 4px;
  998. }
  999. </style>