creatDiscount.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938
  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. goBackToList(listTab = 1) {
  234. this.$store.state.shopSelectedIds = []
  235. setTimeout(() => {
  236. const pages = getCurrentPages()
  237. if (pages.length > 1) {
  238. uni.navigateBack()
  239. } else {
  240. uni.redirectTo({
  241. url: `/pages/coupon/coupon?tab=${listTab}`
  242. })
  243. }
  244. }, 500)
  245. },
  246. //上传详情图
  247. // detailsSuccess(res, index, lists) {
  248. // this.xqImage = lists
  249. // },
  250. // detailsRemove(index, lists) {
  251. // this.xqImage = lists
  252. // },
  253. groupChange(e) {
  254. // e=='1'?this.couponWayInfo2='':this.couponWayInfo1=''
  255. this.form.couponWay = e == '1' ? '1' : '2'
  256. },
  257. conditionsChange(e) {
  258. // this.form.couponWayInfo=''
  259. this.form.conditionsUse = e == '1' ? '1' : '2'
  260. },
  261. ViewImage(e) {
  262. uni.previewImage({
  263. urls: this.headPhotoImg,
  264. current: e.currentTarget.dataset.url
  265. });
  266. },
  267. DelImg(e) {
  268. uni.showModal({
  269. title: '提示',
  270. content: '确定要删除?',
  271. cancelText: '取消',
  272. confirmText: '确定',
  273. success: res => {
  274. if (res.confirm) {
  275. this.headPhotoImg.splice(e.currentTarget.dataset.index, 1)
  276. this.form.couponPhoto.splice(e.currentTarget.dataset.index, 1)
  277. }
  278. }
  279. })
  280. },
  281. ChooseImage() {
  282. uni.chooseImage({
  283. // count: 4, //默认9
  284. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  285. sourceType: ['album'], //从相册选择
  286. success: (res) => {
  287. if (res) {
  288. // this[type + 'Img'] = chooseImageRes.tempFilePaths[0];
  289. uni.uploadFile({
  290. url: configService.apiUrl + '/sys/common/upload',
  291. filePath: res.tempFilePaths[0],
  292. name: "file",
  293. formData: {
  294. 'biz': 'temp',
  295. },
  296. success: (files) => {
  297. let data = JSON.parse(files.data);
  298. if (data.success) {
  299. if (this.headPhotoImg.length != 0) {
  300. this.headPhotoImg = this.headPhotoImg.concat(res.tempFilePaths)
  301. this.form.couponPhoto.push(configService.apiUrl + '/' + data.message)
  302. } else {
  303. this.headPhotoImg = res.tempFilePaths
  304. this.form.couponPhoto = [configService.apiUrl + '/' + data.message]
  305. }
  306. // this.form.headPhoto =this.form.headPhoto+'/'+ data.message
  307. }
  308. }
  309. })
  310. }
  311. }
  312. });
  313. },
  314. confirm1(e) {
  315. this.form.couponRange = e.detail.value + 1
  316. },
  317. //返回
  318. back() {
  319. uni.navigateTo({
  320. url: '/pages/product/index'
  321. })
  322. },
  323. // 处理 confirm 事件,接收子组件传递的时间段数据
  324. handleConfirm(time) {
  325. this.selectedTime = time; // 保存时间段数据
  326. this.isSelectDate = false
  327. },
  328. //隐藏弹窗
  329. closeSelectDate() {
  330. this.isSelectDate = false
  331. },
  332. //跳转至可用时间
  333. setUsable() {
  334. uni.navigateTo({
  335. url: '/pages/product/usable'
  336. })
  337. },
  338. selectDate() {
  339. // this.isSelectDate = true
  340. this.$refs.rangTime.open()
  341. },
  342. onEndTimeChange(val) {
  343. this.form.beginTime = val.startDate
  344. this.form.endTime = val.endDate
  345. this.showDate = val.startDate + '-' + val.endDate
  346. this.$forceUpdate(); // 强制刷新视图
  347. },
  348. geActivity() {
  349. uni.navigateTo({
  350. url: '/pages/coupon/activity?params=' + encodeURIComponent(JSON.stringify(this.form.couponRangeInfo))
  351. })
  352. },
  353. handleInput(val) {
  354. this.$nextTick(()=>{
  355. // 如果输入为空,重置所有值
  356. if (!val) {
  357. this.inputValue = ''
  358. this.form.contentInfo = ''
  359. return
  360. }
  361. // 获取当前输入值
  362. let value = val.toString()
  363. // 验证格式:只允许1-9.9,且最多一位小数
  364. const regex = /^([1-9](\.\d)?|9\.9)$/
  365. // 处理正在输入小数点的情况
  366. if (value === '.' || (value.endsWith('.') && value.length === 2)) {
  367. // 允许输入小数点,但限制只能在1-9之前添加
  368. const numBeforeDot = parseInt(value)
  369. if (numBeforeDot >= 1 && numBeforeDot <= 9) {
  370. this.inputValue = value
  371. this.form.contentInfo = value
  372. uni.showToast({
  373. title: '只能保留一位小数!',
  374. icon: 'none'
  375. })
  376. return
  377. }
  378. }
  379. // 如果不符合格式要求,保持原值
  380. if (!regex.test(value)) {
  381. // 检查是否超出范围
  382. const num = parseFloat(value)
  383. if (num > 9.9) {
  384. uni.showToast({
  385. title: '最大输入值为9.9',
  386. icon: 'none'
  387. })
  388. } else if (num < 1) {
  389. uni.showToast({
  390. title: '最小输入值为1',
  391. icon: 'none'
  392. })
  393. }
  394. // 恢复到上一个有效值
  395. value = this.inputValue || ''
  396. }
  397. // 更新显示值和表单值
  398. this.inputValue = value
  399. this.form.contentInfo = this.inputValue
  400. })
  401. },
  402. //提交审核
  403. submit() {
  404. if (!this.form.couponName) {
  405. uni.showToast({
  406. title: '请输入折扣券名称',
  407. icon: 'none'
  408. });
  409. return
  410. }
  411. else if (this.form.contentConditions == '') {
  412. uni.showToast({
  413. title: '请输入金额',
  414. icon: 'none'
  415. });
  416. return
  417. } else if (!this.form.contentInfo) {
  418. uni.showToast({
  419. title: '请输入折扣',
  420. icon: 'none'
  421. });
  422. return
  423. } else if (!this.form.number) {
  424. uni.showToast({
  425. title: '请输入库存',
  426. icon: 'none'
  427. });
  428. return
  429. } else if (this.form.number == '0' || this.form.number == 0) {
  430. uni.showToast({
  431. title: '库存不能为0',
  432. icon: 'none'
  433. });
  434. return
  435. } else if (!this.form.beginTime && !this.form.endTime) {
  436. uni.showToast({
  437. title: '请选择有效时间',
  438. icon: 'none'
  439. });
  440. return
  441. } else if (this.form.couponWay == null) {
  442. uni.showToast({
  443. title: '请选择领取方式',
  444. icon: 'none'
  445. });
  446. return
  447. } else if (this.form.couponRange == '') {
  448. uni.showToast({
  449. title: '请选择适用范围',
  450. icon: 'none'
  451. });
  452. return
  453. } else if ((this.form.couponRange == '3' || this.form.couponRange == '2') && this.form.couponRangeInfo.length == 0) {
  454. uni.showToast({
  455. title: '请选择适用商品范围',
  456. icon: 'none'
  457. });
  458. return
  459. }
  460. else {
  461. // let temp = []
  462. // if (this.xqImage.length > 0) {
  463. // this.xqImage.forEach((item) => {
  464. // if (item.response && item.response.message) {
  465. // temp.push(configService.apiUrl + '/' + item.response.message)
  466. // } else if (item.url) {
  467. // temp.push(item.url)
  468. // }
  469. // })
  470. // }
  471. let data = {
  472. repeatClaim: this.form.repeatClaim ? '1' : '2',
  473. couponRangeInfo: this.form.couponRangeInfo.length > 0 ? this.form.couponRangeInfo.join(',') : null,
  474. // couponPhoto: this.form.couponPhoto.length > 0 ? this.form.couponPhoto.join(',') : null
  475. // couponPhoto:temp.length > 0 ? temp.join(',') : null
  476. }
  477. if (this.productId == '') {
  478. this.$http.post("/merchant/localCouponInfo/add", { ...this.form, ...data, merchantId: uni.getStorageSync(USER_INFO).merchantId }).then(res => {
  479. if (res.data.code == 200) {
  480. uni.showToast({
  481. title: '添加成功',
  482. icon: 'none'
  483. });
  484. this.goBackToList(1)
  485. }
  486. else {
  487. uni.showToast({
  488. title: res.data.message,
  489. icon: 'none'
  490. });
  491. }
  492. })
  493. } else {
  494. this.form.productId = this.productId
  495. this.$http.post("/merchant/localCouponInfo/edit", { ...this.form, ...data }).then(res => {
  496. if (res.data.code == 200) {
  497. uni.showToast({
  498. title: '编辑成功',
  499. icon: 'none'
  500. });
  501. this.goBackToList(1)
  502. }
  503. else {
  504. uni.showToast({
  505. title: res.data.message,
  506. icon: 'none'
  507. });
  508. }
  509. })
  510. }
  511. }
  512. },
  513. //回显数据
  514. getForm() {
  515. this.$http.get("/merchant/localCouponInfo/queryById?id=" + this.productId).then(res => {
  516. if (res.data.success) {
  517. res.data.result.couponRangeInfo = res.data.result.couponRangeInfo ? res.data.result.couponRangeInfo.split(',').filter(id => id) : []
  518. // res.data.result.couponPhoto = res.data.result.couponPhoto!== null && res.data.result.couponPhoto.length>0? res.data.result.couponPhoto.split(',').filter(id => id) : []
  519. // if(res.data.result.couponPhoto){
  520. // let xqtemp = []
  521. // xqtemp = res.data.result.couponPhoto.split(',')
  522. // xqtemp.map(item => {
  523. // this.xqImage.push({
  524. // url: item
  525. // })
  526. // })
  527. // }
  528. res.data.result.couponWay = res.data.result.couponWay ? res.data.result.couponWay + '' : ''
  529. res.data.result.repeatClaim = res.data.result.repeatClaim && res.data.result.repeatClaim == '1' ? true : false
  530. // this.headPhotoImg=res.data.result.couponPhoto
  531. this.showDate = res.data.result.beginTime + '-' + res.data.result.endTime
  532. this.form = res.data.result
  533. }
  534. })
  535. }
  536. },
  537. onLoad(options) {
  538. if (options.id) {
  539. this.productId = options.id
  540. }
  541. // if (options && options.params) {
  542. // let params = JSON.parse(decodeURIComponent(options.params))
  543. //
  544. // }
  545. },
  546. onShow() {
  547. if((this.form.couponRange == '2' || this.form.couponRange == '3') &&this.$store.state.shopSelectedIds){
  548. this.form.couponRangeInfo = this.$store.state.shopSelectedIds
  549. }
  550. else{
  551. this.form.couponRangeInfo =[]
  552. }
  553. if(this.productId){
  554. this.getForm()
  555. }
  556. }
  557. }
  558. </script>
  559. <style lang="scss" scoped>
  560. .u-radio {
  561. flex: 1;
  562. /* 让每个radio项都尽可能填充可用空间 */
  563. }
  564. .creat {
  565. width: 100vw;
  566. height: 100vh;
  567. background: #F7F8FC;
  568. display: flex;
  569. flex-direction: column;
  570. justify-content: space-between;
  571. /*#ifdef APP-PLUS*/
  572. .top {
  573. width: 100%;
  574. height: var(--status-bar-height);
  575. background-color: #fff;
  576. }
  577. /*#endif*/
  578. .head {
  579. width: 100%;
  580. height: 112rpx;
  581. padding: 32rpx 24rpx;
  582. display: flex;
  583. align-items: center;
  584. background-color: #fff;
  585. position: relative;
  586. .cuIcon-back {
  587. font-size: 40rpx;
  588. margin-right: 40rpx;
  589. }
  590. .case {
  591. font-size: 36rpx;
  592. font-weight: 600;
  593. position: absolute;
  594. top: 50%;
  595. left: 50%;
  596. transform: translate(-50%, -50%);
  597. }
  598. .step {
  599. position: absolute;
  600. right: 20rpx;
  601. }
  602. }
  603. .content {
  604. width: 100%;
  605. flex: 1;
  606. padding: 24rpx;
  607. overflow-y: auto;
  608. .titl {
  609. font-weight: 500;
  610. font-size: 32rpx;
  611. color: #333333;
  612. width: 100%;
  613. // height: 60rpx;
  614. font-weight: 600;
  615. margin-bottom: 22rpx;
  616. }
  617. .form {
  618. background-color: #fff;
  619. padding: 16rpx;
  620. border-radius: 16rpx;
  621. .item {
  622. width: 100%;
  623. height: 58rpx;
  624. border-bottom: 1px solid #EEEEEE;
  625. display: flex;
  626. // align-items: center;
  627. padding-bottom: 16rpx;
  628. margin-bottom: 16rpx;
  629. .label {
  630. margin-right: 20rpx;
  631. font-weight: 600;
  632. font-size: 28rpx;
  633. min-width: 126rpx;
  634. span {
  635. color: red;
  636. }
  637. }
  638. .picker {
  639. flex: 1;
  640. display: flex;
  641. align-items: center;
  642. justify-content: space-between;
  643. font-size: 28rpx;
  644. color: #999999;
  645. ::v-deep.u-input__input {
  646. text-align: right;
  647. }
  648. }
  649. .set {
  650. display: flex;
  651. justify-content: flex-end;
  652. ::v-deep.u-input {
  653. text-align: right !important;
  654. }
  655. }
  656. }
  657. .upload {
  658. display: block;
  659. height: auto;
  660. .tips {
  661. font-size: 20rpx;
  662. color: #999999;
  663. margin-bottom: 16rpx;
  664. margin-top: 10rpx;
  665. }
  666. }
  667. .textarea {
  668. width: 100%;
  669. min-height: 196rpx;
  670. background: #F7F8FC;
  671. border-radius: 4rpx;
  672. padding: 12rpx 16rpx;
  673. font-size: 26rpx;
  674. margin-top: 12rpx;
  675. }
  676. .num {
  677. width: 100%;
  678. text-align: right;
  679. font-size: 24rpx;
  680. color: #999999;
  681. margin-top: 6rpx;
  682. }
  683. }
  684. }
  685. .btn {
  686. width: 100%;
  687. height: 112rpx;
  688. background-color: #fff;
  689. display: flex;
  690. justify-content: center;
  691. align-items: center;
  692. padding: 16rpx 24rpx;
  693. .submit {
  694. width: 100%;
  695. height: 76rpx;
  696. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  697. border-radius: 75rpx;
  698. display: flex;
  699. align-items: center;
  700. justify-content: center;
  701. font-size: 28rpx;
  702. color: #FFFFFF;
  703. }
  704. }
  705. .popup {
  706. width: 100vw;
  707. height: 100vh;
  708. position: fixed;
  709. top: 0;
  710. left: 0;
  711. background: rgba(0, 0, 0, 0.4);
  712. display: flex;
  713. align-items: flex-end;
  714. z-index: 99;
  715. .model {
  716. width: 100%;
  717. background-color: #fff;
  718. border-radius: 20rpx 20rpx 0rpx 0rpx;
  719. padding: 0rpx 24rpx;
  720. padding-bottom: 20rpx;
  721. .title {
  722. width: 100%;
  723. height: 86rpx;
  724. display: flex;
  725. align-items: center;
  726. justify-content: center;
  727. border-bottom: 1px solid #EEEEEE;
  728. position: relative;
  729. image {
  730. width: 40rpx;
  731. height: 40rpx;
  732. position: absolute;
  733. right: 0px;
  734. }
  735. }
  736. .tree {
  737. display: flex;
  738. height: 546rpx;
  739. .left {
  740. overflow-y: auto;
  741. .item {
  742. width: 224rpx;
  743. height: 78rpx;
  744. padding: 20rpx;
  745. font-size: 26rpx;
  746. }
  747. .active {
  748. background: rgba(68, 154, 255, 0.1);
  749. color: #2983EC;
  750. }
  751. }
  752. .border {
  753. border-left: 1px solid #eeeeee;
  754. border-right: 1px solid #eeeeee;
  755. }
  756. }
  757. .sub {
  758. display: flex;
  759. justify-content: space-between;
  760. margin-top: 16rpx;
  761. border-top: 1px solid #eeeeee;
  762. padding-top: 16rpx;
  763. .submit {
  764. width: 672rpx;
  765. height: 76rpx;
  766. background: linear-gradient(90deg, #77B6FF 0%, #449AFF 100%);
  767. border-radius: 53rpx;
  768. display: flex;
  769. align-items: center;
  770. justify-content: center;
  771. font-size: 28rpx;
  772. color: #FFFFFF;
  773. }
  774. }
  775. }
  776. }
  777. }
  778. ::v-deep.u-upload__button {
  779. width: 250rpx !important;
  780. height: 250rpx !important;
  781. }
  782. .radio-style {
  783. margin-bottom: 15rpx;
  784. // border-bottom: 1px solid #EEEEEE;
  785. ::v-deep.uni-data-checklist .checklist-group .checklist-box.is--default.is-checked .checklist-text {
  786. color: #333 !important
  787. }
  788. ::v-deep.uni-data-checklist .checklist-group {
  789. flex-direction: column;
  790. .checklist-box {
  791. flex-direction: row-reverse;
  792. justify-content: space-between;
  793. .checklist-content .checklist-text {
  794. margin-left: 0;
  795. font-weight: 600;
  796. font-size: 28rpx;
  797. }
  798. }
  799. }
  800. }
  801. .product-item {
  802. display: flex;
  803. justify-content: space-between;
  804. margin-bottom: 20rpx;
  805. // border-bottom: 1px solid #EEEEEE;
  806. input {
  807. width: 120rpx;
  808. border-bottom: 1px solid #ccc;
  809. margin: 0 10rpx;
  810. font-size: 28rpx;
  811. text-align: center;
  812. }
  813. }
  814. .radio-container {
  815. width: 34rpx;
  816. height: 34rpx;
  817. border-radius: 50%;
  818. border: 1px solid #B4B4B4;
  819. }
  820. .radio-img {
  821. width: 34rpx;
  822. height: 34rpx;
  823. }
  824. .section-title {
  825. margin-right: 20rpx;
  826. font-weight: 600;
  827. font-size: 28rpx;
  828. min-width: 126rpx;
  829. }
  830. .section-limit {
  831. background: #F6F6F6;
  832. padding: 5rpx 12rpx;
  833. font-size: 24rpx;
  834. color: #666666;
  835. margin-left: 16rpx;
  836. }
  837. .section-full {
  838. display: flex;
  839. margin-top: 18rpx;
  840. border-bottom: 1px solid #EEEEEE;
  841. .u-input {
  842. height: 64rpx;
  843. background: #F7F8FC;
  844. margin-right: 18rpx;
  845. font-size: 28rpx;
  846. margin: 18rpx 0;
  847. margin-right: 18rpx;
  848. }
  849. ::v-deep.u-input__input {
  850. padding: 10rpx 20rpx;
  851. }
  852. }
  853. </style>