球星卡微信小程序
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.

548 lines
13 KiB

3 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
4 years ago
3 years ago
4 years ago
3 years ago
3 years ago
3 years ago
4 years ago
3 years ago
  1. <template>
  2. <view class="flex-col page">
  3. <view class="flex-col group_4">
  4. <view class="flex-col group_5">
  5. <view class="flex-row equal-division">
  6. <view class="equal-division-item flex-col items-center">
  7. <image
  8. src="@/static/icon/tianxie1.png"
  9. class="image_6"
  10. />
  11. <text class="text_2">填写信息</text>
  12. </view>
  13. <view class="equal-division-item flex-col items-center">
  14. <image
  15. src="@/static/icon/tianxie2.png"
  16. class="image_6"
  17. />
  18. <text class="text_2">藏品寄送</text>
  19. </view>
  20. <view class="equal-division-item flex-col items-center">
  21. <image
  22. src="@/static/icon/tianxie3.png"
  23. class="image_6"
  24. />
  25. <text class="text_2">评级</text>
  26. </view>
  27. </view>
  28. <view class="justify-between group_9">
  29. <view class="section_2"> </view>
  30. <view class="section_3"> </view>
  31. </view>
  32. </view>
  33. <view class="flex-col section_4" @click="$url('/packages/address/address?is_select=1')">
  34. <view v-if="$isRight(address)">
  35. <view class="justify-between">
  36. <view class="flex-row">
  37. <text class="text_6">{{ address.name }}</text>
  38. <text class="text_7">{{ address.tel }}</text>
  39. </view>
  40. <image
  41. src="@/static/icon/rightArrow.png"
  42. class="image_10 image_11"
  43. />
  44. </view>
  45. <text class="text_8">{{ address.desc }}</text>
  46. </view>
  47. <!-- 没有选择地址时 -->
  48. <view v-else>
  49. <view class="justify-between">
  50. <view class="flex-row">
  51. <text class="lf-font-32">点击选择收货地址</text>
  52. </view>
  53. <image
  54. src="@/static/icon/rightArrow.png"
  55. class="image_10 image_11"
  56. />
  57. </view>
  58. </view>
  59. </view>
  60. <view class="flex-col section_5">
  61. <view class="justify-between">
  62. <text class="text_9">送评人信息</text>
  63. <!-- <view class="flex-row group_13">
  64. <text>编辑</text>
  65. <image
  66. src="@/static/icon/rightArrow.png"
  67. class="image_10"
  68. />
  69. </view> -->
  70. </view>
  71. <view class="flex-row group_14">
  72. <text class="text_11">送评人</text>
  73. <!-- <text class="text_12">送评人</text> -->
  74. <u-input v-model="sonpingInfo.name" placeholder="请输入送评人"></u-input>
  75. </view>
  76. <view class="flex-row group_15">
  77. <text class="text_13">手机号</text>
  78. <!-- <text class="text_14">18266785384</text> -->
  79. <u-input v-model="sonpingInfo.phone" placeholder="请输入送评人手机号" type="number" maxlength="11"></u-input>
  80. </view>
  81. <view class="flex-row group_16">
  82. <text class="text_15">数量</text>
  83. <!-- <text class="text_16">3</text> -->
  84. <u-input v-model="sonpingInfo.number" placeholder="请输入送评数量" type="number"></u-input>
  85. </view>
  86. <view class="justify-between group_17" @click="pickerShow(true)">
  87. <view class="flex-row group_18">
  88. <text class="text_17">选择档位</text>
  89. <text class="text_18"></text>
  90. </view>
  91. <view class="pick-panel">
  92. <view>
  93. {{columnsData[columnsIndex].title}}
  94. </view>
  95. <image
  96. src="@/static/icon/rightArrow.png"
  97. class="image_10 image_11 rote90"
  98. />
  99. </view>
  100. <!-- <u-switch v-model="isQuickReview" activeColor="#e7a23f"></u-switch> -->
  101. </view>
  102. <view class="flex-col group_19">
  103. <view class="fast_desc">
  104. {{columnsData[columnsIndex].desc}}
  105. </view>
  106. </view>
  107. <view class="flex-col group_19">
  108. <text>打包照片</text>
  109. <view class="flex-row equal-division_1">
  110. <u-upload
  111. :fileList="fileList"
  112. name="1"
  113. multiple
  114. :maxCount="4"
  115. :previewFullImage="true"
  116. @afterRead="afterRead"
  117. @delete="deletePic"
  118. ></u-upload>
  119. </view>
  120. </view>
  121. <view class="flex-col group_20">
  122. <text class="text_20">备注</text>
  123. <u-textarea v-model="remarks" placeholder="请输入备注" :height="100" class="textarea" :count="true"></u-textarea>
  124. </view>
  125. <view class="flex-row group_15">
  126. <text class="text_11">优惠券</text>
  127. <u-input @change="checkCoupon" v-model="coupon" placeholder="非必填,请输入优惠券码"></u-input>
  128. </view>
  129. <view class="flex-col group_21">
  130. <view class="flex-col items-center button" @click="next">
  131. <text>寄送藏品</text>
  132. </view>
  133. <view class="section_6"> </view>
  134. </view>
  135. </view>
  136. </view>
  137. <u-picker :show="show" :columns="columns" immediateChange="true" @cancel="pickerShow(false)" @confirm="confirmPicker"></u-picker>
  138. </view>
  139. </template>
  140. <script>
  141. import { dispose } from '@/common/directoss.js';
  142. import { checkAgentCode } from '@/service/index.js';
  143. import { address } from '@/service/address.js';
  144. export default {
  145. data() {
  146. return {
  147. address: {},
  148. isQuickReview: 0,
  149. sonpingInfo: {
  150. name: '',
  151. phone: '',
  152. number: ''
  153. },
  154. fileList: [],
  155. remarks: '',
  156. rateIndex: 0,
  157. coupon: '',
  158. show:false,
  159. columns:[],
  160. columnsData:null,
  161. columnsIndex:0,
  162. couponStatus:true,
  163. couponTimer:null,
  164. };
  165. },
  166. // computed:{
  167. // columns:()=>{
  168. // return ['1','2'];
  169. // },
  170. // },
  171. onLoad(options){
  172. uni.setStorageSync('AgreementChecked',1);
  173. this.rateIndex = options.rate_index || 0;
  174. let d = uni.getStorageSync('qxk_sysinfo')
  175. if(d){
  176. let options = d.fast_options
  177. // this.columnsData = options.filter((item)=>{
  178. // if(this.rateIndex == 3){
  179. // if(item.id == 0 || item.id == 4){
  180. // return item;
  181. // }
  182. // }else{
  183. // if(item.id <=3){
  184. // return item;
  185. // }
  186. // }
  187. // });
  188. this.columnsData = options
  189. let texts = this.columnsData.map((item)=>{
  190. return item.title
  191. })
  192. //t = [...t,...texts];
  193. this.columns.push(texts)
  194. this.isQuickReview = this.columnsData[0].id
  195. this.defaultAddress();
  196. }
  197. },
  198. methods: {
  199. async defaultAddress(){
  200. let res = await address();
  201. if(res.data.datas.length > 0){
  202. this.address = res.data.datas[0];
  203. this.sonpingInfo.name = this.address.name
  204. this.sonpingInfo.phone = this.address.tel
  205. }
  206. },
  207. checkCoupon(event){
  208. if(this.couponTimer){
  209. clearTimeout(this.couponTimer);
  210. }
  211. this.couponTimer = setTimeout(async () => {
  212. let res = await checkAgentCode(event);
  213. if(res.code > 0){
  214. this.couponStatus = false;
  215. uni.showToast({
  216. title:res.msg,
  217. });
  218. }else{
  219. this.couponStatus = true;
  220. }
  221. },500);
  222. },
  223. async afterRead(event){
  224. let imageList = await dispose(event.file);
  225. this.fileList.push(...imageList);
  226. console.log("上传完成后的图片---------", this.fileList)
  227. },
  228. deletePic(event){
  229. this.fileList.splice(event.index, 1);
  230. },
  231. pickerShow(v){
  232. this.show = v
  233. },
  234. confirmPicker(e){
  235. console.log("confirmPicker",e)
  236. this.columnsIndex = e.indexs[0]
  237. this.isQuickReview = this.columnsData[this.columnsIndex].id
  238. //e.
  239. this.pickerShow(false)
  240. },
  241. next(){
  242. let sonpingInfo = this.sonpingInfo;
  243. if(!this.$isRight(this.address)) return this.$msg('请选择收货地址');
  244. if(!sonpingInfo.name) return this.$msg('请填写送评人信息');
  245. if(!sonpingInfo.phone) return this.$msg('请填写送评人手机号');
  246. if(!sonpingInfo.number) return this.$msg('请填写送评数量');
  247. if(this.couponStatus == false){
  248. this.coupon = '';
  249. }
  250. this.$url('/pages/write/distribution');
  251. }
  252. }
  253. };
  254. </script>
  255. <style scoped lang="css">
  256. .pick-panel{
  257. display: flex;
  258. }
  259. .rote90{
  260. transform: rotate(90deg);
  261. }
  262. .fast_desc{
  263. display:inline-block;
  264. width: 100%;
  265. height: auto;
  266. word-wrap: break-word;
  267. word-break: break-all;
  268. white-space: pre-wrap;
  269. font-size: 28rpx;
  270. }
  271. .equal-division-item {
  272. flex: 1 1 240rpx;
  273. padding: 10rpx 0;
  274. }
  275. .image_10 {
  276. width: 44rpx;
  277. height: 44rpx;
  278. }
  279. .image_6 {
  280. border-radius: 50%;
  281. width: 80rpx;
  282. height: 80rpx;
  283. }
  284. .equal-division-item_1 {
  285. margin-left: 28rpx;
  286. flex: 1 1 210rpx;
  287. border-radius: 10rpx;
  288. width: 210rpx;
  289. height: 130rpx;
  290. }
  291. .text_2 {
  292. margin-top: 20rpx;
  293. }
  294. .page {
  295. background-color: #f6f6f6;
  296. width: 100%;
  297. overflow-y: auto;
  298. height: 100%;
  299. }
  300. .group_4 {
  301. flex: 1 1 auto;
  302. overflow-y: auto;
  303. }
  304. .group_5 {
  305. padding-top: 2rpx;
  306. color: rgb(85, 85, 85);
  307. font-size: 28rpx;
  308. font-weight: 500;
  309. line-height: 40rpx;
  310. white-space: nowrap;
  311. position: relative;
  312. }
  313. .section_4 {
  314. margin-top: 30rpx;
  315. padding: 40rpx 32rpx 40rpx 40rpx;
  316. background-color: rgb(255, 255, 255);
  317. }
  318. .section_5 {
  319. margin-top: 30rpx;
  320. padding: 40rpx 32rpx 16rpx;
  321. background-color: rgb(255, 255, 255);
  322. }
  323. .equal-division {
  324. padding: 30rpx 14rpx;
  325. background-color: rgb(255, 255, 255);
  326. }
  327. .group_9 {
  328. width: 404rpx;
  329. position: absolute;
  330. right: 166rpx;
  331. top: 81rpx;
  332. }
  333. .text_8 {
  334. margin-top: 20rpx;
  335. color: rgb(51, 51, 51);
  336. font-size: 32rpx;
  337. line-height: 44rpx;
  338. }
  339. .group_14 {
  340. margin-top: 40rpx;
  341. align-items: center;
  342. }
  343. .group_15 {
  344. margin-top: 50rpx;
  345. align-items: center;
  346. }
  347. .group_16 {
  348. margin-top: 50rpx;
  349. align-items: center;
  350. }
  351. .group_17 {
  352. margin-top: 44rpx;
  353. }
  354. .group_19 {
  355. margin-top: 44rpx;
  356. color: rgb(119, 119, 119);
  357. font-size: 32rpx;
  358. font-weight: 500;
  359. line-height: 44rpx;
  360. white-space: nowrap;
  361. }
  362. .group_20 {
  363. margin-top: 50rpx;
  364. }
  365. .group_21 {
  366. margin-top: 50rpx;
  367. color: rgb(255, 255, 255);
  368. font-size: 32rpx;
  369. font-weight: 600;
  370. line-height: 44rpx;
  371. white-space: nowrap;
  372. }
  373. .section_2 {
  374. background-image: repeating-linear-gradient(
  375. 90deg,
  376. rgb(231, 162, 63),
  377. rgb(231, 162, 63) 2.4691358024691357%,
  378. transparent 2.4691358024691357%,
  379. transparent 14.814814814814815%
  380. );
  381. width: 162rpx;
  382. height: 2rpx;
  383. }
  384. .section_3 {
  385. background-image: repeating-linear-gradient(
  386. 90deg,
  387. rgb(195, 195, 195),
  388. rgb(195, 195, 195) 2.4691358024691357%,
  389. transparent 2.4691358024691357%,
  390. transparent 14.814814814814815%
  391. );
  392. width: 162rpx;
  393. height: 2rpx;
  394. }
  395. .image_11 {
  396. margin-top: 4rpx;
  397. }
  398. .text_9 {
  399. color: rgb(51, 51, 51);
  400. font-size: 36rpx;
  401. font-weight: 600;
  402. line-height: 50rpx;
  403. white-space: nowrap;
  404. }
  405. .group_13 {
  406. margin-top: 4rpx;
  407. color: rgb(119, 119, 119);
  408. font-size: 28rpx;
  409. font-weight: 500;
  410. line-height: 40rpx;
  411. white-space: nowrap;
  412. }
  413. .text_11 {
  414. color: rgb(119, 119, 119);
  415. font-size: 32rpx;
  416. font-weight: 500;
  417. line-height: 44rpx;
  418. white-space: nowrap;
  419. }
  420. .text_12 {
  421. margin-left: 20rpx;
  422. color: rgb(51, 51, 51);
  423. font-size: 32rpx;
  424. font-weight: 500;
  425. line-height: 44rpx;
  426. white-space: nowrap;
  427. }
  428. .text_13 {
  429. color: rgb(119, 119, 119);
  430. font-size: 32rpx;
  431. font-weight: 500;
  432. line-height: 44rpx;
  433. white-space: nowrap;
  434. }
  435. .text_14 {
  436. margin-left: 20rpx;
  437. color: rgb(51, 51, 51);
  438. font-size: 32rpx;
  439. font-weight: 500;
  440. line-height: 44rpx;
  441. white-space: nowrap;
  442. }
  443. .text_15 {
  444. color: rgb(119, 119, 119);
  445. font-size: 32rpx;
  446. font-weight: 500;
  447. line-height: 44rpx;
  448. white-space: nowrap;
  449. }
  450. .text_16 {
  451. margin-left: 52rpx;
  452. color: rgb(51, 51, 51);
  453. font-size: 32rpx;
  454. font-weight: 500;
  455. line-height: 44rpx;
  456. white-space: nowrap;
  457. }
  458. .group_18 {
  459. margin: 6rpx 0;
  460. }
  461. .switch {
  462. border-radius: 104rpx;
  463. width: 100rpx;
  464. height: 56rpx;
  465. }
  466. .equal-division_1 {
  467. margin-top: 20rpx;
  468. }
  469. .text_20 {
  470. color: rgb(119, 119, 119);
  471. font-size: 32rpx;
  472. font-weight: 500;
  473. line-height: 44rpx;
  474. white-space: nowrap;
  475. }
  476. .text-wrapper {
  477. margin-top: 20rpx;
  478. padding: 30rpx 0 138rpx;
  479. color: rgb(153, 153, 153);
  480. font-size: 28rpx;
  481. font-weight: 500;
  482. line-height: 40rpx;
  483. white-space: nowrap;
  484. background-color: rgb(246, 246, 246);
  485. border-radius: 10rpx;
  486. }
  487. .button {
  488. padding: 26rpx 0;
  489. background-color: rgb(231, 162, 63);
  490. border-radius: 10rpx;
  491. }
  492. .section_6 {
  493. margin-top: 22rpx;
  494. align-self: center;
  495. border-radius: 4rpx;
  496. width: 196rpx;
  497. height: 8rpx;
  498. }
  499. .text_6 {
  500. color: rgb(51, 51, 51);
  501. font-size: 36rpx;
  502. font-weight: 700;
  503. line-height: 50rpx;
  504. white-space: nowrap;
  505. }
  506. .text_7 {
  507. margin-left: 40rpx;
  508. margin-top: 4rpx;
  509. color: rgb(51, 51, 51);
  510. font-size: 32rpx;
  511. font-weight: 700;
  512. line-height: 44rpx;
  513. white-space: nowrap;
  514. }
  515. .text_17 {
  516. color: rgb(119, 119, 119);
  517. font-size: 32rpx;
  518. font-weight: 500;
  519. line-height: 44rpx;
  520. white-space: nowrap;
  521. }
  522. .text_18 {
  523. margin: 6rpx 0 4rpx 10rpx;
  524. color: rgb(231, 162, 63);
  525. font-size: 24rpx;
  526. font-weight: 500;
  527. line-height: 34rpx;
  528. white-space: nowrap;
  529. }
  530. .image_13 {
  531. margin-left: 0;
  532. }
  533. .text_21 {
  534. margin-left: 30rpx;
  535. }
  536. /deep/.u-textarea{
  537. background-color: #f6f6f6 !important;
  538. margin-top: 20rpx;
  539. border-radius: 10rpx;
  540. }
  541. </style>