addsendgoods.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668
  1. <template>
  2. <view class="center">
  3. <view class="transaction">
  4. <u-form :model="purchaseOrder" ref="uForm" class="uForm">
  5. <u-form-item label="业务编号" prop="businessNumber" label-width="140" required>
  6. <u-input v-model="purchaseOrder.businessNumber" input-align="right" placeholder="请输入业务编号"/>
  7. </u-form-item>
  8. <u-form-item label="收货方" prop="consignee" label-width="140" required>
  9. <u-input v-model="purchaseOrder.consignee" input-align="right" placeholder="请输入收货方名称"/>
  10. </u-form-item>
  11. <u-form-item label="发货方" prop="shipper" label-width="140" required>
  12. <u-input v-model="purchaseOrder.shipper" input-align="right" placeholder="请输入发货方名称"/>
  13. </u-form-item>
  14. <u-form-item label="货名" prop="goodsName" label-width="140" required>
  15. <u-input v-model="purchaseOrder.goodsName" input-align="right" placeholder="请输入货名,如玉米"/>
  16. </u-form-item>
  17. <u-form-item label="货物单价(元/吨)" prop="goodsPrice" label-width="250" required>
  18. <u-input v-model="purchaseOrder.goodsPrice" input-align="right" placeholder="请输入货物单价"/>
  19. </u-form-item>
  20. <u-form-item label="运费单价(元/吨)" prop="freightUnitPrice" label-width="250" required>
  21. <u-input v-model="purchaseOrder.freightUnitPrice" input-align="right" placeholder="请输入运费单价"/>
  22. </u-form-item>
  23. <u-form-item label="运费承担方" prop="freightUnitPrice" label-width="250" required>
  24. <!-- <u-select v-model="isFreightUnitPrice" :list="packingType" :default-value="defaultValue" mode="single-column" @confirm="packingChange"></u-select> -->
  25. <view class="con-list">
  26. <picker @change="packingChange" :value="packingIndex" :range="packingType">
  27. <view class="picker">
  28. {{packingIndex>-1?packingType[packingIndex]:'请选择'}}
  29. </view>
  30. </picker>
  31. </view>
  32. </u-form-item>
  33. <u-form-item label="收货地址" prop="receivingAddress" label-width="140" required>
  34. <u-input v-model="purchaseOrder.receivingAddress" input-align="right" placeholder="请输入收货地址"/>
  35. </u-form-item>
  36. <u-form-item label="收货人账号" prop="accountNumber" label-width="160" required>
  37. <u-input v-model="purchaseOrder.accountNumber" input-align="right" placeholder="请输入收货人账号"/>
  38. </u-form-item>
  39. </u-form>
  40. <!-- <view class="c-row b-b margin-top">
  41. <view class="title">业务编号</view>
  42. <view class="con-list">
  43. <input v-model='purchaseOrder.businessNumber' placeholder="请输入业务编号"
  44. placeholder-style="font-size: 12px;" name="input"></input>
  45. </view>
  46. </view> -->
  47. <!-- <view class="c-row b-b">
  48. <view class="title">收货方</view>
  49. <view class="con-list">
  50. <input v-model='purchaseOrder.consignee' placeholder="请输入收货方名称" placeholder-style="font-size: 12px;"
  51. name="input"></input>
  52. </view>
  53. </view> -->
  54. <!-- <view class="c-row b-b">
  55. <view class="title">发货方</view>
  56. <view class="con-list">
  57. <input v-model='purchaseOrder.shipper' placeholder="请输入发货方名称" placeholder-style="font-size: 12px;"
  58. name="input"></input>
  59. </view>
  60. </view> -->
  61. <!-- <view class="c-row b-b">
  62. <view class="title">货名</view>
  63. <view class="con-list">
  64. <input v-model='purchaseOrder.goodsName' placeholder="请输入货名,如玉米"
  65. placeholder-style="font-size: 12px;" name="input"></input>
  66. </view>
  67. </view> -->
  68. <!-- <view class="c-row b-b">
  69. <view class="title">货物单价(元/吨)</view>
  70. <view class="con-list">
  71. <input v-model='purchaseOrder.goodsPrice' placeholder="请输入货物单价" placeholder-style="font-size: 12px;"
  72. name="input"></input>
  73. </view>
  74. </view> -->
  75. <!-- <view class="c-row b-b">
  76. <view class="title">运费单价(元/吨)</view>
  77. <view class="con-list">
  78. <input v-model='purchaseOrder.freightUnitPrice' placeholder="请输入运费单价"
  79. placeholder-style="font-size: 12px;" name="input"></input>
  80. </view>
  81. </view> -->
  82. <!-- <view class="c-row b-b">
  83. <view class="title">运费承担方</view>
  84. <view class="con-list">
  85. <picker @change="packingChange" :value="packingIndex" :range="packingType">
  86. <view class="picker">
  87. {{packingIndex>-1?packingType[packingIndex]:'请选择'}}
  88. </view>
  89. </picker>
  90. </view>
  91. </view> -->
  92. <!-- <view class="c-row b-b">
  93. <view class="title">收货地址</view>
  94. <view class="con-list">
  95. <input v-model='purchaseOrder.receivingAddress' placeholder="请输入收货地址"
  96. placeholder-style="font-size: 12px;" name="input"></input>
  97. </view>
  98. </view>
  99. <view class="c-row">
  100. <view class="title">收货人账号</view>
  101. <view class="con-list">
  102. <input v-model='purchaseOrder.accountNumber' placeholder="请输入收货人账号"
  103. placeholder-style="font-size: 12px;" name="input"></input>
  104. </view>
  105. </view> -->
  106. </view>
  107. <view class="account-tip">
  108. 注:收货人账号为收货人注册易粮易运的手机号码
  109. </view>
  110. <view class='footer'>
  111. <button class="btn" @click="commit()">提交</button>
  112. </view>
  113. </view>
  114. </template>
  115. <script>
  116. export default {
  117. name: "business",
  118. data() {
  119. return {
  120. purchaseOrder: {
  121. freightPayer: "发货方承担"
  122. },
  123. packingType: ["发货方承担","收货方承担"],
  124. isFreightUnitPrice:true,
  125. packingIndex:0,
  126. phone:""
  127. }
  128. },
  129. onShow() {
  130. },
  131. onLoad(options) {debugger
  132. this.phone = options.phone
  133. },
  134. onPageScroll(e) {
  135. },
  136. //下拉刷新
  137. onPullDownRefresh() {},
  138. onReachBottom() { //上拉触底函数
  139. },
  140. methods: {
  141. packingChange(event) {
  142. console.log(event)
  143. this.packingIndex = event.detail.value;
  144. },
  145. commit() {
  146. debugger
  147. this.purchaseOrder.accountNumber= this.phone
  148. this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {debugger
  149. // if(res.data.code=='200'){
  150. // uni.showModal({
  151. // title: '提示',
  152. // content: '该手机号已认证过司机,再次认证将覆盖之前的认证信息,是否确定认证?',
  153. // success: function (res) {
  154. // if (res.confirm) {
  155. // that.DriverViewInfo.cover=1
  156. // that.$api.doRequest('post', '/driverViewInfo/api/editInfo', that.DriverViewInfo).then(res => {
  157. // }).catch(res => {
  158. // uni.showToast({
  159. // title: '提交成功',
  160. // icon: 'none',
  161. // duration: 2000
  162. // })
  163. // uni.navigateTo({
  164. // url: `/pages/attestation/indexThree`
  165. // })
  166. // })
  167. // } else if (res.cancel) {
  168. // uni.showToast({
  169. // title: '提交失败',
  170. // icon: 'none',
  171. // duration: 2000
  172. // })
  173. // }
  174. // }
  175. // });
  176. // }else if(res.data.code==200){
  177. // uni.showToast({
  178. // title: '提交成功',
  179. // icon: 'none',
  180. // duration: 2000
  181. // })
  182. // uni.navigateTo({
  183. // url: `/pages/attestation/indexThree`
  184. // })
  185. // }
  186. if(res.data.code==200){
  187. uni.showToast({
  188. title: '提交成功',
  189. icon: 'none',
  190. duration: 2000,
  191. success:function(){
  192. uni.navigateTo({
  193. url: `/pageA/freightTransport/index`
  194. })
  195. }
  196. })
  197. }
  198. }).catch(res => {
  199. // uni.showToast({
  200. // title: res.data.message,
  201. // icon: 'none',
  202. // duration: 2000
  203. // })
  204. })
  205. }
  206. }
  207. }
  208. </script>
  209. <style lang='scss'>
  210. page,
  211. .content {
  212. background: #F5F6FA;
  213. }
  214. .c-row {
  215. display: -webkit-box;
  216. display: -webkit-flex;
  217. display: flex;
  218. -webkit-box-align: center;
  219. -webkit-align-items: center;
  220. align-items: center;
  221. padding: 20rpx 30rpx;
  222. position: relative;
  223. }
  224. .con-list {
  225. -webkit-box-flex: 1;
  226. -webkit-flex: 1;
  227. flex: 1;
  228. display: -webkit-box;
  229. display: -webkit-flex;
  230. display: flex;
  231. -webkit-box-orient: vertical;
  232. -webkit-box-direction: normal;
  233. -webkit-flex-direction: column;
  234. flex-direction: column;
  235. color: #303133;
  236. line-height: 40rpx;
  237. text-align: right;
  238. /* padding-right: 20rpx; */
  239. /* color: red; */
  240. }
  241. .transaction {
  242. background-color: #FFFFFF;
  243. margin: 10px;
  244. padding-bottom: 10px;
  245. border-radius: 20px;
  246. }
  247. .line {
  248. display: inline-block;
  249. padding: 5px;
  250. position: relative;
  251. font-size: 17px;
  252. }
  253. .line.active {
  254. font-size: 19px;
  255. font-weight: 900;
  256. }
  257. .line.active:after {
  258. content: '';
  259. display: block;
  260. position: absolute;
  261. width: 38px;
  262. left: 50%;
  263. transform: translateX(-50%);
  264. bottom: 0;
  265. border-bottom: 1px solid #22C572;
  266. }
  267. .cu-tag.badge {
  268. right: 26rpx;
  269. }
  270. .cu-item {
  271. height: 80rpx;
  272. display: inline-block;
  273. line-height: 80rpx;
  274. }
  275. .search-form {
  276. background: #F5F6F9;
  277. padding-left: 20rpx;
  278. }
  279. .title-tip {
  280. color: #E63113;
  281. text-align: right;
  282. }
  283. .tag1 {
  284. background: #F5F6F9;
  285. padding: 5px;
  286. color: #333333;
  287. display: inline-flex;
  288. font-size: 22rpx;
  289. border-radius: 3px;
  290. margin: 3px;
  291. }
  292. .tag {
  293. background: #F5F6F9;
  294. padding: 7px 12px;
  295. color: #333333;
  296. display: inline-flex;
  297. font-size: 22rpx;
  298. border-radius: 15px;
  299. margin: 3px;
  300. }
  301. .tag-bule {
  302. background: #EBEEFA;
  303. color: #5C76DF;
  304. }
  305. .tag-green {
  306. background: #C6F7BC;
  307. color: #065112;
  308. }
  309. .tag-yellow {
  310. background: #F9F2EA;
  311. color: #BE9C69;
  312. }
  313. .tag-red {
  314. background: #FEECE6;
  315. color: #FE6430;
  316. }
  317. .text-white {
  318. color: #fff;
  319. }
  320. .text-white text {
  321. position: relative;
  322. z-index: 2;
  323. background: linear-gradient(45deg, #3DC146, #B2D612);
  324. padding: 5px 10px;
  325. border-radius: 38rpx;
  326. }
  327. .guess-section {
  328. padding-bottom: 100upx;
  329. display: flex;
  330. flex-wrap: wrap;
  331. padding: 30upx;
  332. background: #fff;
  333. margin: 10px;
  334. border-radius: 6px;
  335. .type {
  336. border-radius: 10px;
  337. padding: 5px;
  338. wdith: 22px;
  339. height: 22px;
  340. line-height: 14px;
  341. font-size: 12px;
  342. }
  343. .type.send {
  344. background: #22C572;
  345. color: #fff;
  346. }
  347. .type.put {
  348. background: #FD714F;
  349. color: #fff;
  350. }
  351. .businessnumber {
  352. font-size: 16px;
  353. font-weight: 600;
  354. }
  355. .consigner {
  356. font-size: 12px;
  357. }
  358. .time {
  359. color: #878C9C;
  360. }
  361. .goods {
  362. font-size: 12px;
  363. }
  364. .goodsstatus {
  365. background: #F9F9FA;
  366. color: #9698A2;
  367. padding: 10px 0;
  368. padding-left: 47px;
  369. margin: 10px 0;
  370. }
  371. .del {
  372. width: 60px;
  373. height: 33px;
  374. line-height: 33px;
  375. font-size: 14px;
  376. background: #fff;
  377. border: 1px solid #CDCDCD;
  378. border-radius: 30px;
  379. text-align: center;
  380. }
  381. }
  382. .navbar {
  383. position: fixed;
  384. left: 0;
  385. top: var(--window-top);
  386. display: flex;
  387. width: 100%;
  388. height: 80upx;
  389. background: #fff;
  390. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  391. z-index: 10;
  392. .nav-item {
  393. flex: 1;
  394. display: flex;
  395. justify-content: center;
  396. align-items: center;
  397. height: 100%;
  398. font-size: 30upx;
  399. color: $font-color-dark;
  400. position: relative;
  401. &.current {
  402. color: $base-color;
  403. &:after {
  404. content: '';
  405. position: absolute;
  406. left: 50%;
  407. bottom: 0;
  408. transform: translateX(-50%);
  409. width: 120upx;
  410. height: 0;
  411. border-bottom: 4upx solid $base-color;
  412. }
  413. }
  414. }
  415. .p-box {
  416. display: flex;
  417. flex-direction: column;
  418. .yticon {
  419. display: flex;
  420. align-items: center;
  421. justify-content: center;
  422. width: 30upx;
  423. height: 14upx;
  424. line-height: 1;
  425. margin-left: 4upx;
  426. font-size: 26upx;
  427. color: #888;
  428. &.active {
  429. color: $base-color;
  430. }
  431. }
  432. .xia {
  433. transform: scaleY(-1);
  434. }
  435. }
  436. .cate-item {
  437. display: flex;
  438. justify-content: center;
  439. align-items: center;
  440. height: 100%;
  441. width: 80upx;
  442. position: relative;
  443. font-size: 44upx;
  444. &:after {
  445. content: '';
  446. position: absolute;
  447. left: 0;
  448. top: 50%;
  449. transform: translateY(-50%);
  450. border-left: 1px solid #ddd;
  451. width: 0;
  452. height: 36upx;
  453. }
  454. }
  455. }
  456. /* 分类 */
  457. .cate-mask {
  458. position: fixed;
  459. left: 0;
  460. top: var(--window-top);
  461. bottom: 0;
  462. width: 100%;
  463. background: rgba(0, 0, 0, 0);
  464. z-index: 95;
  465. transition: .3s;
  466. .cate-content {
  467. width: 630upx;
  468. height: 100%;
  469. background: #fff;
  470. float: right;
  471. transform: translateX(100%);
  472. transition: .3s;
  473. }
  474. &.none {
  475. display: none;
  476. }
  477. &.show {
  478. background: rgba(0, 0, 0, .4);
  479. .cate-content {
  480. transform: translateX(0);
  481. }
  482. }
  483. }
  484. .cate-list {
  485. display: flex;
  486. flex-direction: column;
  487. height: 100%;
  488. .cate-item {
  489. display: flex;
  490. align-items: center;
  491. height: 90upx;
  492. padding-left: 30upx;
  493. font-size: 28upx;
  494. color: #555;
  495. position: relative;
  496. }
  497. .two {
  498. height: 64upx;
  499. color: #303133;
  500. font-size: 30upx;
  501. background: #f8f8f8;
  502. }
  503. .active {
  504. color: $base-color;
  505. }
  506. }
  507. .introduce-section .title {
  508. font-size: 17px;
  509. font-weight: bold;
  510. height: 40px;
  511. line-height: 40px;
  512. flex: 2.5;
  513. border-bottom: 1px solid #EEEEEE;
  514. }
  515. .introduce-section .address {
  516. color: #878C9C;
  517. font-size: 12px;
  518. padding: 10px 0 10px;
  519. }
  520. .introduce-section .price {
  521. padding: 10px 0 10px;
  522. color: #FD714F;
  523. font-size: 19px;
  524. font-weight: 700;
  525. }
  526. .introduce-section .guess-item {
  527. border-radius: 10px;
  528. background: #fff;
  529. padding: 0upx 30upx 20upx;
  530. margin: 8px;
  531. border-bottom: 1px solid #ccc;
  532. }
  533. /* 销售信息 */
  534. .introduce-section {
  535. .title-tip {
  536. flex: 1;
  537. }
  538. .price-box {
  539. display: flex;
  540. align-items: baseline;
  541. font-size: 26upx;
  542. }
  543. .price {
  544. font-size: $font-lg + 2upx;
  545. }
  546. .m-price {
  547. margin: 0 12upx;
  548. color: $font-color-light;
  549. text-decoration: line-through;
  550. }
  551. .coupon-tip {
  552. align-items: center;
  553. padding: 4upx 10upx;
  554. background: $uni-color-primary;
  555. font-size: $font-sm;
  556. color: #fff;
  557. border-radius: 6upx;
  558. line-height: 1;
  559. transform: translateY(-4upx);
  560. }
  561. .bot-row {
  562. display: flex;
  563. align-items: center;
  564. height: 50upx;
  565. font-size: $font-sm;
  566. color: $font-color-light;
  567. view {
  568. flex: 1;
  569. }
  570. }
  571. }
  572. .footer {
  573. position: fixed;
  574. bottom: 0;
  575. width: 100%;
  576. padding: 20px 0;
  577. }
  578. .btn {
  579. width: 90%;
  580. background: #22C572;
  581. color: #fff;
  582. border-radius: 30px;
  583. }
  584. .btn:after {
  585. border: none;
  586. }
  587. .account-tip{
  588. font-size: 24rpx;
  589. font-weight: 400;
  590. color: #AFB3BF;
  591. padding-left: 60rpx;
  592. }
  593. .uForm {
  594. padding: 0 40rpx;
  595. }
  596. </style>