更新代客下单能够购买判断
This commit is contained in:
@@ -4,17 +4,7 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
}
|
||||
<script setup>
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
415
pages.json
415
pages.json
@@ -44,58 +44,10 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_REGISTER",
|
||||
"path": "pages/login/register",
|
||||
"pageId": "PAGES_ME",
|
||||
"path": "pages/user/user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_STATIC_AGREEMENT",
|
||||
"path": "pages/login/serviceAgreement",
|
||||
"style": {
|
||||
"navigationBarTitleText": "服务协议"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_STATIC_POLICY",
|
||||
"path": "pages/login/privacyPolicy",
|
||||
"style": {
|
||||
"navigationBarTitleText": "隐私政策"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_SCAN_LOGIN",
|
||||
"path": "pages/index/scan",
|
||||
"style": {
|
||||
"navigationBarTitleText": "扫码登录中间页(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"pageId": "PAGES_PAY_ORDER",
|
||||
"path": "pages/order/order",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_PAY_ORDER_DETAIL",
|
||||
"path": "pages/order/orderDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_REFUND_ORDER",
|
||||
"path": "pages/order/refund",
|
||||
"style": {
|
||||
"navigationBarTitleText": "退款(自定义导航)",
|
||||
"navigationBarTitleText": "我的(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
@@ -126,323 +78,6 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择门店"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"pageId": "PAGES_USER_SETUP",
|
||||
"path": "pages/userSetUp/userSetUp",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_RESET_PAYPWD",
|
||||
"path": "pages/userSetUp/payPassword",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_RESET_PWD",
|
||||
"path": "pages/userSetUp/accountPwd",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账号密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_SYS_CONFIG",
|
||||
"path": "pages/userSetUp/systemSetUp",
|
||||
"style": {
|
||||
"navigationBarTitleText": "系统设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_SAFE_CONFIG",
|
||||
"path": "pages/userSetUp/safeSetUp",
|
||||
"style": {
|
||||
"navigationBarTitleText": "安全设置"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_ACCOUNTSETUP",
|
||||
"path": "pages/userSetUp/accountSetUp",
|
||||
"style": {
|
||||
"navigationBarTitleText": "账号设置(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_ME",
|
||||
"path": "pages/user/user",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_ABOUTMCH",
|
||||
"path": "pages/aboutMch/aboutMch",
|
||||
"style": {
|
||||
"navigationBarTitleText": "关于我们(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_QUICK_PAY",
|
||||
"path": "pages/quickMoney/quickMoney",
|
||||
"style": {
|
||||
"navigationBarTitleText": "快捷收银"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_QR_CASHIER",
|
||||
"path": "pages/quickMoney/qrCashier",
|
||||
"style": {
|
||||
"navigationBarTitleText": "聚合收款码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MCH_INFO",
|
||||
"path": "pages/mchInfo/mchInfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商户信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_NOTICE_USER",
|
||||
"path": "pages/noticeManage/noticeManage",
|
||||
"style": {
|
||||
"navigationBarTitleText": "通知人管理(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_NOTICE_BING_USER",
|
||||
"path": "pages/noticeManage/bindUser",
|
||||
"style": {
|
||||
"navigationBarTitleText": "通知接收人管理",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_STAT",
|
||||
"path": "pages/statPage/statPage",
|
||||
"style": {
|
||||
"navigationBarTitleText": "统计报表(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_NOTICE_LIST",
|
||||
"path": "pages/noticePage/noticeList",
|
||||
"style": {
|
||||
"navigationBarTitleText": "全部公告",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_NOTICE_DETAIL",
|
||||
"path": "pages/noticePage/noticeDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "公告详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_APPLYMENT",
|
||||
"path": "pages/applyment/list",
|
||||
"style": {
|
||||
"navigationBarTitleText": "进件管理",
|
||||
"navigationBarBackgroundColor": "#f7f7f7",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_ADDAPP",
|
||||
"path": "pages/applyment/addApp",
|
||||
"style": {
|
||||
"navigationBarTitleText": "添加应用",
|
||||
"navigationBarBackgroundColor": "#f7f7f7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_APPLYMENT_BUSINESS",
|
||||
"path": "pages/applyment/business",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商户管理",
|
||||
"navigationBarBackgroundColor": "#f7f7f7",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_APPLYMENT_SELECETDPAY",
|
||||
"path": "pages/applyment/selectedPay",
|
||||
"style": {
|
||||
"navigationBarTitleText": "选择进件渠道",
|
||||
"navigationBarBackgroundColor": "#f7f7f7"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_APPLYMENT_H5_DETAIL",
|
||||
"path": "pages/applyment/h5/applyDetail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "进件详情",
|
||||
"navigationBarBackgroundColor": "#F5F6FC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_APPLYMENT_H5_OPTION",
|
||||
"path": "pages/applyment/h5/applyOption",
|
||||
"style": {
|
||||
"navigationBarTitleText": "进件配置/签约开通",
|
||||
"navigationBarBackgroundColor": "#F5F6FC"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_FORGET_PASSWORD",
|
||||
"path": "pages/login/forgetPassword",
|
||||
"style": {
|
||||
"navigationBarTitleText": "找回密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_SET_NEW_PASSWORD",
|
||||
"path": "pages/login/setNewPassword",
|
||||
"style": {
|
||||
"navigationBarTitleText": "设置新密码"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_EDIT_FORM",
|
||||
"path": "pages/userSetUp/editForm",
|
||||
"style": {
|
||||
"navigationBarTitleText": "修改用户姓名",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_AD_H5",
|
||||
"path": "pages/adH5/adH5",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_AD_ALIOPERATION",
|
||||
"path": "pages/aliOperation/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "支付宝代运营授权(自定义)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_CENTER",
|
||||
"path": "pages/memberCenter/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER",
|
||||
"path": "pages/memberCenter/member/member",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员管理(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_EDIT",
|
||||
"path": "pages/memberCenter/member/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员编辑(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_DETAIL",
|
||||
"path": "pages/memberCenter/member/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员详情(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_RECHARGE_RULE",
|
||||
"path": "pages/memberCenter/rechargeRule/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "充值规则管理(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_RECHARGE_RULE_EDIT",
|
||||
"path": "pages/memberCenter/rechargeRule/edit",
|
||||
"style": {
|
||||
"navigationBarTitleText": "充值规则编辑(自定义导航)",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_ACCOUNT_HISTORY",
|
||||
"path": "pages/memberCenter/accountHistory/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员账户流水(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_ACCOUNT_HISTORY_DETAIL",
|
||||
"path": "pages/memberCenter/accountHistory/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "流水详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_RECHARGE_RECORD",
|
||||
"path": "pages/memberCenter/rechargeRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员充值记录(自定义导航)",
|
||||
"navigationStyle": "custom",
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_RECHARGE_RECORD_DETAIL",
|
||||
"path": "pages/memberCenter/rechargeRecord/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "充值记录详情"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_MEMBER_RECHARGE_MEMBERMANUAL",
|
||||
"path": "pages/memberCenter/member/memberManual",
|
||||
"style": {
|
||||
"navigationBarTitleText": "会员调账"
|
||||
}
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_LIST_SEARCH",
|
||||
"path": "pages/list/search",
|
||||
"style": {
|
||||
"navigationBarTitleText": "搜索"
|
||||
}
|
||||
}, {
|
||||
"path": "pages/release/release",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"enablePullDownRefresh": false
|
||||
}
|
||||
|
||||
}, {
|
||||
"pageId": "PAGES_WEBVIEW",
|
||||
"path": "pages/webview/webview"
|
||||
}, {
|
||||
"pageId": "PAGES_INVOICE",
|
||||
"path": "pages/invoice/invoice"
|
||||
}
|
||||
],
|
||||
"subPackages": [{
|
||||
@@ -1268,19 +903,18 @@
|
||||
{
|
||||
"root": "pageSalesSummary",
|
||||
"pages": [{
|
||||
"pageId": "PAGES_SALES_SUMMARY",
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "销售汇总"
|
||||
}
|
||||
}, {
|
||||
"pageId": "PAGES_PRODUCT_SALES_RANKING",
|
||||
"path": "productSalesRanking",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品销售排行"
|
||||
}
|
||||
"pageId": "PAGES_SALES_SUMMARY",
|
||||
"path": "index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "销售汇总"
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"pageId": "PAGES_PRODUCT_SALES_RANKING",
|
||||
"path": "productSalesRanking",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品销售排行"
|
||||
}
|
||||
}]
|
||||
},
|
||||
{
|
||||
"root": "pageLineUp",
|
||||
@@ -1394,10 +1028,8 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "账单付款记录"
|
||||
}
|
||||
}
|
||||
]
|
||||
}]
|
||||
},
|
||||
|
||||
{
|
||||
"root": "pagePrinter",
|
||||
"pages": [{
|
||||
@@ -1411,7 +1043,7 @@
|
||||
"pageId": "PAGES_PRINTER_ADD",
|
||||
"path": "add-printer/add-printer",
|
||||
"style": {
|
||||
"navigationBarTitleText" : "添加/编辑云打印机"
|
||||
"navigationBarTitleText": "添加/编辑云打印机"
|
||||
// "navigationBarTitleText": ""
|
||||
}
|
||||
},
|
||||
@@ -1443,10 +1075,9 @@
|
||||
},
|
||||
{
|
||||
"pageId": "PAGES_GOODS_GROUP_EDIT_GOODS",
|
||||
"path" : "edit-group-goods/edit-group-goods",
|
||||
"style" :
|
||||
{
|
||||
"navigationBarTitleText" : "管理商品"
|
||||
"path": "edit-group-goods/edit-group-goods",
|
||||
"style": {
|
||||
"navigationBarTitleText": "管理商品"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1479,14 +1110,6 @@
|
||||
"selectedIconPath": "static/tabImg/index-select.png",
|
||||
"text": "首页"
|
||||
}
|
||||
// ,
|
||||
// {
|
||||
// "pagePath": "pages/order/order",
|
||||
// "iconPath": "static/tabImg/order.png",
|
||||
// "selectedIconPath": "static/tabImg/order-select.png",
|
||||
// "text": "订单"
|
||||
// }
|
||||
,
|
||||
{
|
||||
"pagePath": "pages/user/user",
|
||||
"iconPath": "static/tabImg/user.png",
|
||||
|
||||
@@ -111,21 +111,17 @@
|
||||
console.log(props.goodsData.isStock);
|
||||
number.value = newval.suit || 1
|
||||
})
|
||||
|
||||
|
||||
const isCanBuy=computed(()=>{
|
||||
if(!goods.value) {
|
||||
|
||||
|
||||
const isCanBuy = computed(() => {
|
||||
if (!goods.value) {
|
||||
return false
|
||||
}
|
||||
console.log(util.isCanBuy({
|
||||
...goods.value,
|
||||
isStock: props.goodsData.isStock
|
||||
}));
|
||||
return util.isCanBuy({
|
||||
...goods.value,
|
||||
isStock: props.goodsData.isStock
|
||||
})
|
||||
|
||||
return util.isCanBuy(
|
||||
goods.value,
|
||||
props.goodsData
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
//全部规格是否都无法使用
|
||||
@@ -169,11 +165,11 @@
|
||||
function close() {
|
||||
model.value.close()
|
||||
}
|
||||
|
||||
const isDisabled=computed(()=>{
|
||||
return isAllDisabled.value || !isCanBuy.value
|
||||
|
||||
const isDisabled = computed(() => {
|
||||
return isAllDisabled.value || !isCanBuy.value
|
||||
})
|
||||
|
||||
|
||||
function reduce() {
|
||||
if (isDisabled.value) {
|
||||
return
|
||||
@@ -194,7 +190,7 @@
|
||||
number.value = newval
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function confirm() {
|
||||
close()
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
.btn-hover-class {
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
image{will-change: transform}
|
||||
.item {
|
||||
// width: 250rpx;
|
||||
// height: 272rpx;
|
||||
|
||||
@@ -440,6 +440,10 @@
|
||||
$originGoods = goods
|
||||
if (!data.table.tableId) {
|
||||
//无桌台
|
||||
const {
|
||||
masterId
|
||||
} = await getMasterId()
|
||||
data.masterId = masterId
|
||||
setTabBar(category, goods, [])
|
||||
return
|
||||
}
|
||||
@@ -587,7 +591,7 @@
|
||||
return prve;
|
||||
}, {});
|
||||
const canBudyGoods = specList
|
||||
.filter((v) => util.isCanBuy(v))
|
||||
.filter((v) => util.isCanBuy(v,guigeModelData.chooseGoods.item))
|
||||
.sort((a, b) => {
|
||||
const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
|
||||
return prve + skuMapNumber[cur];
|
||||
@@ -676,7 +680,7 @@
|
||||
prve[i] = matchArr
|
||||
.filter((v) => v.specSnap.match(i))
|
||||
.every((v) => {
|
||||
return !util.isCanBuy(v)
|
||||
return !util.isCanBuy(v,guigeModelData.chooseGoods.item)
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -801,7 +805,8 @@
|
||||
}
|
||||
|
||||
function canAddGoods() {
|
||||
return data.table.tableId
|
||||
// return data.table.tableId
|
||||
return true
|
||||
}
|
||||
|
||||
function searchGoodsUpdate(goodsItem,goodsIndex, isAdd) {
|
||||
@@ -813,11 +818,11 @@
|
||||
}
|
||||
}
|
||||
async function goodsUpdate(foodsindex, index, isAdd,searchGoodsIndex) {
|
||||
if (!canAddGoods()) {
|
||||
return infoBox.showToast('请先选择桌台', 0.5).then(res => {
|
||||
chooseTable()
|
||||
})
|
||||
}
|
||||
// if (!canAddGoods()) {
|
||||
// return infoBox.showToast('请先选择桌台', 0.5).then(res => {
|
||||
// chooseTable()
|
||||
// })
|
||||
// }
|
||||
const $goods = data.tabbar[index].foods[foodsindex]
|
||||
if ($goods.isDan) {
|
||||
//单规格
|
||||
|
||||
@@ -18,8 +18,15 @@ export function $returnUseType(shop, useType) {
|
||||
return result
|
||||
}
|
||||
//判断商品是否可以下单
|
||||
export function isCanBuy(goods, isStock) {
|
||||
return goods.isGrounding && goods.isPauseSale == 0 && (isStock ? goods.stockNumber > 0 : true);
|
||||
export function isCanBuy(skuGoods,goods) {
|
||||
if(goods.typeEnum=='normal'){
|
||||
//单规格
|
||||
return goods.isGrounding&&goods.isPauseSale==0&&(goods.isStock?goods.stockNumber>0:true);
|
||||
}else{
|
||||
//多规格
|
||||
return goods.isGrounding&&goods.isPauseSale==0&&skuGoods.isGrounding&&skuGoods.isPauseSale==0&&(goods.isStock?goods.stockNumber>0:true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user