Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq

This commit is contained in:
gyq 2024-10-26 10:27:33 +08:00
commit a67e109744
7 changed files with 460 additions and 274 deletions

View File

@ -5,7 +5,10 @@ ENV = 'development'
# VUE_APP_BASE_API = 'http://192.168.2.42:8000'
# VUE_APP_BASE_API = 'http://192.168.2.133:8000'
# 测试
VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
#预发布
VUE_APP_BASE_API = 'https://pre-cashieradmin.sxczgkj.cn'
# 生产
# VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
# VUE_APP_BASE_API = 'http://192.168.2.96:8000'

View File

@ -3,13 +3,13 @@ ENV = 'production'
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇Nginx 配置
# 接口地址,注意协议,如果你没有配置 ssl需要将 https 改为 http
# 测试
VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
# VUE_APP_BASE_API = 'https://admintestpapi.sxczgkj.cn'
# 生产
# VUE_APP_BASE_API = 'https://cashieradmin.sxczgkj.cn'
# 预发布接口
# VUE_APP_BASE_API = 'https://pre-cashieradmin.sxczgkj.cn'
VUE_APP_BASE_API = 'https://pre-cashieradmin.sxczgkj.cn'
# VUE_APP_BASE_API = 'http://192.168.2.98:8000'
# 如果接口是 http 形式, wss 需要改为 ws

View File

@ -450,3 +450,14 @@ export function $returnOrder(data) {
}
});
}
//获取台桌详情状态
export function $returnTableDetail(data) {
return request({
url: '/api/tbShopTable/state',
method: "get",
params:{
shopId: localStorage.getItem("shopId"),
...data
}
});
}

View File

@ -49,7 +49,7 @@
<el-radio label="1">部分分类</el-radio>
<!-- <el-radio label="2">部分商品</el-radio> -->
</el-radio-group>
<div style="color: rgb(255, 77, 79);margin-left: 80px;">仅打印制作单[厨房]</div>
<div v-if="forms.classifyPrint == 1" style="color: rgb(255, 77, 79);margin-left: 80px;">仅打印制作单[厨房]</div>
<div v-if="forms.classifyPrint == 1" style="margin-left:70px">
<!-- <el-tree :data="partList" show-checkbox node-key="id" ref="tree" :default-checked-keys="this.forms.categoryIds"
:props="{ children: 'childrenList', label: 'name' }">

View File

@ -118,6 +118,7 @@ export default {
number: "0",
show: false,
timer: null,
payPar:{}
};
},
watch: {
@ -136,18 +137,10 @@ export default {
this.$refs.refInputCode.focus();
});
} else {
this.getPayUrl()
this.tips = "请用户使用微信/支付宝扫描付款码";
this.startGetOrderInfo();
this.$nextTick(() => {
QRCode.toCanvas(
this.$refs.canvas,
this.paymentQrcode,{width: 160,
height: 160,},
function (error) {
console.log(error);
}
);
});
}
},
number(newval) {
@ -193,14 +186,28 @@ export default {
this.close();
this.$emit("confirm", this.form.code);
},
getPayUrl(){
$getOrderPayUrl(this.payPar).then((res) => {
console.log(res);
this.paymentQrcode = res;
this.$nextTick(() => {
QRCode.toCanvas(
this.$refs.canvas,
this.paymentQrcode,{width: 160,
height: 160,},
function (error) {
console.log(error);
}
);
});
});
},
open(data) {
this.show = true;
this.form.money = Number(this.price).toFixed(2);
this.payPar=data
if (this.openSwitch) {
$getOrderPayUrl({ orderId: this.order.id||data.id,payAmount:this.form.money||data.settlementAmount }).then((res) => {
console.log(res);
this.paymentQrcode = res;
});
// this.getPayUrl();
}
this.$nextTick(() => {
this.$refs.refInputCode.focus();

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,17 @@
//判断商品是否可以下单
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);
}
}
//字符匹配
export function $strMatch(matchStr,str){
return matchStr.toLowerCase().includes(str.toLowerCase())
}
// 一个数组是否包含另外一个数组全部元素
@ -15,6 +26,8 @@ export function arrayContainsAll(arr1, arr2) {
//n项 n-1项组合生成全部结果
export function generateCombinations(arr, k) {
console.log(arr)
console.log(k)
let result = [];
function helper(index, current) {