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

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