|
@@ -1,11 +1,12 @@
|
|
|
<template>
|
|
|
- <view class="pages" :style="{'min-height':h+'px','padding-top':(mt)+'px'}">
|
|
|
+ <view class="pages" :style="{'min-height':(h+mt)+'px','padding-top':(mt)+'px'}">
|
|
|
+ <!-- <view class="pages" :style="{'min-height':h+'px'}"> -->
|
|
|
<c-nav-bar title="商品管理"></c-nav-bar>
|
|
|
<view class="tb">
|
|
|
<view class="tabs">
|
|
|
- <view v-for="(item,index) in tabList" :key="index" @tap="changeTab1(item,index)">
|
|
|
- <!-- <text :class="index==current?'active':''">{{item.name}}({{mytotal}})</text> -->
|
|
|
+ <view v-for="(item,index) in tabList" :key="index" @tap="changeTab1(index)">
|
|
|
<text :class="index==current?'active':''">{{item.name}}</text>
|
|
|
+ <text v-if="index==current">({{roomType.length}})</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -28,6 +29,7 @@
|
|
|
批量操作
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
|
|
@@ -55,52 +57,57 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
- <!-- 房型选择 -->
|
|
|
- <view class="type" v-for="(item,index) in roomType" :key="index">
|
|
|
- <view class="left" v-if="Selected==true">
|
|
|
- <view class="image">
|
|
|
- <image @tap="selectPerson(item,index)"
|
|
|
- :src="selectedTags.includes(item)?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
- </image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view style="width: 100%;">
|
|
|
- <view class="right">
|
|
|
- <view class="right-left">
|
|
|
- <image :src="item.coverImg" mode=""></image>
|
|
|
+ <view class="" style="padding-bottom: 160rpx;">
|
|
|
+ <!-- 房型选择 -->
|
|
|
+ <view class="type" v-for="item,index in roomType" :key="index" style="">
|
|
|
+ <view class="left" v-if="Selected==true">
|
|
|
+ <view class="image">
|
|
|
+ <!-- <image @tap="selectPerson(item,index)"
|
|
|
+ :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
+ </image> -->
|
|
|
+ <image @tap="selectPerson(item,index)"
|
|
|
+ :src="selectedTags.includes(item)?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
+ </image>
|
|
|
</view>
|
|
|
- <view class="right-right">
|
|
|
- <view class="top">
|
|
|
- <text style="font-size: 30rpx; color: #333;">{{item.name||item.goodsName}}</text>
|
|
|
+ </view>
|
|
|
+ <!-- <view @click="goEditTypeInfo(item.houseBaseId)" style="width: 100%;"> -->
|
|
|
+ <view style="width: 100%;">
|
|
|
+ <view class="right">
|
|
|
+ <view class="right-left">
|
|
|
+ <image :src="item.cover" mode=""></image>
|
|
|
</view>
|
|
|
- <view class="under">
|
|
|
- <view style="font-size: 24rpx; color: #777;">销量:{{item.salesVolume||item.soldNum}}</view>
|
|
|
- <view style="font-size: 36rpx; color: #FF4141; font-weight: Bold; margin-top: 16rpx;">
|
|
|
- ¥{{item.discountPrice||item.normalPrice}}</view>
|
|
|
+ <view class="right-right">
|
|
|
+ <view class="top">
|
|
|
+ <text style="font-size: 30rpx; color: #333;">{{item.comboName}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="under">
|
|
|
+ <view style="font-size: 24rpx; color: #777;">销量:{{item.saleNums}}</view>
|
|
|
+ <view style="font-size: 36rpx; color: #FF4141; font-weight: Bold; margin-top: 16rpx;">
|
|
|
+ ¥{{item.price}}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="type-btn">
|
|
|
- <view class="type-btn-left">
|
|
|
+ <view class="type-btn">
|
|
|
+ <view class="type-btn-left">
|
|
|
|
|
|
- </view>
|
|
|
- <view class="type-btn-right">
|
|
|
- <view class="" @click="shanchu(item,index)">
|
|
|
- 删除
|
|
|
</view>
|
|
|
- <view class="" @click="gaijia(item,index)">
|
|
|
- 改价格
|
|
|
- </view>
|
|
|
- <view v-if="canyinmeishi" class="" @click="xiajia(item,index)">
|
|
|
- {{fromData.status==0?'下架':'上架'}}
|
|
|
- </view>
|
|
|
-
|
|
|
- <view v-if="!canyinmeishi" class="" @click="xiajia1(item,index)">
|
|
|
- {{fromData.status==0?'上架':'下架'}}
|
|
|
+ <view class="type-btn-right">
|
|
|
+ <view class="" @click="del(item)">
|
|
|
+ 删除
|
|
|
+ </view>
|
|
|
+ <view @click="gaijia(item,index)">
|
|
|
+ 改价格
|
|
|
+ </view>
|
|
|
+ <view class="" @click="Undered(item)" v-if="item.status==1">
|
|
|
+ 下架
|
|
|
+ </view>
|
|
|
+ <view class="" @click="Undered(item)" v-else>
|
|
|
+ 上架
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
@@ -109,6 +116,9 @@
|
|
|
<view class="bottom-btn">
|
|
|
<view class="left">
|
|
|
<view class="image">
|
|
|
+ <!-- <image
|
|
|
+ :src="isSelect?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
+ </image> -->
|
|
|
<image
|
|
|
:src="selectedTags.length>0?'https://i.ringzle.com/file/20240228/c741a340e19642c59473e6f4a6d2f4be.png':'https://i.ringzle.com/file/20231027/db588133d67548fc82dfb0d128eac9a8.png'">
|
|
|
</image>
|
|
@@ -118,22 +128,83 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
- <view v-if="canyinmeishi" class="right-btn" @click="piliangxiajia">
|
|
|
- {{fromData.status==0?'批量下架':'批量上架'}}
|
|
|
+ <view class="right-btn" @click="piliangxiajia()">
|
|
|
+ <!-- 批量下架 -->
|
|
|
+ {{fromData.status==1?'批量下架':'批量上架'}}
|
|
|
</view>
|
|
|
- <view v-if="!canyinmeishi" class="right-btn" @click="piliangxiajia">
|
|
|
- {{fromData.status==0?'批量上架':'批量下架'}}
|
|
|
- </view>
|
|
|
- <view class="right-btn" @click="piliangshanchu">
|
|
|
+ <view class="right-btn" @click="Pricinged()">
|
|
|
批量删除
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 新增按钮 -->
|
|
|
+ <view class="btn-btn" @click="addType()" v-else>
|
|
|
+ <view class="btn">
|
|
|
+ 添加商品
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
|
|
|
- <!-- 改价弹出框 -->
|
|
|
- <u-popup :show="showPricing" @close="closegaijia" @open="opengaijia" :round="10">
|
|
|
+ <u-popup :show="showPricing" @close="close" :round="30">
|
|
|
+ <view class="pop-pop">
|
|
|
+ <view class="hander-one">
|
|
|
+ <view class="image">
|
|
|
+ <image src="https://i.ringzle.com/file/20240317/fdb4de4c4413429bb5a98b3f6c2bd856.png" mode="">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text1">
|
|
|
+ 删除选中的商品
|
|
|
+ </view>
|
|
|
+ <view class="text2">
|
|
|
+ 删除后的商品不可在前台继续售卖,是否继续
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="hander-two">
|
|
|
+ <view class="pop-btn-del" @click="showPricing=false">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="pop-btn-add" @click="GoOndel()">
|
|
|
+ 继续提交
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <u-popup :show="showPricingUnder" @close="close" :round="30">
|
|
|
+ <view class="pop-pop">
|
|
|
+ <view class="hander-one">
|
|
|
+ <view class="image">
|
|
|
+ <image src="https://i.ringzle.com/file/20240317/fdb4de4c4413429bb5a98b3f6c2bd856.png" mode="">
|
|
|
+ </image>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="text1" v-if="Shelves==false">
|
|
|
+ 下架选中的商品
|
|
|
+ </view>
|
|
|
+ <view class="text1" v-else>
|
|
|
+ 上架选中的商品
|
|
|
+ </view>
|
|
|
+ <view class="text2" v-if="Shelves==false">
|
|
|
+ 下架后商品不可在前台继续售卖,是否继续?
|
|
|
+ </view>
|
|
|
+ <view class="text2" v-else>
|
|
|
+ 确定上架售卖吗?是否继续?
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="hander-two">
|
|
|
+ <view class="pop-btn-del" @click="showPricingUnder=false">
|
|
|
+ 取消
|
|
|
+ </view>
|
|
|
+ <view class="pop-btn-add" @click="GoOnUnder()">
|
|
|
+ 继续提交
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
+ <u-popup :show="showPricinggaijia" @close="close" :round="10">
|
|
|
<view class="gaijiadiv">
|
|
|
<view class="toubu">
|
|
|
改价格
|
|
@@ -146,7 +217,7 @@
|
|
|
clearable></u--input>
|
|
|
</view>
|
|
|
<view class="queding">
|
|
|
- <view class="queding1" @click="closegaijia">
|
|
|
+ <view class="queding1" @click="showPricinggaijia=false">
|
|
|
取消
|
|
|
</view>
|
|
|
<view class="queding2" @click="quedingjiae">
|
|
@@ -156,31 +227,11 @@
|
|
|
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
- <!-- 下架弹出框 -->
|
|
|
- <u-modal :show="xiajiashow" :title="fromData.status==0?'下架选中的商品':'上架选中的商品'"
|
|
|
- :content="fromData.status==0?'下架后商品不可在前台继续售卖,是否继续?':'上架后商品可在前台售卖,是否继续?'" showConfirmButton='true'
|
|
|
- showCancelButton='true' @confirm='quedingxiajia' @cancel='quxiaoxiajia'></u-modal>
|
|
|
-
|
|
|
- <!-- 下架弹出框渔家乐 -->
|
|
|
- <u-modal :show="xiajiashow1" :title="fromData.status==1?'下架选中的商品':'上架选中的商品'"
|
|
|
- :content="fromData.status==1?'下架后商品不可在前台继续售卖,是否继续?':'上架后商品可在前台售卖,是否继续?'" showConfirmButton='true'
|
|
|
- showCancelButton='true' @confirm='quedingxiajia' @cancel='quxiaoxiajia'></u-modal>
|
|
|
-
|
|
|
-
|
|
|
- <!-- 删除弹出框 -->
|
|
|
- <u-modal :show="shanchushow" title="删除选中的商品" content='删除后的商品不可在前台继续售卖,是否继续?' showConfirmButton='true'
|
|
|
- showCancelButton='true' @confirm='quedingshanchu' @cancel='quxiaoshanchu'></u-modal>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
<view class="mainContain">
|
|
|
<!-- <view class="nodata" v-if='dataList.length==0'>
|
|
|
<NoData></NoData>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
-
|
|
|
- <u-toast ref="uToast"></u-toast>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -196,449 +247,195 @@
|
|
|
return {
|
|
|
h: uni.getSystemInfoSync().windowHeight,
|
|
|
mt: uni.getSystemInfoSync().statusBarHeight + 44,
|
|
|
- newprice: '',
|
|
|
- lsdata: {},
|
|
|
current: 0,
|
|
|
- canyinmeishi: false,
|
|
|
- xiajiashow: false,
|
|
|
- xiajiashow1: false,
|
|
|
- shanchushow: false,
|
|
|
- tabList: [],
|
|
|
+ tabList: [{
|
|
|
+ name: '出售中'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '待上架'
|
|
|
+ },
|
|
|
+ ],
|
|
|
homestayId: uni.getStorageSync('homestayId') || 0,
|
|
|
roomType: [],
|
|
|
selectedTags: [],
|
|
|
- mytotal: 0,
|
|
|
isSelect: false,
|
|
|
Selected: false,
|
|
|
showPricing: false,
|
|
|
+ showPricingUnder: false,
|
|
|
+ Shelves: false,
|
|
|
areaShow: false,
|
|
|
list1: [{
|
|
|
- name: '创建时间',
|
|
|
- id: 1,
|
|
|
+ name: '创建时间'
|
|
|
},
|
|
|
{
|
|
|
- name: '价格从高到低',
|
|
|
- id: 2,
|
|
|
+ name: '上架时间'
|
|
|
},
|
|
|
{
|
|
|
- name: '价格从低到高',
|
|
|
- id: 4,
|
|
|
+ name: '价格从高到低'
|
|
|
},
|
|
|
{
|
|
|
- name: '销量从高到低',
|
|
|
- id: 2,
|
|
|
+ name: '价格从低到高'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // name: '销量从高到低'
|
|
|
+ // },
|
|
|
],
|
|
|
areaShowIndex: null,
|
|
|
fromData: {
|
|
|
- merchantId: uni.getStorageSync('merchantId'), //商户id
|
|
|
- limit: 99999,
|
|
|
+ homestayId: uni.getStorageSync('homestayId'),
|
|
|
+ limit: 10,
|
|
|
page: 1,
|
|
|
- sortType: '', //选择条件:1创建时间 2销量从高到低 3价格从高到低 4价格从低到高
|
|
|
- status: 0, //状态:0上架1下架
|
|
|
- }
|
|
|
+ order: '',
|
|
|
+ orderField: "",
|
|
|
+ status: 1
|
|
|
+ },
|
|
|
+ ids: [],
|
|
|
+ obj: {},
|
|
|
+ showPricinggaijia: false,
|
|
|
+ newprice: '',
|
|
|
+ id: '',
|
|
|
+ from: {}
|
|
|
}
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
-
|
|
|
-
|
|
|
- console.log('111111111111111111', uni.getStorageSync('merchantType'))
|
|
|
- //this.getHousekeeping();
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
- this.canyinmeishi = true;
|
|
|
- this.tabList = [{
|
|
|
- name: '出售中',
|
|
|
- id: 0
|
|
|
- },
|
|
|
- {
|
|
|
- name: '待上架',
|
|
|
- id: 1
|
|
|
- },
|
|
|
- ]
|
|
|
- this.getRepast(); //获取商品列表(餐饮美食)
|
|
|
-
|
|
|
- } else {
|
|
|
- this.canyinmeishi = false;
|
|
|
- this.tabList = [{
|
|
|
- name: '出售中',
|
|
|
- id: 1
|
|
|
- },
|
|
|
- {
|
|
|
- name: '待上架',
|
|
|
- id: 0
|
|
|
- },
|
|
|
- ]
|
|
|
- this.fromData = {
|
|
|
- merchantId: uni.getStorageSync('merchantId'), //商户id
|
|
|
- limit: 99999,
|
|
|
- page: 1,
|
|
|
- sortType: '', //选择条件:1创建时间 2销量从高到低 3价格从高到低 4价格从低到高
|
|
|
- status: 1, //状态:0上架1下架
|
|
|
- }
|
|
|
-
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
- }
|
|
|
-
|
|
|
+ // if (uni.getStorageSync('merchantType') == 4) {
|
|
|
+ this.getRepast()
|
|
|
+ // } else {
|
|
|
+ // }
|
|
|
},
|
|
|
methods: {
|
|
|
- getHousekeeping() {
|
|
|
- this.$api.get('/sys/dict/type/all').then(res => {
|
|
|
- let alldata = res.data.data.find((p) => p.dictType == 'food_type').dataList;
|
|
|
- console.log('alldata', alldata)
|
|
|
+
|
|
|
+ Pricinged() {
|
|
|
+ this.$api.del('/merchant/hotel/repast', this.ids).then(res => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.getRepast()
|
|
|
+ this.showPricing = false
|
|
|
+ this.ids = []
|
|
|
+ } else this.$showToast(res.data.msg);
|
|
|
})
|
|
|
},
|
|
|
|
|
|
piliangxiajia() {
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
- if (this.selectedTags.length == 0) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "请选择数据",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
-
|
|
|
- } else {
|
|
|
- let namesArray = this.selectedTags.map(obj => obj.id);
|
|
|
- let postdata = {
|
|
|
- discountPrice: 0,
|
|
|
- id: namesArray,
|
|
|
- status: this.fromData.status == 1 ? 0 : 1,
|
|
|
- };
|
|
|
- this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.selectedTags = [];
|
|
|
- this.Selected = false;
|
|
|
- this.getRepast(); //获取商品列表
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- if (this.selectedTags.length == 0) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "请选择数据",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
-
|
|
|
- } else {
|
|
|
-
|
|
|
-
|
|
|
- let postdata = this.selectedTags.map((item, index, arr) => {
|
|
|
- let json = {};
|
|
|
- json.id = item.id;
|
|
|
- json.merchantId = uni.getStorageSync('merchantId');
|
|
|
- json.status = item.status == 0 ? 1 : 0;
|
|
|
- return json
|
|
|
- })
|
|
|
- // let namesArray = this.selectedTags.map(obj => obj.id);
|
|
|
- // let postdata = {
|
|
|
- // id: namesArray,
|
|
|
- // status: this.fromData.status,
|
|
|
- // };
|
|
|
- this.$api.post('/scenic/goods/batchUpDownFrame', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.selectedTags = [];
|
|
|
- this.Selected = false;
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
+ this.$api.post('/merchant/hotel/repast/batchPutAway', this.from).then(res => {
|
|
|
+ this.selectedTags = [];
|
|
|
+ this.Selected = false;
|
|
|
+ this.getRepast(); //获取商品列表
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
- piliangshanchu() {
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
-
|
|
|
- if (this.selectedTags.length == 0) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "请选择数据",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
-
|
|
|
- } else {
|
|
|
- let namesArray = this.selectedTags.map(obj => obj.id);
|
|
|
-
|
|
|
- //status: this.fromData.status,
|
|
|
- this.$api.del('/api/merchant/food/delProduct', namesArray).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.selectedTags = [];
|
|
|
- this.Selected = false;
|
|
|
- this.getRepast(); //获取商品列表
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- } else {
|
|
|
- if (this.selectedTags.length == 0) {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "请选择数据",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
-
|
|
|
- } else {
|
|
|
- let namesArray = this.selectedTags.map(obj => obj.id);
|
|
|
-
|
|
|
- //status: this.fromData.status,
|
|
|
- this.$api.del('/scenic/goods', namesArray).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.selectedTags = [];
|
|
|
- this.Selected = false;
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
- })
|
|
|
- }
|
|
|
+ quedingjiae() {
|
|
|
+ let obj = {
|
|
|
+ price: this.newprice,
|
|
|
+ id: this.id
|
|
|
}
|
|
|
- },
|
|
|
- shanchu(e, i) {
|
|
|
- //console.log('111111111111111111', e, i)
|
|
|
- this.lsdata = e;
|
|
|
- this.shanchushow = true;
|
|
|
- },
|
|
|
- quedingshanchu() {
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
- //(餐饮美食)
|
|
|
- let postdata = [this.lsdata.id];
|
|
|
- //status: this.fromData.status,
|
|
|
- console.log('postdata', postdata)
|
|
|
- this.$api.del('/api/merchant/food/delProduct', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.quxiaoshanchu();
|
|
|
- this.getRepast(); //获取商品列表
|
|
|
- })
|
|
|
+ this.$api.put('/merchant/hotel/repast', obj).then(res => {
|
|
|
|
|
|
- } else {
|
|
|
- //(渔家乐)
|
|
|
- let postdata = [this.lsdata.id];
|
|
|
- //status: this.fromData.status,
|
|
|
- console.log('postdata', postdata)
|
|
|
- this.$api.del('/scenic/goods', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.quxiaoshanchu();
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
- })
|
|
|
+ this.getRepast(); //获取商品列表
|
|
|
+ this.showPricinggaijia = false;
|
|
|
+ })
|
|
|
|
|
|
- }
|
|
|
- },
|
|
|
- quxiaoshanchu() {
|
|
|
- // console.log('quxiaoxiajia',this.lsdata)
|
|
|
- this.lsdata = {};
|
|
|
- this.shanchushow = false;
|
|
|
},
|
|
|
|
|
|
-
|
|
|
- gaijia(e, i) {
|
|
|
- console.log('111111111111111111', e, i)
|
|
|
- this.showPricing = true;
|
|
|
- this.lsdata = e;
|
|
|
- },
|
|
|
closegaijia() {
|
|
|
this.showPricing = false;
|
|
|
this.newprice = '';
|
|
|
- this.lsdata = {};
|
|
|
},
|
|
|
- quedingjiae() {
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
- //获取商品列表(餐饮美食)
|
|
|
- //console.log('111111111111111111', this.newprice)
|
|
|
- let postdata = {
|
|
|
- discountPrice: this.newprice,
|
|
|
- ids: [this.lsdata.id],
|
|
|
- status: this.fromData.status,
|
|
|
- };
|
|
|
- //console.log('postdata', postdata)
|
|
|
- this.$api.post('/api/merchant/food/updateDiscountPrice', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.closegaijia();
|
|
|
- this.getRepast(); //获取商品列表
|
|
|
- })
|
|
|
-
|
|
|
+ gaijia(e, i) {
|
|
|
+ this.showPricinggaijia = true;
|
|
|
+ this.id = e.id
|
|
|
+ },
|
|
|
+ selectPerson(e, i) {
|
|
|
+ if (this.selectedTags.includes(e)) {
|
|
|
+ this.selectedTags = this.selectedTags.filter(t => t !== e);
|
|
|
+ this.ids.splice(i, 1)
|
|
|
} else {
|
|
|
- //获取商品列表(渔家乐)
|
|
|
- if (this.lsdata.goodsType == 1) {
|
|
|
- let postdata = {
|
|
|
- discountPrice: this.newprice,
|
|
|
- id: this.lsdata.id,
|
|
|
- status: this.fromData.status,
|
|
|
- };
|
|
|
- console.log('postdata', postdata)
|
|
|
- this.$api.put('/scenic/goods', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.closegaijia();
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
- })
|
|
|
- } else {
|
|
|
- let postdata = {
|
|
|
- normalPrice: this.newprice,
|
|
|
- id: this.lsdata.id,
|
|
|
- status: this.fromData.status,
|
|
|
- };
|
|
|
- console.log('postdata', postdata)
|
|
|
- this.$api.put('/scenic/goods', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.closegaijia();
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
- })
|
|
|
+ this.selectedTags.push(e);
|
|
|
+ this.ids.push(e.id)
|
|
|
+ this.from = {
|
|
|
+ ids: this.ids,
|
|
|
+ status: e.status == 1 ? 0 : 1
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
},
|
|
|
- opengaijia() {},
|
|
|
-
|
|
|
-
|
|
|
- xiajia1(e, i) {
|
|
|
- console.log('111111111111111111', e, i)
|
|
|
- this.lsdata = e;
|
|
|
- this.xiajiashow1 = true;
|
|
|
+ // 添加商品
|
|
|
+ addType() {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages/HotelMerchandise/addCommodity'
|
|
|
+ })
|
|
|
},
|
|
|
- xiajia(e, i) {
|
|
|
- console.log('111111111111111111', e, i)
|
|
|
- this.lsdata = e;
|
|
|
- this.xiajiashow = true;
|
|
|
+ close() {
|
|
|
+ this.showPricing = false
|
|
|
+ this.showPricingUnder = false
|
|
|
+ this.showPricinggaijia = false
|
|
|
},
|
|
|
- quedingxiajia() {
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
- //获取商品列表(餐饮美食)
|
|
|
- let postdata = {
|
|
|
- discountPrice: this.lsdata.discountPrice,
|
|
|
- ids: [this.lsdata.id],
|
|
|
- status: this.fromData.status,
|
|
|
- };
|
|
|
- this.$api.post('/api/merchant/food/updateStatus', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "下架成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.quxiaoxiajia();
|
|
|
- this.getRepast(); //获取商品列表
|
|
|
- })
|
|
|
- } else {
|
|
|
- //获取商品列表(渔家乐)
|
|
|
- let postdata = {
|
|
|
- id: this.lsdata.id,
|
|
|
- status: this.fromData.status == 1 ? 0 : 1,
|
|
|
- };
|
|
|
- this.$api.put('/scenic/goods', postdata).then(res => {
|
|
|
- this.$refs.uToast.show({
|
|
|
- type: 'success',
|
|
|
- title: '',
|
|
|
- message: "下架成功",
|
|
|
- iconUrl: 'https://cdn.uviewui.com/uview/demo/toast/default.png'
|
|
|
- })
|
|
|
- this.quxiaoxiajia();
|
|
|
- this.yujialedata();
|
|
|
- })
|
|
|
- }
|
|
|
+ // 删除商品
|
|
|
+ del(item) {
|
|
|
+ // let ids = []
|
|
|
+ this.ids.push(item.id)
|
|
|
+ this.showPricing = true
|
|
|
},
|
|
|
- quxiaoxiajia() {
|
|
|
- // console.log('quxiaoxiajia',this.lsdata)
|
|
|
- this.lsdata = {};
|
|
|
- this.xiajiashow = false;
|
|
|
- this.xiajiashow1 = false;
|
|
|
+ GoOndel() {
|
|
|
+ this.$api.del('/merchant/hotel/repast', this.ids).then(res => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.getRepast()
|
|
|
+ this.showPricing = false
|
|
|
+ this.ids = []
|
|
|
+ } else this.$showToast(res.data.msg);
|
|
|
+ })
|
|
|
},
|
|
|
-
|
|
|
- selectPerson(e, i) {
|
|
|
- if (this.selectedTags.includes(e)) {
|
|
|
- this.selectedTags = this.selectedTags.filter(t => t !== e);
|
|
|
+ // 上下架商品
|
|
|
+ Undered(item) {
|
|
|
+ this.ids.push(item.id)
|
|
|
+ this.showPricingUnder = true
|
|
|
+ if (item.status == 1) {
|
|
|
+ this.obj = {
|
|
|
+ ids: this.ids,
|
|
|
+ status: 0
|
|
|
+ }
|
|
|
} else {
|
|
|
- this.selectedTags.push(e);
|
|
|
+ this.Shelves = true
|
|
|
+ this.obj = {
|
|
|
+ ids: this.ids,
|
|
|
+ status: 1
|
|
|
+ }
|
|
|
}
|
|
|
- console.log(' this.selectedTags', this.selectedTags)
|
|
|
|
|
|
},
|
|
|
- yujialedata() {
|
|
|
- this.$api.get('/scenic/goods/page', this.fromData).then(res => {
|
|
|
- console.log(res.data.data.list);
|
|
|
- this.roomType = res.data.data.list;
|
|
|
- this.mytotal = res.data.data.total;
|
|
|
+
|
|
|
+ GoOnUnder() {
|
|
|
+ this.$api.post('/merchant/hotel/repast/batchPutAway', this.obj).then(res => {
|
|
|
+ if (res.data.code == 0) {
|
|
|
+ this.getRepast()
|
|
|
+ this.showPricingUnder = false
|
|
|
+ this.ids = []
|
|
|
+ } else this.$showToast(res.data.msg);
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
getRepast() {
|
|
|
- this.$api.get('/api/merchant/food/product/page', this.fromData).then(res => {
|
|
|
- console.log(res.data.data.list);
|
|
|
- this.roomType = res.data.data.list;
|
|
|
- this.mytotal = res.data.data.total;
|
|
|
+ this.Shelves = false
|
|
|
+ this.$api.get('/merchant/hotel/repast/page', this.fromData).then(res => {
|
|
|
+ this.roomType = res.data.data.list
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
// 区域筛选
|
|
|
clickareaShow(e, i) {
|
|
|
-
|
|
|
- this.areaShowIndex = i;
|
|
|
- this.areaShow = false;
|
|
|
- this.fromData.sortType = e.id;
|
|
|
- this.fromData.page = 1;
|
|
|
- this.getRepast();
|
|
|
+ this.areaShowIndex = i
|
|
|
},
|
|
|
// 上架时间
|
|
|
areaShowed() {
|
|
|
- console.log(123);
|
|
|
this.areaShow = !this.areaShow
|
|
|
},
|
|
|
- changeTab1(e, i) {
|
|
|
- this.roomType = [];
|
|
|
- this.selectedTags = [];
|
|
|
- this.current = i;
|
|
|
- this.fromData.status = e.id;
|
|
|
- this.fromData.page = 1;
|
|
|
-
|
|
|
- if (uni.getStorageSync('merchantType') == 4) {
|
|
|
-
|
|
|
- this.getRepast(); //获取商品列表(餐饮美食)
|
|
|
-
|
|
|
+ changeTab1(index) {
|
|
|
+ this.current = index;
|
|
|
+ if (index == 0) {
|
|
|
+ this.fromData.status = 1
|
|
|
+ this.getRepast()
|
|
|
} else {
|
|
|
-
|
|
|
- this.yujialedata(); //获取商品列表(渔家乐)
|
|
|
+ this.fromData.status = 0
|
|
|
+ this.getRepast()
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
// 批量显示
|
|
|
showList() {
|
|
@@ -714,8 +511,6 @@
|
|
|
right: 30rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
.Doublactive {
|
|
@@ -986,49 +781,73 @@
|
|
|
}
|
|
|
|
|
|
.pop-pop {
|
|
|
- height: 65vh;
|
|
|
+ height: 30vh;
|
|
|
padding: 46rpx 20rpx 0;
|
|
|
+ border-radius: 16rpx 16rpx 0 0;
|
|
|
|
|
|
.hander-one {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
+
|
|
|
+ // display: flex;
|
|
|
+ // justify-content: space-between;
|
|
|
+ text-align: center;
|
|
|
+
|
|
|
+ .image {
|
|
|
+ margin: 0 auto;
|
|
|
+ width: 64rpx;
|
|
|
+ height: 64rpx;
|
|
|
+
|
|
|
+ image {
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.text {
|
|
|
- font-size: 36rpx;
|
|
|
- color: #333333;
|
|
|
- font-weight: bold;
|
|
|
|
|
|
+ .text1 {
|
|
|
+ margin-top: 24rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #111111;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+
|
|
|
+ .text2 {
|
|
|
+ font-size: 28rpx;
|
|
|
+ color: #999999;
|
|
|
+ font-weight: Regular;
|
|
|
+ margin: 23rpx 0 64rpx;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- .del {}
|
|
|
}
|
|
|
|
|
|
.hander-two {
|
|
|
display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
align-items: center;
|
|
|
margin: 30rpx 0;
|
|
|
|
|
|
- .hander-two-text {
|
|
|
- font-size: 30rpx;
|
|
|
- color: #333333;
|
|
|
+ .pop-btn-del {
|
|
|
+ margin: 0 15rpx;
|
|
|
+ padding: 22rpx 136rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #111111;
|
|
|
font-weight: Regular;
|
|
|
+ background-color: #F0F2F5;
|
|
|
+ border-radius: 50rpx;
|
|
|
}
|
|
|
|
|
|
- .hander-two-image {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ .pop-btn-add {
|
|
|
+ border-radius: 50rpx;
|
|
|
+ margin: 0 15rpx;
|
|
|
+ background-color: #1372FF;
|
|
|
+ padding: 22rpx 100rpx;
|
|
|
+ font-size: 32rpx;
|
|
|
+ color: #FFFFFF;
|
|
|
+ font-weight: Regular;
|
|
|
+ }
|
|
|
|
|
|
- .image {
|
|
|
- margin: 0 10rpx;
|
|
|
- width: 30rpx;
|
|
|
- height: 30rpx;
|
|
|
|
|
|
- image {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
.hander-three {
|