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. console.log('+++++++', e, i);
  553. if (this.selectedTags.includes(e)) {
  554. this.selectedTags = this.selectedTags.filter(t => t !== e);
  555. } else {
  556. this.selectedTags.push(e);
  557. }
  558. console.log(' this.selectedTags', this.selectedTags)
  559. },
  560. yujialedata() {
  561. this.$api.get('/scenic/goods/page', this.fromData).then(res => {
  562. console.log(res.data.data.list);
  563. this.roomType = res.data.data.list;
  564. this.mytotal = res.data.data.total;
  565. })
  566. },
  567. getRepast() {
  568. this.$api.get('/api/merchant/food/product/page', this.fromData).then(res => {
  569. console.log(res.data.data.list);
  570. this.roomType = res.data.data.list;
  571. this.mytotal = res.data.data.total;
  572. })
  573. },
  574. // 区域筛选
  575. clickareaShow(e, i) {
  576. this.areaShowIndex = i;
  577. this.areaShow = false;
  578. this.fromData.sortType = e.id;
  579. this.fromData.page = 1;
  580. this.getRepast();
  581. },
  582. // 上架时间
  583. areaShowed() {
  584. console.log(123);
  585. this.areaShow = !this.areaShow
  586. },
  587. changeTab1(e, i) {
  588. this.roomType = [];
  589. this.selectedTags = [];
  590. this.current = i;
  591. this.fromData.status = e.id;
  592. this.fromData.page = 1;
  593. if (uni.getStorageSync('merchantType') == 4) {
  594. this.getRepast(); //获取商品列表(餐饮美食)
  595. } else {
  596. this.yujialedata(); //获取商品列表(渔家乐)
  597. }
  598. },
  599. // 批量显示
  600. showList() {
  601. this.Selected = !this.Selected
  602. },
  603. }
  604. }
  605. </script>
  606. <style lang="scss" scoped>
  607. .queding {
  608. width: 750rpx;
  609. height: 140rpx;
  610. display: flex;
  611. justify-content: space-around;
  612. align-items: center;
  613. .queding1 {
  614. width: 330rpx;
  615. height: 88rpx;
  616. background: #F0F2F5;
  617. border-radius: 44rpx;
  618. font-family: PingFangSC, PingFang SC;
  619. font-weight: 400;
  620. font-size: 32rpx;
  621. color: #333333;
  622. line-height: 88rpx;
  623. text-align: center;
  624. font-style: normal;
  625. }
  626. .queding2 {
  627. width: 330rpx;
  628. height: 88rpx;
  629. background: #007A69;
  630. border-radius: 44rpx;
  631. font-family: PingFangSC, PingFang SC;
  632. font-weight: 400;
  633. font-size: 32rpx;
  634. color: #FFFFFF;
  635. line-height: 88rpx;
  636. text-align: center;
  637. font-style: normal;
  638. }
  639. }
  640. .jiainput {
  641. width: 690rpx;
  642. height: 100rpx;
  643. margin: 0 auto;
  644. }
  645. .gaijiadiv {
  646. width: 750rpx;
  647. height: 950rpx;
  648. .toubu {
  649. width: 750rpx;
  650. height: 110rpx;
  651. font-family: PingFang-SC, PingFang-SC;
  652. font-weight: bold;
  653. font-size: 36rpx;
  654. color: #333333;
  655. line-height: 110rpx;
  656. text-align: center;
  657. font-style: normal;
  658. position: relative;
  659. .toubux {
  660. position: absolute;
  661. top: 33rpx;
  662. right: 30rpx;
  663. }
  664. }
  665. }
  666. .Doublactive {
  667. // background-color: #F0F7F6 !important;
  668. color: #007A69 !important;
  669. // border: 1px solid #007A69 !important;
  670. }
  671. .contented {
  672. width: 100%;
  673. padding: 0 24rpx;
  674. box-sizing: border-box;
  675. position: relative;
  676. }
  677. .custom_popup {
  678. width: 100%;
  679. height: 100%;
  680. background: rgba(0, 0, 0, .4);
  681. top: 0;
  682. left: 0;
  683. position: absolute;
  684. z-index: 999;
  685. .types {
  686. width: 100%;
  687. padding: 30rpx 30rpx 56rpx;
  688. box-sizing: border-box;
  689. background: #FFFFFF;
  690. .pricequjian {
  691. width: 100%;
  692. .contentpeice {
  693. width: 100%;
  694. display: flex;
  695. justify-content: space-between;
  696. margin: 15rpx 0;
  697. .title {
  698. font-weight: Regular;
  699. font-size: 28rpx;
  700. color: #333333;
  701. }
  702. .image {
  703. width: 28rpx;
  704. height: 20rpx;
  705. image {
  706. width: 100%;
  707. height: 100%;
  708. }
  709. }
  710. }
  711. }
  712. }
  713. }
  714. .pages {
  715. background: #F5F8FA;
  716. box-sizing: border-box;
  717. .tb {
  718. width: 100%;
  719. top: 0;
  720. left: 0;
  721. z-index: 999;
  722. .searchBoxParent {
  723. width: 100%;
  724. background: #fff;
  725. padding: 20rpx 24rpx 6rpx;
  726. box-sizing: border-box;
  727. .searchBox {
  728. width: 100%;
  729. background-color: #fff;
  730. }
  731. }
  732. .tabs {
  733. background: #fff;
  734. padding: 26rpx 0;
  735. display: flex;
  736. align-items: center;
  737. width: 100%;
  738. &>view {
  739. width: 25%;
  740. font-size: 28rpx;
  741. font-family: PingFangSC-Regular, PingFang SC;
  742. font-weight: 400;
  743. color: black;
  744. line-height: 40rpx;
  745. position: relative;
  746. text-align: center;
  747. }
  748. .active {
  749. font-size: 32rpx;
  750. font-family: PingFang-SC-Bold, PingFang-SC;
  751. font-weight: bold;
  752. color: black;
  753. line-height: 45rpx;
  754. }
  755. .active::after {
  756. position: absolute;
  757. content: '';
  758. width: 50rpx;
  759. height: 8rpx;
  760. background: #007A69;
  761. bottom: -26rpx;
  762. left: 60%;
  763. margin-left: -42rpx;
  764. }
  765. }
  766. }
  767. .green {}
  768. .mainContain {
  769. display: flex;
  770. flex-direction: column;
  771. padding: 0 20rpx;
  772. .nodata {
  773. background: white;
  774. }
  775. .card {
  776. background: #fff;
  777. border-radius: 16rpx;
  778. margin: 20rpx 0;
  779. padding: 20rpx;
  780. .header {
  781. display: flex;
  782. justify-content: space-between;
  783. border-bottom: 1px #f3f3f3 solid;
  784. padding: 20rpx;
  785. .red {
  786. color: indianred;
  787. }
  788. .green {
  789. color: #999999;
  790. }
  791. .blue {
  792. color: #1372FF;
  793. }
  794. .grey {
  795. color: #4C5F76;
  796. }
  797. .orange {
  798. color: #FF9100;
  799. }
  800. }
  801. .mainContent {
  802. // border-bottom: 1px #f3f3f3 solid;
  803. display: flex;
  804. padding: 20rpx 0;
  805. // justify-content: space-evenly;
  806. .image {
  807. background-repeat: no-repeat;
  808. background-size: cover;
  809. width: 198rpx;
  810. height: 180rpx;
  811. border-radius: 16rpx;
  812. }
  813. .middle {
  814. padding-top: 16rpx;
  815. color: #777777;
  816. // display: flex;
  817. // flex-direction: column;
  818. // justify-content: space-between;
  819. margin-left: 25rpx;
  820. width: 100%;
  821. .title {
  822. font-weight: 700;
  823. font-size: 32rpx;
  824. color: black;
  825. }
  826. .info {
  827. padding-top: 30rpx;
  828. color: #777777;
  829. // display: flex;
  830. // flex-direction: column;
  831. &>span {
  832. margin-top: 10rpx;
  833. }
  834. }
  835. }
  836. .price {
  837. color: red;
  838. text-align: center;
  839. height: 100%;
  840. align-items: center;
  841. align-self: center;
  842. font-size: 29rpx;
  843. font-weight: 700;
  844. }
  845. }
  846. .bottom {
  847. // padding: 30rpx 20rpx;
  848. display: flex;
  849. justify-content: flex-end;
  850. .detail {
  851. // border: 1rpx solid darkgrey;
  852. border-radius: 16rpx;
  853. color: darkgrey;
  854. padding: 13rpx 34rpx;
  855. background-color: #F6F6F6;
  856. font-size: 26rpx;
  857. color: #333333;
  858. font-weight: Regular;
  859. }
  860. .del {
  861. border-radius: 16rpx;
  862. color: darkgrey;
  863. padding: 13rpx 34rpx;
  864. background-color: #007A69;
  865. font-size: 26rpx;
  866. color: #fff;
  867. font-weight: Regular;
  868. }
  869. }
  870. }
  871. }
  872. }
  873. .u-input__content {
  874. margin-top: 22rpx !important;
  875. }
  876. .uicon-arrow-right,
  877. .uicon-close-circle-fill {
  878. margin-top: 32rpx !important;
  879. margin-right: 20rpx !important;
  880. }
  881. .pop-pop {
  882. height: 65vh;
  883. padding: 46rpx 20rpx 0;
  884. .hander-one {
  885. display: flex;
  886. justify-content: space-between;
  887. .text {
  888. font-size: 36rpx;
  889. color: #333333;
  890. font-weight: bold;
  891. }
  892. .del {}
  893. }
  894. .hander-two {
  895. display: flex;
  896. align-items: center;
  897. margin: 30rpx 0;
  898. .hander-two-text {
  899. font-size: 30rpx;
  900. color: #333333;
  901. font-weight: Regular;
  902. }
  903. .hander-two-image {
  904. display: flex;
  905. align-items: center;
  906. .image {
  907. margin: 0 10rpx;
  908. width: 30rpx;
  909. height: 30rpx;
  910. image {
  911. width: 100%;
  912. height: 100%;
  913. }
  914. }
  915. }
  916. }
  917. .hander-three {
  918. display: flex;
  919. border: 1rpx solid #CCCCCC;
  920. border-radius: 16rpx;
  921. justify-content: space-between;
  922. height: 102rpx;
  923. line-height: 102rpx;
  924. .hander-three-text {
  925. width: 200rpx;
  926. text-align: left;
  927. display: flex;
  928. justify-content: space-between;
  929. margin: 0 20rpx;
  930. }
  931. .hander-three-input {
  932. width: 55%;
  933. }
  934. .hander-three-icon {
  935. height: 102rpx;
  936. line-height: 102rpx;
  937. }
  938. }
  939. .hander-four {
  940. margin-top: 30rpx;
  941. display: flex;
  942. border-radius: 16rpx;
  943. justify-content: space-between;
  944. border: 1rpx solid #CCCCCC;
  945. height: 102rpx;
  946. line-height: 102rpx;
  947. .hander-three-text {
  948. width: 200rpx;
  949. text-align: center;
  950. display: flex;
  951. justify-content: space-between;
  952. margin: 0 20rpx;
  953. }
  954. .hander-three-input {
  955. width: 55%;
  956. }
  957. .hander-three-icon {
  958. height: 102rpx;
  959. line-height: 102rpx;
  960. }
  961. }
  962. }
  963. .page {
  964. background: #F3F4F4;
  965. padding-bottom: 260rpx;
  966. box-sizing: border-box;
  967. overflow-y: auto;
  968. overflow-x: auto;
  969. }
  970. .typeNum {
  971. // width: 100%;
  972. height: 73rpx;
  973. display: flex;
  974. justify-content: space-between;
  975. padding: 23rpx 24rpx;
  976. align-items: center;
  977. .left {
  978. display: flex;
  979. align-items: center;
  980. .active {
  981. color: #007A69;
  982. }
  983. }
  984. .right {
  985. display: flex;
  986. align-items: center;
  987. .image {
  988. margin: 0 10rpx;
  989. width: 30rpx;
  990. height: 30rpx;
  991. image {
  992. width: 100%;
  993. height: 100%;
  994. }
  995. }
  996. .text {
  997. font-size: 28rpx;
  998. font-weight: Regular;
  999. color: #333333;
  1000. }
  1001. }
  1002. }
  1003. .type {
  1004. margin: 0 auto;
  1005. border-radius: 10rpx 10rpx 10rpx 10rpx;
  1006. width: 86%;
  1007. // height: 114rpx;
  1008. background-color: #fff;
  1009. padding: 30rpx;
  1010. margin-bottom: 20rpx;
  1011. display: flex;
  1012. .left {
  1013. height: 114rpx;
  1014. line-height: 200rpx;
  1015. margin-right: 20rpx;
  1016. .image {
  1017. margin: 0 10rpx;
  1018. width: 30rpx;
  1019. height: 30rpx;
  1020. image {
  1021. width: 100%;
  1022. height: 100%;
  1023. }
  1024. }
  1025. }
  1026. .right {
  1027. width: 100%;
  1028. display: flex;
  1029. .right-left {
  1030. width: 172rpx;
  1031. height: 172rpx;
  1032. border-radius: 16rpx;
  1033. margin-right: 22rpx;
  1034. image {
  1035. width: 100%;
  1036. height: 100%;
  1037. border-radius: 16rpx;
  1038. }
  1039. }
  1040. .right-right {}
  1041. }
  1042. .type-btn {
  1043. width: 100%;
  1044. display: flex;
  1045. justify-content: space-between;
  1046. .type-btn-left {
  1047. width: 50rpx;
  1048. }
  1049. .type-btn-right {
  1050. display: flex;
  1051. view {
  1052. padding: 15rpx 23rpx;
  1053. background-color: #F6F6F6;
  1054. font-size: 24rpx;
  1055. color: #333;
  1056. font-weight: Regular;
  1057. margin-right: 20rpx;
  1058. border-radius: 50rpx;
  1059. }
  1060. }
  1061. }
  1062. }
  1063. .top {
  1064. display: flex;
  1065. justify-content: space-between;
  1066. }
  1067. .under {
  1068. margin-top: 20rpx;
  1069. // display: flex;
  1070. // justify-content: space-between;
  1071. }
  1072. .btn-btn {
  1073. width: 100%;
  1074. height: 136rpx;
  1075. background-color: #fff;
  1076. position: fixed;
  1077. bottom: 0;
  1078. padding: 30rpx 0 0;
  1079. // margin: 0 auto;
  1080. z-index: 9;
  1081. // margin-top: 30rpx;
  1082. // margin-left: 30rpx;
  1083. .bottom-btn {
  1084. display: flex;
  1085. justify-content: space-between;
  1086. margin: 0 24rpx;
  1087. .left {
  1088. width: 25%;
  1089. display: flex;
  1090. align-items: center;
  1091. .image {
  1092. width: 38rpx;
  1093. height: 38rpx;
  1094. margin: 0 10rpx;
  1095. image {
  1096. width: 100%;
  1097. height: 100%;
  1098. }
  1099. }
  1100. }
  1101. .right {
  1102. width: 75%;
  1103. display: flex;
  1104. justify-content: space-evenly;
  1105. .right-btn {
  1106. width: 148rpx;
  1107. height: 80rpx;
  1108. line-height: 80rpx;
  1109. background-color: #1372FF;
  1110. border-radius: 16rpx;
  1111. font-size: 26rpx;
  1112. color: #fff;
  1113. font-weight: Regular;
  1114. text-align: center;
  1115. }
  1116. }
  1117. }
  1118. }
  1119. .btn {
  1120. margin: 0 auto;
  1121. width: 690rpx;
  1122. height: 96rpx;
  1123. background-color: #1372FF;
  1124. color: #fff;
  1125. display: flex;
  1126. justify-content: center;
  1127. align-items: center;
  1128. font-size: 34rpx;
  1129. border-radius: 48rpx;
  1130. }
  1131. </style>