creatorder.vue 28 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105
  1. <template>
  2. <view :class="[AppTheme]" class="container">
  3. <view class="central_information">
  4. <view class="modular_setion">
  5. <!-- 土地标题 -->
  6. <view class="package_title">
  7. <view class="package_dtitle_p1">
  8. <view class="package_dtitle_p1_1"> {{ordermess.soil_name }}</view>
  9. <view class="dtitle_text_p2 text-primary">{{ordermess.selelanditemtext.alias }}</view>
  10. </view>
  11. <image class="package_thumbnail" mode="aspectFit"
  12. :src="settingFile.root_img+'/static/app/imgs/land.png'"></image>
  13. </view>
  14. <view class="border_nn"></view>
  15. <view class="package_item">
  16. <view class="package_item_tp1">地块编号</view>
  17. <view class="package_item_tp2">
  18. <view class="pa_title_selt">{{ ordermess.selelanditemtext.name }} </view>
  19. </view>
  20. </view>
  21. <view class="border_nn"></view>
  22. <view class="package_item">
  23. <view class="package_item_tp1">地块面积</view>
  24. <view class="package_item_tp2">
  25. <view class="pa_title_selt">{{ ordermess.selelanditemtext.area + 'm²' }}</view>
  26. </view>
  27. </view>
  28. <view class="border_nn"></view>
  29. <!-- 服务类型 -->
  30. <view class="package_item">
  31. <view class="package_item_tp1">服务类型</view>
  32. <view class="package_item_tp2" @click="hostifshow = true">
  33. <view class="pa_title_selt">{{ ordermess.cutlysetagetext.serve_name }}</view>
  34. <u-icon size="20" color="#999" name="arrow-right"></u-icon>
  35. </view>
  36. </view>
  37. <view class="border_nn"></view>
  38. <!-- 租赁周期 -->
  39. <view class="package_item">
  40. <view class="package_item_tp1">租赁周期</view>
  41. <view class="package_item_tp2" @click="hiepackshow = true">
  42. <view class="pa_title_selt">{{ ordermess.hirecycle.label }}</view>
  43. <u-icon size="20" color="#999" name="arrow-right"></u-icon>
  44. </view>
  45. </view>
  46. </view>
  47. <!-- 种子管理 -->
  48. <view class="seedmodular" v-if="ordermess.cutlysetagetext.serve_name !== '无托管'">
  49. <view class="seedmodular_p1" @click="chooseseed()">
  50. <view class="seedlar_text1 text-primary">种子管理</view>
  51. <view class="seedlar_text2">
  52. <view class="">选择种子</view>
  53. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  54. </view>
  55. </view>
  56. <view class="border_nn"></view>
  57. <view class="seedmodular_p2" v-if="ordermess.seedordermy">
  58. <view class="seleedseed_item" v-for="(item, index) in ordermess.seedordermy.orderseedlist"
  59. :key="index">
  60. <view class="seleedseed_item_p1">
  61. <image class="seditem_thumbnail" mode="aspectFill" :src="item.seeditem.ripe_pic"></image>
  62. <view class="seditem_title">{{ item.seeditem.seed_name }}</view>
  63. </view>
  64. <!-- <view class="seleedseed_item_p2">预估产量:{{ item.seeditem.seed_yield * item.seednum }}kg</view> -->
  65. <view class="seleedseed_item_p3">{{item.seednum}}m²</view>
  66. </view>
  67. </view>
  68. <view class="seedmodular_p3 text-primary border-primary" v-if="!ordermess.seedordermy"
  69. @click="chooseseed()">+添加种子</view>
  70. <!-- <view style="height: 10rpx;"></view> -->
  71. <view class="read-more">
  72. <u-read-more :toggle="true" :shadowStyle="shadowStyle" :showHeight="0" closeText="详情" color="#999"
  73. fontSize="26rpx" textIndent="0">
  74. <view class="read-more_1">
  75. <view class="read-more_1_1">种子详情</view>
  76. <view class="read-more_1_2">
  77. <view>名称</view>
  78. <!-- <view>数量</view> -->
  79. <view>预估产量</view>
  80. <view>播种面积</view>
  81. </view>
  82. <view v-if="ordermess.seedordermy">
  83. <view class="read-more_1_3" v-for="(item, index) in ordermess.seedordermy.orderseedlist"
  84. :key="index">
  85. <view class="view1">{{ item.seeditem.seed_name }}</view>
  86. <!-- <view class="view1">{{ item.seednum }}/份</view> -->
  87. <view class="view1">{{ item.seeditem.seed_yield * item.seednum }}kg</view>
  88. <view class="view1">{{item.seednum}}m²</view>
  89. </view>
  90. </view>
  91. <view v-else class="read-more_1_4">暂无种子</view>
  92. </view>
  93. <view class="read-more_2">
  94. <view class="read-more_2_1">土地详情</view>
  95. <view class="read-more_2_2">
  96. <view>租地总面积</view>
  97. <view>播种面积</view>
  98. <view>剩余面积</view>
  99. </view>
  100. <view class="read-more_2_3">
  101. <view class="view2">{{ ordermess.selelanditemtext.area + 'm²' }}</view>
  102. <view class="view2">{{ordermess.seednumber}}m²</view>
  103. <view class="view2">{{ordermess.selelanditemtext.area-ordermess.seednumber}}m²</view>
  104. </view>
  105. </view>
  106. </u-read-more>
  107. </view>
  108. </view>
  109. <!-- 配送信息 -->
  110. <view class="seedmodular">
  111. <view class="seedmodular_p1">
  112. <view class="seedlar_text1 text-primary">配送信息</view>
  113. <navigator class="seedlar_text2" url="/pagesD/pages/address/address?source=1">
  114. <view class="">
  115. 更换地址
  116. </view>
  117. <u-icon name="arrow-right" color="#999" size="20"></u-icon>
  118. </navigator>
  119. </view>
  120. <view class="border_nn"></view>
  121. <navigator class="seedmodular_p3 text-primary border-primary"
  122. v-if="addressData === null || addressData === undefined"
  123. url="/pagesD/pages/address/address?source=1">+请选择地址</navigator>
  124. <navigator class="address_delti" v-if="addressData !== null"
  125. url="/pagesD/pages/address/address?source=1">
  126. <view class="detaed_addrss">
  127. <u-icon name="phone-fill" :color="primary" size="25"></u-icon>
  128. <view class="addr_text">{{ addressData.name }}-{{ addressData.mobile }}</view>
  129. </view>
  130. <view class="detaed_addrss">
  131. <u-icon name="map-fill" :color="primary" size="25"></u-icon>
  132. <view class="addr_text">{{ addressData.address }}</view>
  133. </view>
  134. </navigator>
  135. <view v-if="!addressData" style="height: 40rpx;"></view>
  136. </view>
  137. <!-- 自主采摘 -->
  138. <!-- <view class="seedmodular" v-if="ordermess.cutlysetagetext.serve_name === '半托管'">
  139. <view class="seedlar_text1 text-primary">自主采摘</view>
  140. <view class="border_nn"></view>
  141. <view class="feed_moudel" @click="map">
  142. <view class="feed_modetitle">
  143. <u-icon name="map" :color="primary" size="25"></u-icon>
  144. <view class="feed_modetext">采摘地址</view>
  145. </view>
  146. <view class="feed_modetitle2">
  147. <view class="feed_modnnsnt">{{pickingaddress||"请选择采摘地址"}}</view>
  148. <u-icon name="arrow-right" color="#cacaca" size="20"></u-icon>
  149. </view>
  150. </view>
  151. <view class="feed_moudel">
  152. <view class="feed_modetitle">
  153. <u-icon name="phone-fill" color="#56AB2F" size="25"></u-icon>
  154. <view class="feed_modetext">采摘说明</view>
  155. </view>
  156. <view class="feed_modetitle2">
  157. <view class="feed_modnnsnt">请提前打电话预约</view>
  158. <u-icon name="arrow-right" color="#cacaca" size="20"></u-icon>
  159. </view>
  160. </view>
  161. </view> -->
  162. <!-- 租赁人信息 -->
  163. <view class="seedmodular_info">
  164. <view class="seedlar_text1">租赁人信息</view>
  165. <view class="border_nn"></view>
  166. <view class="leation_suject">姓名</view>
  167. <input type="text" class="brodnn" placeholder-style="color:#cacaca" v-model="leasename"
  168. placeholder="请输入租赁人姓名" />
  169. <view class="border_nn"></view>
  170. <view class="leation_suject">电话</view>
  171. <input type="number" class="brodnn" :value="addressData != null ? addressData.mobile : ''"
  172. placeholder-style="color:#cacaca" placeholder="请输入租赁人电话" />
  173. <view class="border_nn"></view>
  174. <view class="leation_suject">备注</view>
  175. <input type="text" class="brodnn" placeholder-style="color:#cacaca" v-model="remarks"
  176. placeholder="有问题请告诉我" />
  177. <view class="border_nn"></view>
  178. </view>
  179. </view>
  180. <!-- 底部结算和价格计算 -->
  181. <view class="page-bottom">
  182. <view class="page-bottom_1">
  183. <view class="p-b-btn">
  184. <view class="setnt_inion_p1">总计:</view>
  185. <view class="setnt_inion_p2 text-neutral">¥{{ parseFloat(totalpricenum).toFixed(2) }}</view>
  186. <view class="setnt_inion_p3" @click="detailed = true">明细</view>
  187. </view>
  188. <view class="page-bottom_2">
  189. <view>
  190. <u-checkbox-group size='35rpx' active-color="green" @change="changetarpty(tarp)">
  191. <u-checkbox v-model="tarpty" shape="circle" :checked="tarptys"></u-checkbox>
  192. </u-checkbox-group>
  193. </view>
  194. <view @click="yuedutarpty()">
  195. 阅读并同意
  196. <text class="text-primary">《租赁协议》</text>
  197. </view>
  198. </view>
  199. </view>
  200. <view class="action-btn-group"><button type="primary"
  201. class=" bg-linear-gradient action-btn no-border buy-now-btn" @click="settlement">立即支付</button>
  202. </view>
  203. </view>
  204. <!-- 托管套餐和日期选择器 -->
  205. <u-picker :show="hostifshow" :columns="[hostingpackage]" @confirm="confirmpa" @cancel="cancel" keyName="label">
  206. </u-picker>
  207. <u-picker :show="hiepackshow" :columns="[hirepackagelist]" @confirm="confirmdate" @cancel="cancel"
  208. keyName="label"></u-picker>
  209. <payment ref="payment" :channel="4" :alipay="true" :weixinpay="true" :zhtpay="true"></payment>
  210. <tarpty :list='parttext' :tarptyshow="tarptyshow" @tarptycolse='tarptycolse' :type='1'></tarpty>
  211. <!-- 账单明细 -->
  212. <u-popup :show="detailed" mode="bottom" @close="close" :closeOnClickOverlay="true" round="12">
  213. <view class="bill_item">
  214. <view class="bill_text_p1">土地租赁费用</view>
  215. <view class="bill_text_p2">¥{{ ordermess.landexpenss }}</view>
  216. </view>
  217. <view class="bill_item">
  218. <view class="bill_text_p1">土地服务费用</view>
  219. <view class="bill_text_p2">¥{{ ordermess.servlandexpenss }}</view>
  220. </view>
  221. <view class="bill_item">
  222. <view class="bill_text_p1">种子费用</view>
  223. <view class="bill_text_p2">¥{{ ordermess.seedexpenses }}</view>
  224. </view>
  225. <view class="bill_item">
  226. <view class="bill_text_p1">优惠卷抵用</view>
  227. <view class="bill_text_p2">-¥{{ ordermess.coupon }}</view>
  228. </view>
  229. <view class="bill_item">
  230. <view class="bill_text_p1">会员折扣</view>
  231. <view class="bill_text_p2">-¥{{ ordermess.vipdiscount }}</view>
  232. </view>
  233. <view class="bill_item">
  234. <view class="bill_text_p1">总计</view>
  235. <view class="bill_text_p2 text-neutral">¥{{ parseFloat(ordermess.totalprice).toFixed(2) }}</view>
  236. </view>
  237. </u-popup>
  238. </view>
  239. </template>
  240. <script>
  241. import Landapi from '@/api/land/index.js';
  242. import api from '@/api/mall/index.js';
  243. import tarpty from '@/components/ui-tarpty/ui-tarpty.vue';
  244. export default {
  245. components: {
  246. tarpty
  247. },
  248. data() {
  249. return {
  250. shadowStyle: {
  251. backgroundImage: "none",
  252. paddingTop: "0",
  253. marginTop: "0rpx"
  254. },
  255. primary: this.$theme.primary,
  256. pickingaddress: '', //采摘地址
  257. settingFile: getApp().globalData.siteinfo,
  258. //支付方式
  259. items: [{
  260. value: 'weixinpay',
  261. name: '微信支付',
  262. iconsrc: '/static/imgs/icon/wxpay.png',
  263. checked: 'true'
  264. },
  265. {
  266. value: 'balancepay',
  267. iconsrc: '/static/imgs/icon/cacardpay.png',
  268. name: '余额支付'
  269. }
  270. ],
  271. current: 0,
  272. // 订单信息
  273. ordermess: {
  274. totalprice: 0,
  275. landexpenss: 0,
  276. servlandexpenss: 0,
  277. seedexpenses: 0,
  278. coupon: 0,
  279. vipdiscount: 0
  280. },
  281. // 提交订单信息
  282. updaordermess: {},
  283. //总资费
  284. totalpricenum: 0,
  285. // 托管套餐选择器显隐
  286. hostifshow: false,
  287. // 托管周期选择器显隐
  288. hiepackshow: false,
  289. // 托管周期
  290. hirepackagelist: [],
  291. //订单资费详情弹出层
  292. detailed: false,
  293. // 收货地址
  294. addressData: null,
  295. // 租赁姓名
  296. leasename: '',
  297. // 备注
  298. remarks: '',
  299. //套餐集合
  300. hostingpackage: [],
  301. //数据库托管套餐
  302. longrangepackage: [],
  303. tarpty: false,
  304. tarptyshow: false,
  305. parttext: '',
  306. tarptys: false,
  307. tarp: 1,
  308. orderid: '',
  309. part_id: ''
  310. };
  311. },
  312. onLoad(options) {
  313. // 获取土地租赁协议列表
  314. this.orderid = options.soil_id
  315. this.part_id = options.id
  316. this.gethostingpackage(options.id, options.soil_id);
  317. },
  318. onUnload() {
  319. this.calprice();
  320. },
  321. onReady() {},
  322. onShow: function() {
  323. //传递选择的订单信息
  324. this.ordermess = this.$store.state.landleaseorder;
  325. console.log('this.ordermess', JSON.stringify(this.ordermess))
  326. // 获取土地租赁协议列表
  327. this.hirepackagelist = this.ordermess.hirepackagelist;
  328. this.calprice();
  329. },
  330. methods: {
  331. yuedutarpty() {
  332. if (!this.parttext) {
  333. this.$api.msg(`暂无租赁协议,联系客服添加`);
  334. return;
  335. } else {
  336. this.tarptyshow = true
  337. }
  338. },
  339. tarptycolse(show) {
  340. if (show.tap == 2) {
  341. this.tarptys = true
  342. this.tarpty = true
  343. this.tarp = 2
  344. }
  345. this.tarptyshow = show.show
  346. },
  347. changetarpty(e) {
  348. if (this.tarp == 1) {
  349. this.tarp = 2
  350. this.tarpty = true
  351. } else {
  352. this.tarpty = false
  353. this.tarp = 1
  354. }
  355. },
  356. close() {
  357. this.detailed = false
  358. },
  359. map() {
  360. let that = this
  361. uni.getLocation({
  362. success: function(res) {
  363. let that = this
  364. // #ifdef MP-WEIXIN || APP-PLUS
  365. that.$until.chooseLocation(function(res) {
  366. that.pickingaddress = ret.address
  367. });
  368. // #endif
  369. }
  370. })
  371. },
  372. // 获取土地租赁协议列表
  373. gethostingpackage(id, orderid) {
  374. var that = this;
  375. Landapi.getsecemist({
  376. id: id,
  377. soil_id: orderid
  378. }).then(res => {
  379. if (res.status == 1) {
  380. // 给套餐集合赋值
  381. that.longrangepackage = res.data.data;
  382. that.parttext = res.data.party;
  383. res.data.data.forEach(item => {
  384. let paitem = {
  385. label: item.serve_name,
  386. value: item.id
  387. };
  388. this.addressData = this.ordermess.vipaddress;
  389. that.hostingpackage.push(paitem);
  390. });
  391. } else {
  392. that.$api.msg(res.msg);
  393. }
  394. });
  395. },
  396. //更新整体套餐信息
  397. calprice() {
  398. var that = this;
  399. // 优惠卷抵用
  400. that.ordermess.coupon = 0;
  401. // 土地租赁费用
  402. if (that.ordermess.selelanditemtext) {
  403. that.ordermess.landexpenss = parseFloat(that.ordermess.selelanditemtext.price * (that.ordermess
  404. .level_radio / 100)).toFixed(2);
  405. that.ordermess.youhui1 = parseFloat(that.ordermess.selelanditemtext.price - that.ordermess
  406. .landexpenss);
  407. }
  408. // 土地服务费用
  409. if (that.ordermess.hirecycle) {
  410. that.ordermess.servlandexpenss = parseFloat(that.ordermess.hirecycle.value * that.ordermess
  411. .cutlysetagetext.serve_price * (that.ordermess.level_radio / 100)).toFixed(2);
  412. that.ordermess.youhui2 = parseFloat((that.ordermess.hirecycle.value * that.ordermess.cutlysetagetext
  413. .serve_price) - that.ordermess.servlandexpenss);
  414. that.ordermess.yuanjia1 = parseFloat(that.ordermess.hirecycle.value * that.ordermess.cutlysetagetext
  415. .serve_price).toFixed(2);
  416. } else {
  417. that.ordermess.servlandexpenss = 0;
  418. that.ordermess.youhui2 = 0;
  419. that.ordermess.yuanjia1 = 0;
  420. }
  421. // 种子费用
  422. if (that.ordermess.seedordermy !== undefined) {
  423. that.ordermess.seedexpenses = parseFloat(that.ordermess.seedordermy.seedtariff).toFixed(2);
  424. } else {
  425. that.ordermess.seedexpenses = 0;
  426. }
  427. // 会员折扣
  428. that.ordermess.vipdiscount = parseFloat(that.ordermess.youhui1) + parseFloat(that.ordermess.youhui2);
  429. //合计费用
  430. that.ordermess.totalprice =
  431. parseFloat(that.ordermess.landexpenss) +
  432. parseFloat(that.ordermess.servlandexpenss) +
  433. parseFloat(that.ordermess.seedexpenses);
  434. that.ordermess.totalprice = that.ordermess.totalprice.toFixed(2)
  435. that.totalpricenum = that.ordermess.totalprice;
  436. that.vipdiscount = that.ordermess.vipdiscount;
  437. that.ordermess.yuantotalprice = parseFloat(that.ordermess.selelanditemtext.price) + parseFloat(that
  438. .ordermess.servlandexpenss);
  439. },
  440. // 套餐选择器回调函数
  441. confirmpa(e) {
  442. let that = this;
  443. that.hostifshow = false;
  444. that.longrangepackage.some(function(item) {
  445. if (item.id === e.value[0].value) {
  446. that.ordermess.cutlysetagetext = item;
  447. return true;
  448. }
  449. });
  450. that.calprice();
  451. },
  452. //选择关闭
  453. cancel() {
  454. let that = this;
  455. that.hostifshow = false;
  456. that.hiepackshow = false;
  457. },
  458. // 日期选择器回调函数
  459. confirmdate(e) {
  460. this.hiepackshow = false;
  461. this.ordermess.hirecycle = this.hirepackagelist[e.value[0].extra];
  462. this.calprice();
  463. },
  464. //选择种子
  465. chooseseed() {
  466. uni.redirectTo({
  467. url: '/pagesB/pages/creatorder/addseed?orderid=' + this.orderid + '&id=' + this.part_id
  468. });
  469. },
  470. // 结算订单
  471. settlement() {
  472. var that = this;
  473. if (!that.tarpty) {
  474. that.$api.msg(`请同意《租赁协议》`);
  475. return;
  476. }
  477. //如果为全判断收货地址是否为空
  478. if (that.addressData === null) {
  479. that.$api.msg('请先选择配送地址');
  480. }
  481. let tmplIdsone = that.$config.temlist;
  482. if (tmplIdsone) {
  483. that.$until.requestSubscribeMessage([tmplIdsone['orderSuccess'], tmplIdsone['orderDelivery'],
  484. tmplIdsone['returnReminder']
  485. ], tmplIdsone, function() {
  486. that.settlement2()
  487. });
  488. } else {
  489. that.settlement2()
  490. }
  491. },
  492. settlement2() {
  493. var that = this;
  494. // 判断租赁人姓名是否正确
  495. var re = /^[\u4e00-\u9fa5]+$/;
  496. if (re.test(that.leasename)) {
  497. // 用户id赋值
  498. // that.updaordermess.vip_id = that.addressData.vipid;
  499. //土地id赋值
  500. that.updaordermess.soil_id = that.ordermess.landid;
  501. // 选中地块id
  502. that.updaordermess.subdivision_id = that.ordermess.selelanditem;
  503. //订单金额
  504. that.updaordermess.order_money = that.totalpricenum;
  505. // 服务id
  506. that.updaordermess.service_id = that.ordermess.cutlysetagetext.id;
  507. // 服务名称
  508. // that.updaordermess.service_name = that.ordermess.cutlysetagetext.serve_name;
  509. // 租赁周期
  510. that.updaordermess.period_days = that.ordermess.hirecycle.value;
  511. // 选购种子,加一层判断
  512. if (that.ordermess.cutlysetagetext.serve_name !== '无托管') {
  513. if (that.ordermess.seedordermy === undefined || that.ordermess.seedordermy ===
  514. null) {
  515. that.$api.msg('当前订单未选择种子,请选择种子');
  516. that.updaordermess.seeds = [];
  517. return;
  518. } else {
  519. if (that.ordermess.seedordermy.orderseedlist === undefined || that.ordermess
  520. .seedordermy
  521. .orderseedlist === null) {
  522. that.$api.msg('当前订单未选择种子,请选择种子');
  523. that.updaordermess.seeds = [];
  524. return;
  525. } else {
  526. that.updaordermess.seeds = that.ordermess.seedordermy.orderseedlist;
  527. }
  528. }
  529. }
  530. //地址id
  531. that.updaordermess.address_id = that.addressData.id;
  532. //订单客户姓名
  533. that.updaordermess.order_name = that.leasename;
  534. //订单手机号
  535. that.updaordermess.order_mobile = that.addressData.mobile;
  536. //订单备注
  537. that.updaordermess.remark = that.remarks;
  538. //订单支付方式
  539. that.updaordermess.type_pay = that.current + 1;
  540. if (that.updaordermess.seeds != undefined || that.updaordermess.seeds != null) {
  541. if (that.updaordermess.seeds[0].seeditem !== null && that.updaordermess.seeds[0]
  542. .seeditem !==
  543. undefined) {
  544. let seeds = [];
  545. that.updaordermess.seeds.forEach(item => {
  546. let seeditem = {
  547. seed_id: 0,
  548. seed_num: 0,
  549. price: 0
  550. };
  551. seeditem.seed_id = item.seeditem.id;
  552. seeditem.seed_num = item.seednum;
  553. seeditem.price = item.seeditem.price;
  554. seeds.push(seeditem);
  555. });
  556. that.updaordermess.seeds = JSON.stringify(seeds);
  557. }
  558. } else {
  559. that.updaordermess.seeds = '';
  560. }
  561. console.log(that.updaordermess.seeds, '121121211222')
  562. that.updaordermess.payprice = that.ordermess.totalprice;
  563. that.updaordermess.money = that.ordermess.totalprice;
  564. that.updaordermess.yuantotalprice = that.ordermess.yuantotalprice;
  565. that.updaordermess.vipdiscount = that.ordermess.vipdiscount; //会员折扣
  566. console.log(that.updaordermess, 'that.updaordermessthat.updaordermess')
  567. if (that.updaordermess.id) {
  568. that.$refs.payment.payopen(that.updaordermess);
  569. } else {
  570. that.$paycenter.ct_soil_order(that.updaordermess).then(res => {
  571. if (res.status === 0) {
  572. uni.showToast({
  573. title: res.msg,
  574. icon: 'none'
  575. })
  576. } else {
  577. //已授权,跳转去支付页面
  578. that.updaordermess.id = res.data;
  579. that.$refs.payment.payopen(that.updaordermess);
  580. }
  581. })
  582. }
  583. } else {
  584. that.$api.msg('请输入正确的名字');
  585. }
  586. }
  587. }
  588. };
  589. </script>
  590. <style lang="scss">
  591. @import 'common/nowvue.scss';
  592. </style>
  593. <style lang="scss">
  594. .container {
  595. background: #f1f1f1;
  596. }
  597. ::v-deep .u-read-more__toggle[data-v-459946da] {
  598. justify-content: flex-end;
  599. }
  600. .central_information {
  601. overflow-y: scroll;
  602. padding: 0 20rpx;
  603. height: calc(100vh - 90rpx - env(safe-area-inset-bottom));
  604. }
  605. .modular_setion {
  606. padding: 45rpx 30rpx;
  607. background: #ffffff;
  608. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  609. margin: 15rpx 0 25rpx 0;
  610. border-radius: 10rpx;
  611. }
  612. .package_title {
  613. display: flex;
  614. justify-content: space-between;
  615. align-items: center;
  616. }
  617. .package_dtitle_p1 {
  618. width: auto;
  619. .package_dtitle_p1_1 {
  620. font-size: 35rpx;
  621. font-weight: 600;
  622. }
  623. }
  624. .dtitle_text_p1 {
  625. font-size: 34rpx;
  626. font-weight: 900;
  627. }
  628. .dtitle_text_p2 {
  629. font-size: 28rpx;
  630. margin-top: 30rpx;
  631. }
  632. .package_thumbnail {
  633. width: 60rpx;
  634. height: 47.5rpx;
  635. }
  636. .package_item {
  637. margin-top: 25rpx;
  638. }
  639. .package_item_tp1 {
  640. font-size: 26rpx;
  641. color: #999;
  642. }
  643. /* 底部操作菜单 */
  644. .page-bottom {
  645. position: fixed;
  646. left: 0;
  647. bottom: 0;
  648. z-index: 95;
  649. display: flex;
  650. // justify-content: center;
  651. justify-content: space-evenly;
  652. align-items: center;
  653. width: 100%;
  654. height: 140upx;
  655. background: rgba(255, 255, 255, 0.9);
  656. box-shadow: 0 0 20upx 0 rgba(0, 0, 0, 0.5);
  657. .page-bottom_1 {
  658. display: flex;
  659. flex-direction: column;
  660. .p-b-btn {
  661. display: flex;
  662. align-items: center;
  663. justify-content: flex-start;
  664. font-size: 28rpx;
  665. width: 100%;
  666. height: 80upx;
  667. .yticon {
  668. font-size: 40upx;
  669. line-height: 48upx;
  670. color: $font-color-light;
  671. }
  672. &.active,
  673. &.active .yticon {
  674. color: $tab-color-1;
  675. }
  676. .icon-fenxiang2 {
  677. font-size: 42upx;
  678. transform: translateY(-2upx);
  679. }
  680. .icon-shoucang {
  681. font-size: 46upx;
  682. }
  683. }
  684. .page-bottom_2 {
  685. display: flex;
  686. justify-content: flex-start;
  687. font-size: 29rpx;
  688. }
  689. }
  690. .action-btn-group {
  691. display: flex;
  692. height: 76upx;
  693. border-radius: 100px;
  694. overflow: hidden;
  695. box-shadow: 0 20upx 40upx -16upx #fa436a;
  696. box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
  697. margin-left: 20upx;
  698. position: relative;
  699. .action-btn {
  700. display: flex;
  701. align-items: center;
  702. justify-content: center;
  703. width: 300rpx;
  704. height: 100%;
  705. font-size: $font-base;
  706. padding: 0;
  707. border-radius: 0;
  708. }
  709. }
  710. }
  711. .package_item_tp2 {
  712. display: flex;
  713. justify-content: space-between;
  714. align-items: center;
  715. margin-top: 30rpx;
  716. }
  717. .pa_title_selt {
  718. color: #000;
  719. font-size: 30rpx;
  720. }
  721. .footer_payment {
  722. position: fixed;
  723. width: calc(100vw - 15rpx);
  724. margin: 0 7.5rpx;
  725. padding: 10rpx;
  726. bottom: calc(env(safe-area-inset-bottom) + 10rpx);
  727. background: rgba(255, 255, 255, 0.9);
  728. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  729. border-radius: 16rpx;
  730. display: flex;
  731. justify-content: space-between;
  732. align-items: center;
  733. z-index: 2;
  734. .button {
  735. color: #fff;
  736. margin-right: 30rpx;
  737. width: 50%;
  738. font-size: 32rpx;
  739. }
  740. }
  741. .settlement_information {
  742. display: flex;
  743. justify-content: flex-start;
  744. align-items: center;
  745. padding: 0 15rpx;
  746. }
  747. .setnt_inion_p1 {
  748. font-size: 34rpx;
  749. color: #000;
  750. }
  751. .setnt_inion_p2 {
  752. margin: 0 25rpx 0 10rpx;
  753. font-size: 34rpx;
  754. font-weight: 800;
  755. }
  756. .setnt_inion_p3 {
  757. font-size: 26rpx;
  758. color: #999;
  759. }
  760. .bill_item {
  761. display: flex;
  762. justify-content: space-between;
  763. align-items: center;
  764. padding: 25rpx;
  765. }
  766. .bill_text_p1 {
  767. font-size: 30rpx;
  768. color: #999;
  769. }
  770. .bill_text_p2 {
  771. font-size: 28rpx;
  772. // color: #000000;
  773. }
  774. .seedmodular {
  775. padding: 45rpx 30rpx 20rpx 30rpx;
  776. background: #ffffff;
  777. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  778. margin: 15rpx 0 25rpx 0;
  779. border-radius: 10rpx;
  780. max-height: 100%;
  781. }
  782. .read-more_1 {
  783. display: flex;
  784. flex-direction: column;
  785. // align-items: center;
  786. .read-more_1_1 {
  787. padding: 30rpx 0;
  788. font-size: 32rpx;
  789. color: #000;
  790. text-align: center;
  791. }
  792. .read-more_1_2 {
  793. display: flex;
  794. justify-content: space-between;
  795. }
  796. .read-more_1_3 {
  797. display: flex;
  798. justify-content: space-between;
  799. align-items: center;
  800. margin-top: 2vh;
  801. text-align: center;
  802. // margin-left: 2vw;
  803. .view1 {
  804. text-align: center;
  805. height: 45rpx;
  806. line-height: 45rpx;
  807. font-size: 28rpx;
  808. }
  809. }
  810. .read-more_1_4 {
  811. text-align: center;
  812. padding: 40rpx;
  813. }
  814. }
  815. .read-more_2 {
  816. display: flex;
  817. flex-direction: column;
  818. margin-top: 20rpx;
  819. margin-bottom: 20rpx;
  820. .read-more_2_1 {
  821. padding: 30rpx;
  822. font-size: 32rpx;
  823. color: #000;
  824. text-align: center;
  825. }
  826. .read-more_2_2 {
  827. display: flex;
  828. justify-content: space-between;
  829. }
  830. .read-more_2_3 {
  831. display: flex;
  832. justify-content: space-between;
  833. align-items: center;
  834. margin-top: 2vh;
  835. text-align: center;
  836. .view2 {
  837. text-align: center;
  838. height: 45rpx;
  839. line-height: 45rpx;
  840. font-size: 28rpx;
  841. }
  842. }
  843. }
  844. .seedmodular_info {
  845. padding: 45rpx 30rpx;
  846. background: #ffffff;
  847. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  848. margin: 15rpx 0 100rpx 0;
  849. border-radius: 10rpx;
  850. }
  851. .seedmodular_p1 {
  852. display: flex;
  853. justify-content: space-between;
  854. align-items: center;
  855. }
  856. .seedlar_text1 {
  857. font-size: 30rpx;
  858. }
  859. .seedlar_text2 {
  860. font-size: 26rpx;
  861. color: #999;
  862. display: flex;
  863. align-items: center;
  864. }
  865. .seedmodular_p2 {
  866. margin: 25rpx 0;
  867. }
  868. .seedmodular_p3 {
  869. background-color: #fff;
  870. font-size: 30rpx;
  871. height: 70rpx;
  872. line-height: 70rpx;
  873. text-align: center;
  874. border-width: 1px;
  875. border-style: solid;
  876. border-radius: 35rpx;
  877. width: 55%;
  878. margin: 25rpx 22.5%;
  879. }
  880. .seleedseed_item {
  881. display: flex;
  882. justify-content: space-between;
  883. // justify-content: space-evenly;
  884. align-items: center;
  885. margin: 10rpx 0;
  886. }
  887. .seleedseed_item_p1 {
  888. display: flex;
  889. justify-content: flex-start;
  890. align-items: center;
  891. }
  892. .seleedseed_item_p2 {
  893. display: flex;
  894. justify-content: left;
  895. font-size: 28rpx;
  896. color: #999;
  897. }
  898. .seleedseed_item_p3 {
  899. font-size: 28rpx;
  900. color: #999;
  901. }
  902. .seditem_thumbnail {
  903. width: 60rpx;
  904. height: 60rpx;
  905. border-radius: 10rpx;
  906. }
  907. .seditem_title {
  908. font-size: 26rpx;
  909. color: #999;
  910. margin-left: 15rpx;
  911. }
  912. .address_delti {
  913. width: auto;
  914. margin-top: 30rpx;
  915. }
  916. .detaed_addrss {
  917. display: flex;
  918. justify-content: flex-start;
  919. align-items: center;
  920. margin: 20rpx 0;
  921. }
  922. .addr_text {
  923. font-size: 26rpx;
  924. color: #000;
  925. margin-left: 15rpx;
  926. letter-spacing: 2rpx;
  927. }
  928. .feed_moudel {
  929. padding: 25rpx 0;
  930. }
  931. .border_nn {
  932. border-bottom: 1rpx solid #999;
  933. transform: scaleY(0.3);
  934. margin-top: 15rpx;
  935. }
  936. .feed_modetitle {
  937. display: flex;
  938. justify-content: flex-start;
  939. align-items: center;
  940. }
  941. .feed_modetext {
  942. color: #333;
  943. font-size: 26rpx;
  944. margin-left: 15rpx;
  945. }
  946. .feed_modetitle2 {
  947. display: flex;
  948. justify-content: space-between;
  949. align-items: center;
  950. margin-top: 15rpx;
  951. text-indent: 45rpx;
  952. }
  953. .feed_modnnsnt {
  954. font-size: 28rpx;
  955. line-height: 28rpx;
  956. color: #000;
  957. }
  958. .leation_suject {
  959. color: #666;
  960. font-size: 24rpx;
  961. margin: 15rpx 0;
  962. }
  963. .choosepay {
  964. margin: 20rpx 0;
  965. }
  966. .ann_fle {
  967. display: flex;
  968. justify-content: space-between;
  969. margin: 17.5rpx 0;
  970. align-items: center;
  971. color: #000;
  972. font-size: 28rpx;
  973. }
  974. .brodnn {
  975. margin: 20rpx 0;
  976. font-size: 24rpx;
  977. color: #000;
  978. }
  979. .unclas {
  980. width: 45rpx;
  981. height: 45rpx;
  982. margin-right: 25rpx;
  983. }
  984. .ann_nfjds {
  985. display: flex;
  986. justify-content: flex-start;
  987. align-items: center;
  988. }
  989. .unll_pd {
  990. margin: 15rpx 0;
  991. }
  992. .load_window {
  993. position: fixed;
  994. top: 50%;
  995. left: 50%;
  996. width: 100%;
  997. transform: translate(-50%, -50%);
  998. background-color: #ffffff;
  999. box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
  1000. }
  1001. </style>