contract.vue 26 KB

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