更新代客下单能够购买判断

This commit is contained in:
2024-10-24 15:44:45 +08:00
parent c19eb54d6d
commit a232e77a2d
6 changed files with 57 additions and 436 deletions

View File

@@ -4,17 +4,7 @@
</view> </view>
</template> </template>
<script> <script setup>
export default {
data() {
return {
}
},
methods: {
}
}
</script> </script>
<style> <style>

View File

@@ -44,58 +44,10 @@
} }
}, },
{ {
"pageId": "PAGES_REGISTER", "pageId": "PAGES_ME",
"path": "pages/login/register", "path": "pages/user/user",
"style": { "style": {
"navigationBarTitleText": "注册(自定义导航)", "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": "退款(自定义导航)",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
@@ -126,323 +78,6 @@
"style": { "style": {
"navigationBarTitleText": "选择门店" "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": [{ "subPackages": [{
@@ -1268,19 +903,18 @@
{ {
"root": "pageSalesSummary", "root": "pageSalesSummary",
"pages": [{ "pages": [{
"pageId": "PAGES_SALES_SUMMARY", "pageId": "PAGES_SALES_SUMMARY",
"path": "index", "path": "index",
"style": { "style": {
"navigationBarTitleText": "销售汇总" "navigationBarTitleText": "销售汇总"
}
}, {
"pageId": "PAGES_PRODUCT_SALES_RANKING",
"path": "productSalesRanking",
"style": {
"navigationBarTitleText": "商品销售排行"
}
} }
] }, {
"pageId": "PAGES_PRODUCT_SALES_RANKING",
"path": "productSalesRanking",
"style": {
"navigationBarTitleText": "商品销售排行"
}
}]
}, },
{ {
"root": "pageLineUp", "root": "pageLineUp",
@@ -1394,10 +1028,8 @@
"style": { "style": {
"navigationBarTitleText": "账单付款记录" "navigationBarTitleText": "账单付款记录"
} }
} }]
]
}, },
{ {
"root": "pagePrinter", "root": "pagePrinter",
"pages": [{ "pages": [{
@@ -1411,7 +1043,7 @@
"pageId": "PAGES_PRINTER_ADD", "pageId": "PAGES_PRINTER_ADD",
"path": "add-printer/add-printer", "path": "add-printer/add-printer",
"style": { "style": {
"navigationBarTitleText" : "添加/编辑云打印机" "navigationBarTitleText": "添加/编辑云打印机"
// "navigationBarTitleText": "" // "navigationBarTitleText": ""
} }
}, },
@@ -1443,10 +1075,9 @@
}, },
{ {
"pageId": "PAGES_GOODS_GROUP_EDIT_GOODS", "pageId": "PAGES_GOODS_GROUP_EDIT_GOODS",
"path" : "edit-group-goods/edit-group-goods", "path": "edit-group-goods/edit-group-goods",
"style" : "style": {
{ "navigationBarTitleText": "管理商品"
"navigationBarTitleText" : "管理商品"
} }
} }
] ]
@@ -1479,14 +1110,6 @@
"selectedIconPath": "static/tabImg/index-select.png", "selectedIconPath": "static/tabImg/index-select.png",
"text": "首页" "text": "首页"
} }
// ,
// {
// "pagePath": "pages/order/order",
// "iconPath": "static/tabImg/order.png",
// "selectedIconPath": "static/tabImg/order-select.png",
// "text": "订单"
// }
,
{ {
"pagePath": "pages/user/user", "pagePath": "pages/user/user",
"iconPath": "static/tabImg/user.png", "iconPath": "static/tabImg/user.png",

View File

@@ -113,18 +113,14 @@
}) })
const isCanBuy=computed(()=>{ const isCanBuy = computed(() => {
if(!goods.value) { if (!goods.value) {
return false return false
} }
console.log(util.isCanBuy({ return util.isCanBuy(
...goods.value, goods.value,
isStock: props.goodsData.isStock props.goodsData
})); )
return util.isCanBuy({
...goods.value,
isStock: props.goodsData.isStock
})
}) })
@@ -170,7 +166,7 @@
model.value.close() model.value.close()
} }
const isDisabled=computed(()=>{ const isDisabled = computed(() => {
return isAllDisabled.value || !isCanBuy.value return isAllDisabled.value || !isCanBuy.value
}) })

View File

@@ -135,7 +135,7 @@
.btn-hover-class { .btn-hover-class {
opacity: .6; opacity: .6;
} }
image{will-change: transform}
.item { .item {
// width: 250rpx; // width: 250rpx;
// height: 272rpx; // height: 272rpx;

View File

@@ -440,6 +440,10 @@
$originGoods = goods $originGoods = goods
if (!data.table.tableId) { if (!data.table.tableId) {
//无桌台 //无桌台
const {
masterId
} = await getMasterId()
data.masterId = masterId
setTabBar(category, goods, []) setTabBar(category, goods, [])
return return
} }
@@ -587,7 +591,7 @@
return prve; return prve;
}, {}); }, {});
const canBudyGoods = specList const canBudyGoods = specList
.filter((v) => util.isCanBuy(v)) .filter((v) => util.isCanBuy(v,guigeModelData.chooseGoods.item))
.sort((a, b) => { .sort((a, b) => {
const aNumber = a.specSnap.split(",").reduce((prve, cur) => { const aNumber = a.specSnap.split(",").reduce((prve, cur) => {
return prve + skuMapNumber[cur]; return prve + skuMapNumber[cur];
@@ -676,7 +680,7 @@
prve[i] = matchArr prve[i] = matchArr
.filter((v) => v.specSnap.match(i)) .filter((v) => v.specSnap.match(i))
.every((v) => { .every((v) => {
return !util.isCanBuy(v) return !util.isCanBuy(v,guigeModelData.chooseGoods.item)
}); });
} }
} }
@@ -801,7 +805,8 @@
} }
function canAddGoods() { function canAddGoods() {
return data.table.tableId // return data.table.tableId
return true
} }
function searchGoodsUpdate(goodsItem,goodsIndex, isAdd) { function searchGoodsUpdate(goodsItem,goodsIndex, isAdd) {
@@ -813,11 +818,11 @@
} }
} }
async function goodsUpdate(foodsindex, index, isAdd,searchGoodsIndex) { async function goodsUpdate(foodsindex, index, isAdd,searchGoodsIndex) {
if (!canAddGoods()) { // if (!canAddGoods()) {
return infoBox.showToast('请先选择桌台', 0.5).then(res => { // return infoBox.showToast('请先选择桌台', 0.5).then(res => {
chooseTable() // chooseTable()
}) // })
} // }
const $goods = data.tabbar[index].foods[foodsindex] const $goods = data.tabbar[index].foods[foodsindex]
if ($goods.isDan) { if ($goods.isDan) {
//单规格 //单规格

View File

@@ -18,8 +18,15 @@ export function $returnUseType(shop, useType) {
return result return result
} }
//判断商品是否可以下单 //判断商品是否可以下单
export function isCanBuy(goods, isStock) { export function isCanBuy(skuGoods,goods) {
return goods.isGrounding && goods.isPauseSale == 0 && (isStock ? goods.stockNumber > 0 : true); 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);
}
} }