diff --git a/src/views/table/table_list.vue b/src/views/table/table_list.vue
index 883fad3..ce99737 100644
--- a/src/views/table/table_list.vue
+++ b/src/views/table/table_list.vue
@@ -38,7 +38,12 @@
>
下载台桌码
- 下载店铺码
+ 下载店铺码
@@ -233,7 +238,7 @@ import {
tbShopTable,
} from "@/api/table";
import dayjs from "dayjs";
-
+import { downloadFile } from "@/utils/index";
export default {
components: {
@@ -255,12 +260,12 @@ export default {
selTable: "", //当前选中的桌台
areaMap: {},
shopInfo: {},
- timer:null
+ timer: null,
};
},
beforeDestroy() {
this.clearTimer();
- console.log('beforeDestroy')
+ console.log("beforeDestroy");
},
mounted() {
this.clearTimer();
@@ -270,7 +275,7 @@ export default {
},
filters: {
formatTime(milliseconds) {
- console.log(milliseconds)
+ console.log(milliseconds);
if (!milliseconds) {
return "";
}
@@ -281,21 +286,37 @@ export default {
const minutes = Math.floor(
(milliseconds % (1000 * 60 * 60)) / (1000 * 60)
);
- return `${days ? days + "天" : ""} ${hours ? hours + "时" : ""} ${minutes + "分"
+ return `${days ? days + "天" : ""} ${hours ? hours + "时" : ""} ${
+ minutes + "分"
}`;
},
},
methods: {
- clearTimer(){
- console.log('clearTimer')
- clearInterval(this.timer);
- this.timer=null;
+ async downloadShopCode() {
+ try {
+ const link = document.createElement("a");
+ link.href = this.shopInfo.smallQrcode;
+ const fileName = this.shopInfo.shopName +"店铺码"+ ".png";
+ console.log(fileName)
+ link.setAttribute("download", fileName);
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+ this.$message.success("下载成功");
+ } catch (error) {
+ console.log(error);
+ }
},
- setTimter(time=60){
- this.timer=setInterval(() => {
- const showloading=false
- this.tbShopTableGet(showloading)
- }, time*1000);
+ clearTimer() {
+ console.log("clearTimer");
+ clearInterval(this.timer);
+ this.timer = null;
+ },
+ setTimter(time = 60) {
+ this.timer = setInterval(() => {
+ const showloading = false;
+ this.tbShopTableGet(showloading);
+ }, time * 1000);
},
//获取店铺信息
async getShopInfo() {
@@ -372,9 +393,9 @@ export default {
table_name: this.selTable.name,
tableId: this.selTable.tableId,
useType: this.selTable.useType,
- maxCapacity:this.selTable.maxCapacity,
- masterId:this.selTable.masterId,
- orderId:this.selTable.orderId,
+ maxCapacity: this.selTable.maxCapacity,
+ masterId: this.selTable.masterId,
+ orderId: this.selTable.orderId,
...query,
},
});
@@ -406,7 +427,7 @@ export default {
}
},
// 台桌列表
- async tbShopTableGet(showloading=true) {
+ async tbShopTableGet(showloading = true) {
this.loading = showloading;
try {
const { content, total } = await tbShopTableGet({
diff --git a/src/views/tool/Instead/components/cart-item.vue b/src/views/tool/Instead/components/cart-item.vue
index c958b53..9b84f2e 100644
--- a/src/views/tool/Instead/components/cart-item.vue
+++ b/src/views/tool/Instead/components/cart-item.vue
@@ -1,8 +1,12 @@
-
+
包
退
-
+
-
+
{{ item.name }}
@@ -24,13 +28,23 @@
{{ item.specSnap }}
-
- 备注:{{ item.note || "" }}
-
+
+
+
+ 备注:{{ item.note || "" }}
+
+
+ 备注:
+
+
+
+
+ 备注:{{ item.note || "" }}
+
-
-
+
+
X{{ item.totalNumber }}
X{{ item.number }}
@@ -136,6 +150,11 @@ export default {
this.number = this.item.number;
},
methods: {
+ editNote() {
+ if (this.placeNum === 0) {
+ this.$emit("editNote", this.index);
+ }
+ },
//购物车商品输入框数量改变
cartGoodsNumberChange(newval) {
if (newval <= 0) {
@@ -207,13 +226,13 @@ export default {
font-size: 22px;
cursor: pointer;
}
-.order-item {
+.flex.order-item {
padding: 4px;
border-radius: 2px;
display: flex;
overflow: visible;
cursor: pointer;
- align-items: center;
+ align-items: flex-start;
justify-content: space-between;
background-color: rgba(0, 0, 0, 0);
transition: all 0.3s;
@@ -245,6 +264,7 @@ export default {
.total-price {
width: 94px;
+ font-size: 16px;
text-align: right;
}
@@ -269,25 +289,25 @@ export default {
}
.img {
- width: 40px;
- height: 40px;
+ width: 59px;
+ height: 59px;
position: relative;
margin-right: 10px;
img {
- width: 40px;
- height: 40px;
+ width: 59px;
+ height: 59px;
}
}
}
-.note{
+.note {
max-width: 70%;
- font-size: 12px;
- font-weight: 400;
- text-align: left;
- color: #999;
- margin-top: 2px;
- word-break: break-all;
+ font-size: 12px;
+ font-weight: 400;
+ text-align: left;
+ color: #999;
+ margin-top: 5px;
+ word-break: break-all;
}
.order-number-box {
position: relative;
@@ -295,8 +315,8 @@ export default {
.absolute {
width: 60px;
height: 40px;
- right: -30px;
- top: -12px;
+ right: -38px;
+ top: -14px;
position: absolute;
.order-input-number {
diff --git a/src/views/tool/Instead/components/number-box.vue b/src/views/tool/Instead/components/number-box.vue
new file mode 100644
index 0000000..3f7e819
--- /dev/null
+++ b/src/views/tool/Instead/components/number-box.vue
@@ -0,0 +1,121 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/tool/Instead/components/return-cart.vue b/src/views/tool/Instead/components/return-cart.vue
index 61678f2..5442ae4 100644
--- a/src/views/tool/Instead/components/return-cart.vue
+++ b/src/views/tool/Instead/components/return-cart.vue
@@ -1,10 +1,19 @@
-