creatDiscount.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923
  1. <template>
  2. <view class="creat">
  3. <view class="top"></view>
  4. <cu-custom bgColor="bg-fff" :isBack="true">
  5. <block slot="content">{{ productId ? '编辑折扣券' : '新增折扣券' }}</block>
  6. </cu-custom>
  7. <view class="content">
  8. <view class="form">
  9. <view class="titl">
  10. 领取信息
  11. </view>
  12. <view class="item">
  13. <view class="label">
  14. 折扣券名称
  15. </view>
  16. <view class="picker">
  17. <u-input v-model="form.couponName" placeholder="输入折扣券名称" />
  18. </view>
  19. </view>
  20. <view style="margin-bottom:15rpx">
  21. <view class="section-title">
  22. 打折消费
  23. </view>
  24. <view class="section-full justify-between ">
  25. <view style="width: 46%;">
  26. <text class="section-title" style="font-weight: 500;">满
  27. <text class="section-limit">0元即不限制金额</text>
  28. </text>
  29. <view class="flex align-center"><u-input v-model="form.contentConditions"
  30. placeholder="输入金额" />元</view>
  31. </view>
  32. <view style="width: 46%;">
  33. <text class="section-title" style="font-weight: 500;">折扣</text>
  34. <view class="flex align-center">
  35. <!-- <input v-model="form.contentInfo" placeholder="两字短标题" name="input"></input> -->
  36. <u-input v-model="form.contentInfo" placeholder="例:9.5" @input="handleInput"/>折
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="item">
  42. <view class="label">
  43. 库存
  44. </view>
  45. <view class="picker">
  46. <u-input v-model="form.number" placeholder="输入库存" />
  47. </view>
  48. </view>
  49. <view class="item">
  50. <view class="label">
  51. 有效时间
  52. </view>
  53. <view class="picker" style="display: flex;align-items: center;justify-content: end;"@click="selectDate">
  54. <!-- <u-input placeholder="去设置" v-model="showDate" @click="selectDate" selectDate @focus="preventKeyboard" /> -->
  55. <view class="" >
  56. {{showDate}}
  57. </view>
  58. <u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
  59. </view>
  60. </view>
  61. <view class="titl">
  62. 领取方式
  63. </view>
  64. <view class="product-item">
  65. <view class="title flex">所有人可领
  66. </view>
  67. <view @click="groupChange(1)" class="flex" style="margin-left:36rpx">
  68. <text v-if="form.couponWay !== '1'" style="display: inline-block;"
  69. class="radio-container"></text>
  70. <image v-else style=" vertical-align: top;" class="radio-img" src="/static/coupon/xuanzhong.png"
  71. mode=""></image>
  72. </view>
  73. </view>
  74. <view class="product-item">
  75. <view class="title flex">本店消费可领
  76. </view>
  77. <view @click="groupChange(2)" class="flex" style="margin-left:36rpx">
  78. <text v-if="form.couponWay !== '2'" style="display: inline-block;"
  79. class="radio-container"></text>
  80. <image v-else style=" vertical-align: top;" class="radio-img" src="/static/coupon/xuanzhong.png"
  81. mode=""></image>
  82. </view>
  83. </view>
  84. <view class="item justify-between">
  85. <view class="label">
  86. 允许重复领取
  87. </view>
  88. <view>
  89. <u-switch activeValue="1" inactiveValue="2" activeColor="#449AFF " v-model="form.repeatClaim"
  90. size="24"></u-switch>
  91. </view>
  92. </view>
  93. <view class="titl">
  94. 使用信息
  95. </view>
  96. <view class="item justify-between">
  97. <view class="label">
  98. 适用范围
  99. </view>
  100. <view>
  101. <picker @change="confirm1" :value="form.couponRange" :range="columns1" range-key="name">
  102. <view class="picker" v-if="form.couponRange" style="color: #303133">
  103. {{columns1.find(e => e.value == form.couponRange).name}}
  104. </view>
  105. <view v-else style="color: #999999">
  106. 去选择
  107. <u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
  108. </view>
  109. </picker>
  110. </view>
  111. </view>
  112. <view class="item justify-between" v-show="form.couponRange == '2' || form.couponRange == '3'">
  113. <view class="label">适用商品范围</view>
  114. <view @click="geActivity" style="color: #999999">
  115. {{ form.couponRangeInfo.length !== 0 ? '已选择' + form.couponRangeInfo.length + '个商品' : '去选择' }}
  116. <u-icon name="arrow-right" style="margin-left: 17rpx;"></u-icon>
  117. </view>
  118. </view>
  119. <!-- <view class="titl">
  120. 使用条件
  121. </view>
  122. <view class="product-item">
  123. <view class="title flex">不限制 </view>
  124. <view @click="conditionsChange(1)" class="flex" style="margin-left:36rpx">
  125. <text v-if="form.conditionsUse !== '1'" style="display: inline-block;"
  126. class="radio-container"></text>
  127. <image v-else style=" vertical-align: top;" class="radio-img" src="/static/coupon/xuanzhong.png"
  128. mode=""></image>
  129. </view>
  130. </view>
  131. <view class="product-item">
  132. <view class="title flex">最低消费
  133. <input name="input" :disabled="form.conditionsUse !== '2'" v-model="form.conditions" />元
  134. </view>
  135. <view @click="conditionsChange(2)" class="flex" style="margin-left:36rpx">
  136. <text v-if="form.conditionsUse !== '2'" style="display: inline-block;"
  137. class="radio-container"></text>
  138. <image v-else style=" vertical-align: top;" class="radio-img" src="/static/coupon/xuanzhong.png"
  139. mode=""></image>
  140. </view>
  141. </view> -->
  142. <view class="item upload">
  143. <view class="label">
  144. 折扣券描述
  145. </view>
  146. <view class="textarea">
  147. <u-input v-model="form.couponDescription" type="textarea" placeholder="请输入描述内容"
  148. maxlength="500" />
  149. </view>
  150. <view class="num">
  151. <span v-if="form.couponDescription">{{ form.couponDescription &&
  152. form.couponDescription.length > 0 ?
  153. form.couponDescription.length : 0 }}</span>
  154. /500
  155. </view>
  156. <view class="tips">
  157. 支持jpg,png格式,最多上传5张,每张图片大小不得超过5M。
  158. </view>
  159. <!-- <view class="grid col-4 grid-square flex-sub booder-top">
  160. <view class="bg-img" v-for="(item, index) in headPhotoImg" :key="index" @tap="ViewImage"
  161. :data-url="headPhotoImg[index]">
  162. <image :src="headPhotoImg[index]" mode="aspectFill"></image>
  163. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
  164. <text class='cuIcon-close'></text>
  165. </view>
  166. </view>
  167. <view @tap="ChooseImage" v-if="headPhotoImg.length <= 4">
  168. <image style="width: 156rpx;height:156rpx" src="../../static/coupon/upload.png"
  169. mode="aspectFill"></image>
  170. </view>
  171. </view> -->
  172. <u-upload ref="dUpload" :action="action" :file-list="xqImage" @on-success="detailsSuccess"
  173. @on-remove="detailsRemove" max-count="5" width="140rpx" height="140rpx"></u-upload>
  174. </view>
  175. </view>
  176. </view>
  177. <view class="btn">
  178. <view class="submit" @click="submit">
  179. {{ productId ? '确认编辑' : '确认新增' }}
  180. </view>
  181. </view>
  182. <rangTime title="选中有效时间" ref="rangTime" :mode="mode" @onSubmit="onEndTimeChange" />
  183. </view>
  184. </template>
  185. <script>
  186. import rangTime from '@/components/dengrq-datetime-picker/dateSelector/index.vue'
  187. import refund from '@/components/product/refund.vue'
  188. import { USER_INFO } from "@/common/util/constants"
  189. import configService from '../../common/service/config.service'
  190. export default {
  191. components: {
  192. rangTime,
  193. refund
  194. },
  195. data() {
  196. return {
  197. action: configService.apiUrl + '/sys/common/upload', //图片上传地址
  198. xqImage: [], //详情图回显
  199. headPhotoImg: [],
  200. showApplication: false,
  201. columns1: [{
  202. name: '全店通用',
  203. value: 1
  204. }, {
  205. name: '本店可用商品',
  206. value: 2
  207. }, {
  208. name: '本店不可用商品',
  209. value: 3
  210. }],
  211. mode: 1,
  212. form: {
  213. couponWay: null,
  214. // conditionsUse: null,
  215. contentInfo: '',
  216. couponRange: '',
  217. couponRangeInfo: [],
  218. couponPhoto: [],
  219. type: '2',
  220. contentConditions: ''
  221. },
  222. showRule: '', //显示退款规则文字
  223. action: configService.apiUrl + '/sys/common/upload', //图片上传地址
  224. fileList: [],
  225. selectedTime: null,
  226. isSelectDate: false,
  227. showDate: '去设置',
  228. productId: '',
  229. inputValue:''
  230. }
  231. },
  232. methods: {
  233. //上传详情图
  234. detailsSuccess(res, index, lists) {
  235. this.xqImage = lists
  236. },
  237. detailsRemove(index, lists) {
  238. this.xqImage = lists
  239. },
  240. groupChange(e) {
  241. // e=='1'?this.couponWayInfo2='':this.couponWayInfo1=''
  242. this.form.couponWay = e == '1' ? '1' : '2'
  243. },
  244. conditionsChange(e) {
  245. // this.form.couponWayInfo=''
  246. this.form.conditionsUse = e == '1' ? '1' : '2'
  247. },
  248. ViewImage(e) {
  249. uni.previewImage({
  250. urls: this.headPhotoImg,
  251. current: e.currentTarget.dataset.url
  252. });
  253. },
  254. DelImg(e) {
  255. uni.showModal({
  256. title: '提示',
  257. content: '确定要删除?',
  258. cancelText: '取消',
  259. confirmText: '确定',
  260. success: res => {
  261. if (res.confirm) {
  262. this.headPhotoImg.splice(e.currentTarget.dataset.index, 1)
  263. this.form.couponPhoto.splice(e.currentTarget.dataset.index, 1)
  264. }
  265. }
  266. })
  267. },
  268. ChooseImage() {
  269. uni.chooseImage({
  270. // count: 4, //默认9
  271. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  272. sourceType: ['album'], //从相册选择
  273. success: (res) => {
  274. if (res) {
  275. // this[type + 'Img'] = chooseImageRes.tempFilePaths[0];
  276. uni.uploadFile({
  277. url: configService.apiUrl + '/sys/common/upload',
  278. filePath: res.tempFilePaths[0],
  279. name: "file",
  280. formData: {
  281. 'biz': 'temp',
  282. },
  283. success: (files) => {
  284. let data = JSON.parse(files.data);
  285. if (data.success) {
  286. if (this.headPhotoImg.length != 0) {
  287. this.headPhotoImg = this.headPhotoImg.concat(res.tempFilePaths)
  288. this.form.couponPhoto.push(configService.apiUrl + '/' + data.message)
  289. } else {
  290. this.headPhotoImg = res.tempFilePaths
  291. this.form.couponPhoto = [configService.apiUrl + '/' + data.message]
  292. }
  293. // this.form.headPhoto =this.form.headPhoto+'/'+ data.message
  294. }
  295. }
  296. })
  297. }
  298. }
  299. });
  300. },
  301. confirm1(e) {
  302. this.form.couponRange = e.detail.value + 1
  303. },
  304. //返回
  305. back() {
  306. uni.navigateTo({
  307. url: '/pages/product/index'
  308. })
  309. },
  310. // 处理 confirm 事件,接收子组件传递的时间段数据
  311. handleConfirm(time) {
  312. this.selectedTime = time; // 保存时间段数据
  313. this.isSelectDate = false
  314. },
  315. //隐藏弹窗
  316. closeSelectDate() {
  317. this.isSelectDate = false
  318. },
  319. //跳转至可用时间
  320. setUsable() {
  321. uni.navigateTo({
  322. url: '/pages/product/usable'
  323. })
  324. },
  325. selectDate() {
  326. // this.isSelectDate = true
  327. this.$refs.rangTime.open()
  328. },
  329. onEndTimeChange(val) {
  330. this.form.beginTime = val.startDate
  331. this.form.endTime = val.endDate
  332. this.showDate = val.startDate + '-' + val.endDate
  333. this.$forceUpdate(); // 强制刷新视图
  334. },
  335. geActivity() {
  336. uni.navigateTo({
  337. url: '/pages/coupon/activity?params=' + encodeURIComponent(JSON.stringify(this.form.couponRangeInfo))
  338. })
  339. },
  340. handleInput(val) {
  341. this.$nextTick(()=>{
  342. // 如果输入为空,重置所有值
  343. if (!val) {
  344. this.inputValue = ''
  345. this.form.contentInfo = ''
  346. return
  347. }
  348. // 获取当前输入值
  349. let value = val.toString()
  350. // 验证格式:只允许1-9.9,且最多一位小数
  351. const regex = /^([1-9](\.\d)?|9\.9)$/
  352. // 处理正在输入小数点的情况
  353. if (value === '.' || (value.endsWith('.') && value.length === 2)) {
  354. // 允许输入小数点,但限制只能在1-9之前添加
  355. const numBeforeDot = parseInt(value)
  356. if (numBeforeDot >= 1 && numBeforeDot <= 9) {
  357. this.inputValue = value
  358. this.form.contentInfo = value
  359. uni.showToast({
  360. title: '只能保留一位小数!',
  361. icon: 'none'
  362. })
  363. return
  364. }
  365. }
  366. // 如果不符合格式要求,保持原值
  367. if (!regex.test(value)) {
  368. // 检查是否超出范围
  369. const num = parseFloat(value)
  370. if (num > 9.9) {
  371. uni.showToast({
  372. title: '最大输入值为9.9',
  373. icon: 'none'
  374. })
  375. } else if (num < 1) {
  376. uni.showToast({
  377. title: '最小输入值为1',
  378. icon: 'none'
  379. })
  380. }
  381. // 恢复到上一个有效值
  382. value = this.inputValue || ''
  383. }
  384. // 更新显示值和表单值
  385. this.inputValue = value
  386. this.form.contentInfo = this.inputValue
  387. })
  388. },
  389. //提交审核
  390. submit() {
  391. if (!this.form.couponName) {
  392. uni.showToast({
  393. title: '请输入折扣券名称',
  394. icon: 'none'
  395. });
  396. return
  397. }
  398. else if (this.form.contentConditions == '') {
  399. uni.showToast({
  400. title: '请输入金额',
  401. icon: 'none'
  402. });
  403. return
  404. } else if (!this.form.contentInfo) {
  405. uni.showToast({
  406. title: '请输入折扣',
  407. icon: 'none'
  408. });
  409. return
  410. } else if (!this.form.number) {
  411. uni.showToast({
  412. title: '请输入库存',
  413. icon: 'none'
  414. });
  415. return
  416. } else if (this.form.number == '0' || this.form.number == 0) {
  417. uni.showToast({
  418. title: '库存不能为0',
  419. icon: 'none'
  420. });
  421. return
  422. } else if (!this.form.beginTime && !this.form.endTime) {
  423. uni.showToast({
  424. title: '请选择有效时间',
  425. icon: 'none'
  426. });
  427. return
  428. } else if (this.form.couponWay == null) {
  429. uni.showToast({
  430. title: '请选择领取方式',
  431. icon: 'none'
  432. });
  433. return
  434. } else if (this.form.couponRange == '') {
  435. uni.showToast({
  436. title: '请选择适用范围',
  437. icon: 'none'
  438. });
  439. return
  440. } else if ((this.form.couponRange == '3' || this.form.couponRange == '2') && this.form.couponRangeInfo.length == 0) {
  441. uni.showToast({
  442. title: '请选择适用商品范围',
  443. icon: 'none'
  444. });
  445. return
  446. }
  447. else {
  448. let temp = []
  449. console.log(this.xqImage)
  450. if ( this.xqImage.length > 0) {
  451. this.xqImage.forEach((item => {
  452. temp.push( configService.apiUrl +'/'+item.response.message)
  453. }))
  454. }
  455. let data = {
  456. repeatClaim: this.form.repeatClaim ? '1' : '2',
  457. couponRangeInfo: this.form.couponRangeInfo.length > 0 ? this.form.couponRangeInfo.join(',') : null,
  458. // couponPhoto: this.form.couponPhoto.length > 0 ? this.form.couponPhoto.join(',') : null
  459. couponPhoto:temp.length > 0 ? temp.join(',') : null
  460. }
  461. if (this.productId == '') {
  462. this.$http.post("/merchant/localCouponInfo/add", { ...this.form, ...data, merchantId: uni.getStorageSync(USER_INFO).merchantId }).then(res => {
  463. if (res.data.code == 200) {
  464. uni.showToast({
  465. title: '添加成功',
  466. icon: 'none'
  467. });
  468. this.$store.state.shopSelectedIds=[]
  469. uni.navigateTo({
  470. url: '/pages/coupon/coupon'
  471. })
  472. }
  473. else {
  474. this.$tip.error(res.data.message);
  475. }
  476. })
  477. } else {
  478. this.form.productId = this.productId
  479. this.$http.post("/merchant/localCouponInfo/edit", { ...this.form, ...data }).then(res => {
  480. if (res.data.code == 200) {
  481. uni.showToast({
  482. title: '编辑成功',
  483. icon: 'none'
  484. });
  485. this.$store.state.shopSelectedIds=[]
  486. uni.navigateTo({
  487. url: '/pages/coupon/coupon'
  488. })
  489. }
  490. else {
  491. this.$tip.error(res.data.message);
  492. }
  493. })
  494. }
  495. }
  496. },
  497. //回显数据
  498. getForm() {
  499. this.$http.get("/merchant/localCouponInfo/queryById?id=" + this.productId).then(res => {
  500. if (res.data.success) {
  501. res.data.result.couponRangeInfo = res.data.result.couponRangeInfo ? res.data.result.couponRangeInfo.split(',').filter(id => id) : []
  502. // res.data.result.couponPhoto = res.data.result.couponPhoto!== null && res.data.result.couponPhoto.length>0? res.data.result.couponPhoto.split(',').filter(id => id) : []
  503. if(res.data.result.couponPhoto){
  504. let xqtemp = []
  505. xqtemp = res.data.result.couponPhoto.split(',')
  506. xqtemp.map(item => {
  507. this.xqImage.push({
  508. url: item
  509. })
  510. })
  511. }
  512. res.data.result.couponWay = res.data.result.couponWay ? res.data.result.couponWay + '' : ''
  513. res.data.result.repeatClaim = res.data.result.repeatClaim && res.data.result.repeatClaim == '1' ? true : false
  514. this.headPhotoImg=res.data.result.couponPhoto
  515. this.showDate = res.data.result.beginTime + '-' + res.data.result.endTime
  516. this.form = res.data.result
  517. }
  518. })
  519. }
  520. },
  521. onLoad(options) {
  522. if (options.id) {
  523. this.productId = options.id
  524. }
  525. // if (options && options.params) {
  526. // let params = JSON.parse(decodeURIComponent(options.params))
  527. //
  528. // }
  529. },
  530. onShow() {
  531. if((this.form.couponRange == '2' || this.form.couponRange == '3') &&this.$store.state.shopSelectedIds){
  532. this.form.couponRangeInfo = this.$store.state.shopSelectedIds
  533. }
  534. else{
  535. this.form.couponRangeInfo =[]
  536. }
  537. if(this.productId){
  538. this.getForm()
  539. }
  540. }
  541. }
  542. </script>
  543. <style lang="scss" scoped>
  544. .u-radio {
  545. flex: 1;
  546. /* 让每个radio项都尽可能填充可用空间 */
  547. }
  548. .creat {
  549. width: 100vw;
  550. height: 100vh;
  551. background: #F7F8FC;
  552. display: flex;
  553. flex-direction: column;
  554. justify-content: space-between;
  555. /*#ifdef APP-PLUS*/
  556. .top {
  557. width: 100%;
  558. height: var(--status-bar-height);
  559. background-color: #fff;
  560. }
  561. /*#endif*/
  562. .head {
  563. width: 100%;
  564. height: 112rpx;
  565. padding: 32rpx 24rpx;
  566. display: flex;
  567. align-items: center;
  568. background-color: #fff;
  569. position: relative;
  570. .cuIcon-back {
  571. font-size: 40rpx;
  572. margin-right: 40rpx;
  573. }
  574. .case {
  575. font-size: 36rpx;
  576. font-weight: 600;
  577. position: absolute;
  578. top: 50%;
  579. left: 50%;
  580. transform: translate(-50%, -50%);
  581. }
  582. .step {
  583. position: absolute;
  584. right: 20rpx;
  585. }
  586. }
  587. .content {
  588. width: 100%;
  589. flex: 1;
  590. padding: 24rpx;
  591. overflow-y: auto;
  592. .titl {
  593. font-weight: 500;
  594. font-size: 32rpx;
  595. color: #333333;
  596. width: 100%;
  597. // height: 60rpx;
  598. font-weight: 600;
  599. margin-bottom: 22rpx;
  600. }
  601. .form {
  602. background-color: #fff;
  603. padding: 16rpx;
  604. border-radius: 16rpx;
  605. .item {
  606. width: 100%;
  607. height: 58rpx;
  608. border-bottom: 1px solid #EEEEEE;
  609. display: flex;
  610. // align-items: center;
  611. padding-bottom: 16rpx;
  612. margin-bottom: 16rpx;
  613. .label {
  614. margin-right: 20rpx;
  615. font-weight: 600;
  616. font-size: 28rpx;
  617. min-width: 126rpx;
  618. span {
  619. color: red;
  620. }
  621. }
  622. .picker {
  623. flex: 1;
  624. display: flex;
  625. align-items: center;
  626. justify-content: space-between;
  627. font-size: 28rpx;
  628. color: #999999;
  629. ::v-deep.u-input__input {
  630. text-align: right;
  631. }
  632. }
  633. .set {
  634. display: flex;
  635. justify-content: flex-end;
  636. ::v-deep.u-input {
  637. text-align: right !important;
  638. }
  639. }
  640. }
  641. .upload {
  642. display: block;
  643. height: auto;
  644. .tips {
  645. font-size: 20rpx;
  646. color: #999999;
  647. margin-bottom: 16rpx;
  648. margin-top: 10rpx;
  649. }
  650. }
  651. .textarea {
  652. width: 100%;
  653. min-height: 196rpx;
  654. background: #F7F8FC;
  655. border-radius: 4rpx;
  656. padding: 12rpx 16rpx;
  657. font-size: 26rpx;
  658. margin-top: 12rpx;
  659. }
  660. .num {
  661. width: 100%;
  662. text-align: right;
  663. font-size: 24rpx;
  664. color: #999999;
  665. margin-top: 6rpx;
  666. }
  667. }
  668. }
  669. .btn {
  670. width: 100%;
  671. height: 112rpx;
  672. background-color: #fff;
  673. display: flex;
  674. justify-content: center;
  675. align-items: center;
  676. padding: 16rpx 24rpx;
  677. .submit {
  678. width: 100%;
  679. height: 76rpx;
  680. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  681. border-radius: 75rpx;
  682. display: flex;
  683. align-items: center;
  684. justify-content: center;
  685. font-size: 28rpx;
  686. color: #FFFFFF;
  687. }
  688. }
  689. .popup {
  690. width: 100vw;
  691. height: 100vh;
  692. position: fixed;
  693. top: 0;
  694. left: 0;
  695. background: rgba(0, 0, 0, 0.4);
  696. display: flex;
  697. align-items: flex-end;
  698. z-index: 99;
  699. .model {
  700. width: 100%;
  701. background-color: #fff;
  702. border-radius: 20rpx 20rpx 0rpx 0rpx;
  703. padding: 0rpx 24rpx;
  704. padding-bottom: 20rpx;
  705. .title {
  706. width: 100%;
  707. height: 86rpx;
  708. display: flex;
  709. align-items: center;
  710. justify-content: center;
  711. border-bottom: 1px solid #EEEEEE;
  712. position: relative;
  713. image {
  714. width: 40rpx;
  715. height: 40rpx;
  716. position: absolute;
  717. right: 0px;
  718. }
  719. }
  720. .tree {
  721. display: flex;
  722. height: 546rpx;
  723. .left {
  724. overflow-y: auto;
  725. .item {
  726. width: 224rpx;
  727. height: 78rpx;
  728. padding: 20rpx;
  729. font-size: 26rpx;
  730. }
  731. .active {
  732. background: rgba(68, 154, 255, 0.1);
  733. color: #2983EC;
  734. }
  735. }
  736. .border {
  737. border-left: 1px solid #eeeeee;
  738. border-right: 1px solid #eeeeee;
  739. }
  740. }
  741. .sub {
  742. display: flex;
  743. justify-content: space-between;
  744. margin-top: 16rpx;
  745. border-top: 1px solid #eeeeee;
  746. padding-top: 16rpx;
  747. .submit {
  748. width: 672rpx;
  749. height: 76rpx;
  750. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  751. border-radius: 53rpx;
  752. display: flex;
  753. align-items: center;
  754. justify-content: center;
  755. font-size: 28rpx;
  756. color: #FFFFFF;
  757. }
  758. }
  759. }
  760. }
  761. }
  762. ::v-deep.u-upload__button {
  763. width: 250rpx !important;
  764. height: 250rpx !important;
  765. }
  766. .radio-style {
  767. margin-bottom: 15rpx;
  768. // border-bottom: 1px solid #EEEEEE;
  769. ::v-deep.uni-data-checklist .checklist-group .checklist-box.is--default.is-checked .checklist-text {
  770. color: #333 !important
  771. }
  772. ::v-deep.uni-data-checklist .checklist-group {
  773. flex-direction: column;
  774. .checklist-box {
  775. flex-direction: row-reverse;
  776. justify-content: space-between;
  777. .checklist-content .checklist-text {
  778. margin-left: 0;
  779. font-weight: 600;
  780. font-size: 28rpx;
  781. }
  782. }
  783. }
  784. }
  785. .product-item {
  786. display: flex;
  787. justify-content: space-between;
  788. margin-bottom: 20rpx;
  789. // border-bottom: 1px solid #EEEEEE;
  790. input {
  791. width: 120rpx;
  792. border-bottom: 1px solid #ccc;
  793. margin: 0 10rpx;
  794. font-size: 28rpx;
  795. text-align: center;
  796. }
  797. }
  798. .radio-container {
  799. width: 34rpx;
  800. height: 34rpx;
  801. border-radius: 50%;
  802. border: 1px solid #B4B4B4;
  803. }
  804. .radio-img {
  805. width: 34rpx;
  806. height: 34rpx;
  807. }
  808. .section-title {
  809. margin-right: 20rpx;
  810. font-weight: 600;
  811. font-size: 28rpx;
  812. min-width: 126rpx;
  813. }
  814. .section-limit {
  815. background: #F6F6F6;
  816. padding: 5rpx 12rpx;
  817. font-size: 24rpx;
  818. color: #666666;
  819. margin-left: 16rpx;
  820. }
  821. .section-full {
  822. display: flex;
  823. margin-top: 18rpx;
  824. border-bottom: 1px solid #EEEEEE;
  825. .u-input {
  826. height: 64rpx;
  827. background: #F7F8FC;
  828. margin-right: 18rpx;
  829. font-size: 28rpx;
  830. margin: 18rpx 0;
  831. margin-right: 18rpx;
  832. }
  833. ::v-deep.u-input__input {
  834. padding: 10rpx 20rpx;
  835. }
  836. }
  837. </style>