addsendgoods.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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) {
  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. this.purchaseOrder.accountNumber= this.phone
  147. this.$api.doRequest('post', '/freightReceivingDispatching/api/insertFreightReceivingDispatching',this.purchaseOrder).then(res => {
  148. // if(res.data.code=='200'){
  149. // uni.showModal({
  150. // title: '提示',
  151. // content: '该手机号已认证过司机,再次认证将覆盖之前的认证信息,是否确定认证?',
  152. // success: function (res) {
  153. // if (res.confirm) {
  154. // that.DriverViewInfo.cover=1
  155. // that.$api.doRequest('post', '/driverViewInfo/api/editInfo', that.DriverViewInfo).then(res => {
  156. // }).catch(res => {
  157. // uni.showToast({
  158. // title: '提交成功',
  159. // icon: 'none',
  160. // duration: 2000
  161. // })
  162. // uni.navigateTo({
  163. // url: `/pages/attestation/indexThree`
  164. // })
  165. // })
  166. // } else if (res.cancel) {
  167. // uni.showToast({
  168. // title: '提交失败',
  169. // icon: 'none',
  170. // duration: 2000
  171. // })
  172. // }
  173. // }
  174. // });
  175. // }else if(res.data.code==200){
  176. // uni.showToast({
  177. // title: '提交成功',
  178. // icon: 'none',
  179. // duration: 2000
  180. // })
  181. // uni.navigateTo({
  182. // url: `/pages/attestation/indexThree`
  183. // })
  184. // }
  185. if(res.data.code==200){
  186. uni.showToast({
  187. title: '提交成功',
  188. icon: 'none',
  189. duration: 2000,
  190. success:function(){
  191. uni.navigateTo({
  192. url: `/pageA/freightTransport/index`
  193. })
  194. }
  195. })
  196. }
  197. }).catch(res => {
  198. // uni.showToast({
  199. // title: res.data.message,
  200. // icon: 'none',
  201. // duration: 2000
  202. // })
  203. })
  204. }
  205. }
  206. }
  207. </script>
  208. <style lang='scss'>
  209. page,
  210. .content {
  211. background: #F5F6FA;
  212. }
  213. .center{
  214. overflow-y: hidden;
  215. }
  216. .c-row {
  217. display: -webkit-box;
  218. display: -webkit-flex;
  219. display: flex;
  220. -webkit-box-align: center;
  221. -webkit-align-items: center;
  222. align-items: center;
  223. padding: 20rpx 30rpx;
  224. position: relative;
  225. }
  226. .con-list {
  227. -webkit-box-flex: 1;
  228. -webkit-flex: 1;
  229. flex: 1;
  230. display: -webkit-box;
  231. display: -webkit-flex;
  232. display: flex;
  233. -webkit-box-orient: vertical;
  234. -webkit-box-direction: normal;
  235. -webkit-flex-direction: column;
  236. flex-direction: column;
  237. color: #303133;
  238. line-height: 40rpx;
  239. text-align: right;
  240. /* padding-right: 20rpx; */
  241. /* color: red; */
  242. }
  243. .transaction {
  244. background-color: #FFFFFF;
  245. margin: 10px;
  246. padding-bottom: 10px;
  247. border-radius: 20px;
  248. }
  249. .line {
  250. display: inline-block;
  251. padding: 5px;
  252. position: relative;
  253. font-size: 17px;
  254. }
  255. .line.active {
  256. font-size: 19px;
  257. font-weight: 900;
  258. }
  259. .line.active:after {
  260. content: '';
  261. display: block;
  262. position: absolute;
  263. width: 38px;
  264. left: 50%;
  265. transform: translateX(-50%);
  266. bottom: 0;
  267. border-bottom: 1px solid #22C572;
  268. }
  269. .cu-tag.badge {
  270. right: 26rpx;
  271. }
  272. .cu-item {
  273. height: 80rpx;
  274. display: inline-block;
  275. line-height: 80rpx;
  276. }
  277. .search-form {
  278. background: #F5F6F9;
  279. padding-left: 20rpx;
  280. }
  281. .title-tip {
  282. color: #E63113;
  283. text-align: right;
  284. }
  285. .tag1 {
  286. background: #F5F6F9;
  287. padding: 5px;
  288. color: #333333;
  289. display: inline-flex;
  290. font-size: 22rpx;
  291. border-radius: 3px;
  292. margin: 3px;
  293. }
  294. .tag {
  295. background: #F5F6F9;
  296. padding: 7px 12px;
  297. color: #333333;
  298. display: inline-flex;
  299. font-size: 22rpx;
  300. border-radius: 15px;
  301. margin: 3px;
  302. }
  303. .tag-bule {
  304. background: #EBEEFA;
  305. color: #5C76DF;
  306. }
  307. .tag-green {
  308. background: #C6F7BC;
  309. color: #065112;
  310. }
  311. .tag-yellow {
  312. background: #F9F2EA;
  313. color: #BE9C69;
  314. }
  315. .tag-red {
  316. background: #FEECE6;
  317. color: #FE6430;
  318. }
  319. .text-white {
  320. color: #fff;
  321. }
  322. .text-white text {
  323. position: relative;
  324. z-index: 2;
  325. background: linear-gradient(45deg, #3DC146, #B2D612);
  326. padding: 5px 10px;
  327. border-radius: 38rpx;
  328. }
  329. .guess-section {
  330. padding-bottom: 100upx;
  331. display: flex;
  332. flex-wrap: wrap;
  333. padding: 30upx;
  334. background: #fff;
  335. margin: 10px;
  336. border-radius: 6px;
  337. .type {
  338. border-radius: 10px;
  339. padding: 5px;
  340. wdith: 22px;
  341. height: 22px;
  342. line-height: 14px;
  343. font-size: 12px;
  344. }
  345. .type.send {
  346. background: #22C572;
  347. color: #fff;
  348. }
  349. .type.put {
  350. background: #FD714F;
  351. color: #fff;
  352. }
  353. .businessnumber {
  354. font-size: 16px;
  355. font-weight: 600;
  356. }
  357. .consigner {
  358. font-size: 12px;
  359. }
  360. .time {
  361. color: #878C9C;
  362. }
  363. .goods {
  364. font-size: 12px;
  365. }
  366. .goodsstatus {
  367. background: #F9F9FA;
  368. color: #9698A2;
  369. padding: 10px 0;
  370. padding-left: 47px;
  371. margin: 10px 0;
  372. }
  373. .del {
  374. width: 60px;
  375. height: 33px;
  376. line-height: 33px;
  377. font-size: 14px;
  378. background: #fff;
  379. border: 1px solid #CDCDCD;
  380. border-radius: 30px;
  381. text-align: center;
  382. }
  383. }
  384. .navbar {
  385. position: fixed;
  386. left: 0;
  387. top: var(--window-top);
  388. display: flex;
  389. width: 100%;
  390. height: 80upx;
  391. background: #fff;
  392. box-shadow: 0 2upx 10upx rgba(0, 0, 0, .06);
  393. z-index: 10;
  394. .nav-item {
  395. flex: 1;
  396. display: flex;
  397. justify-content: center;
  398. align-items: center;
  399. height: 100%;
  400. font-size: 30upx;
  401. color: $font-color-dark;
  402. position: relative;
  403. &.current {
  404. color: $base-color;
  405. &:after {
  406. content: '';
  407. position: absolute;
  408. left: 50%;
  409. bottom: 0;
  410. transform: translateX(-50%);
  411. width: 120upx;
  412. height: 0;
  413. border-bottom: 4upx solid $base-color;
  414. }
  415. }
  416. }
  417. .p-box {
  418. display: flex;
  419. flex-direction: column;
  420. .yticon {
  421. display: flex;
  422. align-items: center;
  423. justify-content: center;
  424. width: 30upx;
  425. height: 14upx;
  426. line-height: 1;
  427. margin-left: 4upx;
  428. font-size: 26upx;
  429. color: #888;
  430. &.active {
  431. color: $base-color;
  432. }
  433. }
  434. .xia {
  435. transform: scaleY(-1);
  436. }
  437. }
  438. .cate-item {
  439. display: flex;
  440. justify-content: center;
  441. align-items: center;
  442. height: 100%;
  443. width: 80upx;
  444. position: relative;
  445. font-size: 44upx;
  446. &:after {
  447. content: '';
  448. position: absolute;
  449. left: 0;
  450. top: 50%;
  451. transform: translateY(-50%);
  452. border-left: 1px solid #ddd;
  453. width: 0;
  454. height: 36upx;
  455. }
  456. }
  457. }
  458. /* 分类 */
  459. .cate-mask {
  460. position: fixed;
  461. left: 0;
  462. top: var(--window-top);
  463. bottom: 0;
  464. width: 100%;
  465. background: rgba(0, 0, 0, 0);
  466. z-index: 95;
  467. transition: .3s;
  468. .cate-content {
  469. width: 630upx;
  470. height: 100%;
  471. background: #fff;
  472. float: right;
  473. transform: translateX(100%);
  474. transition: .3s;
  475. }
  476. &.none {
  477. display: none;
  478. }
  479. &.show {
  480. background: rgba(0, 0, 0, .4);
  481. .cate-content {
  482. transform: translateX(0);
  483. }
  484. }
  485. }
  486. .cate-list {
  487. display: flex;
  488. flex-direction: column;
  489. height: 100%;
  490. .cate-item {
  491. display: flex;
  492. align-items: center;
  493. height: 90upx;
  494. padding-left: 30upx;
  495. font-size: 28upx;
  496. color: #555;
  497. position: relative;
  498. }
  499. .two {
  500. height: 64upx;
  501. color: #303133;
  502. font-size: 30upx;
  503. background: #f8f8f8;
  504. }
  505. .active {
  506. color: $base-color;
  507. }
  508. }
  509. .introduce-section .title {
  510. font-size: 17px;
  511. font-weight: bold;
  512. height: 40px;
  513. line-height: 40px;
  514. flex: 2.5;
  515. border-bottom: 1px solid #EEEEEE;
  516. }
  517. .introduce-section .address {
  518. color: #878C9C;
  519. font-size: 12px;
  520. padding: 10px 0 10px;
  521. }
  522. .introduce-section .price {
  523. padding: 10px 0 10px;
  524. color: #FD714F;
  525. font-size: 19px;
  526. font-weight: 700;
  527. }
  528. .introduce-section .guess-item {
  529. border-radius: 10px;
  530. background: #fff;
  531. padding: 0upx 30upx 20upx;
  532. margin: 8px;
  533. border-bottom: 1px solid #ccc;
  534. }
  535. /* 销售信息 */
  536. .introduce-section {
  537. .title-tip {
  538. flex: 1;
  539. }
  540. .price-box {
  541. display: flex;
  542. align-items: baseline;
  543. font-size: 26upx;
  544. }
  545. .price {
  546. font-size: $font-lg + 2upx;
  547. }
  548. .m-price {
  549. margin: 0 12upx;
  550. color: $font-color-light;
  551. text-decoration: line-through;
  552. }
  553. .coupon-tip {
  554. align-items: center;
  555. padding: 4upx 10upx;
  556. background: $uni-color-primary;
  557. font-size: $font-sm;
  558. color: #fff;
  559. border-radius: 6upx;
  560. line-height: 1;
  561. transform: translateY(-4upx);
  562. }
  563. .bot-row {
  564. display: flex;
  565. align-items: center;
  566. height: 50upx;
  567. font-size: $font-sm;
  568. color: $font-color-light;
  569. view {
  570. flex: 1;
  571. }
  572. }
  573. }
  574. .footer {
  575. position: fixed;
  576. bottom: 0;
  577. width: 100%;
  578. padding: 20px 0;
  579. }
  580. .btn {
  581. width: 90%;
  582. background: #22C572;
  583. color: #fff;
  584. border-radius: 30px;
  585. }
  586. .btn:after {
  587. border: none;
  588. }
  589. .account-tip{
  590. font-size: 24rpx;
  591. font-weight: 400;
  592. color: #AFB3BF;
  593. padding-left: 60rpx;
  594. }
  595. .uForm {
  596. padding: 0 40rpx;
  597. }
  598. </style>