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

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