index.vue 30 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303
  1. <template>
  2. <view class="pages" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
  3. <c-nav-bar title="商品管理"></c-nav-bar>
  4. <view class="tb">
  5. <view class="tabs">
  6. <view v-for="(item,index) in tabList" :key="index" @tap="changeTab1(item,index)">
  7. <!-- <text :class="index==current?'active':''">{{item.name}}({{mytotal}})</text> -->
  8. <text :class="index==current?'active':''">{{item.name}}</text>
  9. </view>
  10. </view>
  11. </view>
  12. <!-- 房型数量 -->
  13. <view class="">
  14. <view class="typeNum">
  15. <view class="left" style="font-size: 24rpx; color: #777;" @click="areaShowed()">
  16. <text :class="areaShow==true?'active':''" style="margin-right: 20rpx;">上架时间</text>
  17. <u-icon name="arrow-down-fill" bold='true' v-if="areaShow==false" size="20" labelPos="left"
  18. labelSize="26"></u-icon>
  19. <u-icon name="arrow-up-fill" bold='true' v-else color="#007a68" labelColor='#007a68' size="20"
  20. labelPos="left" labelSize="26"></u-icon>
  21. </view>
  22. <view class="right" @click="showList">
  23. <view class="image">
  24. <image src="https://i.ringzle.com/file/20240313/f3d301b3bc4544ffaf5a0d96a761dd00.png" mode="">
  25. </image>
  26. </view>
  27. <view class="text">
  28. 批量操作
  29. </view>
  30. </view>
  31. </view>
  32. <!-- 区域筛选 -->
  33. <view class="contented" :style="{'height':(h-mt)+'px'}" v-show="areaShow">
  34. <view class="custom_popup">
  35. <view class="types">
  36. <view class="pricequjian" style="height: 240rpx;">
  37. <view class="jiage" v-for="(item, index) in list1" :key="index"
  38. @click="clickareaShow(item, index)">
  39. <view class="contentpeice">
  40. <view class="title" :class="{'Doublactive': areaShowIndex == index}">
  41. {{item.name}}
  42. </view>
  43. <view class="image" v-if="areaShowIndex == index">
  44. <image
  45. src="https://i.ringzle.com/file/20240316/16dd69efb40242de83da8207539ec73e.png"
  46. mode=""></image>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 房型选择 -->
  56. <view class="type" v-for="(item,index) in roomType" :key="index">
  57. <view class="left" v-if="Selected==true">
  58. <view class="image">
  59. <image @tap="selectPerson(item,index)"
  60. :src="selectedTags.includes(item)?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
  61. </image>
  62. </view>
  63. </view>
  64. <view style="width: 100%;">
  65. <view class="right">
  66. <view class="right-left">
  67. <image :src="item.coverImg" mode=""></image>
  68. </view>
  69. <view class="right-right">
  70. <view class="top">
  71. <text style="font-size: 30rpx; color: #333;">{{item.name||item.goodsName}}</text>
  72. </view>
  73. <view class="under">
  74. <view style="font-size: 24rpx; color: #777;">销量:{{item.salesVolume||item.soldNum}}</view>
  75. <view style="font-size: 36rpx; color: #FF4141; font-weight: Bold; margin-top: 16rpx;">
  76. ¥{{item.discountPrice||item.normalPrice}}</view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="type-btn">
  81. <view class="type-btn-left">
  82. </view>
  83. <view class="type-btn-right">
  84. <view class="" @click="shanchu(item,index)">
  85. 删除
  86. </view>
  87. <view class="" @click="gaijia(item,index)">
  88. 改价格
  89. </view>
  90. <view v-if="canyinmeishi" class="" @click="xiajia(item,index)">
  91. {{fromData.status==0?'下架':'上架'}}
  92. </view>
  93. <view v-if="!canyinmeishi" class="" @click="xiajia1(item,index)">
  94. {{fromData.status==0?'上架':'下架'}}
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. <!-- 批量按钮 -->
  101. <view class="btn-btn" v-if="Selected==true">
  102. <view class="bottom-btn">
  103. <view class="left">
  104. <view class="image">
  105. <image
  106. :src="selectedTags.length>0?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
  107. </image>
  108. </view>
  109. <view class="text">
  110. 已选:{{selectedTags.length}}
  111. </view>
  112. </view>
  113. <view class="right">
  114. <view v-if="canyinmeishi" class="right-btn" @click="piliangxiajia">
  115. {{fromData.status==0?'批量下架':'批量上架'}}
  116. </view>
  117. <view v-if="!canyinmeishi" class="right-btn" @click="piliangxiajia">
  118. {{fromData.status==0?'批量上架':'批量下架'}}
  119. </view>
  120. <view class="right-btn" @click="piliangshanchu">
  121. 批量删除
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. <!-- 改价弹出框 -->
  127. <u-popup :show="showPricing" @close="closegaijia" @open="opengaijia" :round="10">
  128. <view class="gaijiadiv">
  129. <view class="toubu">
  130. 改价格
  131. <view class="toubux" @click="closegaijia">
  132. <u-icon name="close" color="#000000" size="40"></u-icon>
  133. </view>
  134. </view>
  135. <view class="jiainput">
  136. <u--input type='number' v-model="newprice" placeholder="请输入价格" border="surround"
  137. clearable></u--input>
  138. </view>
  139. <view class="queding">
  140. <view class="queding1" @click="closegaijia">
  141. 取消
  142. </view>
  143. <view class="queding2" @click="quedingjiae">
  144. 确定
  145. </view>
  146. </view>
  147. </view>
  148. </u-popup>
  149. <!-- 下架弹出框 -->
  150. <u-modal :show="xiajiashow" :title="fromData.status==0?'下架选中的商品':'上架选中的商品'"
  151. :content="fromData.status==0?'下架后商品不可在前台继续售卖,是否继续?':'上架后商品可在前台售卖,是否继续?'" showConfirmButton='true'
  152. showCancelButton='true' @confirm='quedingxiajia' @cancel='quxiaoxiajia'></u-modal>
  153. <!-- 下架弹出框渔家乐 -->
  154. <u-modal :show="xiajiashow1" :title="fromData.status==1?'下架选中的商品':'上架选中的商品'"
  155. :content="fromData.status==1?'下架后商品不可在前台继续售卖,是否继续?':'上架后商品可在前台售卖,是否继续?'" showConfirmButton='true'
  156. showCancelButton='true' @confirm='quedingxiajia' @cancel='quxiaoxiajia'></u-modal>
  157. <!-- 删除弹出框 -->
  158. <u-modal :show="shanchushow" title="删除选中的商品" content='删除后的商品不可在前台继续售卖,是否继续?' showConfirmButton='true'
  159. showCancelButton='true' @confirm='quedingshanchu' @cancel='quxiaoshanchu'></u-modal>
  160. <view class="mainContain">
  161. <!-- <view class="nodata" v-if='dataList.length==0'>
  162. <NoData></NoData>
  163. </view> -->
  164. </view>
  165. <u-toast ref="uToast"></u-toast>
  166. </view>
  167. </template>
  168. <script>
  169. import TopTabs from '@/components/TopTabs/topTabs.vue';
  170. // import NoData from '../../components/NoData/index.vue';
  171. export default {
  172. components: {
  173. TopTabs,
  174. // NoData
  175. },
  176. data() {
  177. return {
  178. h: uni.getSystemInfoSync().windowHeight,
  179. mt: uni.getSystemInfoSync().statusBarHeight + 44,
  180. newprice: '',
  181. lsdata: {},
  182. current: 0,
  183. canyinmeishi: false,
  184. xiajiashow: false,
  185. xiajiashow1: false,
  186. shanchushow: false,
  187. tabList: [],
  188. homestayId: uni.getStorageSync('homestayId') || 0,
  189. roomType: [],
  190. selectedTags: [],
  191. mytotal: 0,
  192. isSelect: false,
  193. Selected: false,
  194. showPricing: false,
  195. areaShow: false,
  196. list1: [{
  197. name: '创建时间',
  198. id: 1,
  199. },
  200. {
  201. name: '价格从高到低',
  202. id: 2,
  203. },
  204. {
  205. name: '价格从低到高',
  206. id: 4,
  207. },
  208. {
  209. name: '销量从高到低',
  210. id: 2,
  211. },
  212. ],
  213. areaShowIndex: null,
  214. fromData: {
  215. merchantId: uni.getStorageSync('merchantId'), //商户id
  216. limit: 99999,
  217. page: 1,
  218. sortType: '', //选择条件:1创建时间 2销量从高到低 3价格从高到低 4价格从低到高
  219. status: 0, //状态:0上架1下架
  220. }
  221. }
  222. },
  223. onLoad(option) {
  224. console.log('111111111111111111', uni.getStorageSync('merchantType'))
  225. //this.getHousekeeping();
  226. if (uni.getStorageSync('merchantType') == 4) {
  227. this.canyinmeishi = true;
  228. this.tabList = [{
  229. name: '出售中',
  230. id: 0
  231. },
  232. {
  233. name: '待上架',
  234. id: 1
  235. },
  236. ]
  237. this.getRepast(); //获取商品列表(餐饮美食)
  238. } else {
  239. this.canyinmeishi = false;
  240. this.tabList = [{
  241. name: '出售中',
  242. id: 1
  243. },
  244. {
  245. name: '待上架',
  246. id: 0
  247. },
  248. ]
  249. this.fromData = {
  250. merchantId: uni.getStorageSync('merchantId'), //商户id
  251. limit: 99999,
  252. page: 1,
  253. sortType: '', //选择条件:1创建时间 2销量从高到低 3价格从高到低 4价格从低到高
  254. status: 1, //状态:0上架1下架
  255. }
  256. this.yujialedata(); //获取商品列表(渔家乐)
  257. }
  258. },
  259. methods: {
  260. getHousekeeping() {
  261. this.$api.get('/sys/dict/type/all').then(res => {
  262. let alldata = res.data.data.find((p) => p.dictType == 'food_type').dataList;
  263. console.log('alldata', alldata)
  264. // this.categoryMain = alldata.map((item, index, arr) => {
  265. // let json = {};
  266. // json.name = item.dictLabel;
  267. // json.type = item.dictValue;
  268. // json.icon =
  269. // 'https://i.ringzle.com/file/20231125/a314703e463d43c7808714d1b29632ad.png';
  270. // return json
  271. // })
  272. })
  273. },
  274. piliangxiajia() {
  275. if (uni.getStorageSync('merchantType') == 4) {
  276. if (this.selectedTags.length == 0) {
  277. this.$refs.uToast.show({
  278. type: 'success',
  279. title: '',
  280. message: "请选择数据",
  281. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  282. })
  283. } else {
  284. let namesArray = this.selectedTags.map(obj => obj.id);
  285. let postdata = {
  286. discountPrice: 0,
  287. id: namesArray,
  288. status: this.fromData.status == 1 ? 0 : 1,
  289. };
  290. this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
  291. this.$refs.uToast.show({
  292. type: 'success',
  293. title: '',
  294. message: "成功",
  295. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  296. })
  297. this.selectedTags = [];
  298. this.Selected = false;
  299. this.getRepast(); //获取商品列表
  300. })
  301. }
  302. } else {
  303. if (this.selectedTags.length == 0) {
  304. this.$refs.uToast.show({
  305. type: 'success',
  306. title: '',
  307. message: "请选择数据",
  308. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  309. })
  310. } else {
  311. let postdata = this.selectedTags.map((item, index, arr) => {
  312. let json = {};
  313. json.id = item.id;
  314. json.merchantId = uni.getStorageSync('merchantId');
  315. json.status = item.status == 0 ? 1 : 0;
  316. return json
  317. })
  318. // let namesArray = this.selectedTags.map(obj => obj.id);
  319. // let postdata = {
  320. // id: namesArray,
  321. // status: this.fromData.status,
  322. // };
  323. this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
  324. this.$refs.uToast.show({
  325. type: 'success',
  326. title: '',
  327. message: "成功",
  328. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  329. })
  330. this.selectedTags = [];
  331. this.Selected = false;
  332. this.yujialedata(); //获取商品列表(渔家乐)
  333. })
  334. }
  335. }
  336. },
  337. piliangshanchu() {
  338. if (uni.getStorageSync('merchantType') == 4) {
  339. if (this.selectedTags.length == 0) {
  340. this.$refs.uToast.show({
  341. type: 'success',
  342. title: '',
  343. message: "请选择数据",
  344. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  345. })
  346. } else {
  347. let namesArray = this.selectedTags.map(obj => obj.id);
  348. //status: this.fromData.status,
  349. this.$api.del('/api/merchant/food/delProduct', namesArray).then(res => {
  350. this.$refs.uToast.show({
  351. type: 'success',
  352. title: '',
  353. message: "成功",
  354. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  355. })
  356. this.selectedTags = [];
  357. this.Selected = false;
  358. this.getRepast(); //获取商品列表
  359. })
  360. }
  361. } else {
  362. if (this.selectedTags.length == 0) {
  363. this.$refs.uToast.show({
  364. type: 'success',
  365. title: '',
  366. message: "请选择数据",
  367. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  368. })
  369. } else {
  370. let namesArray = this.selectedTags.map(obj => obj.id);
  371. //status: this.fromData.status,
  372. this.$api.del('/scenic/goods', namesArray).then(res => {
  373. this.$refs.uToast.show({
  374. type: 'success',
  375. title: '',
  376. message: "成功",
  377. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  378. })
  379. this.selectedTags = [];
  380. this.Selected = false;
  381. this.yujialedata(); //获取商品列表(渔家乐)
  382. })
  383. }
  384. }
  385. },
  386. shanchu(e, i) {
  387. //console.log('111111111111111111', e, i)
  388. this.lsdata = e;
  389. this.shanchushow = true;
  390. },
  391. quedingshanchu() {
  392. if (uni.getStorageSync('merchantType') == 4) {
  393. //(餐饮美食)
  394. let postdata = [this.lsdata.id];
  395. //status: this.fromData.status,
  396. console.log('postdata', postdata)
  397. this.$api.del('/api/merchant/food/delProduct', postdata).then(res => {
  398. this.$refs.uToast.show({
  399. type: 'success',
  400. title: '',
  401. message: "成功",
  402. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  403. })
  404. this.quxiaoshanchu();
  405. this.getRepast(); //获取商品列表
  406. })
  407. } else {
  408. //(渔家乐)
  409. let postdata = [this.lsdata.id];
  410. //status: this.fromData.status,
  411. console.log('postdata', postdata)
  412. this.$api.del('/scenic/goods', postdata).then(res => {
  413. this.$refs.uToast.show({
  414. type: 'success',
  415. title: '',
  416. message: "成功",
  417. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  418. })
  419. this.quxiaoshanchu();
  420. this.yujialedata(); //获取商品列表(渔家乐)
  421. })
  422. }
  423. },
  424. quxiaoshanchu() {
  425. // console.log('quxiaoxiajia',this.lsdata)
  426. this.lsdata = {};
  427. this.shanchushow = false;
  428. },
  429. gaijia(e, i) {
  430. console.log('111111111111111111', e, i)
  431. this.showPricing = true;
  432. this.lsdata = e;
  433. },
  434. closegaijia() {
  435. this.showPricing = false;
  436. this.newprice = '';
  437. this.lsdata = {};
  438. },
  439. quedingjiae() {
  440. if (uni.getStorageSync('merchantType') == 4) {
  441. //获取商品列表(餐饮美食)
  442. //console.log('111111111111111111', this.newprice)
  443. let postdata = {
  444. discountPrice: this.newprice,
  445. ids: [this.lsdata.id],
  446. status: this.fromData.status,
  447. };
  448. //console.log('postdata', postdata)
  449. this.$api.post('/api/merchant/food/updateDiscountPrice', postdata).then(res => {
  450. this.$refs.uToast.show({
  451. type: 'success',
  452. title: '',
  453. message: "成功",
  454. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  455. })
  456. this.closegaijia();
  457. this.getRepast(); //获取商品列表
  458. })
  459. } else {
  460. //获取商品列表(渔家乐)
  461. if (this.lsdata.goodsType == 1) {
  462. let postdata = {
  463. discountPrice: this.newprice,
  464. id: this.lsdata.id,
  465. status: this.fromData.status,
  466. };
  467. console.log('postdata', postdata)
  468. this.$api.put('/scenic/goods', postdata).then(res => {
  469. this.$refs.uToast.show({
  470. type: 'success',
  471. title: '',
  472. message: "成功",
  473. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  474. })
  475. this.closegaijia();
  476. this.yujialedata(); //获取商品列表(渔家乐)
  477. })
  478. } else {
  479. let postdata = {
  480. normalPrice: this.newprice,
  481. id: this.lsdata.id,
  482. status: this.fromData.status,
  483. };
  484. console.log('postdata', postdata)
  485. this.$api.put('/scenic/goods', postdata).then(res => {
  486. this.$refs.uToast.show({
  487. type: 'success',
  488. title: '',
  489. message: "成功",
  490. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  491. })
  492. this.closegaijia();
  493. this.yujialedata(); //获取商品列表(渔家乐)
  494. })
  495. }
  496. }
  497. },
  498. opengaijia() {},
  499. xiajia1(e, i) {
  500. console.log('111111111111111111', e, i)
  501. this.lsdata = e;
  502. this.xiajiashow1 = true;
  503. },
  504. xiajia(e, i) {
  505. console.log('111111111111111111', e, i)
  506. this.lsdata = e;
  507. this.xiajiashow = true;
  508. },
  509. quedingxiajia() {
  510. if (uni.getStorageSync('merchantType') == 4) {
  511. //获取商品列表(餐饮美食)
  512. let postdata = {
  513. discountPrice: this.lsdata.discountPrice,
  514. ids: [this.lsdata.id],
  515. status: this.fromData.status,
  516. };
  517. this.$api.post('/api/merchant/food/updateStatus', postdata).then(res => {
  518. this.$refs.uToast.show({
  519. type: 'success',
  520. title: '',
  521. message: "下架成功",
  522. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  523. })
  524. this.quxiaoxiajia();
  525. this.getRepast(); //获取商品列表
  526. })
  527. } else {
  528. //获取商品列表(渔家乐)
  529. let postdata = {
  530. id: this.lsdata.id,
  531. status: this.fromData.status == 1 ? 0 : 1,
  532. };
  533. this.$api.put('/scenic/goods', postdata).then(res => {
  534. this.$refs.uToast.show({
  535. type: 'success',
  536. title: '',
  537. message: "下架成功",
  538. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  539. })
  540. this.quxiaoxiajia();
  541. this.yujialedata();
  542. })
  543. }
  544. },
  545. quxiaoxiajia() {
  546. // console.log('quxiaoxiajia',this.lsdata)
  547. this.lsdata = {};
  548. this.xiajiashow = false;
  549. this.xiajiashow1 = false;
  550. },
  551. selectPerson(e, i) {
  552. if (this.selectedTags.includes(e)) {
  553. this.selectedTags = this.selectedTags.filter(t => t !== e);
  554. } else {
  555. this.selectedTags.push(e);
  556. }
  557. console.log(' this.selectedTags', this.selectedTags)
  558. },
  559. yujialedata() {
  560. this.$api.get('/scenic/goods/page', this.fromData).then(res => {
  561. console.log(res.data.data.list);
  562. this.roomType = res.data.data.list;
  563. this.mytotal = res.data.data.total;
  564. })
  565. },
  566. getRepast() {
  567. this.$api.get('/api/merchant/food/product/page', this.fromData).then(res => {
  568. console.log(res.data.data.list);
  569. this.roomType = res.data.data.list;
  570. this.mytotal = res.data.data.total;
  571. })
  572. },
  573. // 区域筛选
  574. clickareaShow(e, i) {
  575. this.areaShowIndex = i;
  576. this.areaShow = false;
  577. this.fromData.sortType = e.id;
  578. this.fromData.page = 1;
  579. this.getRepast();
  580. },
  581. // 上架时间
  582. areaShowed() {
  583. console.log(123);
  584. this.areaShow = !this.areaShow
  585. },
  586. changeTab1(e, i) {
  587. this.roomType = [];
  588. this.selectedTags = [];
  589. this.current = i;
  590. this.fromData.status = e.id;
  591. this.fromData.page = 1;
  592. if (uni.getStorageSync('merchantType') == 4) {
  593. this.getRepast(); //获取商品列表(餐饮美食)
  594. } else {
  595. this.yujialedata(); //获取商品列表(渔家乐)
  596. }
  597. },
  598. // 批量显示
  599. showList() {
  600. this.Selected = !this.Selected
  601. },
  602. }
  603. }
  604. </script>
  605. <style lang="scss" scoped>
  606. .queding {
  607. width: 750rpx;
  608. height: 140rpx;
  609. display: flex;
  610. justify-content: space-around;
  611. align-items: center;
  612. .queding1 {
  613. width: 330rpx;
  614. height: 88rpx;
  615. background: #F0F2F5;
  616. border-radius: 44rpx;
  617. font-family: PingFangSC, PingFang SC;
  618. font-weight: 400;
  619. font-size: 32rpx;
  620. color: #333333;
  621. line-height: 88rpx;
  622. text-align: center;
  623. font-style: normal;
  624. }
  625. .queding2 {
  626. width: 330rpx;
  627. height: 88rpx;
  628. background: #007A69;
  629. border-radius: 44rpx;
  630. font-family: PingFangSC, PingFang SC;
  631. font-weight: 400;
  632. font-size: 32rpx;
  633. color: #FFFFFF;
  634. line-height: 88rpx;
  635. text-align: center;
  636. font-style: normal;
  637. }
  638. }
  639. .jiainput {
  640. width: 690rpx;
  641. height: 100rpx;
  642. margin: 0 auto;
  643. }
  644. .gaijiadiv {
  645. width: 750rpx;
  646. height: 950rpx;
  647. .toubu {
  648. width: 750rpx;
  649. height: 110rpx;
  650. font-family: PingFang-SC, PingFang-SC;
  651. font-weight: bold;
  652. font-size: 36rpx;
  653. color: #333333;
  654. line-height: 110rpx;
  655. text-align: center;
  656. font-style: normal;
  657. position: relative;
  658. .toubux {
  659. position: absolute;
  660. top: 33rpx;
  661. right: 30rpx;
  662. }
  663. }
  664. }
  665. .Doublactive {
  666. // background-color: #F0F7F6 !important;
  667. color: #007A69 !important;
  668. // border: 1px solid #007A69 !important;
  669. }
  670. .contented {
  671. width: 100%;
  672. padding: 0 24rpx;
  673. box-sizing: border-box;
  674. position: relative;
  675. }
  676. .custom_popup {
  677. width: 100%;
  678. height: 100%;
  679. background: rgba(0, 0, 0, .4);
  680. top: 0;
  681. left: 0;
  682. position: absolute;
  683. z-index: 999;
  684. .types {
  685. width: 100%;
  686. padding: 30rpx 30rpx 56rpx;
  687. box-sizing: border-box;
  688. background: #FFFFFF;
  689. .pricequjian {
  690. width: 100%;
  691. .contentpeice {
  692. width: 100%;
  693. display: flex;
  694. justify-content: space-between;
  695. margin: 15rpx 0;
  696. .title {
  697. font-weight: Regular;
  698. font-size: 28rpx;
  699. color: #333333;
  700. }
  701. .image {
  702. width: 28rpx;
  703. height: 20rpx;
  704. image {
  705. width: 100%;
  706. height: 100%;
  707. }
  708. }
  709. }
  710. }
  711. }
  712. }
  713. .pages {
  714. background: #F5F8FA;
  715. box-sizing: border-box;
  716. .tb {
  717. width: 100%;
  718. top: 0;
  719. left: 0;
  720. z-index: 999;
  721. .searchBoxParent {
  722. width: 100%;
  723. background: #fff;
  724. padding: 20rpx 24rpx 6rpx;
  725. box-sizing: border-box;
  726. .searchBox {
  727. width: 100%;
  728. background-color: #fff;
  729. }
  730. }
  731. .tabs {
  732. background: #fff;
  733. padding: 26rpx 0;
  734. display: flex;
  735. align-items: center;
  736. width: 100%;
  737. &>view {
  738. width: 25%;
  739. font-size: 28rpx;
  740. font-family: PingFangSC-Regular, PingFang SC;
  741. font-weight: 400;
  742. color: black;
  743. line-height: 40rpx;
  744. position: relative;
  745. text-align: center;
  746. }
  747. .active {
  748. font-size: 32rpx;
  749. font-family: PingFang-SC-Bold, PingFang-SC;
  750. font-weight: bold;
  751. color: black;
  752. line-height: 45rpx;
  753. }
  754. .active::after {
  755. position: absolute;
  756. content: '';
  757. width: 50rpx;
  758. height: 8rpx;
  759. background: #007A69;
  760. bottom: -26rpx;
  761. left: 60%;
  762. margin-left: -42rpx;
  763. }
  764. }
  765. }
  766. .green {}
  767. .mainContain {
  768. display: flex;
  769. flex-direction: column;
  770. padding: 0 20rpx;
  771. .nodata {
  772. background: white;
  773. }
  774. .card {
  775. background: #fff;
  776. border-radius: 16rpx;
  777. margin: 20rpx 0;
  778. padding: 20rpx;
  779. .header {
  780. display: flex;
  781. justify-content: space-between;
  782. border-bottom: 1px #f3f3f3 solid;
  783. padding: 20rpx;
  784. .red {
  785. color: indianred;
  786. }
  787. .green {
  788. color: #999999;
  789. }
  790. .blue {
  791. color: #1372FF;
  792. }
  793. .grey {
  794. color: #4C5F76;
  795. }
  796. .orange {
  797. color: #FF9100;
  798. }
  799. }
  800. .mainContent {
  801. // border-bottom: 1px #f3f3f3 solid;
  802. display: flex;
  803. padding: 20rpx 0;
  804. // justify-content: space-evenly;
  805. .image {
  806. background-repeat: no-repeat;
  807. background-size: cover;
  808. width: 198rpx;
  809. height: 180rpx;
  810. border-radius: 16rpx;
  811. }
  812. .middle {
  813. padding-top: 16rpx;
  814. color: #777777;
  815. // display: flex;
  816. // flex-direction: column;
  817. // justify-content: space-between;
  818. margin-left: 25rpx;
  819. width: 100%;
  820. .title {
  821. font-weight: 700;
  822. font-size: 32rpx;
  823. color: black;
  824. }
  825. .info {
  826. padding-top: 30rpx;
  827. color: #777777;
  828. // display: flex;
  829. // flex-direction: column;
  830. &>span {
  831. margin-top: 10rpx;
  832. }
  833. }
  834. }
  835. .price {
  836. color: red;
  837. text-align: center;
  838. height: 100%;
  839. align-items: center;
  840. align-self: center;
  841. font-size: 29rpx;
  842. font-weight: 700;
  843. }
  844. }
  845. .bottom {
  846. // padding: 30rpx 20rpx;
  847. display: flex;
  848. justify-content: flex-end;
  849. .detail {
  850. // border: 1rpx solid darkgrey;
  851. border-radius: 16rpx;
  852. color: darkgrey;
  853. padding: 13rpx 34rpx;
  854. background-color: #F6F6F6;
  855. font-size: 26rpx;
  856. color: #333333;
  857. font-weight: Regular;
  858. }
  859. .del {
  860. border-radius: 16rpx;
  861. color: darkgrey;
  862. padding: 13rpx 34rpx;
  863. background-color: #007A69;
  864. font-size: 26rpx;
  865. color: #fff;
  866. font-weight: Regular;
  867. }
  868. }
  869. }
  870. }
  871. }
  872. .u-input__content {
  873. margin-top: 22rpx !important;
  874. }
  875. .uicon-arrow-right,
  876. .uicon-close-circle-fill {
  877. margin-top: 32rpx !important;
  878. margin-right: 20rpx !important;
  879. }
  880. .pop-pop {
  881. height: 65vh;
  882. padding: 46rpx 20rpx 0;
  883. .hander-one {
  884. display: flex;
  885. justify-content: space-between;
  886. .text {
  887. font-size: 36rpx;
  888. color: #333333;
  889. font-weight: bold;
  890. }
  891. .del {}
  892. }
  893. .hander-two {
  894. display: flex;
  895. align-items: center;
  896. margin: 30rpx 0;
  897. .hander-two-text {
  898. font-size: 30rpx;
  899. color: #333333;
  900. font-weight: Regular;
  901. }
  902. .hander-two-image {
  903. display: flex;
  904. align-items: center;
  905. .image {
  906. margin: 0 10rpx;
  907. width: 30rpx;
  908. height: 30rpx;
  909. image {
  910. width: 100%;
  911. height: 100%;
  912. }
  913. }
  914. }
  915. }
  916. .hander-three {
  917. display: flex;
  918. border: 1rpx solid #CCCCCC;
  919. border-radius: 16rpx;
  920. justify-content: space-between;
  921. height: 102rpx;
  922. line-height: 102rpx;
  923. .hander-three-text {
  924. width: 200rpx;
  925. text-align: left;
  926. display: flex;
  927. justify-content: space-between;
  928. margin: 0 20rpx;
  929. }
  930. .hander-three-input {
  931. width: 55%;
  932. }
  933. .hander-three-icon {
  934. height: 102rpx;
  935. line-height: 102rpx;
  936. }
  937. }
  938. .hander-four {
  939. margin-top: 30rpx;
  940. display: flex;
  941. border-radius: 16rpx;
  942. justify-content: space-between;
  943. border: 1rpx solid #CCCCCC;
  944. height: 102rpx;
  945. line-height: 102rpx;
  946. .hander-three-text {
  947. width: 200rpx;
  948. text-align: center;
  949. display: flex;
  950. justify-content: space-between;
  951. margin: 0 20rpx;
  952. }
  953. .hander-three-input {
  954. width: 55%;
  955. }
  956. .hander-three-icon {
  957. height: 102rpx;
  958. line-height: 102rpx;
  959. }
  960. }
  961. }
  962. .page {
  963. background: #F3F4F4;
  964. padding-bottom: 260rpx;
  965. box-sizing: border-box;
  966. overflow-y: auto;
  967. overflow-x: auto;
  968. }
  969. .typeNum {
  970. // width: 100%;
  971. height: 73rpx;
  972. display: flex;
  973. justify-content: space-between;
  974. padding: 23rpx 24rpx;
  975. align-items: center;
  976. .left {
  977. display: flex;
  978. align-items: center;
  979. .active {
  980. color: #007A69;
  981. }
  982. }
  983. .right {
  984. display: flex;
  985. align-items: center;
  986. .image {
  987. margin: 0 10rpx;
  988. width: 30rpx;
  989. height: 30rpx;
  990. image {
  991. width: 100%;
  992. height: 100%;
  993. }
  994. }
  995. .text {
  996. font-size: 28rpx;
  997. font-weight: Regular;
  998. color: #333333;
  999. }
  1000. }
  1001. }
  1002. .type {
  1003. margin: 0 auto;
  1004. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1005. width: 86%;
  1006. // height: 114rpx;
  1007. background-color: #fff;
  1008. padding: 30rpx;
  1009. margin-bottom: 20rpx;
  1010. display: flex;
  1011. .left {
  1012. height: 114rpx;
  1013. line-height: 200rpx;
  1014. margin-right: 20rpx;
  1015. .image {
  1016. margin: 0 10rpx;
  1017. width: 30rpx;
  1018. height: 30rpx;
  1019. image {
  1020. width: 100%;
  1021. height: 100%;
  1022. }
  1023. }
  1024. }
  1025. .right {
  1026. width: 100%;
  1027. display: flex;
  1028. .right-left {
  1029. width: 172rpx;
  1030. height: 172rpx;
  1031. border-radius: 16rpx;
  1032. margin-right: 22rpx;
  1033. image {
  1034. width: 100%;
  1035. height: 100%;
  1036. border-radius: 16rpx;
  1037. }
  1038. }
  1039. .right-right {}
  1040. }
  1041. .type-btn {
  1042. width: 100%;
  1043. display: flex;
  1044. justify-content: space-between;
  1045. .type-btn-left {
  1046. width: 50rpx;
  1047. }
  1048. .type-btn-right {
  1049. display: flex;
  1050. view {
  1051. padding: 15rpx 23rpx;
  1052. background-color: #F6F6F6;
  1053. font-size: 24rpx;
  1054. color: #333;
  1055. font-weight: Regular;
  1056. margin-right: 20rpx;
  1057. border-radius: 50rpx;
  1058. }
  1059. }
  1060. }
  1061. }
  1062. .top {
  1063. display: flex;
  1064. justify-content: space-between;
  1065. }
  1066. .under {
  1067. margin-top: 20rpx;
  1068. // display: flex;
  1069. // justify-content: space-between;
  1070. }
  1071. .btn-btn {
  1072. width: 100%;
  1073. height: 136rpx;
  1074. background-color: #fff;
  1075. position: fixed;
  1076. bottom: 0;
  1077. padding: 30rpx 0 0;
  1078. // margin: 0 auto;
  1079. z-index: 9;
  1080. // margin-top: 30rpx;
  1081. // margin-left: 30rpx;
  1082. .bottom-btn {
  1083. display: flex;
  1084. justify-content: space-between;
  1085. margin: 0 24rpx;
  1086. .left {
  1087. width: 25%;
  1088. display: flex;
  1089. align-items: center;
  1090. .image {
  1091. width: 38rpx;
  1092. height: 38rpx;
  1093. margin: 0 10rpx;
  1094. image {
  1095. width: 100%;
  1096. height: 100%;
  1097. }
  1098. }
  1099. }
  1100. .right {
  1101. width: 75%;
  1102. display: flex;
  1103. justify-content: space-evenly;
  1104. .right-btn {
  1105. width: 148rpx;
  1106. height: 80rpx;
  1107. line-height: 80rpx;
  1108. background-color: #1372FF;
  1109. border-radius: 16rpx;
  1110. font-size: 26rpx;
  1111. color: #fff;
  1112. font-weight: Regular;
  1113. text-align: center;
  1114. }
  1115. }
  1116. }
  1117. }
  1118. .btn {
  1119. margin: 0 auto;
  1120. width: 690rpx;
  1121. height: 96rpx;
  1122. background-color: #1372FF;
  1123. color: #fff;
  1124. display: flex;
  1125. justify-content: center;
  1126. align-items: center;
  1127. font-size: 34rpx;
  1128. border-radius: 48rpx;
  1129. }
  1130. </style>