index.vue 28 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295
  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. })
  265. },
  266. piliangxiajia() {
  267. if (uni.getStorageSync('merchantType') == 4) {
  268. if (this.selectedTags.length == 0) {
  269. this.$refs.uToast.show({
  270. type: 'success',
  271. title: '',
  272. message: "请选择数据",
  273. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  274. })
  275. } else {
  276. let namesArray = this.selectedTags.map(obj => obj.id);
  277. let postdata = {
  278. discountPrice: 0,
  279. id: namesArray,
  280. status: this.fromData.status == 1 ? 0 : 1,
  281. };
  282. this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
  283. this.$refs.uToast.show({
  284. type: 'success',
  285. title: '',
  286. message: "成功",
  287. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  288. })
  289. this.selectedTags = [];
  290. this.Selected = false;
  291. this.getRepast(); //获取商品列表
  292. })
  293. }
  294. } else {
  295. if (this.selectedTags.length == 0) {
  296. this.$refs.uToast.show({
  297. type: 'success',
  298. title: '',
  299. message: "请选择数据",
  300. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  301. })
  302. } else {
  303. let postdata = this.selectedTags.map((item, index, arr) => {
  304. let json = {};
  305. json.id = item.id;
  306. json.merchantId = uni.getStorageSync('merchantId');
  307. json.status = item.status == 0 ? 1 : 0;
  308. return json
  309. })
  310. // let namesArray = this.selectedTags.map(obj => obj.id);
  311. // let postdata = {
  312. // id: namesArray,
  313. // status: this.fromData.status,
  314. // };
  315. this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
  316. this.$refs.uToast.show({
  317. type: 'success',
  318. title: '',
  319. message: "成功",
  320. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  321. })
  322. this.selectedTags = [];
  323. this.Selected = false;
  324. this.yujialedata(); //获取商品列表(渔家乐)
  325. })
  326. }
  327. }
  328. },
  329. piliangshanchu() {
  330. if (uni.getStorageSync('merchantType') == 4) {
  331. if (this.selectedTags.length == 0) {
  332. this.$refs.uToast.show({
  333. type: 'success',
  334. title: '',
  335. message: "请选择数据",
  336. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  337. })
  338. } else {
  339. let namesArray = this.selectedTags.map(obj => obj.id);
  340. //status: this.fromData.status,
  341. this.$api.del('/api/merchant/food/delProduct', namesArray).then(res => {
  342. this.$refs.uToast.show({
  343. type: 'success',
  344. title: '',
  345. message: "成功",
  346. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  347. })
  348. this.selectedTags = [];
  349. this.Selected = false;
  350. this.getRepast(); //获取商品列表
  351. })
  352. }
  353. } else {
  354. if (this.selectedTags.length == 0) {
  355. this.$refs.uToast.show({
  356. type: 'success',
  357. title: '',
  358. message: "请选择数据",
  359. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  360. })
  361. } else {
  362. let namesArray = this.selectedTags.map(obj => obj.id);
  363. //status: this.fromData.status,
  364. this.$api.del('/scenic/goods', namesArray).then(res => {
  365. this.$refs.uToast.show({
  366. type: 'success',
  367. title: '',
  368. message: "成功",
  369. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  370. })
  371. this.selectedTags = [];
  372. this.Selected = false;
  373. this.yujialedata(); //获取商品列表(渔家乐)
  374. })
  375. }
  376. }
  377. },
  378. shanchu(e, i) {
  379. //console.log('111111111111111111', e, i)
  380. this.lsdata = e;
  381. this.shanchushow = true;
  382. },
  383. quedingshanchu() {
  384. if (uni.getStorageSync('merchantType') == 4) {
  385. //(餐饮美食)
  386. let postdata = [this.lsdata.id];
  387. //status: this.fromData.status,
  388. console.log('postdata', postdata)
  389. this.$api.del('/api/merchant/food/delProduct', postdata).then(res => {
  390. this.$refs.uToast.show({
  391. type: 'success',
  392. title: '',
  393. message: "成功",
  394. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  395. })
  396. this.quxiaoshanchu();
  397. this.getRepast(); //获取商品列表
  398. })
  399. } else {
  400. //(渔家乐)
  401. let postdata = [this.lsdata.id];
  402. //status: this.fromData.status,
  403. console.log('postdata', postdata)
  404. this.$api.del('/scenic/goods', postdata).then(res => {
  405. this.$refs.uToast.show({
  406. type: 'success',
  407. title: '',
  408. message: "成功",
  409. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  410. })
  411. this.quxiaoshanchu();
  412. this.yujialedata(); //获取商品列表(渔家乐)
  413. })
  414. }
  415. },
  416. quxiaoshanchu() {
  417. // console.log('quxiaoxiajia',this.lsdata)
  418. this.lsdata = {};
  419. this.shanchushow = false;
  420. },
  421. gaijia(e, i) {
  422. console.log('111111111111111111', e, i)
  423. this.showPricing = true;
  424. this.lsdata = e;
  425. },
  426. closegaijia() {
  427. this.showPricing = false;
  428. this.newprice = '';
  429. this.lsdata = {};
  430. },
  431. quedingjiae() {
  432. if (uni.getStorageSync('merchantType') == 4) {
  433. //获取商品列表(餐饮美食)
  434. //console.log('111111111111111111', this.newprice)
  435. let postdata = {
  436. discountPrice: this.newprice,
  437. ids: [this.lsdata.id],
  438. status: this.fromData.status,
  439. };
  440. //console.log('postdata', postdata)
  441. this.$api.post('/api/merchant/food/updateDiscountPrice', postdata).then(res => {
  442. this.$refs.uToast.show({
  443. type: 'success',
  444. title: '',
  445. message: "成功",
  446. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  447. })
  448. this.closegaijia();
  449. this.getRepast(); //获取商品列表
  450. })
  451. } else {
  452. //获取商品列表(渔家乐)
  453. if (this.lsdata.goodsType == 1) {
  454. let postdata = {
  455. discountPrice: this.newprice,
  456. id: this.lsdata.id,
  457. status: this.fromData.status,
  458. };
  459. console.log('postdata', postdata)
  460. this.$api.put('/scenic/goods', postdata).then(res => {
  461. this.$refs.uToast.show({
  462. type: 'success',
  463. title: '',
  464. message: "成功",
  465. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  466. })
  467. this.closegaijia();
  468. this.yujialedata(); //获取商品列表(渔家乐)
  469. })
  470. } else {
  471. let postdata = {
  472. normalPrice: this.newprice,
  473. id: this.lsdata.id,
  474. status: this.fromData.status,
  475. };
  476. console.log('postdata', postdata)
  477. this.$api.put('/scenic/goods', postdata).then(res => {
  478. this.$refs.uToast.show({
  479. type: 'success',
  480. title: '',
  481. message: "成功",
  482. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  483. })
  484. this.closegaijia();
  485. this.yujialedata(); //获取商品列表(渔家乐)
  486. })
  487. }
  488. }
  489. },
  490. opengaijia() {},
  491. xiajia1(e, i) {
  492. console.log('111111111111111111', e, i)
  493. this.lsdata = e;
  494. this.xiajiashow1 = true;
  495. },
  496. xiajia(e, i) {
  497. console.log('111111111111111111', e, i)
  498. this.lsdata = e;
  499. this.xiajiashow = true;
  500. },
  501. quedingxiajia() {
  502. if (uni.getStorageSync('merchantType') == 4) {
  503. //获取商品列表(餐饮美食)
  504. let postdata = {
  505. discountPrice: this.lsdata.discountPrice,
  506. ids: [this.lsdata.id],
  507. status: this.fromData.status,
  508. };
  509. this.$api.post('/api/merchant/food/updateStatus', postdata).then(res => {
  510. this.$refs.uToast.show({
  511. type: 'success',
  512. title: '',
  513. message: "下架成功",
  514. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  515. })
  516. this.quxiaoxiajia();
  517. this.getRepast(); //获取商品列表
  518. })
  519. } else {
  520. //获取商品列表(渔家乐)
  521. let postdata = {
  522. id: this.lsdata.id,
  523. status: this.fromData.status == 1 ? 0 : 1,
  524. };
  525. this.$api.put('/scenic/goods', postdata).then(res => {
  526. this.$refs.uToast.show({
  527. type: 'success',
  528. title: '',
  529. message: "下架成功",
  530. iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
  531. })
  532. this.quxiaoxiajia();
  533. this.yujialedata();
  534. })
  535. }
  536. },
  537. quxiaoxiajia() {
  538. // console.log('quxiaoxiajia',this.lsdata)
  539. this.lsdata = {};
  540. this.xiajiashow = false;
  541. this.xiajiashow1 = false;
  542. },
  543. selectPerson(e, i) {
  544. if (this.selectedTags.includes(e)) {
  545. this.selectedTags = this.selectedTags.filter(t => t !== e);
  546. } else {
  547. this.selectedTags.push(e);
  548. }
  549. console.log(' this.selectedTags', this.selectedTags)
  550. },
  551. yujialedata() {
  552. this.$api.get('/scenic/goods/page', this.fromData).then(res => {
  553. console.log(res.data.data.list);
  554. this.roomType = res.data.data.list;
  555. this.mytotal = res.data.data.total;
  556. })
  557. },
  558. getRepast() {
  559. this.$api.get('/api/merchant/food/product/page', this.fromData).then(res => {
  560. console.log(res.data.data.list);
  561. this.roomType = res.data.data.list;
  562. this.mytotal = res.data.data.total;
  563. })
  564. },
  565. // 区域筛选
  566. clickareaShow(e, i) {
  567. this.areaShowIndex = i;
  568. this.areaShow = false;
  569. this.fromData.sortType = e.id;
  570. this.fromData.page = 1;
  571. this.getRepast();
  572. },
  573. // 上架时间
  574. areaShowed() {
  575. console.log(123);
  576. this.areaShow = !this.areaShow
  577. },
  578. changeTab1(e, i) {
  579. this.roomType = [];
  580. this.selectedTags = [];
  581. this.current = i;
  582. this.fromData.status = e.id;
  583. this.fromData.page = 1;
  584. if (uni.getStorageSync('merchantType') == 4) {
  585. this.getRepast(); //获取商品列表(餐饮美食)
  586. } else {
  587. this.yujialedata(); //获取商品列表(渔家乐)
  588. }
  589. },
  590. // 批量显示
  591. showList() {
  592. this.Selected = !this.Selected
  593. },
  594. }
  595. }
  596. </script>
  597. <style lang="scss" scoped>
  598. .queding {
  599. width: 750rpx;
  600. height: 140rpx;
  601. display: flex;
  602. justify-content: space-around;
  603. align-items: center;
  604. .queding1 {
  605. width: 330rpx;
  606. height: 88rpx;
  607. background: #F0F2F5;
  608. border-radius: 44rpx;
  609. font-family: PingFangSC, PingFang SC;
  610. font-weight: 400;
  611. font-size: 32rpx;
  612. color: #333333;
  613. line-height: 88rpx;
  614. text-align: center;
  615. font-style: normal;
  616. }
  617. .queding2 {
  618. width: 330rpx;
  619. height: 88rpx;
  620. background: #007A69;
  621. border-radius: 44rpx;
  622. font-family: PingFangSC, PingFang SC;
  623. font-weight: 400;
  624. font-size: 32rpx;
  625. color: #FFFFFF;
  626. line-height: 88rpx;
  627. text-align: center;
  628. font-style: normal;
  629. }
  630. }
  631. .jiainput {
  632. width: 690rpx;
  633. height: 100rpx;
  634. margin: 0 auto;
  635. }
  636. .gaijiadiv {
  637. width: 750rpx;
  638. height: 950rpx;
  639. .toubu {
  640. width: 750rpx;
  641. height: 110rpx;
  642. font-family: PingFang-SC, PingFang-SC;
  643. font-weight: bold;
  644. font-size: 36rpx;
  645. color: #333333;
  646. line-height: 110rpx;
  647. text-align: center;
  648. font-style: normal;
  649. position: relative;
  650. .toubux {
  651. position: absolute;
  652. top: 33rpx;
  653. right: 30rpx;
  654. }
  655. }
  656. }
  657. .Doublactive {
  658. // background-color: #F0F7F6 !important;
  659. color: #007A69 !important;
  660. // border: 1px solid #007A69 !important;
  661. }
  662. .contented {
  663. width: 100%;
  664. padding: 0 24rpx;
  665. box-sizing: border-box;
  666. position: relative;
  667. }
  668. .custom_popup {
  669. width: 100%;
  670. height: 100%;
  671. background: rgba(0, 0, 0, .4);
  672. top: 0;
  673. left: 0;
  674. position: absolute;
  675. z-index: 999;
  676. .types {
  677. width: 100%;
  678. padding: 30rpx 30rpx 56rpx;
  679. box-sizing: border-box;
  680. background: #FFFFFF;
  681. .pricequjian {
  682. width: 100%;
  683. .contentpeice {
  684. width: 100%;
  685. display: flex;
  686. justify-content: space-between;
  687. margin: 15rpx 0;
  688. .title {
  689. font-weight: Regular;
  690. font-size: 28rpx;
  691. color: #333333;
  692. }
  693. .image {
  694. width: 28rpx;
  695. height: 20rpx;
  696. image {
  697. width: 100%;
  698. height: 100%;
  699. }
  700. }
  701. }
  702. }
  703. }
  704. }
  705. .pages {
  706. background: #F5F8FA;
  707. box-sizing: border-box;
  708. .tb {
  709. width: 100%;
  710. top: 0;
  711. left: 0;
  712. z-index: 999;
  713. .searchBoxParent {
  714. width: 100%;
  715. background: #fff;
  716. padding: 20rpx 24rpx 6rpx;
  717. box-sizing: border-box;
  718. .searchBox {
  719. width: 100%;
  720. background-color: #fff;
  721. }
  722. }
  723. .tabs {
  724. background: #fff;
  725. padding: 26rpx 0;
  726. display: flex;
  727. align-items: center;
  728. width: 100%;
  729. &>view {
  730. width: 25%;
  731. font-size: 28rpx;
  732. font-family: PingFangSC-Regular, PingFang SC;
  733. font-weight: 400;
  734. color: black;
  735. line-height: 40rpx;
  736. position: relative;
  737. text-align: center;
  738. }
  739. .active {
  740. font-size: 32rpx;
  741. font-family: PingFang-SC-Bold, PingFang-SC;
  742. font-weight: bold;
  743. color: black;
  744. line-height: 45rpx;
  745. }
  746. .active::after {
  747. position: absolute;
  748. content: '';
  749. width: 50rpx;
  750. height: 8rpx;
  751. background: #007A69;
  752. bottom: -26rpx;
  753. left: 60%;
  754. margin-left: -42rpx;
  755. }
  756. }
  757. }
  758. .green {}
  759. .mainContain {
  760. display: flex;
  761. flex-direction: column;
  762. padding: 0 20rpx;
  763. .nodata {
  764. background: white;
  765. }
  766. .card {
  767. background: #fff;
  768. border-radius: 16rpx;
  769. margin: 20rpx 0;
  770. padding: 20rpx;
  771. .header {
  772. display: flex;
  773. justify-content: space-between;
  774. border-bottom: 1px #f3f3f3 solid;
  775. padding: 20rpx;
  776. .red {
  777. color: indianred;
  778. }
  779. .green {
  780. color: #999999;
  781. }
  782. .blue {
  783. color: #1372FF;
  784. }
  785. .grey {
  786. color: #4C5F76;
  787. }
  788. .orange {
  789. color: #FF9100;
  790. }
  791. }
  792. .mainContent {
  793. // border-bottom: 1px #f3f3f3 solid;
  794. display: flex;
  795. padding: 20rpx 0;
  796. // justify-content: space-evenly;
  797. .image {
  798. background-repeat: no-repeat;
  799. background-size: cover;
  800. width: 198rpx;
  801. height: 180rpx;
  802. border-radius: 16rpx;
  803. }
  804. .middle {
  805. padding-top: 16rpx;
  806. color: #777777;
  807. // display: flex;
  808. // flex-direction: column;
  809. // justify-content: space-between;
  810. margin-left: 25rpx;
  811. width: 100%;
  812. .title {
  813. font-weight: 700;
  814. font-size: 32rpx;
  815. color: black;
  816. }
  817. .info {
  818. padding-top: 30rpx;
  819. color: #777777;
  820. // display: flex;
  821. // flex-direction: column;
  822. &>span {
  823. margin-top: 10rpx;
  824. }
  825. }
  826. }
  827. .price {
  828. color: red;
  829. text-align: center;
  830. height: 100%;
  831. align-items: center;
  832. align-self: center;
  833. font-size: 29rpx;
  834. font-weight: 700;
  835. }
  836. }
  837. .bottom {
  838. // padding: 30rpx 20rpx;
  839. display: flex;
  840. justify-content: flex-end;
  841. .detail {
  842. // border: 1rpx solid darkgrey;
  843. border-radius: 16rpx;
  844. color: darkgrey;
  845. padding: 13rpx 34rpx;
  846. background-color: #F6F6F6;
  847. font-size: 26rpx;
  848. color: #333333;
  849. font-weight: Regular;
  850. }
  851. .del {
  852. border-radius: 16rpx;
  853. color: darkgrey;
  854. padding: 13rpx 34rpx;
  855. background-color: #007A69;
  856. font-size: 26rpx;
  857. color: #fff;
  858. font-weight: Regular;
  859. }
  860. }
  861. }
  862. }
  863. }
  864. .u-input__content {
  865. margin-top: 22rpx !important;
  866. }
  867. .uicon-arrow-right,
  868. .uicon-close-circle-fill {
  869. margin-top: 32rpx !important;
  870. margin-right: 20rpx !important;
  871. }
  872. .pop-pop {
  873. height: 65vh;
  874. padding: 46rpx 20rpx 0;
  875. .hander-one {
  876. display: flex;
  877. justify-content: space-between;
  878. .text {
  879. font-size: 36rpx;
  880. color: #333333;
  881. font-weight: bold;
  882. }
  883. .del {}
  884. }
  885. .hander-two {
  886. display: flex;
  887. align-items: center;
  888. margin: 30rpx 0;
  889. .hander-two-text {
  890. font-size: 30rpx;
  891. color: #333333;
  892. font-weight: Regular;
  893. }
  894. .hander-two-image {
  895. display: flex;
  896. align-items: center;
  897. .image {
  898. margin: 0 10rpx;
  899. width: 30rpx;
  900. height: 30rpx;
  901. image {
  902. width: 100%;
  903. height: 100%;
  904. }
  905. }
  906. }
  907. }
  908. .hander-three {
  909. display: flex;
  910. border: 1rpx solid #CCCCCC;
  911. border-radius: 16rpx;
  912. justify-content: space-between;
  913. height: 102rpx;
  914. line-height: 102rpx;
  915. .hander-three-text {
  916. width: 200rpx;
  917. text-align: left;
  918. display: flex;
  919. justify-content: space-between;
  920. margin: 0 20rpx;
  921. }
  922. .hander-three-input {
  923. width: 55%;
  924. }
  925. .hander-three-icon {
  926. height: 102rpx;
  927. line-height: 102rpx;
  928. }
  929. }
  930. .hander-four {
  931. margin-top: 30rpx;
  932. display: flex;
  933. border-radius: 16rpx;
  934. justify-content: space-between;
  935. border: 1rpx solid #CCCCCC;
  936. height: 102rpx;
  937. line-height: 102rpx;
  938. .hander-three-text {
  939. width: 200rpx;
  940. text-align: center;
  941. display: flex;
  942. justify-content: space-between;
  943. margin: 0 20rpx;
  944. }
  945. .hander-three-input {
  946. width: 55%;
  947. }
  948. .hander-three-icon {
  949. height: 102rpx;
  950. line-height: 102rpx;
  951. }
  952. }
  953. }
  954. .page {
  955. background: #F3F4F4;
  956. padding-bottom: 260rpx;
  957. box-sizing: border-box;
  958. overflow-y: auto;
  959. overflow-x: auto;
  960. }
  961. .typeNum {
  962. // width: 100%;
  963. height: 73rpx;
  964. display: flex;
  965. justify-content: space-between;
  966. padding: 23rpx 24rpx;
  967. align-items: center;
  968. .left {
  969. display: flex;
  970. align-items: center;
  971. .active {
  972. color: #007A69;
  973. }
  974. }
  975. .right {
  976. display: flex;
  977. align-items: center;
  978. .image {
  979. margin: 0 10rpx;
  980. width: 30rpx;
  981. height: 30rpx;
  982. image {
  983. width: 100%;
  984. height: 100%;
  985. }
  986. }
  987. .text {
  988. font-size: 28rpx;
  989. font-weight: Regular;
  990. color: #333333;
  991. }
  992. }
  993. }
  994. .type {
  995. margin: 0 auto;
  996. border-radius: 10rpx 10rpx 10rpx 10rpx;
  997. width: 86%;
  998. // height: 114rpx;
  999. background-color: #fff;
  1000. padding: 30rpx;
  1001. margin-bottom: 20rpx;
  1002. display: flex;
  1003. .left {
  1004. height: 114rpx;
  1005. line-height: 200rpx;
  1006. margin-right: 20rpx;
  1007. .image {
  1008. margin: 0 10rpx;
  1009. width: 30rpx;
  1010. height: 30rpx;
  1011. image {
  1012. width: 100%;
  1013. height: 100%;
  1014. }
  1015. }
  1016. }
  1017. .right {
  1018. width: 100%;
  1019. display: flex;
  1020. .right-left {
  1021. width: 172rpx;
  1022. height: 172rpx;
  1023. border-radius: 16rpx;
  1024. margin-right: 22rpx;
  1025. image {
  1026. width: 100%;
  1027. height: 100%;
  1028. border-radius: 16rpx;
  1029. }
  1030. }
  1031. .right-right {}
  1032. }
  1033. .type-btn {
  1034. width: 100%;
  1035. display: flex;
  1036. justify-content: space-between;
  1037. .type-btn-left {
  1038. width: 50rpx;
  1039. }
  1040. .type-btn-right {
  1041. display: flex;
  1042. view {
  1043. padding: 15rpx 23rpx;
  1044. background-color: #F6F6F6;
  1045. font-size: 24rpx;
  1046. color: #333;
  1047. font-weight: Regular;
  1048. margin-right: 20rpx;
  1049. border-radius: 50rpx;
  1050. }
  1051. }
  1052. }
  1053. }
  1054. .top {
  1055. display: flex;
  1056. justify-content: space-between;
  1057. }
  1058. .under {
  1059. margin-top: 20rpx;
  1060. // display: flex;
  1061. // justify-content: space-between;
  1062. }
  1063. .btn-btn {
  1064. width: 100%;
  1065. height: 136rpx;
  1066. background-color: #fff;
  1067. position: fixed;
  1068. bottom: 0;
  1069. padding: 30rpx 0 0;
  1070. // margin: 0 auto;
  1071. z-index: 9;
  1072. // margin-top: 30rpx;
  1073. // margin-left: 30rpx;
  1074. .bottom-btn {
  1075. display: flex;
  1076. justify-content: space-between;
  1077. margin: 0 24rpx;
  1078. .left {
  1079. width: 25%;
  1080. display: flex;
  1081. align-items: center;
  1082. .image {
  1083. width: 38rpx;
  1084. height: 38rpx;
  1085. margin: 0 10rpx;
  1086. image {
  1087. width: 100%;
  1088. height: 100%;
  1089. }
  1090. }
  1091. }
  1092. .right {
  1093. width: 75%;
  1094. display: flex;
  1095. justify-content: space-evenly;
  1096. .right-btn {
  1097. width: 148rpx;
  1098. height: 80rpx;
  1099. line-height: 80rpx;
  1100. background-color: #1372FF;
  1101. border-radius: 16rpx;
  1102. font-size: 26rpx;
  1103. color: #fff;
  1104. font-weight: Regular;
  1105. text-align: center;
  1106. }
  1107. }
  1108. }
  1109. }
  1110. .btn {
  1111. margin: 0 auto;
  1112. width: 690rpx;
  1113. height: 96rpx;
  1114. background-color: #1372FF;
  1115. color: #fff;
  1116. display: flex;
  1117. justify-content: center;
  1118. align-items: center;
  1119. font-size: 34rpx;
  1120. border-radius: 48rpx;
  1121. }
  1122. </style>