contract.vue 27 KB

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