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

547 lines
13 KiB

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