contract.vue 26 KB

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