铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

571 lines
12 KiB

6 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
  1. <template>
  2. <view class="page">
  3. <navbar :title="titleList[titleIndex]" leftClick @leftClick="$utils.navigateBack" />
  4. <view class="frame">
  5. <view class="title">
  6. <span
  7. style="width: 10rpx;height: 40rpx;background-color: #1f1c39;border-radius: 10rpx;overflow: hidden;"></span>
  8. <span>{{ $t('other.aluminumProducts') }}</span>
  9. </view>
  10. <view class="basic-info">
  11. <!--供应商名称-->
  12. <!-- <view v-if="titleIndex == 1" class="item">
  13. <view>{{ $t('other.supplierName') }}</view>
  14. <view>华南铝业有限公司</view>
  15. </view> -->
  16. <!--商品规格-->
  17. <view class="item">
  18. <view>{{ $t('components.productSpe') }}</view>
  19. <view>铝制品(Al>96%)</view>
  20. </view>
  21. <view class="addressA" @click="openAddress">
  22. <view class="title">提货地点</view>
  23. <view class="address" style="width: 70%">
  24. <image mode="" src="/static/image/address/selectIcon.png"></image>
  25. <view class="">
  26. {{ address.name }}
  27. </view>
  28. <view class="icon">
  29. <uv-icon name="arrow-right" size="30rpx"></uv-icon>
  30. </view>
  31. </view>
  32. </view>
  33. <!--提货地点-->
  34. <!--<view class="currentRegion">-->
  35. <!-- <view>{{ $t('components.pickupLocation') }}</view>-->
  36. <!-- <view @click.stop="selectAddr">-->
  37. <!-- <input class="input" disabled v-model="form.currentRegion"-->
  38. <!-- :placeholder=" $t('components.selectRegion')">-->
  39. <!-- </input>-->
  40. <!-- <view class="orientation">-->
  41. <!-- <img src="../../static/image/address/selectIcon.png"-->
  42. <!-- style="width:30rpx;height: 30rpx;margin:5rpx 5rpx 5rpx 5rpx;">-->
  43. <!-- </view>-->
  44. <!-- </view>-->
  45. <!--</view>-->
  46. <!--详细地址-->
  47. <view class="item" v-if="address.addressDetail">
  48. <view>{{ $t('components.detailedAddress') }}</view>
  49. <view>
  50. <view class="">
  51. {{ address.address }}
  52. </view>
  53. <view class="">
  54. {{ address.addressDetail }}
  55. </view>
  56. </view>
  57. </view>
  58. <!--交货日期-->
  59. <view class="delivery-date" @click="startDateOpen">
  60. <view>{{ $t('components.deliveryDate') }}</view>
  61. <view class="value">
  62. <view class="dateTimeCls">
  63. <view class="date">
  64. {{ form.transactionTime }}
  65. <uv-datetime-picker ref="startDateRef" v-model="form.transactionTime" mode="date"
  66. @confirm="startDateChange"></uv-datetime-picker>
  67. </view>
  68. <view class="img">
  69. >
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. <!--暂定数量-->
  75. <view class="tentativeQuantity">
  76. <view class="key">{{ $t('other.tentativeQuantity') }}</view>
  77. <view class="value">
  78. <uv-number-box v-model="form.num"></uv-number-box>
  79. </view>
  80. </view>
  81. <!--单价-->
  82. <view class="item">
  83. <view>{{ $t('components.unitPrice') }}</view>
  84. <view>
  85. <input v-model="form.price" clearable></input>
  86. </view>
  87. </view>
  88. <!--提交报价和提交审核-->
  89. <view class="btns">
  90. <span @click="confirmBtn" class="ljxd">
  91. {{ titleIndex == 0 ? $t('other.submitQuotation') : $t('other.submitReview') }}
  92. </span>
  93. <span class="lxwm" @click="contactUs">
  94. {{ $t('components.contactUs') }}
  95. </span>
  96. <span class="tip">{{ $t('components.contactTip') }}</span>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 联系客服弹框 -->
  101. <customerServicePopup ref="customerServicePopup" />
  102. <!-- 地址选择弹框 -->
  103. <uv-popup ref="addressPopup" :round="30">
  104. <addressList ref="addressList" height="60vh" @select="selectAddress" />
  105. </uv-popup>
  106. </view>
  107. </template>
  108. <script>
  109. import topbar from "@/components/base/topbar.vue";
  110. import tabber from "@/components/base/tabbar.vue";
  111. import customerServicePopup from "@/components/config/customerServicePopup.vue";
  112. import Position from "@/utils/position";
  113. import dayjs from "dayjs";
  114. import AddressList from "@/pages_order/components/address/addressList.vue";
  115. export default {
  116. name: "offer",
  117. components: {
  118. AddressList,
  119. customerServicePopup,
  120. tabber,
  121. topbar
  122. },
  123. onLoad(options) {
  124. this.titleIndex = options.titleIndex;
  125. },
  126. data() {
  127. return {
  128. titleIndex: 0,
  129. titleList: [
  130. // 0 供应商报价
  131. this.$t('pages.index.index.supplierQuotation'),
  132. this.$t('pages.index.index.supplierBillLading')
  133. ],
  134. form: {
  135. "addressId": "",
  136. "num": 0,
  137. "price": 0,
  138. "transactionTime": ""
  139. },
  140. address: {
  141. name: '请选择地址',
  142. addressDetail: '',
  143. },
  144. addressTotal: 0,
  145. }
  146. },
  147. onShow() {},
  148. methods: {
  149. //获取地址列表
  150. getAddressListA() {
  151. this.$refs.addressList
  152. .getAddressList()
  153. .then(res => {
  154. if (res == 0) {
  155. this.$refs.popup.close()
  156. return uni.navigateTo({
  157. url: '/pages_order/mine/address?type=back'
  158. })
  159. }
  160. })
  161. },
  162. // 提交报价/提交审核
  163. confirmBtn() {
  164. //TODO
  165. this.form.addressId = this.address.id
  166. if (this.$utils.verificationAll(this.form, {
  167. "addressId": '请选择提货地点',
  168. "num": '请选择吨数',
  169. "price": '请输入单价',
  170. "transactionTime": '请选择交货时间',
  171. })) {
  172. return
  173. }
  174. this.$api('addProduct', this.form, res => {
  175. if (res.code == 200) {
  176. uni.showToast({
  177. title: '提交成功',
  178. icon: 'none'
  179. })
  180. setTimeout(() => {
  181. uni.navigateTo({
  182. url: '/pages/index/index'
  183. })
  184. }, 1500)
  185. }
  186. })
  187. },
  188. openAddress() {
  189. this.$refs.addressPopup.open('bottom')
  190. // this.getAddressList()
  191. this.$nextTick(() => {
  192. this.getAddressListA()
  193. })
  194. },
  195. // 选择地址
  196. selectAddress(e) {
  197. this.address = e
  198. this.$refs.addressPopup.close()
  199. },
  200. startDateChange(val) {
  201. this.$nextTick(() => {
  202. this.form.transactionTime = dayjs(val.value).format("YYYY-MM-DD")
  203. });
  204. },
  205. startDateOpen() {
  206. this.$refs.startDateRef.open();
  207. },
  208. // 联系我们
  209. contactUs() {
  210. this.$refs.customerServicePopup.open()
  211. },
  212. //地图上选择地址
  213. selectAddr() {
  214. Position.getLocation(res => {
  215. Position.selectAddress(res.longitude, res.latitude, success => {
  216. this.setAddress(success)
  217. })
  218. })
  219. Position.getLocationDetail(res => {
  220. console.log(res);
  221. this.form.address = res
  222. })
  223. },
  224. },
  225. }
  226. </script>
  227. <style scoped lang="scss">
  228. .page {
  229. height: 100vh;
  230. .frame {
  231. background-color: #FFF;
  232. .title {
  233. display: flex;
  234. font-size: 30rpx;
  235. font-weight: 700;
  236. padding: 0rpx 0 0rpx 20rpx;
  237. margin: 20rpx 0 0 0;
  238. >span:nth-of-type(1) {
  239. margin: 4rpx 0 0 8rpx;
  240. background-color: #FFF;
  241. }
  242. >span:nth-of-type(2) {
  243. margin: 0 0 0 8rpx;
  244. background-color: #FFF;
  245. }
  246. }
  247. .basic-info {
  248. display: flex;
  249. flex-direction: column;
  250. gap: 10rpx;
  251. //margin-top: 20rpx;
  252. padding: 20rpx 20rpx 20rpx 20rpx;
  253. .addressA {
  254. display: flex;
  255. align-items: center;
  256. background-color: #FFF;
  257. height: 80rpx;
  258. // margin: 10rpx 0 0 0;
  259. //padding: 10rpx 0 0 20rpx;
  260. .title {
  261. display: flex;
  262. align-items: center;
  263. justify-content: flex-start;
  264. font-weight: 400;
  265. width: 30%;
  266. }
  267. .address {
  268. width: 70%;
  269. display: flex;
  270. padding: 20rpx;
  271. background-color: #fff;
  272. image {
  273. width: 30rpx;
  274. height: 30rpx;
  275. margin: 10rpx;
  276. }
  277. view {
  278. //margin: 20rpx;
  279. overflow: hidden; //超出的文本隐藏
  280. text-overflow: ellipsis; //溢出用省略号显示
  281. white-space: nowrap; //溢出不换行
  282. }
  283. .icon {
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. margin-left: auto;
  288. }
  289. }
  290. }
  291. .delivery-date {
  292. display: flex;
  293. align-items: center;
  294. background-color: #FFF;
  295. height: 80rpx;
  296. // margin: 10rpx 0 0 0;
  297. padding: 10rpx 0 0 20rpx;
  298. >view:nth-of-type(1) {
  299. width: 30%;
  300. // font-weight: 700;
  301. }
  302. .value {
  303. width: 70%;
  304. border-radius: 10rpx;
  305. overflow: hidden;
  306. .dateTimeCls {
  307. display: flex;
  308. align-items: center;
  309. justify-content: space-between;
  310. width: 100%;
  311. height: 80%;
  312. //border: 1px solid #b0b2b3;
  313. padding: 5rpx;
  314. border-radius: 20rpx;
  315. .date {
  316. font-size: 30rpx;
  317. display: flex;
  318. align-items: center;
  319. width: 80%;
  320. height: 100%;
  321. color: #000;
  322. }
  323. .img {
  324. display: flex;
  325. justify-content: center;
  326. align-items: center;
  327. //margin-left: 50rpx;
  328. width: 20%;
  329. //height: 100%;
  330. }
  331. }
  332. }
  333. }
  334. .tentativeQuantity {
  335. display: flex;
  336. align-items: center;
  337. background-color: #FFF;
  338. height: 80rpx;
  339. // margin: 10rpx 0 0 0;
  340. padding: 10rpx 0 0 20rpx;
  341. .key {
  342. width: 30%;
  343. }
  344. .value {
  345. width: 70%;
  346. border-radius: 10rpx;
  347. overflow: hidden;
  348. }
  349. }
  350. .Tip {
  351. display: flex;
  352. align-items: center;
  353. justify-content: center;
  354. .span {
  355. color: #999;
  356. font-size: 24rpx;
  357. }
  358. }
  359. .btns {
  360. width: 100%;
  361. display: flex;
  362. flex-direction: column;
  363. align-items: center;
  364. justify-content: center;
  365. gap: 20rpx;
  366. .ljxd {
  367. display: flex;
  368. align-items: center;
  369. justify-content: center;
  370. width: 500rpx;
  371. height: 70rpx;
  372. border-radius: 40rpx;
  373. color: #FFF;
  374. font-size: 28rpx;
  375. margin: 20rpx 10rpx 0 0;
  376. background: $uni-color;
  377. //margin-top: 20rpx;
  378. border-radius: 40rpx;
  379. }
  380. .lxwm {
  381. display: flex;
  382. align-items: center;
  383. justify-content: center;
  384. width: 500rpx;
  385. height: 70rpx;
  386. border-radius: 40rpx;
  387. color: #000000;
  388. font-size: 28rpx;
  389. margin: 20rpx 10rpx 0 0;
  390. background: #f1f1f1;
  391. //margin-top: 20rpx;
  392. border-radius: 40rpx;
  393. }
  394. .tip {
  395. display: flex;
  396. align-items: center;
  397. justify-content: center;
  398. font-size: 24rpx;
  399. color: #999;
  400. //width: 500rpx;
  401. }
  402. }
  403. .item {
  404. display: flex;
  405. align-items: center;
  406. background-color: #FFF;
  407. height: 80rpx;
  408. // margin: 10rpx 0 0 0;
  409. padding: 10rpx 0 0 20rpx;
  410. >view:nth-of-type(1) {
  411. width: 30%;
  412. // font-weight: 700;
  413. }
  414. >view:nth-of-type(2) {
  415. width: 70%;
  416. border-radius: 10rpx;
  417. overflow: hidden;
  418. input {
  419. background-color: #FFF;
  420. font-size: 28rpx;
  421. padding: 16rpx 8rpx 16rpx 15rpx;
  422. }
  423. }
  424. }
  425. .performanceBond {
  426. display: flex;
  427. align-items: center;
  428. background-color: #FFF;
  429. height: 80rpx;
  430. // margin: 10rpx 0 0 0;
  431. padding: 10rpx 0 0 20rpx;
  432. .key {
  433. width: 30%;
  434. // font-weight: 700;
  435. }
  436. .value {
  437. width: 70%;
  438. border-radius: 10rpx;
  439. overflow: hidden;
  440. input {
  441. background-color: #FFF;
  442. font-size: 28rpx;
  443. padding: 16rpx 8rpx 16rpx 15rpx;
  444. }
  445. }
  446. }
  447. .currentRegion {
  448. display: flex;
  449. align-items: center;
  450. background-color: #FFF;
  451. height: 80rpx;
  452. // margin: 10rpx 0 0 0;
  453. padding: 10rpx 0 0 20rpx;
  454. >view:nth-of-type(1) {
  455. width: 30%;
  456. // font-weight: 700;
  457. }
  458. >view:nth-of-type(2) {
  459. width: 70%;
  460. padding: 0 20rpx 0 0;
  461. display: flex;
  462. .input {
  463. background-color: #f5f5f5;
  464. // color: #a4a4a4;
  465. font-size: 28rpx;
  466. padding: 8rpx 8rpx 8rpx 15rpx;
  467. width: 350rpx;
  468. }
  469. .orientation {
  470. display: flex;
  471. padding: 10rpx 10rpx 10rpx 20rpx;
  472. font-size: 30rpx;
  473. color: #FBAB32;
  474. flex-direction: column;
  475. justify-content: center;
  476. align-items: center;
  477. }
  478. }
  479. }
  480. }
  481. }
  482. }
  483. </style>