铝交易,微信公众号
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.

553 lines
13 KiB

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