creatReduction.vue 23 KB

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