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

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