Merge branch 'ymf' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into dev
This commit is contained in:
commit
146e6a617c
|
|
@ -5,7 +5,10 @@ ENV = 'development'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.42:8000'
|
# VUE_APP_BASE_API = 'http://192.168.2.42:8000'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.133: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 = 'https://cashieradmin.sxczgkj.cn'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.2.96:8000'
|
# VUE_APP_BASE_API = 'http://192.168.2.96:8000'
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@ ENV = 'production'
|
||||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
# 接口地址,注意协议,如果你没有配置 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://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'
|
# VUE_APP_BASE_API = 'http://192.168.2.98:8000'
|
||||||
# 如果接口是 http 形式, wss 需要改为 ws
|
# 如果接口是 http 形式, wss 需要改为 ws
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,7 @@ export default {
|
||||||
number: "0",
|
number: "0",
|
||||||
show: false,
|
show: false,
|
||||||
timer: null,
|
timer: null,
|
||||||
|
payPar:{}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -136,18 +137,10 @@ export default {
|
||||||
this.$refs.refInputCode.focus();
|
this.$refs.refInputCode.focus();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
this.getPayUrl()
|
||||||
this.tips = "请用户使用微信/支付宝扫描付款码";
|
this.tips = "请用户使用微信/支付宝扫描付款码";
|
||||||
this.startGetOrderInfo();
|
this.startGetOrderInfo();
|
||||||
this.$nextTick(() => {
|
|
||||||
QRCode.toCanvas(
|
|
||||||
this.$refs.canvas,
|
|
||||||
this.paymentQrcode,{width: 160,
|
|
||||||
height: 160,},
|
|
||||||
function (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
number(newval) {
|
number(newval) {
|
||||||
|
|
@ -193,14 +186,28 @@ export default {
|
||||||
this.close();
|
this.close();
|
||||||
this.$emit("confirm", this.form.code);
|
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) {
|
open(data) {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.form.money = Number(this.price).toFixed(2);
|
this.form.money = Number(this.price).toFixed(2);
|
||||||
|
this.payPar=data
|
||||||
if (this.openSwitch) {
|
if (this.openSwitch) {
|
||||||
$getOrderPayUrl({ orderId: this.order.id||data.id,payAmount:this.form.money||data.settlementAmount }).then((res) => {
|
// this.getPayUrl();
|
||||||
console.log(res);
|
|
||||||
this.paymentQrcode = res;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.refInputCode.focus();
|
this.$refs.refInputCode.focus();
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -1,6 +1,13 @@
|
||||||
//判断商品是否可以下单
|
//判断商品是否可以下单
|
||||||
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);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 一个数组是否包含另外一个数组全部元素
|
// 一个数组是否包含另外一个数组全部元素
|
||||||
|
|
@ -15,6 +22,8 @@ export function arrayContainsAll(arr1, arr2) {
|
||||||
|
|
||||||
//n项 n-1项组合,生成全部结果
|
//n项 n-1项组合,生成全部结果
|
||||||
export function generateCombinations(arr, k) {
|
export function generateCombinations(arr, k) {
|
||||||
|
console.log(arr)
|
||||||
|
console.log(k)
|
||||||
let result = [];
|
let result = [];
|
||||||
|
|
||||||
function helper(index, current) {
|
function helper(index, current) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue