task.vue 35 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208
  1. <template>
  2. <view class="content">
  3. <view class="cu-list menu-avatar">
  4. <view
  5. class="cu-item" v-if='item.hide==0' :class="modalName=='move-box-'+ index?'move-cur':''" v-for="(item, index) in taskInfo" :key="index"
  6. @click="navToDetailPage(item)"
  7. @touchstart="ListTouchStart" @touchmove="ListTouchMove" @touchend="ListTouchEnd" :data-target="'move-box-' + index"
  8. >
  9. <view class='wrap' >
  10. <view style='align-items: center;' class="flex justify-between padding">
  11. <view class=" padding-xs">
  12. <view class="radius">
  13. <view v-if="item.taskStatus != 1 " class="text-gray">
  14. <view style='font-weight: 600;font-size: 16px;margin-bottom: 5px;'>{{item.taskType}}<text v-if='item.carNo'>({{item.carNo}})</text></view>
  15. </view>
  16. <view v-else-if="item.taskType == '出库任务'" class="text-red">
  17. <view style='font-weight: 600;font-size: 16px;margin-bottom: 5px;'>{{item.taskType}}<text v-if='item.carNo'>({{item.carNo}})</text></view>
  18. </view>
  19. <view v-else-if="item.taskType == '入库任务'" class="text-green">
  20. <view style='font-weight: 600;font-size: 16px;margin-bottom: 5px;'>{{item.taskType}}<text v-if='item.carNo'>({{item.carNo}})</text></view>
  21. </view>
  22. <view v-else>
  23. <view style='font-weight: 600;font-size: 16px;margin-bottom: 5px;'>{{item.taskType}}<text v-if='item.carNo'>({{item.carNo}})</text></view>
  24. </view>
  25. <view style='color:#ccc;'>{{item.customer}}</view>
  26. <view style='color:#ccc;'>{{item.gmtUpdate}}</view>
  27. </view>
  28. </view>
  29. <view v-if="item.taskStatus == 1" class="tag-green line-green">
  30. 执行中
  31. </view>
  32. <view v-if="item.taskStatus == 2" class="tag-gray line-gray">
  33. 已完成
  34. </view>
  35. <view v-if="item.taskStatus == 3" class="tag-red line-red">
  36. 已改派
  37. </view>
  38. </view>
  39. </view>
  40. <view v-if="item.companyId != 2" class="move" v-show='item.show==true' @click.stop="hided(item,$event)">
  41. <view class="bg-red">删除</view>
  42. </view>
  43. </view>
  44. <view v-show="isLoadMore">
  45. <uni-load-more :status="loadStatus" ></uni-load-more>
  46. </view>
  47. </view>
  48. <u-modal v-model="inputShow"
  49. :title="title"
  50. :mask-close-able="true"
  51. show-cancel-button="true"
  52. :confirm-text="confirmText"
  53. :cancel-text="cancelText"
  54. @confirm="confirm"
  55. @cancel="cancel" >
  56. <view v-if="taskDetail.orderNo" class="cu-form-group">
  57. <view class="title">销售单号</view>
  58. {{taskDetail.orderNo}}
  59. </view>
  60. <view v-else-if="taskDetail.orderNoBuy" class="cu-form-group">
  61. <view class="title">采购单号</view>
  62. {{taskDetail.orderNoBuy}}
  63. </view>
  64. <view v-if="taskDetail.seller" class="cu-form-group">
  65. <view class="title">采购来源</view>
  66. {{taskDetail.seller}}
  67. </view>
  68. <view v-if="taskDetail.cost" class="cu-form-group">
  69. <view class="title">库存成本</view>
  70. {{taskDetail.cost}}
  71. </view>
  72. <view v-if="currentTask.taskType == '审核任务'&&currentTask.saleType" class="cu-form-group">
  73. <view class="title">销售类型</view>
  74. {{currentTask.saleType}}
  75. </view>
  76. <view v-if="currentTask.taskType == '审核任务' && currentTask.saleType != '移库'&&currentTask.buyer" class="cu-form-group">
  77. <view class="title">销售流向</view>
  78. {{currentTask.buyer}}
  79. </view>
  80. <!-- <view v-if="currentTask.taskType == '审核任务'&&taskDetail.contractPrice<taskDetail.price" class="cu-form-group">
  81. <view class="title">销售价格</view>
  82. <view class="text-red ">{{taskDetail.contractPrice}}</view>
  83. </view> -->
  84. <view v-if="taskDetail.contractPrice" class="cu-form-group">
  85. <view class="title">销售价格</view>
  86. {{taskDetail.contractPrice}}
  87. </view>
  88. <view v-if="taskDetail.level" class="cu-form-group">
  89. <view class="title">货品</view>
  90. {{taskDetail.level + taskDetail.goodsName}}
  91. </view>
  92. <view v-if="currentTask.address " class="cu-form-group">
  93. <view v-if='currentTask.tranType!=1' class="title">发运地</view>
  94. <view v-if='currentTask.tranType==1' class="title">发站起始地</view>
  95. <text>{{currentTask.address}}</text>
  96. </view>
  97. <view v-if="currentTask.startInPlace" class="cu-form-group">
  98. <view v-if='currentTask.tranType!=2' class="title">发站目的地</view>
  99. <view v-if='currentTask.tranType==2' class="title">发站港口</view>
  100. {{currentTask.startInPlace}}
  101. </view>
  102. <view v-if="currentTask.endInPlace" class="cu-form-group">
  103. <view v-if='currentTask.tranType!=2' class="title">到站起始地</view>
  104. <view v-if='currentTask.tranType==2' class="title">到站港口</view>
  105. {{currentTask.endInPlace}}
  106. </view>
  107. <view v-if="currentTask.endPlace" class="cu-form-group">
  108. <view v-if='currentTask.tranType!=1' class="title">目的地</view>
  109. <view v-if='currentTask.tranType==1' class="title">到站目的地</view>
  110. {{currentTask.endPlace}}
  111. </view>
  112. <view v-if="currentTask.netWeight" class="cu-form-group">
  113. <view class="title">净重</view>
  114. {{currentTask.netWeight}}
  115. </view>
  116. <view v-if="currentTask.onePrice" class="cu-form-group">
  117. <view class="title">单价</view>
  118. {{currentTask.onePrice}}
  119. </view>
  120. <view v-if="currentTask.waterContent" class="cu-form-group">
  121. <text class="tit">粮食指标</text>
  122. <view class="con-list">
  123. <button class='cu-btn bg-green shadow' @click="foodsLook" >查看</button>
  124. </view>
  125. </view>
  126. <view v-if="currentTask.waterContent" class="cu-form-group">
  127. <view class="title">付款方式</view>
  128. <picker @change="PayTypeChange" :value="payTypeIndex" :range="payType">
  129. <view class="picker">
  130. {{payTypeIndex>-1?payType[payTypeIndex]:'请选择'}}
  131. </view>
  132. </picker>
  133. </view>
  134. <view v-if="taskDetail.gmtUpdate" class="cu-form-group">
  135. <view class="title">申请时间</view>
  136. {{taskDetail.gmtUpdate}}
  137. </view>
  138. <view v-else class="cu-form-group">
  139. <view class="title">申请时间</view>
  140. {{currentTask.gmtUpdate}}
  141. </view>
  142. <view v-if="currentTask.taskType == '定价任务'" class="cu-form-group">
  143. <view class="title">{{priceType}}(元/吨)</view>
  144. <input v-model="inputPrice" style="margin:20upx;" placeholder="请输入指导价" />
  145. </view>
  146. <view v-else-if="priceType&&currentTask.outPrice" class="cu-form-group">
  147. <view v-if='currentTask.tranType!=1&&currentTask.tranType!=2' class="title">{{priceType}}</view>
  148. <view v-if='currentTask.tranType==1' class="title">发站运价</view>
  149. <view v-if='currentTask.tranType==2' class="title">北方拖车运价</view>
  150. {{currentTask.outPrice}}
  151. </view>
  152. <view v-if="currentTask.tranType==1&&currentTask.inPrice||currentTask.tranType==2&&currentTask.inPrice" class="cu-form-group">
  153. <view v-if='currentTask.tranType==1' class="title">到站运价</view>
  154. <view v-if='currentTask.tranType==2' class="title">南方拖车运价</view>
  155. {{currentTask.inPrice}}
  156. </view>
  157. </u-modal>
  158. <u-modal v-model="inputShow2"
  159. :mask-close-able="true"
  160. :title="title"
  161. show-cancel-button="true"
  162. :confirm-text="confirmText"
  163. :cancel-text="cancelText"
  164. @confirm="confirm"
  165. @cancel="cancel" >
  166. <view v-if="paymentaudit.type == '采购'">
  167. <view v-if="paymentaudit.orderNoBuy" class="cu-form-group">
  168. <view class="title">采购单号</view>
  169. {{paymentaudit.orderNoBuy}}
  170. </view>
  171. <view v-if="paymentaudit.seller" class="cu-form-group">
  172. <view class="title">卖方</view>
  173. {{paymentaudit.seller}}
  174. </view>
  175. <view v-if="paymentaudit.contractNo" class="cu-form-group">
  176. <view class="title">合同编号</view>
  177. {{paymentaudit.contractNo}}
  178. </view>
  179. <view v-if="paymentaudit.poundImg" class="cu-form-group">
  180. <view class="title">磅单照片</view>
  181. <view @click="previewImg(paymentaudit.poundImg)" class="text-blue">查看</view>
  182. </view>
  183. <view v-if="paymentaudit.carNos" class="cu-form-group">
  184. <view class="title">车牌号</view>
  185. {{paymentaudit.carNos}}
  186. </view>
  187. <view v-if="paymentaudit.buy == 0" class="cu-form-group">
  188. <view class="title">成交价</view>
  189. {{paymentaudit.unitPrice}}
  190. </view>
  191. <view v-if="paymentaudit.buy > 0" class="cu-form-group">
  192. <view class="title">平仓价</view>
  193. {{paymentaudit.unitPrice}}
  194. </view>
  195. <view v-if="paymentaudit.deduction" class="cu-form-group">
  196. <view class="title">扣款</view>
  197. {{paymentaudit.deduction}}
  198. </view>
  199. <view v-if="paymentaudit.unloadingFee" class="cu-form-group">
  200. <view class="title">卸车费</view>
  201. {{paymentaudit.unloadingFee}}
  202. </view>
  203. <view v-if="paymentaudit.invoiceMoney" class="cu-form-group">
  204. <view class="title">发票费</view>
  205. {{paymentaudit.invoiceMoney}}
  206. </view>
  207. <view v-if="paymentaudit.basis" class="cu-form-group">
  208. <view class="title">基差</view>
  209. {{paymentaudit.basis}}
  210. </view>
  211. <view v-if="paymentaudit.unitPrice1" class="cu-form-group">
  212. <view class="title">付款单价</view>
  213. {{paymentaudit.unitPrice1}}
  214. </view>
  215. <view v-if="paymentaudit.netWeights" class="cu-form-group">
  216. <view class="title">净重</view>
  217. {{paymentaudit.netWeights}}
  218. </view>
  219. <view v-if="paymentaudit.money" class="cu-form-group">
  220. <view class="title">付款金额</view>
  221. {{paymentaudit.money}}
  222. </view>
  223. </view>
  224. <view v-else>
  225. <view v-if="paymentaudit.orderNo" class="cu-form-group">
  226. <view class="title">销售单号</view>
  227. {{paymentaudit.orderNo}}
  228. </view>
  229. <view v-if="paymentaudit.buyer" class="cu-form-group">
  230. <view class="title">买方</view>
  231. {{paymentaudit.buyer}}
  232. </view>
  233. <view v-if="paymentaudit.contractNo" class="cu-form-group">
  234. <view class="title">合同编号</view>
  235. {{paymentaudit.contractNo}}
  236. </view>
  237. <view class="cu-form-group">
  238. <view class="title">成交价</view>
  239. {{paymentaudit.unitPrice}}
  240. </view>
  241. <view v-if="paymentaudit.buy >0" class="cu-form-group">
  242. <view class="title">平仓价</view>
  243. {{paymentaudit.unitPrice + paymentaudit.unitPrice1-paymentaudit.basis}}
  244. </view>
  245. <view v-if="paymentaudit.buy" class="cu-form-group">
  246. <view class="title">平仓吨数</view>
  247. {{paymentaudit.buy}}
  248. </view>
  249. <view v-if="paymentaudit.unitPrice1" class="cu-form-group">
  250. <view class="title">结算单价</view>
  251. {{paymentaudit.unitPrice1}}
  252. </view>
  253. <view v-if="paymentaudit.basis" class="cu-form-group">
  254. <view class="title">平仓基差</view>
  255. {{paymentaudit.basis}}
  256. </view>
  257. <view v-if="paymentaudit.money" class="cu-form-group">
  258. <view class="title">付款金额</view>
  259. {{paymentaudit.money}}
  260. </view>
  261. </view>
  262. </u-modal>
  263. <u-modal v-model="inputShow3"
  264. :mask-close-able="true"
  265. :title="title"
  266. show-cancel-button="true"
  267. :confirm-text="confirmText"
  268. :cancel-text="cancelText"
  269. @confirm="confirm"
  270. @cancel="cancel" >
  271. <view v-if="paymentaudit.unitPrice" class="cu-form-group">
  272. <view class="title">点价</view>
  273. {{paymentaudit.unitPrice}}
  274. </view>
  275. <view v-if="paymentaudit.basis" class="cu-form-group">
  276. <view class="title">基差</view>
  277. {{paymentaudit.basis}}
  278. </view>
  279. <view class="cu-form-group">
  280. <view class="title">发票</view>
  281. {{paymentaudit.invoiceFee}}
  282. </view>
  283. <view v-if="paymentaudit.unloadingFee" class="cu-form-group">
  284. <view class="title">卸车费</view>
  285. {{paymentaudit.unloadingFee}}
  286. </view>
  287. <view v-if="paymentaudit.packingMoney" class="cu-form-group">
  288. <view class="title">包装费</view>
  289. {{paymentaudit.packingMoney}}
  290. </view>
  291. <view v-if="paymentaudit.tradeContractNo" class="cu-form-group">
  292. <view class="title">合同编号</view>
  293. {{paymentaudit.tradeContractNo}}
  294. </view>
  295. <view v-if="paymentaudit.storeName1" class="cu-form-group">
  296. <view class="title">库点</view>
  297. {{paymentaudit.storeName1}}
  298. </view>
  299. <view v-if="paymentaudit.packing" class="cu-form-group">
  300. <view class="title">包装方式</view>
  301. {{paymentaudit.packing}}
  302. </view>
  303. <view v-if="paymentaudit.invoiceType" class="cu-form-group">
  304. <view class="title">发票类型</view>
  305. {{paymentaudit.invoiceType}}
  306. </view>
  307. </u-modal>
  308. <u-modal v-model="overbookingshow"
  309. :mask-close-able="true"
  310. :title="title"
  311. show-cancel-button="true"
  312. :confirm-text="confirmText"
  313. :cancel-text="cancelText"
  314. @confirm="confirm"
  315. @cancel="cancel" >
  316. <view v-if="paymentaudit.customer" class="cu-form-group">
  317. <view class="title">客户</view>
  318. {{paymentaudit.customer}}
  319. </view>
  320. <view v-if="paymentaudit.type" class="cu-form-group">
  321. <view class="title">类型</view>
  322. {{paymentaudit.type}}
  323. </view>
  324. <view class="cu-form-group">
  325. <view class="title">数量</view>
  326. {{paymentaudit.tradeCount}}
  327. </view>
  328. <view v-if="paymentaudit.title" class="cu-form-group">
  329. <view class="title">库点</view>
  330. {{paymentaudit.title}}
  331. </view>
  332. <view v-if="paymentaudit.unitPrice" class="cu-form-group">
  333. <view class="title">点价</view>
  334. {{paymentaudit.unitPrice}}
  335. </view>
  336. <view v-if="paymentaudit.basis" class="cu-form-group">
  337. <view class="title">基差</view>
  338. {{paymentaudit.basis}}
  339. </view>
  340. <view v-if="paymentaudit.gmtCreate" class="cu-form-group">
  341. <view class="title">时间</view>
  342. {{paymentaudit.gmtCreate}}
  343. </view>
  344. </u-modal>
  345. <!-- <drag-button
  346. v-if="companyId != 2"
  347. :isDock="true"
  348. :existTabBar="true"
  349. :isIcon='false'
  350. text="放货"
  351. location="40"
  352. icon='cuIcon-deliver'
  353. @btnClick="fanghuo"
  354. /> -->
  355. </view>
  356. </template>
  357. <script>
  358. import dragButton from "@/components/drag-button/drag-button.vue";
  359. import {
  360. mapState
  361. } from 'vuex';
  362. export default {
  363. components: {
  364. dragButton
  365. },
  366. data() {
  367. return {
  368. taskInfo: [],
  369. pages:1,//页数
  370. limit:20 ,//每次取条目数
  371. loadStatus:'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  372. isLoadMore:false ,//是否加载中
  373. inputPrice:'',
  374. inputShow: false,
  375. inputShow2: false,
  376. inputShow3: false,
  377. taskDetail:[],
  378. currentTask:[],
  379. delBtnWidth:200,
  380. payType: ['装车付款', '到货付款'],
  381. payTypeIndex: -1,
  382. title:'',
  383. priceType:'',
  384. confirmText:'',
  385. cancelText:'',
  386. fanghuoShow:'',
  387. payShow:false,
  388. fanghuoInfo:'',
  389. foodsValue:'',
  390. listTouchStart: 0,
  391. listTouchDirection: null,
  392. modalName: null,
  393. paymentaudit:[],
  394. companyId:1,
  395. overbookingshow:false
  396. };
  397. },
  398. computed: {
  399. ...mapState(['hasLogin','userInfo'])
  400. },
  401. onShow() {
  402. this.loadData();
  403. },
  404. onLoad(options) {
  405. this.companyId = options.companyId
  406. console.log(options)
  407. },
  408. onPageScroll(e) {
  409. },
  410. //下拉刷新
  411. onPullDownRefresh() {
  412. this.pages = 1
  413. this.isLoadMore = false
  414. this.loadStatus = 'loading'
  415. this.loadData()
  416. },
  417. onReachBottom(){ //上拉触底函数
  418. if(!this.isLoadMore){ //此处判断,上锁,防止重复请求
  419. this.isLoadMore=true
  420. this.pages += 1
  421. this.getIndexTaskData()
  422. }
  423. },
  424. methods: {
  425. previewImg(urls){
  426. uni.previewImage({urls:[urls]})
  427. },
  428. hided(item,e){
  429. const that = this
  430. that.$api.request('task', 'hided', {
  431. taskId:item.id
  432. },failres => {
  433. that.$api.msg(failres.errmsg)
  434. that.isLoadMore=false
  435. that.loadStatus = 'nomore'
  436. // if(that.pages>1){that.pages-=1}
  437. uni.hideLoading()
  438. }).then(res => {
  439. item.hide=1
  440. uni.hideLoading()
  441. })
  442. },
  443. fanghuo() {
  444. uni.navigateTo({
  445. url: `/pages/user/task_detail_fh`
  446. })
  447. },
  448. //加载商品 ,带下拉刷新和上滑加载
  449. async loadData() {
  450. const that = this
  451. uni.showLoading({
  452. title: '正在加载',
  453. mask:true
  454. })
  455. that.$api.request('task', 'getTaskListInfo', {
  456. page: 1,
  457. limit:20
  458. },failres => {
  459. that.$api.msg(failres.errmsg)
  460. that.isLoadMore=false
  461. that.loadStatus = 'nomore'
  462. // if(that.pages>1){that.pages-=1}
  463. uni.hideLoading()
  464. uni.stopPullDownRefresh()
  465. }).then(res => {
  466. let data = res.data
  467. console.log(data)
  468. if(data.length > 0){
  469. for(var i=0;i<data.length;i++){
  470. data[i].leftStyle=0
  471. data[i].show=false
  472. }
  473. that.taskInfo = data
  474. that.isLoadMore=false
  475. that.pages = 1
  476. that.loadStatus = 'loading'
  477. }
  478. else{
  479. // if(that.pages>1){that.pages-=1}
  480. that.isLoadMore=true
  481. that.loadStatus = 'nomore'
  482. }
  483. uni.hideLoading()
  484. uni.stopPullDownRefresh()
  485. })
  486. },
  487. //详情
  488. navToDetailPage(item) {
  489. this.currentTask = item
  490. console.log(this.currentTask)
  491. if(item.price){
  492. this.inputPrice = item.price
  493. }
  494. else{
  495. this.inputPrice = ""
  496. }
  497. if(item.taskType == "定价任务"){
  498. this.title = '指定销售价格'
  499. this.priceType = '销售指导价'
  500. this.confirmText = '确定'
  501. this.cancelText = '取消'
  502. uni.showLoading({
  503. title: '正在加载',
  504. mask:true
  505. })
  506. const that = this
  507. this.$api.request('task', 'getTaskDetailInfo', {
  508. orderNo: item.orderNo
  509. },failres => {
  510. that.$api.msg(failres.errmsg)
  511. uni.hideLoading()
  512. }).then(res => {
  513. that.taskDetail = res.data
  514. console.log(res.data)
  515. if(!that.taskDetail.orderNo){
  516. that.title = '指定采购价格'
  517. that.priceType = '采购指导价'
  518. }
  519. that.inputShow = true
  520. uni.hideLoading()
  521. })
  522. }
  523. else if(item.taskType == "审核任务"){
  524. if(item.memo=="库内自采"||item.memo=="外采(含运费)"){
  525. this.title=item.memo
  526. }
  527. else if(item.memo=="外采(不含运费)"&&item.sendCarNo!=null){
  528. this.title=item.memo
  529. this.foodsValue = "水分:"+item.waterContent+"%,"+"容重:"+item.bulkDensity+","+"焦糊粒:"+item.burnt+"%,"+"霉变粒:"+item.moldy+"%"
  530. }
  531. else{
  532. this.title = '审核运价'
  533. this.priceType = '申请运价(元/吨)'
  534. }
  535. if(item.saleType == "库内销售"){
  536. this.title = '申请审核'
  537. this.priceType = ''
  538. }
  539. else if(item.saleType == "装箱进港"){
  540. this.title = '申请审核'
  541. this.priceType = ''
  542. }
  543. else if(item.saleType == "散船平仓"){
  544. this.title = '申请审核'
  545. this.priceType = ''
  546. }
  547. if(this.currentTask.taskStatus == 1){
  548. this.confirmText = '同意'
  549. this.cancelText = '驳回'
  550. }
  551. else{
  552. this.confirmText = '确定'
  553. this.cancelText = '取消'
  554. }
  555. uni.showLoading({
  556. title: '正在加载',
  557. mask:true
  558. })
  559. const that = this
  560. this.$api.request('task', 'getTaskDetailInfo', {
  561. orderNo: item.orderNo,
  562. tranNo:item.tranNo
  563. },failres => {
  564. that.$api.msg(failres.errmsg)
  565. uni.hideLoading()
  566. }).then(res => {
  567. this.taskDetail = res.data
  568. console.log(this.taskDetail)
  569. this.inputShow = true
  570. uni.hideLoading()
  571. })
  572. }
  573. else if(item.taskType == "付款审核任务"){
  574. if(this.currentTask.taskStatus == 1){
  575. this.confirmText = '同意'
  576. this.cancelText = '驳回'
  577. }
  578. else{
  579. this.confirmText = '确定'
  580. this.cancelText = '取消'
  581. }
  582. uni.showLoading({
  583. title: '正在加载',
  584. mask:true
  585. })
  586. const that = this
  587. this.paymentaudit = item
  588. this.inputShow2 = true
  589. uni.hideLoading()
  590. }
  591. else if(item.taskType == "下单任务"){
  592. this.confirmText = '确定'
  593. this.cancelText = '取消'
  594. uni.showLoading({
  595. title: '正在加载',
  596. mask:true
  597. })
  598. const that = this
  599. this.paymentaudit = item
  600. this.overbookingshow = true
  601. uni.hideLoading()
  602. }
  603. else if(item.taskType == "交易审核任务"){
  604. var taskId = item.id
  605. var taskType = "交易审核任务"
  606. var taskStatus = item.taskStatus
  607. uni.navigateTo({
  608. url: `/pageA/pages/task_detail_jy?taskId=${taskId}&taskType=${taskType}&taskStatus=${taskStatus}`
  609. })
  610. }
  611. else if(item.taskType == "发运任务"){
  612. const that = this
  613. if(item.saleType == "移库" || item.saleType == "运送到厂"){
  614. //判断是否为火运任务
  615. if(!item.sendCarNo){
  616. var taskId = item.id
  617. var taskType = "发运任务"
  618. var taskStatus = item.taskStatus
  619. uni.navigateTo({
  620. url: `/pageA/pages/task?taskId=${taskId}&taskType=${taskType}&taskStatus=${taskStatus}`
  621. })
  622. }
  623. else{
  624. that.$api.request('tran', 'getCarInfoBySendCarNo', {
  625. sendCarNo:item.sendCarNo
  626. }, failres => {
  627. that.$api.msg(failres.errmsg)
  628. uni.hideLoading()
  629. }).then(res => {
  630. console.log(res)
  631. if(res.data.status == 13){
  632. var sendCarNo = item.sendCarNo
  633. var taskStatus = item.taskStatus
  634. var taskId = item.id
  635. uni.navigateTo({
  636. url: `/pages/user/task_before?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}`
  637. })
  638. }
  639. else{
  640. var sendCarNo = item.sendCarNo
  641. var taskStatus = item.taskStatus
  642. var taskId = item.id
  643. var taskType = "发运任务"
  644. uni.navigateTo({
  645. url: `/pageA/pages/task_detail?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  646. })
  647. }
  648. uni.hideLoading()
  649. })
  650. }
  651. }
  652. //散船平仓海运情况
  653. else if(item.saleType == "散船平仓"){
  654. var taskId = item.id
  655. var taskStatus = item.taskStatus
  656. uni.navigateTo({
  657. url: `/pages/user/task_detail_pc?taskId=${taskId}&taskStatus=${taskStatus}`
  658. })
  659. }
  660. //装箱进港海运情况
  661. else if(item.saleType == "装箱进港"){
  662. var taskId = item.id
  663. var taskStatus = item.taskStatus
  664. uni.navigateTo({
  665. url: `/pages/user/task_detail_zx?taskId=${taskId}&taskStatus=${taskStatus}`
  666. })
  667. }
  668. else if(item.saleType == "库内销售"){
  669. var taskId = item.id
  670. var taskStatus = item.taskStatus
  671. uni.navigateTo({
  672. url: `/pages/user/task_detail_kn?taskId=${taskId}&taskStatus=${taskStatus}`
  673. })
  674. }
  675. else{
  676. var sendCarNo = item.sendCarNo
  677. var taskStatus = item.taskStatus
  678. var taskId = item.id
  679. var taskType = "发运任务"
  680. uni.navigateTo({
  681. url: `/pageA/pages/task_detail?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  682. })
  683. }
  684. }
  685. else if(item.taskType == "交货任务"){
  686. const that = this
  687. var taskStatus = item.taskStatus
  688. var taskId = item.id
  689. uni.navigateTo({
  690. url: `/pages/user/task_detail_jh?taskId=${taskId}&taskStatus=${taskStatus}`
  691. })
  692. }
  693. else if(item.taskType == "发站完货"){
  694. const that = this
  695. var taskId = item.id
  696. var taskType = "发站完货"
  697. var taskStatus = item.taskStatus
  698. uni.navigateTo({
  699. url: `/pages/user/task_detail_hy?taskId=${taskId}&taskType=${taskType}&taskStatus=${taskStatus}`
  700. })
  701. }
  702. else if(item.taskType == "入库任务"){
  703. const that = this
  704. if(item.tranType==1){
  705. var sendCarNo = item.sendCarNo
  706. var taskStatus = item.taskStatus
  707. var taskId = item.id
  708. var taskType = "入库任务"
  709. uni.navigateTo({
  710. url: `/pages/user/task_detail_hyrk?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  711. })
  712. }
  713. else if(item.memo=="外采(不含运费)"){
  714. var sendCarNo = item.sendCarNo
  715. var taskStatus = item.taskStatus
  716. var taskId = item.id
  717. var taskType = "入库任务"
  718. uni.navigateTo({
  719. url: `/pages/user/task_detail_wai?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  720. })
  721. }
  722. else{
  723. var sendCarNo = item.sendCarNo
  724. var taskStatus = item.taskStatus
  725. var taskId = item.id
  726. var taskType = "入库任务"
  727. uni.navigateTo({
  728. url: `/pageA/pages/task_detail?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  729. })
  730. }
  731. }
  732. else if(item.taskType == "到站入库"){
  733. console.log(item)
  734. const that = this
  735. var sendCarNo = item.sendCarNo
  736. var taskStatus = item.taskStatus
  737. var taskId = item.id
  738. var taskType = "入库任务"
  739. uni.navigateTo({
  740. url: `/pages/user/task_detail_hyrk?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  741. })
  742. }
  743. else if(item.taskType == "自采任务"){
  744. var sendCarNo = item.sendCarNo
  745. var taskStatus = item.taskStatus
  746. var taskId = item.id
  747. var taskType = "自采任务"
  748. uni.navigateTo({
  749. url: `/pages/user/task_detail_buy?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  750. })
  751. }
  752. else if(item.taskType == "到站下线"){
  753. console.log(item.taskType)
  754. var sendCarNo = item.sendCarNo
  755. var taskStatus = item.taskStatus
  756. var taskId = item.id
  757. var taskType = "到站下线"
  758. uni.navigateTo({
  759. url: `/pages/user/task_arrive?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  760. })
  761. }
  762. else if(item.taskType == "外采任务"&&item.memo=="外采(含运费)"){
  763. var sendCarNo = item.sendCarNo
  764. var taskStatus = item.taskStatus
  765. var taskId = item.id
  766. var taskType = "自采任务"
  767. uni.navigateTo({
  768. url: `/pages/user/task_detail_buy?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  769. })
  770. }
  771. else if(item.taskType == "外采任务"&&item.memo=="外采(不含运费)"){
  772. const that = this
  773. that.$api.request('tran', 'getCarInfoBySendCarNo', {
  774. sendCarNo:item.sendCarNo
  775. }, failres => {
  776. that.$api.msg(failres.errmsg)
  777. uni.hideLoading()
  778. }).then(res => {
  779. if(res.data.status == 13){
  780. var sendCarNo = item.sendCarNo
  781. var taskStatus = item.taskStatus
  782. var taskId = item.id
  783. uni.navigateTo({
  784. url: `/pages/user/task_before?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}`
  785. })
  786. }
  787. else{
  788. var sendCarNo = item.sendCarNo
  789. var taskStatus = item.taskStatus
  790. var taskId = item.id
  791. var taskType = "外采任务"
  792. uni.navigateTo({
  793. url: `/pages/user/task_detail_buy?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  794. })
  795. }
  796. uni.hideLoading()
  797. })
  798. }
  799. else if(item.taskType == "收货跟踪"&&item.memo!="客户自理"){
  800. var sendCarNo = item.sendCarNo
  801. var taskStatus = item.taskStatus
  802. var taskId = item.id
  803. var taskType = "收货跟踪"
  804. uni.navigateTo({
  805. url: `/pageA/pages/task_detail?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  806. })
  807. }
  808. else if(item.taskType == "收货跟踪"&&item.memo=="客户自理"){
  809. var taskId = item.id
  810. var taskType = "收货跟踪"
  811. var taskStatus = item.taskStatus
  812. uni.navigateTo({
  813. url: `/pageA/pages/task_detail_ys?taskId=${taskId}&taskType=${taskType}&taskStatus=${taskStatus}&`
  814. })
  815. }
  816. else if(item.taskType == "出库任务"){
  817. console.log(1111)
  818. var sendCarNo = item.sendCarNo
  819. var taskStatus = item.taskStatus
  820. var taskId = item.id
  821. var taskType = "出库任务"
  822. uni.navigateTo({
  823. url: `/pageA/pages/task_detail_ck?sendCarNo=${sendCarNo}&taskStatus=${taskStatus}&taskId=${taskId}&taskType=${taskType}`
  824. })
  825. }
  826. uni.hideLoading()
  827. },
  828. // ListTouch触摸开始
  829. ListTouchStart(e) {
  830. this.listTouchStart = e.touches[0].pageX
  831. },
  832. // ListTouch计算方向
  833. ListTouchMove(e) {
  834. this.listTouchDirection = e.touches[0].pageX - this.listTouchStart > 0 ? 'right' : 'left'
  835. },
  836. // ListTouch计算滚动
  837. ListTouchEnd(e) {
  838. if (this.listTouchDirection == 'left') {
  839. this.modalName = e.currentTarget.dataset.target
  840. } else {
  841. this.modalName = null
  842. }
  843. this.listTouchDirection = null
  844. },
  845. foodsLook(){
  846. uni.showModal({
  847. title: '粮食指标',
  848. content: this.foodsValue,
  849. showCancel: false,
  850. confirmText: '确定',
  851. success: (e) => {
  852. },
  853. fail: () => {},
  854. complete: () => {}
  855. })
  856. },
  857. PayTypeChange(e) {
  858. this.payTypeIndex = e.detail.value
  859. },
  860. cancel() {
  861. if(this.currentTask.taskType == "审核任务"||this.currentTask.taskType == "付款审核任务"||this.currentTask.taskType == "交易审核任务"){
  862. if(this.currentTask.taskStatus == 1){
  863. const that = this
  864. that.$api.request('task', 'doTask', {
  865. id: that.currentTask.id,
  866. reply:"驳回"
  867. }).then(res => {
  868. that.$api.msg('驳回成功')
  869. setTimeout(()=>{
  870. that.inputShow = false
  871. that.inputShow2 = false
  872. that.inputShow3 = false
  873. },1000);
  874. that.loadData()
  875. })
  876. }
  877. else{
  878. this.inputShow = false
  879. }
  880. }else if(this.currentTask.taskType == "下单任务"){
  881. this.overbookingshow = false
  882. }
  883. else{
  884. this.inputShow = false
  885. }
  886. },
  887. confirm() {
  888. uni.showLoading({
  889. title: '正在加载',
  890. mask:true
  891. })
  892. var paymentMethod;
  893. if(this.payTypeIndex == 0){
  894. paymentMethod = "装车付款"
  895. }
  896. else if(this.payTypeIndex == 1){
  897. paymentMethod = "到货付款"
  898. }
  899. if(this.currentTask.taskType == "定价任务"){
  900. const that = this
  901. if (!that.inputPrice) {
  902. that.$api.msg('输入价格不能为空')
  903. that.inputShow = true
  904. return
  905. }
  906. that.$api.request('task', 'doTask', {
  907. id: that.currentTask.id,
  908. price:that.inputPrice
  909. }).then(res => {
  910. that.$api.msg('定价任务已完成')
  911. that.inputShow = false
  912. uni.hideLoading()
  913. that.loadData()
  914. })
  915. }
  916. else if(this.currentTask.taskType == "审核任务"||this.currentTask.taskType == "付款审核任务"){
  917. if(this.payTypeIndex == -1&&this.currentTask.waterContent!=null){
  918. this.$api.msg('请选择付款方式');
  919. this.inputShow = true;
  920. uni.hideLoading()
  921. return
  922. }
  923. if(this.currentTask.taskStatus == 1){
  924. const that = this
  925. that.$api.request('task', 'doTask', {
  926. id: that.currentTask.id,
  927. payType:!paymentMethod?'':paymentMethod,
  928. reply:"同意"
  929. }).then(res => {
  930. uni.hideLoading()
  931. that.$api.msg('审核成功')
  932. that.loadData()
  933. setTimeout(()=>{
  934. that.inputShow = false
  935. that.inputShow2 = false
  936. },1000);
  937. })
  938. }
  939. else{
  940. this.inputShow = false
  941. }
  942. }
  943. else if(this.currentTask.taskType == "交易审核任务"){
  944. const that = this
  945. that.$api.request('task', 'doTask', {
  946. id: that.currentTask.id,
  947. payType:!paymentMethod?'':paymentMethod,
  948. reply:"同意"
  949. }).then(res => {
  950. uni.hideLoading()
  951. that.$api.msg('审核成功')
  952. that.loadData()
  953. setTimeout(()=>{
  954. that.inputShow3 = false
  955. },1000);
  956. })
  957. }else if(this.currentTask.taskType == "下单任务"){
  958. const that = this
  959. that.$api.request('task', 'doTask', {
  960. id: that.currentTask.id,
  961. }).then(res => {
  962. that.$api.msg('确定成功')
  963. console.log(that)
  964. setTimeout(()=>{
  965. that.overbookingshow = false
  966. },1000);
  967. that.loadData()
  968. })
  969. }
  970. },
  971. getIndexTaskData(){
  972. const that = this
  973. var pages=that.pages
  974. var limit=that.limit
  975. uni.showLoading({
  976. title: '正在加载',
  977. mask:true
  978. })
  979. that.$api.request('task', 'getTaskListInfo', {
  980. page: pages,
  981. limit:limit
  982. },failres => {
  983. that.$api.msg(failres.errmsg)
  984. that.isLoadMore=false
  985. that.loadStatus = 'nomore'
  986. if(that.pages>1){that.pages-=1}
  987. uni.hideLoading()
  988. }).then(res => {
  989. let data = res.data
  990. //采购信息
  991. if(data.length > 0){
  992. that.taskInfo = that.taskInfo.concat(data)
  993. that.isLoadMore=false
  994. }
  995. else{
  996. if(that.pages>1){that.pages-=1}
  997. that.isLoadMore=true
  998. that.loadStatus = 'nomore'
  999. }
  1000. uni.hideLoading()
  1001. })
  1002. }
  1003. },
  1004. }
  1005. </script>
  1006. <style lang="scss" scoped>
  1007. .wrap{
  1008. width:100%;
  1009. }
  1010. .tag-green{
  1011. border: 1px solid #39b54a;
  1012. padding: 4px 13px;
  1013. border-radius: 5px;
  1014. height:30px;
  1015. }
  1016. .tag-gray{
  1017. border: 1px solid #aaaaaa;
  1018. padding: 4px 13px;
  1019. border-radius: 5px;
  1020. height:30px;
  1021. }
  1022. .tag-red{
  1023. border: 1px solid #e54d42;
  1024. padding: 4px 13px;
  1025. border-radius: 5px;
  1026. height:30px;
  1027. }
  1028. .cu-list>.cu-item .move{
  1029. width: 110px;
  1030. }
  1031. .del{
  1032. position: absolute;
  1033. top: 50%;
  1034. -webkit-transform: translateY(-50%);
  1035. transform: translateY(-50%);
  1036. right: -197rpx;
  1037. width: 141rpx;
  1038. height: 140rpx;
  1039. line-height:140rpx;
  1040. font-weight: 500;
  1041. font-size: 30rpx;
  1042. text-align: center;
  1043. color: #FFFFFF;
  1044. background: #FF1C1C;
  1045. }
  1046. .navbar {
  1047. position: fixed;
  1048. left: 0;
  1049. top: var(--window-top);
  1050. display: flex;
  1051. width: 100%;
  1052. height: 80upx;
  1053. background: #fff;
  1054. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  1055. z-index: 10;
  1056. .nav-item {
  1057. flex: 1;
  1058. display: flex;
  1059. justify-content: center;
  1060. align-items: center;
  1061. height: 100%;
  1062. font-size: 30upx;
  1063. color: $font-color-dark;
  1064. position: relative;
  1065. &.current {
  1066. color: $base-color;
  1067. &:after {
  1068. content: '';
  1069. position: absolute;
  1070. left: 50%;
  1071. bottom: 0;
  1072. transform: translateX(-50%);
  1073. width: 120upx;
  1074. height: 0;
  1075. border-bottom: 4upx solid $base-color;
  1076. }
  1077. }
  1078. }
  1079. .p-box {
  1080. display: flex;
  1081. flex-direction: column;
  1082. .yticon {
  1083. display: flex;
  1084. align-items: center;
  1085. justify-content: center;
  1086. width: 30upx;
  1087. height: 14upx;
  1088. line-height: 1;
  1089. margin-left: 4upx;
  1090. font-size: 26upx;
  1091. color: #888;
  1092. &.active {
  1093. color: $base-color;
  1094. }
  1095. }
  1096. .xia {
  1097. transform: scaleY(-1);
  1098. }
  1099. }
  1100. .cate-item {
  1101. display: flex;
  1102. justify-content: center;
  1103. align-items: center;
  1104. height: 100%;
  1105. width: 80upx;
  1106. position: relative;
  1107. font-size: 44upx;
  1108. &:after {
  1109. content: '';
  1110. position: absolute;
  1111. left: 0;
  1112. top: 50%;
  1113. transform: translateY(-50%);
  1114. border-left: 1px solid #ddd;
  1115. width: 0;
  1116. height: 36upx;
  1117. }
  1118. }
  1119. }
  1120. /* 分类 */
  1121. .cate-mask {
  1122. position: fixed;
  1123. left: 0;
  1124. top: var(--window-top);
  1125. bottom: 0;
  1126. width: 100%;
  1127. background: rgba(0, 0, 0, 0);
  1128. z-index: 95;
  1129. transition: .3s;
  1130. .cate-content {
  1131. width: 630upx;
  1132. height: 100%;
  1133. background: #fff;
  1134. float: right;
  1135. transform: translateX(100%);
  1136. transition: .3s;
  1137. }
  1138. &.none {
  1139. display: none;
  1140. }
  1141. &.show {
  1142. background: rgba(0, 0, 0, .4);
  1143. .cate-content {
  1144. transform: translateX(0);
  1145. }
  1146. }
  1147. }
  1148. .cate-list {
  1149. display: flex;
  1150. flex-direction: column;
  1151. height: 100%;
  1152. .cate-item {
  1153. display: flex;
  1154. align-items: center;
  1155. height: 90upx;
  1156. padding-left: 30upx;
  1157. font-size: 28upx;
  1158. color: #555;
  1159. position: relative;
  1160. }
  1161. .two {
  1162. height: 64upx;
  1163. color: #303133;
  1164. font-size: 30upx;
  1165. background: #f8f8f8;
  1166. }
  1167. .active {
  1168. color: $base-color;
  1169. }
  1170. }
  1171. .guess-section .guess-item{
  1172. border-bottom:none;
  1173. }
  1174. </style>