contract.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024
  1. <template>
  2. <view class="center">
  3. <view v-for="(item , index) in lists" :Key="index" class="region">
  4. <view>
  5. <view class="c-row ">
  6. <text class="tit" v-if="item.orderType == '采购'">{{item.orderType}}</text>
  7. <text class="tit2" v-if="item.orderType == '销售'">{{item.orderType}}</text>
  8. <view class="enterprise">
  9. 编号{{item.contractNo}}({{item.procurementPlanType}})
  10. </view>
  11. <!-- <text class="status status1" v-if="item.status == '已挂单'">{{item.status}}</text>
  12. <text class="status status2" v-if="item.status == '已成交'">{{item.status}}</text>
  13. <text class="status status3" v-if="item.status == '已完成'">{{item.status}}</text>
  14. <text class="status status1" v-if="item.status == '审核中'">{{item.status}}</text>
  15. <text class="status status1" v-if="item.status == '执行中'">{{item.status}}</text> -->
  16. <text class="status status1">{{item.status}}</text>
  17. </view>
  18. </view>
  19. <view>
  20. <view class="c-row ">
  21. <text class="tit1" v-if="item.orderType == '采购'">买方</text>
  22. <text class="tit1" v-if="item.orderType == '销售'">卖方</text>
  23. <view class="enterprise">
  24. {{item.contracter}}
  25. </view>
  26. </view>
  27. </view>
  28. <view class="forList flex">
  29. <view class="title">{{item.goodsName}}:<text>{{item.transactionsNumber}}</text></view>
  30. <view class="title">单价:¥<text>{{item.unitPrice}}</text></view>
  31. <view class="title">基差:¥<text>{{item.basis}}</text></view>
  32. </view>
  33. <view class="c-row flex annius">
  34. <text class="anniu" @click="commit(item)"> 附件</text>
  35. <text class="anniu" @click="someprice(item)"
  36. v-if="item.procurementPlanType == '期货' && (item.status == '已成交' || item.status == '已挂单')"> 点价</text>
  37. <text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'"> 发货</text>
  38. <!-- <text class="anniu" @click="commit"> 附件</text>
  39. <text class="anniu" @click="someprice(item)" v-if="item.procurementPlanType == '期货' && (item.status == '已成交' || item.status == '已挂单')"> 点价</text>
  40. <text class="anniu1" @click="commit1(item)" v-if="item.orderType == '采购'&&item.status != '待审核'"> 发货</text> -->
  41. <text class="anniu1" @click="commit2(item)" v-if="item.orderType == '销售'"> 收货</text>
  42. </view>
  43. </view>
  44. <view v-if='pricestatus' class='shade'>
  45. <view class='shade-content'>
  46. <view class="titles1">点价</view>
  47. <view class='shade-content-item flex'>
  48. <input v-model='price' placeholder="请输入点价价格" type="number" class="pointprice">
  49. <text style="font-size: 16px; color: #AFB3BF;margin-top: -3px;">元/吨</text>
  50. </view>
  51. <view class="flex">
  52. <view class="btns btn1" @click='pricestatus=false'>取消</view>
  53. <view class="btns btn2" @click='amendprice'>确定</view>
  54. </view>
  55. </view>
  56. </view>
  57. <view v-if='shadestatus' class='shade'>
  58. <view class='shade-content'>
  59. <view class='shade-content-item'>
  60. <view class="titles">请于以下时间段进行点价操作:</view>
  61. <view class="timeslot">11:30 ~ 12:30</view>
  62. <view class="timeslot">15:30 ~ 20:00</view>
  63. <view class="timeslot">23:00 ~ 08:00</view>
  64. </view>
  65. <view class="cancel" @click='shadestatus=false'>知道了</view>
  66. </view>
  67. </view>
  68. <view class="padding flex flex-direction">
  69. <!-- <button class="cu-btn commit margin-tb-sm lg" @click="commit">提交</button> -->
  70. </view>
  71. <!-- </block> -->
  72. </view>
  73. </template>
  74. <script>
  75. import uploadImage from '@/components/ossutil/uploadFile.js';
  76. import {
  77. mapState
  78. } from 'vuex';
  79. export default {
  80. name: "trust",
  81. data() {
  82. return {
  83. lists: [],
  84. shadestatus: false,
  85. pricestatus: false,
  86. goods: {
  87. pageSize: 10,
  88. currentPage: 1,
  89. // pcFlag : 0,
  90. },
  91. procurementPlanInfo: {
  92. pageSize: 10,
  93. currentPage: 1
  94. },
  95. price: "",
  96. tran: {
  97. total: 0,
  98. price: 0,
  99. startPlace: undefined,
  100. endPlace: undefined,
  101. goodsName: undefined,
  102. sender: '',
  103. senderPhone: '',
  104. status: 0,
  105. receiver: '',
  106. receiverPhone: '',
  107. verifyCode: '',
  108. driver: '',
  109. driverPhone: '',
  110. carNo: '',
  111. personNoImg: '',
  112. personNoImg1: '',
  113. driverNoImg: '',
  114. driverNoImg1: '',
  115. carNoImg: '',
  116. carNoImg1: ''
  117. },
  118. id: 0,
  119. PageCur: "trust",
  120. TabCur: 0,
  121. priceTypeIndex: -1,
  122. priceType: ['库内价', '到库价', '到港价'],
  123. unitPrice: 0,
  124. seller: '',
  125. sellerPhone: '',
  126. minSale: '',
  127. exsitCount: 0,
  128. origin: '',
  129. stock: '',
  130. goodsName: '',
  131. verifyCode: '',
  132. sendText0: '获取验证码',
  133. sendText1: '获取验证码',
  134. sendText2: '获取验证码',
  135. sendText3: '获取验证码',
  136. sendDisabled0: false,
  137. sendDisabled1: false,
  138. sendDisabled2: false,
  139. sendDisabled3: false,
  140. buyer: '',
  141. buyerPhone: '',
  142. level: '',
  143. sender: '',
  144. senderPhone: '',
  145. receiver: '',
  146. receiverPhone: '',
  147. total: 0,
  148. startPlace: '',
  149. endPlace: '',
  150. driver: '',
  151. driverPhone: '',
  152. carNo: '',
  153. personNoImg: '',
  154. personNoImg1: '',
  155. driverNoImg: '',
  156. driverNoImg1: '',
  157. carNoImg: '',
  158. carNoImg1: '',
  159. showTran: true
  160. };
  161. },
  162. computed: {
  163. ...mapState(['hasLogin', 'userInfo'])
  164. },
  165. // onShow() {
  166. // this.loadData()
  167. // },
  168. onLoad() {
  169. this.getList()
  170. },
  171. onPullDownRefresh() {
  172. this.getList()
  173. uni.stopPullDownRefresh()
  174. },
  175. methods: {
  176. amendprice() {
  177. this.$api.doRequest('post', '/purchaseOrder/api/pointPrice', {
  178. id: this.id,
  179. unitPrice: Number(this.price)
  180. }).then(res => {
  181. if (res.data.code == 200) {
  182. this.pricestatus = false
  183. } else {
  184. uni.showToast({
  185. title: res.data.message,
  186. icon: 'none',
  187. duration: 2000
  188. })
  189. }
  190. })
  191. .catch(res => {
  192. if(res.errmsg){
  193. uni.showToast({
  194. title: res.errmsg,
  195. icon: 'none',
  196. duration: 2000
  197. })
  198. }
  199. else{
  200. uni.showToast({
  201. title: "系统异常,请联系管理员",
  202. icon: 'none',
  203. duration: 2000
  204. })
  205. }
  206. });
  207. },
  208. someprice(item) {
  209. var time = new Date().getTime()
  210. var time1 = new Date(new Date(new Date().toLocaleDateString()).getTime() - (1 * 60 * 60 * 1000))
  211. var time2 = new Date()
  212. time2.setHours(8);
  213. time2.setMinutes(0);
  214. time2.setSeconds(0);
  215. var time3 = new Date()
  216. time3.setHours(11);
  217. time3.setMinutes(30);
  218. time3.setSeconds(0);
  219. var time4 = new Date()
  220. time4.setHours(12);
  221. time4.setMinutes(30);
  222. time4.setSeconds(0);
  223. var time5 = new Date()
  224. time5.setHours(15);
  225. time5.setMinutes(30);
  226. time5.setSeconds(0);
  227. var time6 = new Date()
  228. time6.setHours(20);
  229. time6.setMinutes(0);
  230. time6.setSeconds(0);
  231. if (time < time2.getTime() && time > time1 || time < time4.getTime() && time > time3.getTime() || time <
  232. time6.getTime() && time > time5.getTime()) {
  233. this.id = item.id
  234. this.pricestatus = true
  235. } else {
  236. this.shadestatus = true
  237. }
  238. },
  239. commit(item) {
  240. console.log(item)
  241. var list = item.addressUrl.toString().split(',')
  242. if(list.length > 0){
  243. uni.downloadFile({
  244. url: list[0],
  245. success: function (res) {
  246. var filePath = res.tempFilePath;
  247. uni.openDocument({
  248. filePath: filePath,
  249. success: function (res) {
  250. uni.hideLoading()
  251. console.log('打开文档成功');
  252. }
  253. });
  254. },
  255. })
  256. }
  257. // uni.navigateTo({
  258. // url: `/pageB/contract/enclosures?addressUrl=${item.addressUrl}`
  259. // })
  260. },
  261. commit1(item) {
  262. uni.navigateTo({
  263. url: `/pageB/contract/look?id=${item.id}&planId=${item.planId}&contractNo=${item.contractNo}&contracter=${item.contracter}&goodsName=${item.goodsName}`
  264. })
  265. },
  266. commit2(item) {
  267. uni.navigateTo({
  268. url: `/pageB/contract/collectLook?id=${item.id}&contractNo=${item.contractNo}&customer=${item.customer}&goodsName=${item.goodsName}&contracter=${item.contracter}`
  269. })
  270. },
  271. getList() {
  272. this.goods.commonId = this.userInfo.id
  273. // this.goods.pcFlag = 0
  274. this.$api.doRequest('get', '/purchaseOrder/selectPurchaseOrderApp', this.goods).then(res => {
  275. if (res.data.code == 200) {
  276. this.lists = res.data.data.records
  277. } else {
  278. uni.showToast({
  279. title: res.data.message,
  280. icon: 'none',
  281. duration: 2000
  282. })
  283. }
  284. })
  285. .catch(res => {
  286. if(res.errmsg){
  287. uni.showToast({
  288. title: res.errmsg,
  289. icon: 'none',
  290. duration: 2000
  291. })
  292. }
  293. else{
  294. uni.showToast({
  295. title: "系统异常,请联系管理员",
  296. icon: 'none',
  297. duration: 2000
  298. })
  299. }
  300. });
  301. },
  302. ChooseImageCar() {
  303. uni.chooseImage({
  304. count: 1, //默认9
  305. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  306. sourceType: ['album', 'camera'], //从相册选择
  307. success: (res) => {
  308. //上传图片
  309. //图片路径可自行修改
  310. uploadImage(res.tempFilePaths[0], 'carNoImg/',
  311. result => {
  312. if (this.carNoImg.length != 0) {
  313. this.carNoImg1 = result
  314. } else {
  315. this.carNoImg = result
  316. }
  317. uni.hideLoading();
  318. }
  319. )
  320. }
  321. });
  322. },
  323. ViewImage(e) {
  324. var img = [];
  325. img = e.currentTarget.dataset.url.split(' ')
  326. uni.previewImage({
  327. current: 0,
  328. urls: img
  329. });
  330. },
  331. // DelImg(e) {
  332. // uni.showModal({
  333. // title: '提示',
  334. // content: '确定要删除该照片吗?',
  335. // cancelText: '取消',
  336. // confirmText: '确定',
  337. // success: res => {
  338. // if (res.confirm) {
  339. // if (e.currentTarget.dataset.index == 0) {
  340. // this.personNoImg = "";
  341. // } else if (e.currentTarget.dataset.index == 1) {
  342. // this.personNoImg1 = "";
  343. // } else if (e.currentTarget.dataset.index == 2) {
  344. // this.driverNoImg = "";
  345. // } else if (e.currentTarget.dataset.index == 3) {
  346. // this.driverNoImg1 = "";
  347. // } else if (e.currentTarget.dataset.index == 4) {
  348. // this.carNoImg = "";
  349. // } else if (e.currentTarget.dataset.index == 5) {
  350. // this.carNoImg1 = "";
  351. // }
  352. // }
  353. // }
  354. // })
  355. // },
  356. commit11() {
  357. if (this.hasLogin) {
  358. uni.showModal({
  359. title: '登录提示',
  360. content: '您尚未登录,是否立即登录?',
  361. showCancel: true,
  362. confirmText: '登录',
  363. success: (e) => {
  364. if (e.confirm) {
  365. uni.navigateTo({
  366. url: '/pagesB/contract/look'
  367. })
  368. }
  369. },
  370. fail: () => {},
  371. complete: () => {}
  372. })
  373. } else {
  374. const that = this
  375. if (this.TabCur == 0) {
  376. // if (!that.seller) {
  377. // this.$api.msg('请填写卖方');
  378. // return;
  379. // }
  380. // if (!that.sellerPhone) {
  381. // this.$api.msg('请填写手机号码');
  382. // return;
  383. // }
  384. // if (!that.exsitCount) {
  385. // this.$api.msg('请填写库存量');
  386. // return;
  387. // }
  388. // if (!that.minSale) {
  389. // this.$api.msg('请填写最小成交量');
  390. // return;
  391. // }
  392. // if (!that.goodsName) {
  393. // this.$api.msg('请填写货名');
  394. // return;
  395. // }
  396. // if (!that.verifyCode) {
  397. // this.$api.msg('请填写验证码');
  398. // return;
  399. // }
  400. // if (!that.price) {
  401. // that.$api.msg('请选择价格类型')
  402. // return
  403. // }
  404. // if (!that.unitPrice) {
  405. // that.$api.msg('请填写协议价格(元/吨)');
  406. // return
  407. // }
  408. // if (!that.origin) {
  409. // this.$api.msg('请填写产地');
  410. // return;
  411. // }
  412. // if (!that.stock) {
  413. // this.$api.msg('请填写库存地');
  414. // return;
  415. // }
  416. // if (!that.level) {
  417. // this.$api.msg('请填写国标等级');
  418. // return;
  419. // }
  420. // that.saleInfo.seller = that.seller
  421. // that.saleInfo.sellerPhone = that.sellerPhone
  422. // that.saleInfo.priceType = that.price
  423. // that.saleInfo.unitPrice = that.unitPrice
  424. // that.saleInfo.minSale = that.minSale
  425. // that.saleInfo.exsitCount = that.exsitCount
  426. // that.saleInfo.origin = that.origin
  427. // that.saleInfo.stock = that.stock
  428. // that.saleInfo.verifyCode = that.verifyCode
  429. // that.saleInfo.goodsName = that.goodsName
  430. // that.saleInfo.buyer = that.buyer
  431. // that.saleInfo.buyerPhone = that.buyerPhone
  432. // that.saleInfo.level = that.level
  433. } else if (this.TabCur == 1) {
  434. if (!that.buyer) {
  435. this.$api.msg('请填写买方');
  436. return;
  437. }
  438. if (!that.buyerPhone) {
  439. this.$api.msg('请填写手机号码');
  440. return;
  441. }
  442. if (!that.goodsName) {
  443. this.$api.msg('请填写货名');
  444. return;
  445. }
  446. if (!that.verifyCode) {
  447. this.$api.msg('请填写验证码');
  448. return;
  449. }
  450. if (!that.price) {
  451. that.$api.msg('请选择价格类型')
  452. return
  453. }
  454. if (!that.unitPrice) {
  455. that.$api.msg('请填写协议价格(元/吨)');
  456. return
  457. }
  458. if (!that.origin) {
  459. this.$api.msg('请填写产地');
  460. return;
  461. }
  462. if (!that.stock) {
  463. this.$api.msg('请填写库存地');
  464. return;
  465. }
  466. if (!that.level) {
  467. this.$api.msg('请填写国标等级');
  468. return;
  469. }
  470. that.saleInfo.seller = that.seller
  471. that.saleInfo.sellerPhone = that.sellerPhone
  472. that.saleInfo.priceType = that.price
  473. that.saleInfo.unitPrice = that.unitPrice
  474. that.saleInfo.minSale = that.minSale
  475. that.saleInfo.exsitCount = that.exsitCount
  476. that.saleInfo.origin = that.origin
  477. that.saleInfo.stock = that.stock
  478. that.saleInfo.verifyCode = that.verifyCode
  479. that.saleInfo.goodsName = that.goodsName
  480. that.saleInfo.buyer = that.buyer
  481. that.saleInfo.buyerPhone = that.buyerPhone
  482. that.saleInfo.level = that.level
  483. } else if (this.TabCur == 2) {
  484. if (!that.sender) {
  485. this.$api.msg('请填写发货方');
  486. return;
  487. }
  488. if (!that.senderPhone) {
  489. this.$api.msg('请填写发货方手机号码');
  490. return;
  491. }
  492. if (!that.receiver) {
  493. this.$api.msg('请填写收货方');
  494. return;
  495. }
  496. if (!that.receiverPhone) {
  497. this.$api.msg('请填写收货方手机号码');
  498. return;
  499. }
  500. if (!that.goodsName) {
  501. this.$api.msg('请填写货名');
  502. return;
  503. }
  504. if (!that.verifyCode) {
  505. this.$api.msg('请填写验证码');
  506. return;
  507. }
  508. that.tran.sender = that.sender
  509. that.tran.senderPhone = that.senderPhone
  510. that.tran.receiver = that.receiver
  511. that.tran.receiverPhone = that.receiverPhone
  512. that.tran.verifyCode = that.verifyCode
  513. that.tran.goodsName = that.goodsName
  514. that.tran.total = that.total
  515. that.tran.price = that.price
  516. that.tran.startPlace = that.startPlace
  517. that.tran.endPlace = that.endPlace
  518. } else if (this.TabCur == 3) {
  519. if (!that.startPlace) {
  520. this.$api.msg('请填写起始地');
  521. return;
  522. }
  523. if (!that.endPlace) {
  524. this.$api.msg('请填写目的地');
  525. return;
  526. }
  527. if (!that.driver) {
  528. this.$api.msg('请填写承运人');
  529. return;
  530. }
  531. if (!that.driverPhone) {
  532. this.$api.msg('请填写承运人手机号码');
  533. return;
  534. }
  535. if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(that.driverPhone)) {
  536. that.$api.msg('请输入正确的承运人手机号码');
  537. return
  538. }
  539. if (!that.carNo) {
  540. this.$api.msg('请填写车牌号');
  541. return;
  542. }
  543. if (!that.verifyCode) {
  544. this.$api.msg('请填写验证码');
  545. return;
  546. }
  547. if (!that.personNoImg || !that.personNoImg1) {
  548. that.$api.msg('请上传身份证正、反面照片');
  549. return
  550. }
  551. if (!that.driverNoImg || !that.driverNoImg1) {
  552. that.$api.msg('请上传驾驶证主、副页照片');
  553. return
  554. }
  555. if (!that.carNoImg || !that.carNoImg1) {
  556. that.$api.msg('请上传行车证主、副页照片');
  557. return
  558. }
  559. that.tran.driver = that.driver
  560. that.tran.driverPhone = that.driverPhone
  561. that.tran.verifyCode = that.verifyCode
  562. that.tran.price = that.price
  563. that.tran.startPlace = that.startPlace
  564. that.tran.endPlace = that.endPlace
  565. that.tran.carNo = that.carNo
  566. that.tran.personNoImg = that.personNoImg
  567. that.tran.personNoImg1 = that.personNoImg1
  568. that.tran.driverNoImg = that.driverNoImg
  569. that.tran.driverNoImg1 = that.driverNoImg1
  570. that.tran.carNoImg = that.carNoImg
  571. that.tran.carNoImg1 = that.carNoImg1
  572. }
  573. // 获取用户的当前设置,判断是否点击了“总是保持以上,不在询问”
  574. wx.getSetting({
  575. // withSubscriptions: true,//是否获取用户订阅消息的订阅状态,默认false不返回
  576. success(res) {
  577. if (res.authSetting['scope.subscribeMessage']) {
  578. uni.openSetting({ // 打开设置页
  579. success(res) {
  580. console.log(res.authSetting)
  581. }
  582. });
  583. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  584. uni.requestSubscribeMessage({
  585. tmplIds: ['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'], //
  586. success(res) {
  587. if (res['8cVkckXi_8zfHeScXRHhjN6cgZFYYCWIMPDTiPWagXY'] ==
  588. "accept") { // 字段就是tmplIds模板id
  589. uni.showLoading({
  590. title: '正在提交',
  591. mask: true
  592. })
  593. if (that.TabCur == 0) {
  594. that.$api.request('sale', 'addSale', that.saleInfo,
  595. failres => {
  596. uni.hideLoading()
  597. if(failres.errmsg){
  598. uni.showToast({
  599. title: failres.errmsg,
  600. icon: 'none',
  601. duration: 2000
  602. })
  603. }
  604. else{
  605. uni.showToast({
  606. title: "系统异常,请联系管理员",
  607. icon: 'none',
  608. duration: 2000
  609. })
  610. }
  611. }).then(res => {
  612. uni.hideLoading()
  613. uni.showModal({
  614. title: '提示',
  615. content: "发布提交成功,工作人员会尽快联系该号码:" +
  616. that.sellerPhone,
  617. showCancel: false,
  618. confirmText: '确定',
  619. success: () => {
  620. uni.navigateBack()
  621. }
  622. })
  623. // that.$api.prePage().refreshList(data, that.manageType);
  624. })
  625. } else if (that.TabCur == 1) {
  626. that.$api.request('sale', 'addBuy', that.saleInfo,
  627. failres => {
  628. uni.hideLoading()
  629. if(failres.errmsg){
  630. uni.showToast({
  631. title: failres.errmsg,
  632. icon: 'none',
  633. duration: 2000
  634. })
  635. }
  636. else{
  637. uni.showToast({
  638. title: "系统异常,请联系管理员",
  639. icon: 'none',
  640. duration: 2000
  641. })
  642. }
  643. }).then(res => {
  644. uni.hideLoading()
  645. uni.showModal({
  646. title: '提示',
  647. showCancel: false,
  648. content: "发布提交成功,工作人员会尽快联系该号码:" +
  649. that.buyerPhone,
  650. confirmText: '确定',
  651. success: () => {
  652. uni.navigateBack()
  653. }
  654. })
  655. // that.$api.prePage().refreshList(data, that.manageType);
  656. })
  657. } else if (that.TabCur == 2) {
  658. that.$api.request('tran', 'addTran', that.tran,
  659. failres => {
  660. uni.hideLoading()
  661. if(failres.errmsg){
  662. uni.showToast({
  663. title: failres.errmsg,
  664. icon: 'none',
  665. duration: 2000
  666. })
  667. }
  668. else{
  669. uni.showToast({
  670. title: "系统异常,请联系管理员",
  671. icon: 'none',
  672. duration: 2000
  673. })
  674. }
  675. }).then(res => {
  676. uni.hideLoading()
  677. uni.showModal({
  678. title: '提示',
  679. showCancel: false,
  680. content: "发布提交成功,工作人员会尽快联系该号码:" +
  681. that.senderPhone,
  682. confirmText: '确定',
  683. success: () => {
  684. uni.navigateBack()
  685. }
  686. })
  687. // that.$api.prePage().refreshList(data, that.manageType);
  688. })
  689. } else if (that.TabCur == 3) {
  690. that.$api.request('tran', 'addCarDriver', that.tran,
  691. failres => {
  692. uni.hideLoading()
  693. if(failres.errmsg){
  694. uni.showToast({
  695. title: failres.errmsg,
  696. icon: 'none',
  697. duration: 2000
  698. })
  699. }
  700. else{
  701. uni.showToast({
  702. title: "系统异常,请联系管理员",
  703. icon: 'none',
  704. duration: 2000
  705. })
  706. }
  707. }).then(res => {
  708. uni.hideLoading()
  709. uni.showModal({
  710. title: '提示',
  711. showCancel: false,
  712. content: "发布提交成功,工作人员会尽快联系该号码:" +
  713. that.driverPhone,
  714. confirmText: '确定',
  715. success: () => {
  716. uni.navigateBack()
  717. }
  718. })
  719. // that.$api.prePage().refreshList(data, that.manageType);
  720. })
  721. }
  722. }
  723. }
  724. })
  725. }
  726. }
  727. })
  728. }
  729. }
  730. },
  731. }
  732. </script>
  733. <style scoped>
  734. .center {
  735. padding: 10px 20px;
  736. background-color: #F5F6FA;
  737. }
  738. .region {
  739. background-color: #FFFFFF;
  740. border-radius: 20px;
  741. margin-top: 10px;
  742. }
  743. .zan-dialog__mask {
  744. position: fixed;
  745. top: 0;
  746. left: 0;
  747. right: 0;
  748. bottom: 0;
  749. z-index: 10;
  750. background: rgba(0, 0, 0, 0);
  751. /*设置阴影半透明背景如: background: rgba(0, 0, 0, 0.4);*/
  752. display: none;
  753. }
  754. .zan-dialog__container {
  755. position: fixed;
  756. bottom: 400rpx;
  757. width: 650rpx;
  758. /*弹窗布局宽*/
  759. height: 350rpx;
  760. /*弹窗布局高,与下面弹出距离transform有关*/
  761. margin-left: 50rpx;
  762. background: #f8f8f8;
  763. transform: translateY(300%);
  764. /*弹框弹出距离,与弹框布局高度有关,如300%表示弹起距离为3倍弹窗高度 */
  765. transition: all 0.4s ease;
  766. z-index: 12;
  767. border-radius: 20rpx;
  768. box-shadow: 0px 3px 3px 2px gainsboro;
  769. /*弹框的悬浮阴影效果,如不需要可注释该行*/
  770. }
  771. .zan-dialog--show .zan-dialog__container {
  772. transform: translateY(0);
  773. }
  774. .zan-dialog--show .zan-dialog__mask {
  775. display: block;
  776. }
  777. .container {
  778. padding-bottom: 160rpx;
  779. }
  780. .cu-form-group input {
  781. text-align: right;
  782. }
  783. .text-white text {
  784. background: linear-gradient(45deg, #3DC146, #B2D612);
  785. padding: 5px 10px;
  786. border-radius: 38rpx;
  787. }
  788. .cu-form-group textarea {
  789. text-align: right;
  790. }
  791. .commit {
  792. background: linear-gradient(45deg, #DF331C, #DA611A);
  793. color: #fff;
  794. }
  795. .shade {
  796. position: fixed;
  797. top: 0;
  798. left: 0;
  799. width: 100%;
  800. background: rgba(0, 0, 0, 0.5);
  801. height: 100%;
  802. z-index: 999999;
  803. }
  804. .shade-content {
  805. background: #fff;
  806. position: absolute;
  807. top: 50%;
  808. left: 50%;
  809. border-radius: 20px;
  810. transform: translateX(-50%) translateY(-50%);
  811. z-index: 999999;
  812. text-align: center;
  813. }
  814. .shade-content-item {
  815. width: 277px;
  816. text-align: center;
  817. height: 121px;
  818. padding: 35px 10px;
  819. }
  820. .c-row {
  821. display: -webkit-box;
  822. display: -webkit-flex;
  823. display: flex;
  824. -webkit-box-align: center;
  825. -webkit-align-items: center;
  826. align-items: center;
  827. padding: 20rpx 30rpx;
  828. position: relative;
  829. }
  830. .con-list {
  831. -webkit-box-flex: 1;
  832. -webkit-flex: 1;
  833. flex: 1;
  834. display: -webkit-box;
  835. display: -webkit-flex;
  836. display: flex;
  837. -webkit-box-orient: vertical;
  838. -webkit-box-direction: normal;
  839. -webkit-flex-direction: column;
  840. flex-direction: column;
  841. color: #303133;
  842. line-height: 40rpx;
  843. text-align: right;
  844. padding-right: 20rpx;
  845. font-size: 14px;
  846. }
  847. .forList {
  848. width: 90%;
  849. height: 30px;
  850. margin: 0 auto;
  851. background-color: #F9F9FA;
  852. border-radius: 10px;
  853. }
  854. .forList .title {
  855. line-height: 30px;
  856. margin-left: 25px;
  857. color: #9698A2;
  858. }
  859. .tit {
  860. width: 34px;
  861. height: 24px;
  862. background-color: #E9F8F0;
  863. color: #22C572;
  864. padding: 2px 3px;
  865. border-radius: 5px;
  866. }
  867. .tit1 {
  868. width: 34px;
  869. height: 24px;
  870. background-color: #FEECE6;
  871. color: #FE6430;
  872. padding: 2px 3px;
  873. border-radius: 5px;
  874. }
  875. .tit2 {
  876. width: 34px;
  877. height: 24px;
  878. background-color: #EBEEFA;
  879. color: #5C76DF;
  880. padding: 2px 3px;
  881. border-radius: 5px;
  882. }
  883. .enterprise {
  884. font-size: 16px;
  885. font-weight: 600;
  886. margin-left: 20px;
  887. }
  888. .annius {
  889. width: 70%;
  890. margin-left: 110px;
  891. justify-content: flex-end;
  892. }
  893. .anniu {
  894. width: 50px;
  895. font-size: 16px;
  896. border: 1px solid #CDCDCD;
  897. border-radius: 12px;
  898. position: relative;
  899. margin-right: 10px;
  900. text-align: center;
  901. line-height: 30px;
  902. }
  903. .anniu1 {
  904. width: 50px;
  905. font-size: 16px;
  906. border: 1px solid #22C572;
  907. border-radius: 15px;
  908. color: #22C572;
  909. position: relative;
  910. margin-right: 10px;
  911. text-align: center;
  912. line-height: 30px;
  913. }
  914. .titles {
  915. color: #333333;
  916. font-size: 16px;
  917. font-weight: 600;
  918. margin-top: -16px;
  919. margin-bottom: 10px;
  920. }
  921. .timeslot {
  922. font-size: 14px;
  923. color: #333333;
  924. height: 20px;
  925. }
  926. .cancel {
  927. text-align: center;
  928. width: 100%;
  929. color: #22C572;
  930. border-top: 1px solid #EEEEEE;
  931. margin-bottom: 6px;
  932. font-size: 18px;
  933. line-height: 40px;
  934. display: inline-block;
  935. }
  936. .pointprice {
  937. border-bottom: 1px solid #EEEEEE;
  938. text-align: left;
  939. padding-left: 10px;
  940. width: 70%;
  941. margin: 0 auto;
  942. }
  943. .titles1 {
  944. color: #333333;
  945. font-size: 16px;
  946. font-weight: 600;
  947. margin-top: 10px;
  948. }
  949. .btns {
  950. width: 50%;
  951. line-height: 50px;
  952. font-size: 18px;
  953. border-top: 1px solid #EEEEEE;
  954. margin-top: -20px;
  955. }
  956. .btn1 {
  957. color: #AFB3BF;
  958. border-right: 1px solid #EEEEEE;
  959. }
  960. .btn2 {
  961. color: #22C572;
  962. }
  963. .status {
  964. right: 20px;
  965. position: absolute;
  966. }
  967. .status1 {
  968. color: #FE6430;
  969. }
  970. .status2 {
  971. color: #22C572;
  972. }
  973. .status3 {
  974. color: #AFB3BF;
  975. }
  976. </style>