tianyi 2 months ago
parent
commit
2692d9ee18
  1. 83
      pages/index/index.vue
  2. 3
      pages/login/login.vue
  3. 2
      pages/shop/addGoods.vue
  4. 434
      pages/shop/attributeList.vue
  5. 1
      pages/shop/orderDetail.vue

83
pages/index/index.vue

@ -30,6 +30,14 @@
</view> </view>
<view class="order2"> <view class="order2">
<view class="order22"> <view class="order22">
<view class="order33" @tap="changeIndex(1,3)">
<view class="order44" style="color: red;">
{{daipeisongjiedan}}
</view>
<view class="order55">
待配送接单
</view>
</view>
<view class="order33" @tap="changeIndex(1,13)"> <view class="order33" @tap="changeIndex(1,13)">
<view class="order44" style="color: red;"> <view class="order44" style="color: red;">
{{daichucan}} {{daichucan}}
@ -109,15 +117,11 @@
<view style="flex: 1;"> <view style="flex: 1;">
今日实时数据 今日实时数据
</view> </view>
<view @tap="goDetail('tj')">
更多
<uni-icons type="right" size="12"></uni-icons>
</view>
</view> </view>
<view class="data2"> <view class="data2">
<view class="data22"> <view class="data22">
<view class="data222"> <view class="data222">
{{shopData.orderRevenueAndCount == undefined ?0:shopData.orderRevenueAndCount.count}} {{shopData.orderRevenueAndCount ?shopData.orderRevenueAndCount.count:0}}
</view> </view>
<view class="data333"> <view class="data333">
今日订单 今日订单
@ -125,12 +129,28 @@
</view> </view>
<view class="data22"> <view class="data22">
<view class="data222"> <view class="data222">
{{shopData.orderRevenueAndCount == undefined ?0:shopData.orderRevenueAndCount.amount == undefined ?0:shopData.orderRevenueAndCount.amount}} {{shopData.orderRevenueAndCount?shopData.orderRevenueAndCount.amount:0}}
</view> </view>
<view class="data333"> <view class="data333">
营业额 营业额
</view> </view>
</view> </view>
<view class="data22">
<view class="data222">
{{shopData.orderRevenueAndCount?shopData.orderRevenueAndCount.afterSaleCount:0}}
</view>
<view class="data333">
退/售后笔数
</view>
</view>
<view class="data22">
<view class="data222">
{{shopData.orderRevenueAndCount?shopData.orderRevenueAndCount.afterSaleAmount:0}}
</view>
<view class="data333">
退/售后金额
</view>
</view>
</view> </view>
</view> </view>
<view class="shop-order"> <view class="shop-order">
@ -194,8 +214,16 @@
打印设置 打印设置
</view> </view>
</view> </view>
<view class="menu22" @tap="goDetail('shjl')">
<view class="menu33" style="width: 100%;height: 56rpx;">
<image src="../../static/image/dingdan/dd0.png" alt="" />
</view>
<view class="menu44">
退款售后记录
</view>
</view>
</view> </view>
<view style="width: 100%;height: 200rpx;"></view> <view style="width: 100%;height: 20rpx;"></view>
</view> </view>
</view> </view>
<view class="swiper-page" v-show="currentIndex == 1"> <view class="swiper-page" v-show="currentIndex == 1">
@ -229,6 +257,7 @@
data() { data() {
return { return {
width: 0, width: 0,
daipeisongjiedan:0,
currentIndex: 0, currentIndex: 0,
businessStatus: 1, businessStatus: 1,
shop: {}, shop: {},
@ -265,10 +294,26 @@
}); });
this.getData() this.getData()
this.getBusinessStatus() this.getBusinessStatus()
this.getShopTakeaway()
if (!uni.getStorageSync('area')) { if (!uni.getStorageSync('area')) {
this.checkArea() this.checkArea()
} }
}, },
getShopTakeaway(){
this.NB.sendRequest("/app/shoptakeaway/getByShopId", {
shopId: uni.getStorageSync('shopId')
}, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
uni.setStorageSync('shopTakeaway',res.result)
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
}
})
},
checkArea() { checkArea() {
this.NB.sendRequest("/auth/getShopByUser", {}, false, 'post', 'application/x-www-form-urlencoded').then(( this.NB.sendRequest("/auth/getShopByUser", {}, false, 'post', 'application/x-www-form-urlencoded').then((
res) => { res) => {
@ -346,6 +391,7 @@
}, },
goDetail(type, index) { goDetail(type, index) {
let url = '' let url = ''
switch (type) { switch (type) {
case 'tj': case 'tj':
@ -376,13 +422,14 @@
url = '/pages/shop/shopOrderList' url = '/pages/shop/shopOrderList'
break; break;
case 'tui': case 'tui':
uni.navigateTo({ url = '/pages/shop/shopReturnOrder?type=shop'
url: '/pages/shop/shopReturnOrder?type=shop'
})
break; break;
case 'zd': case 'zd':
url = '/pages/shop/shopBill' url = '/pages/shop/shopBill'
break; break;
case 'shjl':
url = '/pages/shop/afterService?type=shop&mode=record'
break;
case 'pj': case 'pj':
let item = { let item = {
shopScore: uni.getStorageSync('shopScore'), shopScore: uni.getStorageSync('shopScore'),
@ -404,10 +451,16 @@
this.daisongda = 0 this.daisongda = 0
this.daiquhuo = 0 this.daiquhuo = 0
this.daixiaofei = 0 this.daixiaofei = 0
this.daipeisongjiedan = 0
this.daichucan = 0 this.daichucan = 0
}, },
getData() { getData() {
let that = this; let that = this;
this.daixiaofei = 0
this.daipeisongjiedan = 0
this.daichucan = 0
this.daiquhuo = 0
this.daisongda = 0
that.NB.sendRequest("/mall/order/countByShop/" + uni.getStorageSync('shopId'), {}, false, 'GET', that.NB.sendRequest("/mall/order/countByShop/" + uni.getStorageSync('shopId'), {}, false, 'GET',
'application/x-www-form-urlencoded').then((res) => { 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
@ -498,7 +551,6 @@
this.indexInit() this.indexInit()
break; break;
case 1: case 1:
that.$refs.deLivery.init(type) that.$refs.deLivery.init(type)
break; break;
case 2: case 2:
@ -608,7 +660,8 @@
} }
.data22 { .data22 {
flex: 1; width:25%;
} }
.data222 { .data222 {
@ -616,7 +669,10 @@
font-weight: 700; font-weight: 700;
padding-bottom: 20rpx; padding-bottom: 20rpx;
} }
.data333 {
color: #415c56;
font-size: 28rpx;
}
.menu2 { .menu2 {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@ -640,6 +696,7 @@
.menu44 { .menu44 {
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
font-size:28rpx;
} }
.popup-area-content { .popup-area-content {

3
pages/login/login.vue

@ -316,7 +316,7 @@
//多店铺的时候点击选择需要登录的店铺 //多店铺的时候点击选择需要登录的店铺
checkShop(item) { checkShop(item) {
let that = this; let that = this;
console.log('看看--------------',item)
uni.getSystemInfo({ uni.getSystemInfo({
success: function (res1) { success: function (res1) {
that.NB.sendRequest('/auth/chooseShop', { that.NB.sendRequest('/auth/chooseShop', {
@ -324,6 +324,7 @@
deviceId:res1.deviceId deviceId:res1.deviceId
}, true, 'POST', 'application/x-www-form-urlencoded').then(res => { }, true, 'POST', 'application/x-www-form-urlencoded').then(res => {
if (res.code == 200) { if (res.code == 200) {
console.log('看看--------------',res.result)
uni.setStorageSync('type',item.type) uni.setStorageSync('type',item.type)
uni.setStorageSync('warehouseKeeperFlag',item.warehouseKeeperFlag) uni.setStorageSync('warehouseKeeperFlag',item.warehouseKeeperFlag)
uni.setStorageSync('shopId',item.shop.id) uni.setStorageSync('shopId',item.shop.id)

2
pages/shop/addGoods.vue

@ -95,7 +95,7 @@
</view> </view>
</view> </view>
</uni-forms-item> </uni-forms-item>
<uni-forms-item label="设置加料" name="isMoreBuy"> <uni-forms-item label="拼团搭配" name="isMoreBuy">
<view style="line-height: 74rpx;"> <view style="line-height: 74rpx;">
<radio :checked="formData.isMoreBuy==0" name="isMoreBuy" @click="checkisMoreBuy('0')" />否 <radio :checked="formData.isMoreBuy==0" name="isMoreBuy" @click="checkisMoreBuy('0')" />否
<radio :checked="formData.isMoreBuy==1" name="isMoreBuy" @click="checkisMoreBuy('1')" />是 <radio :checked="formData.isMoreBuy==1" name="isMoreBuy" @click="checkisMoreBuy('1')" />是

434
pages/shop/attributeList.vue

@ -18,7 +18,8 @@
<li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)"> <li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)">
<view class="name"> <view class="name">
<text>{{item.attributeName}}</text> <text>{{item.attributeName}}</text>
<u-icon name="edit-pen-fill" size="22" v-if="item.attributeName != '默认属性'" @tap.stop="inputDialogToggle('edit', item)"></u-icon> <view style="width: 10px;"></view>
<uni-icons type="compose" size="22" v-if="item.attributeName != '默认属性'" @tap.stop="inputDialogToggle('edit', item)"></uni-icons>
</view> </view>
<button class="bj-btn" @tap.stop="goGategoryLow(item)">管理属性</button> <button class="bj-btn" @tap.stop="goGategoryLow(item)">管理属性</button>
</li> </li>
@ -26,27 +27,20 @@
</view> </view>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此属性?'" showCancelButton="true" @cancel="show = false" <u-modal :show="show" :title="'删除'" :content="'是否确认删除此属性?'" showCancelButton="true" @cancel="show = false"
@confirm="delItemModal"></u-modal> @confirm="delItemModal"></u-modal>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
@confirm="dialogInputConfirm" @close="dialogClose">
</uni-popup-dialog>
</uni-popup>
<uni-popup ref="delDialog" background-color="#fff"> <uni-popup ref="delDialog" background-color="#fff">
<view class="add-popup-content"> <view class="add-popup-content attr-name-popup">
<view class="add-popup-title"> <view class="add-popup-title">
<text>编辑属性</text> <text>编辑属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16" <uni-icons class="popup-close" @tap='close' type="closeempty" color='#777' size="18"></uni-icons>
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view> </view>
<view class="add-popup-container"> <view class="add-popup-container">
<view style="width: 90%;margin: 40rpx auto 0;"> <view class="form-field">
属性名称: <view class="form-label">属性名称</view>
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入属性值" /> <uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入属性值" />
</view> </view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;color: #fff;display: flex;position: absolute;bottom: 0;"> <view class="popup-actions">
<view style="flex: 1;background: linear-gradient(90deg, #60F3FF, #088FEB);" v-if="inputVal != '默认属性'" @tap="dialogDel">删除</view> <view class="popup-action danger" v-if="inputVal != '默认属性'" @tap="dialogDel">删除</view>
<view style="flex: 1;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view> <view class="popup-action primary" @tap="dialogInputConfirm">确认</view>
</view> </view>
<!-- <ul> <!-- <ul>
<li v-for="(item,index) in defaultList" :key="index"> <li v-for="(item,index) in defaultList" :key="index">
@ -66,16 +60,16 @@
</uni-popup> </uni-popup>
<!-- 添加属性弹出层 --> <!-- 添加属性弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff"> <uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content"> <view class="add-popup-content attr-name-popup">
<view class="add-popup-title"> <view class="add-popup-title">
<text>新增属性</text> <text>新增属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16" <uni-icons class="popup-close" @tap='close' type="closeempty" color='#777' size="18"></uni-icons>
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view> </view>
<view class="add-popup-container"> <view class="add-popup-container">
<view class="form-field">
<input type="text" v-model="typeText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;" <view class="form-label">属性名称</view>
placeholder="请输入属性名称"> <input type="text" v-model="typeText" class="popup-input" placeholder="请输入属性名称">
</view>
<!-- <ul> <!-- <ul>
<li v-for="(item,index) in defaultList" :key="index"> <li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur"> <view class="title-fur">
@ -97,28 +91,32 @@
</uni-popup> </uni-popup>
<uni-popup ref="attrValueDialog" background-color="#fff"> <uni-popup ref="attrValueDialog" background-color="#fff">
<view class="add-popup-content" style="width: 640rpx;max-height: 600px;overflow: scroll;"> <view class="add-popup-content attr-value-popup">
<view class="add-popup-title"> <view class="add-popup-title">
<text>管理属性</text> <text>管理属性</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16" <uni-icons class="popup-close" @tap='close' type="closeempty" color='#777' size="18"></uni-icons>
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view> </view>
<view class="add-popup-container"> <view class="add-popup-container">
<view> <view class="popup-tip">
<text style="color:red;font-size:22rpx;">*点击“+”号可新增专属自己店铺的属性值</text> 点击右侧“+”号可新增本店铺专属属性值
</view> </view>
<view style="display: flex;font-weight: 700;font-size: 16px;height: 50px;line-height: 50px;padding-right: 10px;"> <view class="attr-value-header">
<view style="flex: 1;"> <view class="attr-value-title">
属性列表 属性列表
</view> </view>
<uni-icons type="plusempty" @tap="toggle()" color="#5fd9ee" size="20"></uni-icons> <view class="add-value-btn" @tap="toggle()">
<uni-icons type="plusempty" color="#00231C" size="18"></uni-icons>
<text>新增</text>
</view>
</view> </view>
<ul> <ul class="attr-value-list">
<li v-for="(item,index) in defaultList" :key="index"> <li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur"> <view class="title-fur">
<view class="name">{{item.value}}</view> <view class="name">{{item.value}}</view>
<view class="btn" v-if="inputVal != '默认属性'" @tap="editValue(item)">修改</view> <view class="value-actions" v-if="inputVal != '默认属性'">
<view class="btn" v-if="inputVal != '默认属性'" @tap="delValue(item)">删除</view> <view class="btn" @tap="editValue(item)">修改</view>
<view class="btn danger-text" @tap="delValue(item)">删除</view>
</view>
</view> </view>
</li> </li>
</ul> </ul>
@ -162,16 +160,23 @@
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="addDialog" type="dialog"> <uni-popup ref="addDialog" background-color="#fff">
<uni-popup-dialog <view class="add-popup-content value-edit-popup">
ref="addClose" <view class="add-popup-title">
mode="input" <text>{{isEdieValue ? '修改属性值' : '新增属性值'}}</text>
:title="'请输入属性名'" <uni-icons class="popup-close" @tap='$refs.addDialog.close()' type="closeempty" color='#777' size="18"></uni-icons>
v-model="specVal" </view>
placeholder="请输入属性名称" <view class="add-popup-container">
@confirm="addSpec" <view class="form-field">
@close="dialogClose"> <view class="form-label">属性值名称</view>
</uni-popup-dialog> <input type="text" v-model="specVal" class="popup-input" placeholder="请输入属性值名称">
</view>
<view class="popup-actions">
<view class="popup-action plain" @tap="$refs.addDialog.close()">取消</view>
<view class="popup-action primary" @tap="addSpec(specVal)">确认</view>
</view>
</view>
</view>
</uni-popup> </uni-popup>
</view> </view>
@ -356,28 +361,41 @@
this.$refs.addDialog.open() this.$refs.addDialog.open()
}, },
delValue(item){ delValue(item){
this.tui.request("/app/productAttributeValue/delById", "post", { this.NB.sendRequest("/app/productAttributeValue/delById", {
id: item.id id: item.id
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.tui.toast("删除成功") uni.showToast({
title: "删除成功",
icon: 'none'
})
this.goGategoryLow(this.editItem) this.goGategoryLow(this.editItem)
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.tui.toast("添加失败") uni.showToast({
title: "删除失败",
icon: 'none'
})
return;
} }
uni.hideLoading();
}).catch((res) => {}) }).catch((res) => {});
}, },
//初始化获取属性列表 //初始化获取属性列表
getGategoryList() { getGategoryList() {
this.tui.request("/app/productAttribute/selectByCategoryId", "post", {categoryId:this.attrId}, false, true).then((res) => { this.NB.sendRequest("/app/productAttribute/selectByCategoryId", {
categoryId:this.attrId
}, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.indexList = res.result; this.indexList = res.result;
} else { } else {
this.tui.toast(res.message) uni.showToast({
title: res.message,
icon: 'none'
})
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
}, },
//判断需要打开哪个弹窗(删除弹窗、取消弹窗) //判断需要打开哪个弹窗(删除弹窗、取消弹窗)
inputDialogToggle(type, item, parent) { inputDialogToggle(type, item, parent) {
@ -396,6 +414,9 @@
}, },
close(){ close(){
this.$refs.attrValueDialog.close() this.$refs.attrValueDialog.close()
this.$refs.delDialog.close()
this.$refs.addTypeDialog.close()
this.$refs.addDialog.close()
}, },
handleBlur(e){ handleBlur(e){
this.inputVal = e.detail.value this.inputVal = e.detail.value
@ -406,17 +427,17 @@
//查询属性下有没有库存 //查询属性下有没有库存
getTypeToNum(id) { getTypeToNum(id) {
let that = this; let that = this;
this.tui.request("/app/stock/getlistByAttributeList", "post", { this.NB.sendRequest("/app/stock/getlistByAttributeList", {
categoryId: id, categoryId: id,
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (res.result != '') { if (res.result != '') {
this.goodsList = res.result this.goodsList = res.result
this.$refs.carPopup.open('bottom') this.$refs.carPopup.open('bottom')
} else { } else {
this.tui.request("/app/productAttribute/selectByCategoryId", "POST", { this.NB.sendRequest("/app/productAttribute/selectByCategoryId", {
categoryId: this.delItems.id categoryId: this.delItems.id
}, false, true).then((res1) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res1) => {
if (res1.code == 200) { if (res1.code == 200) {
if (res1.result.length > 0) { if (res1.result.length > 0) {
uni.showModal({ uni.showModal({
@ -431,11 +452,23 @@
} else { } else {
that.show = true that.show = true
} }
} else {
uni.showToast({
title: res1.message,
icon: 'none'
})
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
} }
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
}, },
//点击选择列表,带参数 返回上一页 //点击选择列表,带参数 返回上一页
clickList(item) { clickList(item) {
@ -456,34 +489,55 @@
}, },
addSpec(e){ addSpec(e){
let that = this; let that = this;
if(e == ''){
uni.showToast({
title: "请输入属性值名称",
icon: 'none'
})
return
}
if(this.isEdieValue){ if(this.isEdieValue){
that.tui.request("/app/productAttributeValue/edit", "post", { this.NB.sendRequest("/app/productAttributeValue/edit", {
id: that.valueEditId, id: that.valueEditId,
value:e value:e
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.tui.toast("修改成功") uni.showToast({
title: "修改成功",
icon: 'none'
})
that.$refs.addDialog.close()
that.goGategoryLow(that.editItem) that.goGategoryLow(that.editItem)
that.$forceUpdate() that.$forceUpdate()
} else { } else {
that.tui.toast("添加失败") uni.showToast({
title: res.message,
icon: 'none'
})
} }
uni.hideLoading();
}).catch((res) => {}) }).catch((res) => {});
}else{ }else{
that.tui.request("/app/productAttributeValue/save", "post", { this.NB.sendRequest("/app/productAttributeValue/save", {
attributeId: that.editItem.id, attributeId: that.editItem.id,
value:e value:e
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.tui.toast("添加成功") uni.showToast({
title: "添加成功",
icon: 'none'
})
that.$refs.addDialog.close()
that.goGategoryLow(that.editItem) that.goGategoryLow(that.editItem)
that.$forceUpdate() that.$forceUpdate()
} else { } else {
that.tui.toast("添加失败") uni.showToast({
title: "添加失败",
icon: 'none'
})
} }
uni.hideLoading();
}).catch((res) => {}) }).catch((res) => {});
} }
}, },
//属性编辑(新增,修改) //属性编辑(新增,修改)
@ -501,36 +555,40 @@
} }
} }
if(e == ''){ if(e == ''){
that.tui.toast("请输入属性名") uni.showToast({
title: "请输入属性名",
icon: 'none'
})
return return
} }
that.tui.request("/app/productAttribute/save", "post", { this.NB.sendRequest("/app/productAttribute/save", {
categoryId: that.attrId, categoryId: that.attrId,
attributeName:e attributeName:e
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.tui.toast("添加成功") uni.showToast({
title: "添加成功",
icon: 'none'
})
that.$refs.addTypeDialog.close() that.$refs.addTypeDialog.close()
that.getGategoryList() that.getGategoryList()
} else { } else {
that.tui.toast("添加失败") uni.showToast({
title: "添加失败",
icon: 'none'
})
} }
uni.hideLoading();
}).catch((res) => {});
}).catch((res) => {})
// that.$refs.addTypeDialog.val = ''
/* for(var i=0;i<that.defaultList.length;i++){
for(var m=0;m<that.defaultList[i].list.length;m++){
that.defaultList[i].list[m].checked = false
}
} */
that.typeText = '' that.typeText = ''
that.multipleList = [] that.multipleList = []
break; break;
case 'edit': case 'edit':
that.tui.request("/app/productAttribute/edit", "post", { this.NB.sendRequest("/app/productAttribute/edit", {
attributeName: this.inputVal, attributeName: this.inputVal,
id: that.editItem.id id: that.editItem.id
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
that.getGategoryList() that.getGategoryList()
that.sortText = '' that.sortText = ''
@ -544,27 +602,25 @@
icon: 'none' icon: 'none'
}) })
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
break; break;
default: default:
} }
that.$refs.delDialog.close() that.$refs.delDialog.close()
that.$refs.inputClose.val = ''
this.inputVal = "" this.inputVal = ""
}, },
//点击取消按钮 //点击取消按钮
dialogClose() { dialogClose() {
this.inputVal = ''; this.inputVal = '';
this.specVal = ''; this.specVal = '';
this.$refs.inputClose.val = ''
this.$refs.addClose.val = ''
}, },
//带删除按钮的弹窗 //带删除按钮的弹窗
dialogDel() { dialogDel() {
this.tui.request("/app/productAttribute/delById", "post", { this.NB.sendRequest("/app/productAttribute/delById", {
id: this.editItem.id, id: this.editItem.id,
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getGategoryList() this.getGategoryList()
uni.showToast({ uni.showToast({
@ -579,14 +635,15 @@
icon: 'none' icon: 'none'
}) })
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
}, },
delItemModal() { delItemModal() {
this.show = false; this.show = false;
if (this.delType == 'del') { if (this.delType == 'del') {
this.tui.request("/app/productCategory/delById", "post", { this.NB.sendRequest("/app/productCategory/delById", {
id: this.delItems.id, id: this.delItems.id,
}, false, true).then((res) => { }, false, 'post', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.getGategoryList() this.getGategoryList()
uni.showToast({ uni.showToast({
@ -595,14 +652,14 @@
}) })
this.$refs.carPopup.close() this.$refs.carPopup.close()
this.$refs.delDialog.close() this.$refs.delDialog.close()
} else { } else {
uni.showToast({ uni.showToast({
title: "删除失败", title: "删除失败",
icon: 'none' icon: 'none'
}) })
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
} }
}, },
delItem(item, type) { delItem(item, type) {
@ -613,9 +670,9 @@
//跳转子属性页 //跳转子属性页
goGategoryLow(item) { goGategoryLow(item) {
this.editItem = item this.editItem = item
this.tui.request("/app/productAttributeValue/selectByAttributeId", "get", { this.NB.sendRequest("/app/productAttributeValue/selectByAttributeId", {
id: item.id, id: item.id,
}, false, true).then((res) => { }, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.defaultList = res.result; this.defaultList = res.result;
this.$refs.attrValueDialog.open(); this.$refs.attrValueDialog.open();
@ -625,8 +682,8 @@
icon: 'none' icon: 'none'
}) })
} }
}).catch((res) => {}) uni.hideLoading();
}).catch((res) => {});
}, },
//选择多个属性保存 //选择多个属性保存
addMultipleType(item,item1,index){ addMultipleType(item,item1,index){
@ -843,16 +900,22 @@
} }
.back-btn { .back-btn {
margin-top: 110rpx; padding-top: 110rpx;
} }
.btn{ .btn{
flex: 1; min-width: 88rpx;
line-height: 25px; height: 48rpx;
line-height: 48rpx;
text-align: center; text-align: center;
height: 25px; color: #00231C;
color: #1E90FF; border-radius: 48rpx;
border-radius: 7px; background: rgba(166, 255, 234, 0.45);
margin: 5px 0 0 10px; margin-left: 16rpx;
font-size: 24rpx;
}
.danger-text {
color: #FF5A4F;
background: #FFF0E6;
} }
.title-search { .title-search {
@ -904,24 +967,90 @@
border-radius: 70rpx; border-radius: 70rpx;
} }
.add-popup-content { .add-popup-content {
align-items: center; width: 640rpx;
justify-content: center; max-width: 92vw;
padding: 30rpx; max-height: 82vh;
width: 100%; background: #fff;
height: 325rpx; border-radius: 28rpx;
background-color: #fff; padding: 34rpx 30rpx 30rpx;
overflow: scroll; box-sizing: border-box;
overflow: hidden;
}
.attr-name-popup {
width: 100vw;
max-width: 100vw;
border-radius: 28rpx 28rpx 0 0;
padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
} }
.add-popup-title { .add-popup-title {
font-size: 36rpx; font-size: 36rpx;
font-weight: bold; font-weight: bold;
text-align: center; text-align: left;
position: relative; position: relative;
color: #00231C;
padding-right: 70rpx;
}
.popup-close {
position: absolute !important;
top: 4rpx;
right: 0;
width: 48rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
border-radius: 50%;
background: #F7F8F8;
} }
.add-popup-container { .add-popup-container {
margin-top: 20rpx; margin-top: 28rpx;
}
.form-field {
margin-top: 26rpx;
}
.form-label {
font-size: 28rpx;
font-weight: 700;
color: #00231C;
margin-bottom: 16rpx;
}
.popup-input {
width: 100%;
height: 84rpx;
line-height: 84rpx;
border: 2rpx solid #E8ECEB;
background: #F7F8F8;
border-radius: 18rpx;
box-sizing: border-box;
padding: 0 24rpx;
font-size: 28rpx;
}
.popup-actions {
display: flex;
gap: 20rpx;
margin-top: 42rpx;
}
.popup-action {
flex: 1;
height: 84rpx;
line-height: 84rpx;
text-align: center;
border-radius: 84rpx;
font-size: 30rpx;
font-weight: 700;
}
.popup-action.primary {
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
}
.popup-action.danger {
background: #FFF0E6;
color: #FF5A4F;
}
.popup-action.plain {
background: #F7F8F8;
color: #00231C;
} }
.title-name { .title-name {
padding-top: 110rpx; padding-top: 110rpx;
@ -935,27 +1064,88 @@
height: 80rpx; height: 80rpx;
color: #fff; color: #fff;
line-height: 80rpx; line-height: 80rpx;
margin-top: 50rpx; margin-top: 42rpx;
} }
.add-popup-btn { .add-popup-btn {
flex: 1; flex: 1;
text-align: center; text-align: center;
background: linear-gradient(90deg, #60F3FF, #088FEB); height: 84rpx;
line-height: 84rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
color: #00231C;
border-radius: 84rpx;
font-size: 30rpx;
font-weight: 700;
}
.attr-value-popup {
width: 680rpx;
padding-bottom: 20rpx;
}
.value-edit-popup {
width: 620rpx;
}
.popup-tip {
padding: 18rpx 22rpx;
background: rgba(166, 255, 234, 0.24);
color: #005849;
border-radius: 16rpx;
font-size: 24rpx;
line-height: 36rpx;
}
.attr-value-header {
display: flex;
align-items: center;
height: 88rpx;
}
.attr-value-title {
flex: 1;
font-size: 30rpx;
font-weight: 700;
color: #00231C;
}
.add-value-btn {
display: flex;
align-items: center;
height: 58rpx;
line-height: 58rpx;
padding: 0 22rpx;
border-radius: 58rpx;
background: linear-gradient(90deg, rgba(227, 255, 150, 1), rgba(166, 255, 234, 1));
font-size: 26rpx;
font-weight: 700;
color: #00231C;
}
.add-value-btn text {
margin-left: 6rpx;
}
.attr-value-list {
max-height: 58vh;
overflow-y: auto;
padding-bottom: 10rpx;
} }
.title-fur { .title-fur {
width: 95%; width: 100%;
height: 70rpx; min-height: 82rpx;
margin: 0 auto; margin: 0 auto;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
display: flex; display: flex;
align-items: center;
.name { .name {
font-size: 30rpx; font-size: 30rpx;
width: 65%; flex: 1;
height: 70rpx; min-width: 0;
line-height: 70rpx; line-height: 40rpx;
color: #00231C;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
.value-actions {
display: flex;
align-items: center;
}
.content-fur { .content-fur {
padding-bottom: 25rpx; padding-bottom: 25rpx;
} }
@ -981,7 +1171,7 @@
} }
@media screen and (min-width: 760px) { @media screen and (min-width: 760px) {
.add-popup-content{ .add-popup-content{
height: 700px !important; max-height: 700px !important;
} }
.vue-ref{ .vue-ref{
padding-bottom:0 !important; padding-bottom:0 !important;

1
pages/shop/orderDetail.vue

@ -284,6 +284,7 @@
}, },
mealServing(item){ mealServing(item){
let that = this let that = this
console.log('确定出餐吗?',item)
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '确定要出餐吗?', content: '确定要出餐吗?',

Loading…
Cancel
Save