shopdetail.vue 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495
  1. <template>
  2. <view class="shopdetail">
  3. <view class="shopdetail-content">
  4. <!-- 商品来源 -->
  5. <view class="goodsfrom">
  6. <view class="title">商品来源</view>
  7. <view class="radio-warp">
  8. <!-- goodsFrom 0自营;1分销 -->
  9. <radio-group class="change-radio" name="goodsfrom" @change="changeGoodsFrom">
  10. <label class="radio1">
  11. <radio class="radioValue1" value="0" :disabled="radionChechk" :checked="goodsFrom=== '0'" style="transform:scale(0.7)" /><text class="bar">自营</text>
  12. </label>
  13. <label class="radio2">
  14. <radio class="radioValue2" value="1" :disabled="radionChechk" :checked="goodsFrom === '1'" style="transform:scale(0.7)" /><text class="bar">分销</text>
  15. </label>
  16. </radio-group>
  17. </view>
  18. </view>
  19. <!-- 所属店铺 -->
  20. <view class="shop detail-list">
  21. <view class="menu">
  22. <view class="uni-list-cell">
  23. <view class="uni-list-cell-db">
  24. <picker class="selectlist" mode="selector" @change="changeStore" :value="storeIndex" :range="storeList" :disabled="storeDisable" range-key="name">
  25. <view class="uni-input title">{{ storeList[storeIndex].name}}</view>
  26. </picker>
  27. <image src="../../static/images/moreicon.png" class="more"></image>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 商品类型 -->
  33. <view class="shoptype detail-list">
  34. <view class="menu">
  35. <view class="uni-list-cell">
  36. <view class="uni-list-cell-db">
  37. <picker @change="changeType" :value="typeIndex" :range="typeList" :disabled="typeDisabled" range-key="name" class="selectlist">
  38. <view class="uni-input title">{{ typeList[typeIndex].name }}</view>
  39. </picker>
  40. <image src="../../static/images/moreicon.png" class="more"></image>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <!-- 商品名称 -->
  46. <view class="shopname detail-list">
  47. <view class="menu" v-if="goodsFrom === '1'">
  48. <view class="uni-list-cell">
  49. <view class="uni-list-cell-db">
  50. <picker @change="changeShop" :value="shopIndex" :range="shopList" :disabled="nameDisabled" range-key="name" class="selectlist">
  51. <view class="uni-input title">{{ shopList[shopIndex].name }}</view>
  52. </picker>
  53. <image src="../../static/images/moreicon.png" class="more"></image>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="menu" v-if="goodsFrom === '0'">
  58. <input class="input-shopname" type="text" v-model="shopname" placeholder-style="color:#a2a8a8;font-size:28upx" placeholder="请输入商品名称"/>
  59. </view>
  60. </view>
  61. <!-- 自定义分类 -->
  62. <view class="classify detail-list noborder">
  63. <view class="menu">
  64. <view class="title bigtitle">自定义分类</view>
  65. <view class="txt" @tap="toClassify">管理分类</view>
  66. </view>
  67. </view>
  68. <!-- 分类 -->
  69. <view class="xiline detail-list">
  70. <view class="menu">
  71. <view class="uni-list-cell">
  72. <view class="uni-list-cell-db">
  73. <picker
  74. @change="changeClassify"
  75. :value="lineIndex"
  76. :range="lineList"
  77. :disabled="lineDidsable"
  78. range-key="name"
  79. class="selectlist"
  80. >
  81. <view class="uni-input title">{{
  82. lineList[lineIndex].name
  83. }}</view>
  84. </picker>
  85. <image
  86. src="../../static/images/moreicon.png"
  87. class="more"
  88. ></image>
  89. </view>
  90. </view>
  91. </view>
  92. </view>
  93. <!-- 核销类型 -->
  94. <view class="goodsfrom">
  95. <view class="title">核销类型</view>
  96. <view class="radio-warp">
  97. <!-- verifyType 1验码核销;2滑动核销-->
  98. <radio-group class="change-radio" name="goodsfrom" @change="changeCancel">
  99. <label class="radio1">
  100. <radio class="radioValue1" :checked="verifyType === '1'" value="1" style="transform:scale(0.7)" /><text class="bar">验码核销</text>
  101. </label>
  102. <label class="radio2">
  103. <radio class="radioValue2" :checked="verifyType === '2'" value="2" style="transform:scale(0.7)" /><text class="bar">滑动核销</text>
  104. </label>
  105. </radio-group>
  106. </view>
  107. </view>
  108. <!-- 可核销次数 -->
  109. <view class="cancelNum">
  110. <view class="cancel-num-warp">
  111. <view class="title">可核销次数:</view>
  112. <!-- checkNum -->
  113. <input class="inputcancelnum" v-model="checkNum" type="number" placeholder="请输入核销次数" placeholder-style="#a3a8a8">
  114. </view>
  115. </view>
  116. <!-- 账号限制 -->
  117. <view class="warp">
  118. <view class="idastrict detail-list">
  119. <view class="menu">
  120. <view class="title astricttitle">账号限制</view>
  121. <switch :checked="showoperat" @change="Change" />
  122. </view>
  123. </view>
  124. <view class="detail-list operat" v-if="showoperat">
  125. <view class="menu">
  126. <view class="title">同一账号在</view>
  127. <view class="sub" @tap="subtractUser">-</view>
  128. <text class="num1">{{ astrictDate.data.saleDay }}</text>
  129. <view class="add" @tap="addUser">+</view>
  130. <view class="txt">天内最多购买</view>
  131. <view class="sub" @tap="subtractDate">-</view
  132. ><text class="num2">{{ astrictDate.data.saleNum }}</text
  133. ><view class="add" @tap="addDate">+</view
  134. ><text class="unit">张</text>
  135. </view>
  136. </view>
  137. </view>
  138. <!-- 实名制 -->
  139. <view class="truename">
  140. <view class="truename-warp">
  141. <view class="txt">是否开启实名制购票</view>
  142. <switch :checked="trueNme" @change="trueNmeChange" />
  143. </view>
  144. </view>
  145. <!-- 可退规则 -->
  146. <view class="modeltwo">
  147. <view class="title">退订规则</view>
  148. <view class="uni-list">
  149. <radio-group @change="bookingChange">
  150. <label class="uni-list-cell uni-list-cell-pd booking-item" v-for="(item, index) in bookingList" :key="index">
  151. <view class="checkth">
  152. <radio :value="item.id" :checked="index === bookingIndex"/>
  153. </view>
  154. <view class="txt">{{ item.name }}</view>
  155. </label>
  156. </radio-group>
  157. </view>
  158. </view>
  159. <view class="warp" v-if="goodsFrom === '0'">
  160. <!-- 销售属性 -->
  161. <view class="property">
  162. <view class="property-warp">
  163. <view class="title">销售属性</view>
  164. <!-- 卖价 -->
  165. <view class="price-warp">
  166. <view class="name">卖价:</view>
  167. <input class="price" type="digit" v-model="price" placeholder="请输入卖价"/>
  168. </view>
  169. <!-- 打折价 -->
  170. <view class="price-warp">
  171. <view class="name">划线价:</view>
  172. <input class="price" type="digit" v-model="rateprice" placeholder="请输入划线价"/>
  173. </view>
  174. <view class="date">
  175. <view class="namebar">过期日期:</view>
  176. <view class="num" @tap="openTime"> {{ expirationDate }}</view>
  177. </view>
  178. <view class="pattern">
  179. <view class="uni-list">
  180. <radio-group @change="radioChange">
  181. <label class="uni-list-cell uni-list-cell-pd pattern-item" v-for="(item, index) in patterList" :key="index">
  182. <view class="checkth">
  183. <radio :value="item.id" :checked="index === patterIndex"/>
  184. </view>
  185. <view class="txt">
  186. <text class="txt1"> {{ item.name }}</text>
  187. <text> {{ item.know }}</text>
  188. </view>
  189. </label>
  190. </radio-group>
  191. </view>
  192. </view>
  193. </view>
  194. </view>
  195. <!-- 商品库存 -->
  196. <view class="property">
  197. <view class="property-warp">
  198. <view class="title">商品库存</view>
  199. <view class="pattern">
  200. <view class="uni-list">
  201. <radio-group @change="shopNumChange">
  202. <label class="uni-list-cell uni-list-cell-pd pattern-item" v-for="(item, index) in shopNumList" :key="index">
  203. <view class="checkth">
  204. <radio :value="item.id" :checked="index === shopNumIndex"/>
  205. </view>
  206. <view class="txt">
  207. <text class="txt1"> {{ item.name }}</text>
  208. <text> {{ item.know }}</text>
  209. <view class="inventory" v-if="item.name === '限日库存模式'">
  210. <text class="name">日库存数:</text>
  211. <input class="dateInventory" type="number" placeholder="请输入库存数量" v-model="dateInventory"/>
  212. </view>
  213. <view class="ref" v-if="item.name === '限日库存模式'">
  214. <text class="residue">今日剩余库存:<text class="residuenum"> {{ todayResidue }}</text></text>
  215. <image class="reficon" src="../../static/images/ref.png" @tap="refToday"></image>
  216. </view>
  217. <view class="inventory" v-if="item.name === '限总库存模式'">
  218. <text class="name">总库存数:</text>
  219. <input class="dateInventory" type="number" placeholder="请输入库存数量" v-model="sunInventory"/>
  220. </view>
  221. <view class="ref" v-if="item.name === '限总库存模式'">
  222. <text class="residue">当前剩余总库存:<text class="residuenum"> {{ sunResidue }}</text></text>
  223. <image class="reficon" src="../../static/images/ref.png" @tap="refSun"></image>
  224. </view>
  225. </view>
  226. </label>
  227. </radio-group>
  228. </view>
  229. </view>
  230. </view>
  231. </view>
  232. <!-- 预定规则 -->
  233. <view class="booking">
  234. <view class="booking-warp">
  235. <view class="title">预定规则</view>
  236. <view class="model">
  237. <view class="inputnum">
  238. <text class="bar">预定数量:</text>
  239. <input
  240. class="bookingnum"
  241. v-model="astrictDate.data.bookRule"
  242. type="number"
  243. placeholder="请输入数量"
  244. />
  245. </view>
  246. <view class="txt">一天内同一身份证可预定数量</view>
  247. </view>
  248. </view>
  249. </view>
  250. </view>
  251. <!-- 商品图标 -->
  252. <view class="shopicon">商品图标</view>
  253. <view class="iconcontent">
  254. <image class="shopLogo" :src="iconurl" v-if="iconurl"></image>
  255. <text class="icon" @tap="uploadImg">点击上传</text>
  256. <text class="per">{{ uploadtxt }} {{ progress === 0 ? '' : progress }}
  257. <text v-if="progress != 0">%</text></text
  258. >
  259. </view>
  260. <view class="shopicon">商品图册</view>
  261. <view class="uploading">
  262. <view class="item-warp" v-for="(item, index) in pickList" :key="index">
  263. <view class="img-warp">
  264. <image :src="item" class="item list"></image>
  265. <view class="delete">
  266. <image
  267. src="../../static/images/delete.png"
  268. class="delete-icon"
  269. @tap="deleteThisImg(index)"
  270. ></image>
  271. </view>
  272. </view>
  273. </view>
  274. <view class="item-warp">
  275. <image
  276. src="../../static/images/upload.png"
  277. class="item upload"
  278. @tap="uploadList"
  279. ></image>
  280. </view>
  281. </view>
  282. <!-- 购票须知 -->
  283. <view class="shopicon">商品描述(购票须知)</view>
  284. <view class="know">
  285. <view class="container">
  286. <editor
  287. id="editor"
  288. class="ql-container"
  289. :placeholder="placeholderContent"
  290. @input="saveTxt"
  291. @ready="onEditorReady"
  292. ></editor>
  293. </view>
  294. </view>
  295. <view class="btn" @tap="submitMesage">确认</view>
  296. <!-- <rf-loading v-if="loading"></rf-loading> -->
  297. <uni-calendar
  298. ref="calendar"
  299. :insert="false"
  300. :range="false"
  301. @confirm="confirm"
  302. />
  303. </view>
  304. </view>
  305. </template>
  306. <script>
  307. let myCloud;
  308. let _self;
  309. import Header from '../components/header.vue';
  310. import uniCalendar from '@/components/uni-calendar/uni-calendar.vue';
  311. import moment from '@/common/moment';
  312. import indexConfig from '@/config/index.config';
  313. export default {
  314. components: {
  315. Header,
  316. uniCalendar,
  317. },
  318. data () {
  319. return {
  320. loading: false,
  321. scenicId: uni.getStorageSync('scenicMessage').id,
  322. title: '商品详情',
  323. showoperat: false,
  324. salerule: '',
  325. placeholderContent: '请输入内容...',
  326. mastKnow: '',
  327. storeList: [{ name: '所属店铺', id: '', type: '' }],
  328. storeIndex: 0,
  329. storeId: '',
  330. storeDisable: true,
  331. typeList: [{ name: '商品类型(请先选择所属店铺)', id: '' }],
  332. typeIndex: 0,
  333. typeId: '',
  334. typeDisabled: true,
  335. shopList: [{ name: '商品名称(请先选择商品类型)', id: '' }],
  336. shopIndex: 0,
  337. shopId: '',
  338. shopname: '',
  339. nameDisabled: true,
  340. hasNameList: 0, // 判断是否有商品名称列表
  341. lineList: [{ name: '分类(请先选择所属商品)', id: '' }],
  342. lineIndex: 0,
  343. lineId: '',
  344. lineDidsable: true,
  345. // 图标上传
  346. uploadtxt: '',
  347. progress: 0,
  348. iconurl: '',
  349. pickList: [],
  350. Icon: '',
  351. Imglist: [],
  352. progressimgs: 0,
  353. price: 0.00,
  354. rateprice: 0.00,
  355. // -------------- 编辑分界线 ------------------------------------
  356. SHOPID: 0,
  357. shopData: {},
  358. expirationDate: '请选择商品过期日期',
  359. // 销售属性
  360. patterList: [
  361. {
  362. id: '0',
  363. name: '有效期模式',
  364. know: '无需用户指定使用日,在过期时间前均可使用。',
  365. },
  366. {
  367. id: '1',
  368. name: '使用日模式',
  369. know: '用户购买时需选择游玩日,并在游玩日当天使用。',
  370. },
  371. ],
  372. patterIndex: 0,
  373. // 商品库存
  374. shopNumList: [
  375. {id: '0',name: '无限库存模式',know: '售卖商品不计算库存,无限售卖。'},
  376. { id: '1', name: '限日库存模式', know: '每日固定库存售卖。' },
  377. { id: '2', name: '限总库存模式', know: '总库存限制,卖完为止。' },
  378. ],
  379. shopNumIndex: 0,
  380. inventory: '', // 库存数量
  381. dateInventory: 0,
  382. sunInventory: 0,
  383. todayResidue: 0,
  384. sunResidue: 0,
  385. bookingnum: '',
  386. trueNme: true,
  387. codeShow: false,
  388. radionChechk: false,
  389. goodsName: '',
  390. goodsFrom: '1', // 0 自营,1分销
  391. verifyType: '1', // 1验码核销 ; 2滑动核销
  392. checkNum: 1, // 核销次数
  393. refund: '0', // 可退规则
  394. bookingList: [
  395. { id: '0', name: '未消费统一可退' },
  396. { id: '1', name: '过期不可退' },
  397. { id: '2', name: '统一不可退' },
  398. ],
  399. bookingIndex: 0,
  400. // 规则参数
  401. astrictDate: {
  402. data: {
  403. saleDay: 1, // 限购天数
  404. saleNum: 1, // 限购票数
  405. dateSetting: '0', // 有效期模式
  406. goodsStockFlag: '0', // 库存模式
  407. bookRule: '', // 同一天限购
  408. isRealName: '1', // 开启实名制 1是 ; 0 否
  409. },
  410. },
  411. };
  412. },
  413. onReady () {
  414. myCloud = uniCloud.init({
  415. provider: 'aliyun',
  416. spaceId: 'db8671a1-69bd-470d-ad59-ba927c88f4a4',
  417. clientSecret: '8nOzV70edtpCd0El6qce3g==',
  418. });
  419. },
  420. onShow () {
  421. if (this.storeId != '') {
  422. this.getLine(this.storeId)
  423. }
  424. },
  425. onLoad ( option ) {
  426. if (option.id != 'undefined') {
  427. this.SHOPID = option.id
  428. this.getShopBuyId(option.id).then(() => {
  429. this.getShopList().then(() => {
  430. this.getShopName(this.typeId, this.storeId);
  431. });
  432. this.radionChechk = true
  433. // 数据回显
  434. this.price = this.shopData.salePrice / 100;
  435. this.rateprice = this.shopData.price / 100;
  436. if (this.shopData.expiredTime) {
  437. this.expirationDate = this.shopData.expiredTime.slice(0, 10) ? this.shopData.expiredTime.slice(0, 10) : '请选择商品过期日期';
  438. }
  439. // 图标回显
  440. if (this.shopData.icon) {
  441. this.Icon = this.shopData.icon
  442. this.iconurl = this.shopData.icon;
  443. }
  444. // 图册回显
  445. if (this.shopData.imges) {
  446. this.Imglist = JSON.parse(this.shopData.imges)
  447. let urllist = JSON.parse(this.shopData.imges)
  448. urllist.forEach(element => {
  449. this.pickList.push(element.url)
  450. });
  451. }
  452. let rule = JSON.parse(this.shopData.saleRuleJson);
  453. // 实名制
  454. if (rule.data.isRealName === '0') {
  455. this.trueNme = true;
  456. } else {
  457. this.trueNme = false;
  458. }
  459. this.astrictDate.data.isRealName = rule.data.isRealName;
  460. if (rule) {
  461. this.astrictDate.data.saleDay = rule.data.saleDay
  462. ? rule.data.saleDay
  463. : 1;
  464. this.astrictDate.data.saleNum = rule.data.saleNum
  465. ? rule.data.saleNum
  466. : 1;
  467. // 有效期模式
  468. this.astrictDate.data.dateSetting = rule.data.dateSetting;
  469. this.patterIndex = +rule.data.dateSetting;
  470. // 库存模式
  471. this.astrictDate.data.goodsStockFlag = rule.data.goodsStockFlag;
  472. this.getResidue()
  473. this.shopNumIndex = +rule.data.goodsStockFlag;
  474. if (this.shopNumIndex === 1) {
  475. this.dateInventory = this.shopData.inventory;
  476. } else if (this.shopNumIndex === 2) {
  477. this.sunInventory = this.shopData.inventory;
  478. }
  479. // 预订数量
  480. this.astrictDate.data.bookRule = rule.data.bookRule;
  481. }
  482. // 限制购票回显
  483. if (this.shopData.saleRule === '1') {
  484. this.showoperat = true;
  485. this.salerule = '1'
  486. } else {
  487. this.showoperat = false;
  488. this.salerule = '0'
  489. }
  490. this.loading = false;
  491. });
  492. } else {
  493. this.radionChechk = false
  494. this.getShopList()
  495. }
  496. },
  497. methods: {
  498. // 商品来源
  499. changeGoodsFrom(e) {
  500. this.goodsFrom = e.detail.value
  501. },
  502. // 核验方式
  503. changeCancel(e) {
  504. this.verifyType = e.detail.value
  505. },
  506. // 获取单个商品信息
  507. async getShopBuyId (id) {
  508. this.loading = true;
  509. await this.$http.get('/goods/getById/' + id).then((res) => {
  510. console.log(res);
  511. if (res.code === 200 && res.msg === 'OK') {
  512. this.goodsFrom = res.data.goodsFrom
  513. this.verifyType = res.data.verifyType
  514. this.refund = res.data.refund
  515. this.checkNum = res.data.checkNum
  516. // 可退规则
  517. this.bookingList.forEach((item,index) => {
  518. if (item.id === res.data.refund) {
  519. this.bookingIndex = index
  520. }
  521. });
  522. this.refund = res.data.refund;
  523. this.shopData = res.data;
  524. this.storeId = res.data.shopId;
  525. this.typeId = res.data.typeId;
  526. this.loading = false;
  527. }
  528. });
  529. },
  530. // 打开日历
  531. openTime () {
  532. this.$refs.calendar.open();
  533. },
  534. confirm (e) {
  535. this.expirationDate = e.fulldate;
  536. },
  537. // 自定义属性
  538. radioChange (evt) {
  539. for (let i = 0; i < this.patterList.length; i++) {
  540. if (this.patterList[i].id === evt.target.value) {
  541. this.patterIndex = i;
  542. break;
  543. }
  544. }
  545. this.astrictDate.data.dateSetting = evt.detail.value;
  546. },
  547. // 库存模式
  548. shopNumChange (e) {
  549. for (let i = 0; i < this.shopNumList.length; i++) {
  550. if (this.shopNumList[i].id === e.target.value) {
  551. this.shopNumIndex = i;
  552. break;
  553. }
  554. }
  555. if (e.detail.value === '1') {
  556. this.sunInventory = 0;
  557. }
  558. if (e.detail.value === '2') {
  559. this.dateInventory = 0;
  560. }
  561. this.astrictDate.data.goodsStockFlag = e.detail.value;
  562. // this.getResidue()
  563. },
  564. // 剩余库存
  565. async getResidue () {
  566. console.log(this.astrictDate.data.goodsStockFlag);
  567. await this.$http.get('/goods/getInventory',{
  568. id:this.SHOPID,
  569. goodsStockFlag: this.astrictDate.data.goodsStockFlag
  570. }).then( res =>{
  571. console.log(res);
  572. if (res.code === 200 && res.msg ==='OK') {
  573. if (+this.astrictDate.data.goodsStockFlag === 1) {
  574. this.todayResidue = res.data.now_inventory
  575. } else if (+this.astrictDate.data.goodsStockFlag === 2) {
  576. this.sunResidue = res.data.now_inventory
  577. }
  578. }
  579. })
  580. },
  581. refToday () {
  582. this.todayResidue = 0
  583. this.getResidue()
  584. },
  585. refSun () {
  586. this.sunResidue = 0
  587. this.getResidue()
  588. },
  589. // 可退模式
  590. bookingChange (e) {
  591. for (let i = 0; i < this.bookingList.length; i++) {
  592. if (this.bookingList[i].id === e.target.value) {
  593. this.bookingIndex = i;
  594. break;
  595. }
  596. }
  597. this.refund = e.detail.value;
  598. },
  599. // 实名制
  600. trueNmeChange (e) {
  601. if (e.detail.value) {
  602. this.astrictDate.data.isRealName = '0';
  603. } else {
  604. this.astrictDate.data.isRealName = '1';
  605. }
  606. },
  607. // 初始化编辑器
  608. onEditorReady () {
  609. // this.placeholderContent = this.shopData.describ
  610. uni
  611. .createSelectorQuery()
  612. .select('#editor')
  613. .context((res) => {
  614. this.editorCtx = res.context;
  615. this.editorCtx.setContents({
  616. html: this.shopData.describ, //this.EditGoodsDetail.content为赋值内容。
  617. });
  618. })
  619. .exec()
  620. },
  621. // -----------------------------------------------------------------
  622. // 跳转到管理分类页面
  623. toClassify () {
  624. if (this.storeId) {
  625. uni.setStorageSync('shopid', this.storeId);
  626. this.$mRouter.push({ route: '/pages/goods/classify' });
  627. } else {
  628. this.$mHelper.toast('请选择所属店铺后再进行自定义分类管理');
  629. }
  630. },
  631. // 选择店铺
  632. changeStore (e) {
  633. this.storeIndex = e.detail.value;
  634. this.storeId = this.storeList[this.storeIndex].id;
  635. console.log(e);
  636. if (!this.SHOPID && e.detail.value != 0) {
  637. this.getType(this.storeId)
  638. this.getLine(this.storeId)
  639. }
  640. },
  641. // 选择商品类型
  642. changeType (e) {
  643. this.typeIndex = e.detail.value;
  644. this.typeId = this.typeList[this.typeIndex].id;
  645. if (!this.SHOPID) {
  646. this.getShopName(this.typeId, this.storeId);
  647. }
  648. },
  649. // 商品名称选择
  650. changeShop (e) {
  651. this.shopIndex = e.detail.value;
  652. this.shopId = this.shopList[this.shopIndex].id;
  653. },
  654. // 分类
  655. changeClassify (e) {
  656. this.lineIndex = e.detail.value;
  657. this.lineId = this.lineList[this.lineIndex].id;
  658. },
  659. // 所属店铺
  660. async getShopList () {
  661. this.storeList = [{ name: '所属店铺', id: '', type: '' }];
  662. await this.$http
  663. .get('/shop/getList', { mid: this.scenicId })
  664. .then((res) => {
  665. if (res.data) {
  666. let arr = [];
  667. res.data.forEach((element) =>
  668. arr.push({
  669. name: element.name,
  670. id: element.id,
  671. type: element.shopFrom,
  672. })
  673. );
  674. this.storeList = this.storeList.concat(arr);
  675. this.storeDisable = false;
  676. // 所属店铺回显
  677. if (this.shopData.shopId) {
  678. this.storeDisable = true;
  679. this.storeList.forEach((item, index) => {
  680. if (this.shopData.shopId === item.id) {
  681. this.storeIndex = index;
  682. }
  683. });
  684. this.storeId = this.storeList[this.storeIndex].id;
  685. this.getType(this.storeId);
  686. this.getLine(this.storeId);
  687. }
  688. }
  689. });
  690. },
  691. // 商品类型
  692. async getType (storeId) {
  693. this.typeList = [{ name: '商品类型(请先选择所属店铺)', id: '' }];
  694. this.$http
  695. .get('/type/getTypeListByShopId', {
  696. id: storeId,
  697. })
  698. .then((res) => {
  699. let arr = [];
  700. res.data[0].children.forEach((element) => {
  701. arr.push({ name: element.name, id: element.id });
  702. });
  703. this.typeList = this.typeList.concat(arr);
  704. this.typeDisabled = false;
  705. // 商品类型回显
  706. if (this.shopData.typeId) {
  707. this.typeDisabled = true;
  708. this.typeList.forEach((item, index) => {
  709. if (this.shopData.typeId === item.id) {
  710. this.typeIndex = index;
  711. }
  712. });
  713. this.typeId = this.typeList[this.typeIndex].id;
  714. this.shopname = this.shopData.name;
  715. }
  716. });
  717. },
  718. // 商品名称
  719. async getShopName (typeId, storeId) {
  720. this.shopList = [{ name: '商品名称(请先选择商品类型)', id: '' }];
  721. await this.$http
  722. .get('/goods/getTicketGoods', {
  723. typeId: typeId,
  724. shopId: storeId,
  725. })
  726. .then(async (res) => {
  727. if (res.code === 200) {
  728. let arr = [];
  729. res.data.forEach(element => arr.push({ name: element.ticket_name, id: element.ticket_no }));
  730. this.shopList = this.shopList.concat(arr);
  731. this.nameDisabled = false
  732. // 回显名称
  733. if (this.shopData.name) {
  734. this.loading = true;
  735. if (this.goodsFrom != 0) {
  736. this.shopList[0] = { name: this.shopData.name, id: '' };
  737. this.shopIndex = 0
  738. this.shopId = this.shopList[this.shopIndex].id;
  739. if (this.shopList.length != 1) {
  740. if (this.shopList[0].name === this.shopList[1].name) {
  741. this.shopList.length = 1
  742. }
  743. }
  744. } else {
  745. // 自营商品直接赋值
  746. this.shopname = this.shopData.name;
  747. }
  748. this.loading = false;
  749. }
  750. }
  751. });
  752. },
  753. // 线路分配
  754. async getLine (storeId) {
  755. this.lineList = [{ name: '分类(请先选择所属商品)', id: '' }];
  756. await this.$http
  757. .get('/goods/getCustomGroupList', {
  758. shopId: storeId,
  759. })
  760. .then(async (res) => {
  761. let arr = [];
  762. res.data.customGroupList.forEach((element) => {
  763. arr.push({ name: element.name, id: element.id });
  764. });
  765. this.lineList = this.lineList.concat(arr);
  766. this.lineDidsable = false;
  767. // 分类回显
  768. if (this.shopData.customGroupId) {
  769. this.loading = true;
  770. this.lineList.forEach((item, index) => {
  771. if (this.shopData.customGroupId === item.id) {
  772. this.lineIndex = index;
  773. }
  774. });
  775. this.lineId = this.lineList[this.lineIndex].id;
  776. this.loading = false;
  777. }
  778. });
  779. },
  780. // 账号限制
  781. Change (e) {
  782. this.showoperat = e.detail.value;
  783. },
  784. subtractUser () {
  785. if (this.astrictDate.data.saleDay <= 1) {
  786. this.astrictDate.data.saleDay = 1
  787. this.$mHelper.toast('最少一天');
  788. return;
  789. } else {
  790. this.astrictDate.data.saleDay--;
  791. }
  792. },
  793. addUser () {
  794. this.astrictDate.data.saleDay++;
  795. },
  796. subtractDate () {
  797. if (this.astrictDate.data.saleNum <= 1) {
  798. this.astrictDate.data.saleNum = 1
  799. this.$mHelper.toast('最少一张票');
  800. return;
  801. } else {
  802. this.astrictDate.data.saleNum--;
  803. }
  804. },
  805. addDate () {
  806. this.astrictDate.data.saleNum++;
  807. },
  808. // 图标上传
  809. uploadImg () {
  810. let _self = this;
  811. _self.uploadtxt = '上传中...';
  812. _self.progress = 0;
  813. uni.chooseImage({
  814. count: 1,
  815. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  816. sourceType: ['album'], // camera 使用相机 album 从相册中选
  817. success: function (res) {
  818. // 成功则返回图片的本地文件路径列表 tempFilePaths
  819. _self.iconurl = res.tempFilePaths[0];
  820. myCloud.uploadFile({
  821. url: indexConfig.uploadUrl,
  822. filePath: _self.iconurl, // 要上传的文件对象
  823. cloudPath: _self.iconurl, // 要上传的文件对象
  824. name: 'file',
  825. success: (res) => {
  826. if (res.fileID) {
  827. _self.Icon = res.fileID;
  828. }
  829. },
  830. fail: function (msg) {
  831. _self.$mHelper.toast('图标上传失败,请重新上传')
  832. },
  833. onUploadProgress: function (progressEvent) {
  834. _self.progress = Math.round( (progressEvent.loaded * 100) / progressEvent.total );
  835. if (_self.progress === 100) {
  836. _self.uploadtxt = '上传成功';
  837. }
  838. },
  839. });
  840. },
  841. fail: function (error) {
  842. _self.uploadtxt = '已取消上传';
  843. },
  844. });
  845. },
  846. // 图册上传
  847. uploadList () {
  848. let _self = this;
  849. uni.chooseImage({
  850. count: 6,
  851. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  852. sourceType: ['album'], // camera 使用相机 album 从相册中选
  853. success: function (res) {
  854. // 成功则返回图片的本地文件路径列表 tempFilePaths
  855. if (_self.pickList.length >= 6) {
  856. _self.$mHelper.toast('最多只可上传6张图片');
  857. } else {
  858. _self.pickList = _self.pickList.concat(res.tempFilePaths).slice(0,6);
  859. _self.Imglist = []
  860. for (let i = 0; i < _self.pickList.length; i++) {
  861. let element = _self.pickList[i];
  862. myCloud.uploadFile({
  863. url: indexConfig.uploadUrl,
  864. filePath: element, // 要上传的文件对象
  865. cloudPath: element,
  866. name: 'file',
  867. onUploadProgress: function (progressEvent) {
  868. // 上传进度回调
  869. let percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total);
  870. },
  871. success: (res) => {
  872. _self.Imglist.push({url:res.fileID,uid:res.filePath})
  873. }
  874. });
  875. }
  876. }
  877. },
  878. });
  879. },
  880. // 删除图册中的图片
  881. deleteThisImg (index) {
  882. this.pickList.splice(index, 1);
  883. this.Imglist.forEach( (element,i) => {
  884. if (element.uid === this.pickList[index]) {
  885. this.Imglist.splice(i,1)
  886. }
  887. });
  888. },
  889. // 富文本失去焦点保存内容
  890. saveTxt (e) {
  891. this.mastKnow = e.detail.html;
  892. },
  893. // 内容提交
  894. submitMesage () {
  895. let _this = this;
  896. this.proofRule().then( ()=>{
  897. this.loading = true;
  898. this.$http.post('/goods/add', {
  899. id: this.shopData.id || '',
  900. mid: this.scenicId,
  901. shopId: this.storeId,
  902. typeId: this.typeId,
  903. customGroupId: this.lineId,
  904. describ: this.mastKnow,
  905. icon: this.Icon || '',
  906. imges: JSON.stringify(this.Imglist) || '',
  907. del: this.shopData.del || '',
  908. upDown: this.shopData.upDown || '',
  909. saleRule: this.salerule, // 限制购票
  910. goodsFrom: this.goodsFrom,
  911. verifyType: this.verifyType,
  912. checkNum: this.checkNum,
  913. refund: this.refund,
  914. saleRuleJson: JSON.stringify(this.astrictDate),
  915. // 自营
  916. name: this.goodsName,
  917. salePrice: this.price * 100 || null,
  918. price: this.rateprice * 100 || null,
  919. expiredTime: this.expirationDate === '请选择商品过期日期'? '': this.expirationDate,
  920. inventory: this.inventory
  921. }).then((res) => {
  922. if (res.code === 200 && res.msg === 'OK') {
  923. this.loading = false;
  924. if (this.shopData.id) {
  925. this.$mHelper.toast('保存成功,请联系管理员进行审核');
  926. } else {
  927. this.$mHelper.toast('添加成功');
  928. }
  929. setTimeout(() => {
  930. this.$mRouter.back();
  931. }, 500);
  932. }
  933. });
  934. })
  935. },
  936. // 验证规则
  937. proofRule () {
  938. return new Promise((resolve,reject)=>{
  939. if (this.progress > 0 && this.progress < 100) {
  940. this.$mHelper.toast('您有图标正在上传,请在上传完成后提交内容!')
  941. return
  942. }
  943. // 判断是否限制账号购买
  944. if (this.showoperat) {
  945. this.salerule = '1'
  946. } else {
  947. this.salerule = '0'
  948. this.astrictDate.data.saleDay = '';
  949. this.astrictDate.data.saleNum = '';
  950. }
  951. if (!this.storeId) {
  952. this.$mHelper.toast('请选择所属商铺!');
  953. return;
  954. }
  955. if (!this.typeId) {
  956. this.$mHelper.toast('请选择商品类型!');
  957. return;
  958. }
  959. if (this.goodsFrom === '1') { // 分销商品
  960. if (this.SHOPID) {
  961. this.goodsName = this.shopList[this.shopIndex].name
  962. } else {
  963. this.goodsName = this.shopList[this.shopIndex].id;
  964. }
  965. } else if (this.goodsFrom === '0') {
  966. this.goodsName = this.shopname;
  967. }
  968. if (!this.goodsName) {
  969. this.$mHelper.toast('请选择商品名称或者输入商品名称!');
  970. return;
  971. }
  972. console.log(this.goodsFrom);
  973. if (this.goodsFrom === '0') {
  974. if (!this.lineId) {
  975. this.$mHelper.toast('请选择商品分类!');
  976. return;
  977. }
  978. const pat = new RegExp(/(?:^[1-9]([0-9]+)?(?:\.[0-9]{1,2})?$)|(?:^(?:0){1}$)|(?:^[0-9]\.[0-9](?:[0-9])?$)/)
  979. if (!this.price || !pat.test(this.price)) {
  980. this.$mHelper.toast('请输入正确的商品卖价!');
  981. return;
  982. }
  983. if (!this.rateprice || !pat.test(this.rateprice)) {
  984. this.$mHelper.toast('请输入正确的商品划线价!');
  985. return;
  986. }
  987. if (this.expirationDate === '请选择商品过期日期') {
  988. this.$mHelper.toast('请选择商品过期日期');
  989. return;
  990. }
  991. if (this.shopNumIndex === 0) {
  992. this.inventory = '';
  993. }
  994. console.log(this.shopNumIndex);
  995. if (this.shopNumIndex === 1) {
  996. this.inventory = this.dateInventory;
  997. if (!this.inventory) {
  998. this.$mHelper.toast('请输入日库存数量!');
  999. return;
  1000. }
  1001. }
  1002. if (this.shopNumIndex === 2) {
  1003. this.inventory = this.sunInventory;
  1004. if (!this.inventory) {
  1005. this.$mHelper.toast('请输入总库存数量!');
  1006. return;
  1007. }
  1008. }
  1009. if (!this.astrictDate.data.bookRule) {
  1010. this.$mHelper.toast('请输入预订数量!');
  1011. return;
  1012. }
  1013. }
  1014. resolve()
  1015. })
  1016. }
  1017. },
  1018. };
  1019. </script>
  1020. <style lang="scss" scoped>
  1021. .shopdetail {
  1022. .shopdetail-content {
  1023. padding: 24upx 0 0upx;
  1024. .goodsfrom {
  1025. background-color: #fff;
  1026. border-bottom: 1px solid #e7e7e7;
  1027. .title{
  1028. padding: 20upx 33upx;
  1029. font-size: 32rpx;
  1030. color: #232828;
  1031. font-weight: 700;
  1032. background-color: #f1f1f1;
  1033. }
  1034. .radio-warp{
  1035. padding: 22upx 33upx;
  1036. .change-radio{
  1037. display: flex;
  1038. align-items: center;
  1039. .radio2{
  1040. margin-left: 60upx;
  1041. }
  1042. .bar {
  1043. margin-left: 20upx;
  1044. }
  1045. }
  1046. }
  1047. }
  1048. .cancelNum{
  1049. background-color: #fff;
  1050. border-bottom: 1px solid #e7e7e7;
  1051. .cancel-num-warp{
  1052. padding: 22upx 33upx;
  1053. display: flex;
  1054. align-items: center;
  1055. .title{
  1056. color: #000;
  1057. }
  1058. .inputcancelnum{
  1059. margin-left: 20upx;
  1060. }
  1061. }
  1062. }
  1063. .modeltwo {
  1064. .title {
  1065. padding: 20upx 33upx;
  1066. font-size: 32rpx;
  1067. color: #232828;
  1068. font-weight: 700;
  1069. background-color: #f1f1f1;
  1070. }
  1071. .booking-item {
  1072. display: flex;
  1073. border-bottom: 1px solid #e7e7e7;
  1074. padding: 0 33upx 22upx;
  1075. .checkth {
  1076. width: 100upx;
  1077. }
  1078. .txt {
  1079. flex: 1;
  1080. }
  1081. }
  1082. }
  1083. .truename {
  1084. .truename-warp {
  1085. padding: 20upx 33upx;
  1086. display: flex;
  1087. justify-content: space-between;
  1088. border-bottom: 1px solid #e7e7e7;
  1089. background-color: #fff;
  1090. .txt {
  1091. font-size: 32upx;
  1092. font-weight: 700;
  1093. }
  1094. }
  1095. }
  1096. .detail-list {
  1097. padding: 0 33upx;
  1098. background-color: #ffffff;
  1099. border-bottom: 1px solid #e7e7e7;
  1100. box-sizing: border-box;
  1101. .menu {
  1102. display: flex;
  1103. justify-content: space-between;
  1104. align-items: center;
  1105. height: 93upx;
  1106. .uni-list-cell {
  1107. width: 100%;
  1108. display: flex;
  1109. align-items: center;
  1110. height: 93upx;
  1111. .uni-list-cell-db {
  1112. height: 100%;
  1113. display: flex;
  1114. justify-content: space-between;
  1115. align-items: center;
  1116. .selectlist {
  1117. width: 100%;
  1118. }
  1119. }
  1120. }
  1121. .title {
  1122. font-size: 28upx;
  1123. color: #232828;
  1124. }
  1125. .more {
  1126. width: 15upx;
  1127. height: 26upx;
  1128. }
  1129. .bigtitle {
  1130. font-size: 32upx;
  1131. color: #232828;
  1132. font-weight: 700;
  1133. }
  1134. .input-shopname {
  1135. width: 100%;
  1136. height: 100%;
  1137. }
  1138. .txt {
  1139. color: #a95cff;
  1140. font-weight: 700;
  1141. }
  1142. .linetitle {
  1143. color: #232828;
  1144. }
  1145. .astricttitle {
  1146. font-weight: 700;
  1147. font-size: 32upx;
  1148. color: #232828;
  1149. }
  1150. }
  1151. }
  1152. .noborder {
  1153. border-bottom: none;
  1154. }
  1155. .classify {
  1156. background-color: #f9f9f9;
  1157. }
  1158. .idastrict {
  1159. background-color: #fff;
  1160. }
  1161. .operat {
  1162. background-color: #f9f9f9;
  1163. .menu {
  1164. .title {
  1165. font-size: 28upx;
  1166. color: #232828;
  1167. }
  1168. .sub,
  1169. .add {
  1170. width: 44upx;
  1171. height: 44upx;
  1172. border-radius: 50%;
  1173. border: 1px solid #b4b8b7;
  1174. color: #b4b8b7;
  1175. text-align: center;
  1176. line-height: 40upx;
  1177. font-weight: 700;
  1178. }
  1179. .txt {
  1180. color: #232828;
  1181. font-weight: normal;
  1182. }
  1183. .unit {
  1184. color: #232828;
  1185. }
  1186. }
  1187. }
  1188. .shopicon {
  1189. height: 100upx;
  1190. padding: 0 33upx;
  1191. font-size: 32upx;
  1192. color: #232828;
  1193. font-weight: 700;
  1194. line-height: 100upx;
  1195. }
  1196. .iconcontent {
  1197. padding: 25upx 33upx;
  1198. background-color: #f9f9f9;
  1199. display: flex;
  1200. align-items: center;
  1201. .icon {
  1202. display: inline-block;
  1203. height: 56upx;
  1204. font-size: 28upx;
  1205. color: #a3a8a8;
  1206. border-radius: 50%;
  1207. margin-left: 20upx;
  1208. border: 1px dashed #ccc;
  1209. border-radius: 5%;
  1210. text-align: center;
  1211. line-height: 56upx;
  1212. padding: 0 15upx;
  1213. }
  1214. .shopLogo {
  1215. width: 56upx;
  1216. height: 56upx;
  1217. border-radius: 50%;
  1218. }
  1219. .per {
  1220. margin-left: 50upx;
  1221. color: #a3a8a8;
  1222. }
  1223. }
  1224. .uploading {
  1225. padding: 25upx 33upx;
  1226. display: flex;
  1227. align-items: center;
  1228. flex-wrap: wrap;
  1229. background-color: #fff;
  1230. .item-warp {
  1231. border-radius: 17upx;
  1232. margin-right: 15upx;
  1233. margin-bottom: 15upx;
  1234. box-sizing: border-box;
  1235. overflow: hidden;
  1236. .img-warp {
  1237. position: relative;
  1238. }
  1239. .item {
  1240. width: 160upx;
  1241. height: 160upx;
  1242. }
  1243. &:nth-child(4) {
  1244. margin-right: 0;
  1245. }
  1246. .delete {
  1247. position: absolute;
  1248. right: -35upx;
  1249. top: -35upx;
  1250. width: 70upx;
  1251. height: 70upx;
  1252. border-radius: 50%;
  1253. background-color: #8064f7;
  1254. .delete-icon {
  1255. position: absolute;
  1256. left: 13upx;
  1257. bottom: 13upx;
  1258. width: 14upx;
  1259. height: 14upx;
  1260. }
  1261. }
  1262. }
  1263. }
  1264. .know {
  1265. padding: 24upx 33upx;
  1266. background-color: #fff;
  1267. #editor {
  1268. width: 100%;
  1269. height: 300px;
  1270. }
  1271. }
  1272. .btn {
  1273. width: 100%;
  1274. height: 98upx;
  1275. color: #ffffff;
  1276. font-size: 32upx;
  1277. text-align: center;
  1278. line-height: 98upx;
  1279. background-color: #8064f7;
  1280. margin-top: 27upx;
  1281. letter-spacing: 2upx;
  1282. }
  1283. .price-warp {
  1284. padding: 0 33upx;
  1285. background-color: #ffffff;
  1286. border-bottom: 1px solid #e7e7e7;
  1287. box-sizing: border-box;
  1288. display: flex;
  1289. align-items: center;
  1290. height: 93upx;
  1291. .name {
  1292. font-size: 28upx;
  1293. color: #232828;
  1294. }
  1295. .price {
  1296. flex: 1;
  1297. }
  1298. }
  1299. .property {
  1300. .property-warp {
  1301. .title {
  1302. padding: 20upx 33upx;
  1303. font-size: 32rpx;
  1304. color: #232828;
  1305. font-weight: 700;
  1306. }
  1307. .date {
  1308. padding: 0 33upx;
  1309. display: flex;
  1310. align-items: center;
  1311. border-bottom: 1px solid #e7e7e7;
  1312. background-color: #fff;
  1313. height: 93upx;
  1314. .namebar {
  1315. font-size: 28upx;
  1316. line-height: 93upx;
  1317. color: #232828;
  1318. }
  1319. .num {
  1320. flex: 1;
  1321. height: 100%;
  1322. line-height: 93upx;
  1323. color: #a3a8a8;
  1324. }
  1325. }
  1326. }
  1327. }
  1328. .pattern {
  1329. .pattern-item {
  1330. padding: 0 33upx 22upx;
  1331. display: flex;
  1332. align-items: center;
  1333. border-bottom: 1px solid #e7e7e7;
  1334. .checkth {
  1335. width: 100upx;
  1336. }
  1337. .txt {
  1338. flex: 1;
  1339. display: flex;
  1340. justify-content: center;
  1341. flex-direction: column;
  1342. color: #a3a8a8;
  1343. .txt1 {
  1344. color: #232828;
  1345. font-weight: 700;
  1346. }
  1347. .inventory {
  1348. display: flex;
  1349. align-items: center;
  1350. .name {
  1351. width: 150upx;
  1352. color: #232828;
  1353. }
  1354. .dateInventory {
  1355. flex: 1;
  1356. color: #232828;
  1357. }
  1358. }
  1359. .ref {
  1360. display: flex;
  1361. align-items: center;
  1362. .residue {
  1363. color: #232828;
  1364. }
  1365. .residuenum{
  1366. margin-left: 15upx;
  1367. color: firebrick;
  1368. font-weight: 700;
  1369. }
  1370. .reficon{
  1371. margin-left: 30upx;
  1372. width: 30upx;
  1373. height: 30upx;
  1374. z-index: 10;
  1375. }
  1376. }
  1377. }
  1378. }
  1379. }
  1380. .booking {
  1381. .booking-warp {
  1382. .title {
  1383. padding: 20upx 33upx;
  1384. font-size: 32rpx;
  1385. color: #232828;
  1386. font-weight: 700;
  1387. }
  1388. .model {
  1389. padding: 20upx 33upx;
  1390. background-color: #fff;
  1391. border-bottom: 1px solid #e7e7e7;
  1392. .inputnum {
  1393. display: flex;
  1394. align-items: center;
  1395. .bar {
  1396. width: 150upx;
  1397. font-size: 28upx;
  1398. font-weight: 700;
  1399. color: #232828;
  1400. }
  1401. .bookingnum {
  1402. flex: 1;
  1403. }
  1404. }
  1405. .txt {
  1406. margin-top: 28upx;
  1407. color: #a3a8a8;
  1408. }
  1409. }
  1410. }
  1411. }
  1412. }
  1413. }
  1414. </style>