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

537 lines
13 KiB

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