球星卡微信小程序
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. let texts = this.columnsData.map((item)=>{
  189. return item.title
  190. })
  191. //t = [...t,...texts];
  192. this.columns.push(texts)
  193. this.isQuickReview = this.columnsData[0].id
  194. this.defaultAddress();
  195. }
  196. },
  197. methods: {
  198. async defaultAddress(){
  199. let res = await address();
  200. if(res.data.datas.length > 0){
  201. this.address = res.data.datas[0];
  202. this.sonpingInfo.name = this.address.name
  203. this.sonpingInfo.phone = this.address.tel
  204. }
  205. },
  206. checkCoupon(event){
  207. if(this.couponTimer){
  208. clearTimeout(this.couponTimer);
  209. }
  210. this.couponTimer = setTimeout(async () => {
  211. let res = await checkAgentCode(event);
  212. if(res.code > 0){
  213. this.couponStatus = false;
  214. uni.showToast({
  215. title:res.msg,
  216. });
  217. }else{
  218. this.couponStatus = true;
  219. }
  220. },500);
  221. },
  222. async afterRead(event){
  223. let imageList = await dispose(event.file);
  224. this.fileList.push(...imageList);
  225. console.log("上传完成后的图片---------", this.fileList)
  226. },
  227. deletePic(event){
  228. this.fileList.splice(event.index, 1);
  229. },
  230. pickerShow(v){
  231. this.show = v
  232. },
  233. confirmPicker(e){
  234. console.log("confirmPicker",e)
  235. this.columnsIndex = e.indexs[0]
  236. this.isQuickReview = this.columnsData[this.columnsIndex].id
  237. //e.
  238. this.pickerShow(false)
  239. },
  240. next(){
  241. let sonpingInfo = this.sonpingInfo;
  242. if(!this.$isRight(this.address)) return this.$msg('请选择收货地址');
  243. if(!sonpingInfo.name) return this.$msg('请填写送评人信息');
  244. if(!sonpingInfo.phone) return this.$msg('请填写送评人手机号');
  245. if(!sonpingInfo.number) return this.$msg('请填写送评数量');
  246. if(this.couponStatus == false){
  247. this.coupon = '';
  248. }
  249. this.$url('/pages/write/distribution');
  250. }
  251. }
  252. };
  253. </script>
  254. <style scoped lang="css">
  255. .pick-panel{
  256. display: flex;
  257. }
  258. .rote90{
  259. transform: rotate(90deg);
  260. }
  261. .fast_desc{
  262. display:inline-block;
  263. width: 100%;
  264. height: auto;
  265. word-wrap: break-word;
  266. word-break: break-all;
  267. white-space: pre-wrap;
  268. font-size: 28rpx;
  269. }
  270. .equal-division-item {
  271. flex: 1 1 240rpx;
  272. padding: 10rpx 0;
  273. }
  274. .image_10 {
  275. width: 44rpx;
  276. height: 44rpx;
  277. }
  278. .image_6 {
  279. border-radius: 50%;
  280. width: 80rpx;
  281. height: 80rpx;
  282. }
  283. .equal-division-item_1 {
  284. margin-left: 28rpx;
  285. flex: 1 1 210rpx;
  286. border-radius: 10rpx;
  287. width: 210rpx;
  288. height: 130rpx;
  289. }
  290. .text_2 {
  291. margin-top: 20rpx;
  292. }
  293. .page {
  294. background-color: #f6f6f6;
  295. width: 100%;
  296. overflow-y: auto;
  297. height: 100%;
  298. }
  299. .group_4 {
  300. flex: 1 1 auto;
  301. overflow-y: auto;
  302. }
  303. .group_5 {
  304. padding-top: 2rpx;
  305. color: rgb(85, 85, 85);
  306. font-size: 28rpx;
  307. font-weight: 500;
  308. line-height: 40rpx;
  309. white-space: nowrap;
  310. position: relative;
  311. }
  312. .section_4 {
  313. margin-top: 30rpx;
  314. padding: 40rpx 32rpx 40rpx 40rpx;
  315. background-color: rgb(255, 255, 255);
  316. }
  317. .section_5 {
  318. margin-top: 30rpx;
  319. padding: 40rpx 32rpx 16rpx;
  320. background-color: rgb(255, 255, 255);
  321. }
  322. .equal-division {
  323. padding: 30rpx 14rpx;
  324. background-color: rgb(255, 255, 255);
  325. }
  326. .group_9 {
  327. width: 404rpx;
  328. position: absolute;
  329. right: 166rpx;
  330. top: 81rpx;
  331. }
  332. .text_8 {
  333. margin-top: 20rpx;
  334. color: rgb(51, 51, 51);
  335. font-size: 32rpx;
  336. line-height: 44rpx;
  337. }
  338. .group_14 {
  339. margin-top: 40rpx;
  340. align-items: center;
  341. }
  342. .group_15 {
  343. margin-top: 50rpx;
  344. align-items: center;
  345. }
  346. .group_16 {
  347. margin-top: 50rpx;
  348. align-items: center;
  349. }
  350. .group_17 {
  351. margin-top: 44rpx;
  352. }
  353. .group_19 {
  354. margin-top: 44rpx;
  355. color: rgb(119, 119, 119);
  356. font-size: 32rpx;
  357. font-weight: 500;
  358. line-height: 44rpx;
  359. white-space: nowrap;
  360. }
  361. .group_20 {
  362. margin-top: 50rpx;
  363. }
  364. .group_21 {
  365. margin-top: 50rpx;
  366. color: rgb(255, 255, 255);
  367. font-size: 32rpx;
  368. font-weight: 600;
  369. line-height: 44rpx;
  370. white-space: nowrap;
  371. }
  372. .section_2 {
  373. background-image: repeating-linear-gradient(
  374. 90deg,
  375. rgb(231, 162, 63),
  376. rgb(231, 162, 63) 2.4691358024691357%,
  377. transparent 2.4691358024691357%,
  378. transparent 14.814814814814815%
  379. );
  380. width: 162rpx;
  381. height: 2rpx;
  382. }
  383. .section_3 {
  384. background-image: repeating-linear-gradient(
  385. 90deg,
  386. rgb(195, 195, 195),
  387. rgb(195, 195, 195) 2.4691358024691357%,
  388. transparent 2.4691358024691357%,
  389. transparent 14.814814814814815%
  390. );
  391. width: 162rpx;
  392. height: 2rpx;
  393. }
  394. .image_11 {
  395. margin-top: 4rpx;
  396. }
  397. .text_9 {
  398. color: rgb(51, 51, 51);
  399. font-size: 36rpx;
  400. font-weight: 600;
  401. line-height: 50rpx;
  402. white-space: nowrap;
  403. }
  404. .group_13 {
  405. margin-top: 4rpx;
  406. color: rgb(119, 119, 119);
  407. font-size: 28rpx;
  408. font-weight: 500;
  409. line-height: 40rpx;
  410. white-space: nowrap;
  411. }
  412. .text_11 {
  413. color: rgb(119, 119, 119);
  414. font-size: 32rpx;
  415. font-weight: 500;
  416. line-height: 44rpx;
  417. white-space: nowrap;
  418. }
  419. .text_12 {
  420. margin-left: 20rpx;
  421. color: rgb(51, 51, 51);
  422. font-size: 32rpx;
  423. font-weight: 500;
  424. line-height: 44rpx;
  425. white-space: nowrap;
  426. }
  427. .text_13 {
  428. color: rgb(119, 119, 119);
  429. font-size: 32rpx;
  430. font-weight: 500;
  431. line-height: 44rpx;
  432. white-space: nowrap;
  433. }
  434. .text_14 {
  435. margin-left: 20rpx;
  436. color: rgb(51, 51, 51);
  437. font-size: 32rpx;
  438. font-weight: 500;
  439. line-height: 44rpx;
  440. white-space: nowrap;
  441. }
  442. .text_15 {
  443. color: rgb(119, 119, 119);
  444. font-size: 32rpx;
  445. font-weight: 500;
  446. line-height: 44rpx;
  447. white-space: nowrap;
  448. }
  449. .text_16 {
  450. margin-left: 52rpx;
  451. color: rgb(51, 51, 51);
  452. font-size: 32rpx;
  453. font-weight: 500;
  454. line-height: 44rpx;
  455. white-space: nowrap;
  456. }
  457. .group_18 {
  458. margin: 6rpx 0;
  459. }
  460. .switch {
  461. border-radius: 104rpx;
  462. width: 100rpx;
  463. height: 56rpx;
  464. }
  465. .equal-division_1 {
  466. margin-top: 20rpx;
  467. }
  468. .text_20 {
  469. color: rgb(119, 119, 119);
  470. font-size: 32rpx;
  471. font-weight: 500;
  472. line-height: 44rpx;
  473. white-space: nowrap;
  474. }
  475. .text-wrapper {
  476. margin-top: 20rpx;
  477. padding: 30rpx 0 138rpx;
  478. color: rgb(153, 153, 153);
  479. font-size: 28rpx;
  480. font-weight: 500;
  481. line-height: 40rpx;
  482. white-space: nowrap;
  483. background-color: rgb(246, 246, 246);
  484. border-radius: 10rpx;
  485. }
  486. .button {
  487. padding: 26rpx 0;
  488. background-color: rgb(231, 162, 63);
  489. border-radius: 10rpx;
  490. }
  491. .section_6 {
  492. margin-top: 22rpx;
  493. align-self: center;
  494. border-radius: 4rpx;
  495. width: 196rpx;
  496. height: 8rpx;
  497. }
  498. .text_6 {
  499. color: rgb(51, 51, 51);
  500. font-size: 36rpx;
  501. font-weight: 700;
  502. line-height: 50rpx;
  503. white-space: nowrap;
  504. }
  505. .text_7 {
  506. margin-left: 40rpx;
  507. margin-top: 4rpx;
  508. color: rgb(51, 51, 51);
  509. font-size: 32rpx;
  510. font-weight: 700;
  511. line-height: 44rpx;
  512. white-space: nowrap;
  513. }
  514. .text_17 {
  515. color: rgb(119, 119, 119);
  516. font-size: 32rpx;
  517. font-weight: 500;
  518. line-height: 44rpx;
  519. white-space: nowrap;
  520. }
  521. .text_18 {
  522. margin: 6rpx 0 4rpx 10rpx;
  523. color: rgb(231, 162, 63);
  524. font-size: 24rpx;
  525. font-weight: 500;
  526. line-height: 34rpx;
  527. white-space: nowrap;
  528. }
  529. .image_13 {
  530. margin-left: 0;
  531. }
  532. .text_21 {
  533. margin-left: 30rpx;
  534. }
  535. /deep/.u-textarea{
  536. background-color: #f6f6f6 !important;
  537. margin-top: 20rpx;
  538. border-radius: 10rpx;
  539. }
  540. </style>