contract.vue 26 KB

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