contract.vue 26 KB

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