From 6c4786876ef41f325adefd37ee616c4dbf1d0601 Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 25 Oct 2024 11:40:54 +0800
Subject: [PATCH 1/8] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BB=A3=E5=AE=A2?=
=?UTF-8?q?=E4=B8=8B=E5=8D=95=E6=97=A0=E5=8F=B0=E6=A1=8C=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=EF=BC=8C=E6=9B=B4=E6=96=B0=E5=8F=B0=E6=A1=8C=E5=88=97=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
commons/goodsData.js | 74 +++++++++++++++++++
.../add-Product/add-Product-9-19-back.vue | 2 +-
pageProduct/add-Product/add-Product.vue | 2 +-
.../choose-specifications.vue | 3 +-
.../invoicing-check/invoicing-check.vue | 3 +-
pageProduct/invoicing-list/invoicing-list.vue | 5 +-
pageProduct/util.js | 2 +-
pageTable/index/index.vue | 37 +++++++---
pages/login/index.vue | 8 +-
pagesCreateOrder/index/index.vue | 6 +-
10 files changed, 115 insertions(+), 27 deletions(-)
create mode 100644 commons/goodsData.js
diff --git a/commons/goodsData.js b/commons/goodsData.js
new file mode 100644
index 0000000..3fa480a
--- /dev/null
+++ b/commons/goodsData.js
@@ -0,0 +1,74 @@
+import dayjs from "dayjs";
+export const $types = [{
+ title: "计量商品",
+ desc: '单价购买',
+ value: 'normal'
+ },
+ {
+ title: "多规格",
+ desc: '多种不同规格',
+ value: 'sku'
+ },
+ {
+ title: "套餐组合",
+ desc: '选择多种组合',
+ value: 'group'
+ },
+ {
+ title: "称重商品",
+ desc: '按重量售卖',
+ value: 'weight'
+ },
+ {
+ title: "时价商品",
+ desc: '收银端可更改价格',
+ value: 'currentPrice'
+ }
+]
+
+// 商品默认sku
+export const $defaultSku = {
+ salePrice: '',
+ memberPrice: '',
+ costPrice: '',
+ originPrice: '',
+ // stockNumber: '',
+ firstShared: '',
+ suit: 1,
+ barCode: `${uni.getStorageSync("shopId")}${dayjs().valueOf()}`,
+}
+
+
+// 库存记录筛选类型
+export const $invoicingType = [{
+ text: '全部',
+ value: ''
+ },
+ {
+ text: '供应商入库',
+ value: 'purveyor'
+ },
+ {
+ text: '供应商退货',
+ value: 'reject'
+ },
+ {
+ text: '其他入库',
+ value: 'purchase'
+ },
+ {
+ text: '其他出库',
+ value: 'other-out'
+ }
+]
+
+// 页面常用数据
+export const $pageData = {
+ query: {
+ page: 0,
+ size: 10
+ },
+ totalElements: 0,
+ list: [],
+ hasAjax: false,
+}
\ No newline at end of file
diff --git a/pageProduct/add-Product/add-Product-9-19-back.vue b/pageProduct/add-Product/add-Product-9-19-back.vue
index b638e16..adae269 100644
--- a/pageProduct/add-Product/add-Product-9-19-back.vue
+++ b/pageProduct/add-Product/add-Product-9-19-back.vue
@@ -930,7 +930,7 @@
import {
$types,
$defaultSku
- } from '../goodsData.js'
+ } from '@/commons/goodsData.js'
import {
$getProductDetail,
$tbShopCategory,
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index 7ed6956..e08499a 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -546,7 +546,7 @@
import {
$types,
$defaultSku
- } from '../goodsData.js'
+ } from '@/commons/goodsData.js'
import {
$getProductDetail,
$tbShopCategory,
diff --git a/pageProduct/add-specifications/choose-specifications.vue b/pageProduct/add-specifications/choose-specifications.vue
index cea6292..e1fa0d1 100644
--- a/pageProduct/add-specifications/choose-specifications.vue
+++ b/pageProduct/add-specifications/choose-specifications.vue
@@ -183,8 +183,9 @@
import go from '@/commons/utils/go.js';
import color from '@/commons/color.js';
import {
+ $types,
$defaultSku
- } from '../goodsData.js'
+ } from '@/commons/goodsData.js'
import {
$productSpec
} from '@/http/yskApi/goods.js';
diff --git a/pageProduct/invoicing-check/invoicing-check.vue b/pageProduct/invoicing-check/invoicing-check.vue
index 1d5b2bf..7670be8 100644
--- a/pageProduct/invoicing-check/invoicing-check.vue
+++ b/pageProduct/invoicing-check/invoicing-check.vue
@@ -78,7 +78,8 @@
import listItem from './components/list-item';
import {
$pageData
- } from '../goodsData.js'
+ } from '@/commons/goodsData.js'
+
import {
computed,
reactive,
diff --git a/pageProduct/invoicing-list/invoicing-list.vue b/pageProduct/invoicing-list/invoicing-list.vue
index da5f838..7783ad1 100644
--- a/pageProduct/invoicing-list/invoicing-list.vue
+++ b/pageProduct/invoicing-list/invoicing-list.vue
@@ -93,8 +93,9 @@
$getProductDetail,
$getProductStockDetail,$getProductStockDetailSum
} from '@/http/yskApi/goods.js'
- import {$invoicingType} from '../goodsData.js'
-
+ import {
+ $invoicingType
+ } from '@/commons/goodsData.js'
const search = reactive({
keyword: '',
show: false
diff --git a/pageProduct/util.js b/pageProduct/util.js
index 86005cd..eff220a 100644
--- a/pageProduct/util.js
+++ b/pageProduct/util.js
@@ -1,6 +1,6 @@
import {
$types
-} from '@/pageProduct/goodsData.js'
+} from '@/commons/goodsData.js'
export function returnSkuSnap(goods) {
const selectSpec = typeof goods.selectSpec === 'string' ? JSON.parse(goods.selectSpec) : goods.selectSpec
let result = selectSpec.map(v => {
diff --git a/pageTable/index/index.vue b/pageTable/index/index.vue
index 5831443..b821fc9 100644
--- a/pageTable/index/index.vue
+++ b/pageTable/index/index.vue
@@ -54,11 +54,18 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -372,10 +379,17 @@
mask.value.close()
}
- const query = {
- page: 0,
+ const query = reactive({
+ page: 1,
size: 10,
- areaId: 0
+ areaId: 0,
+ totalElements:0
+ })
+ // 页数改变事件
+ function pageChange(page) {
+ console.log(page);
+ query.page = page
+ getTable()
}
const tables = reactive({
hasAjax: false,
@@ -393,9 +407,10 @@
}
async function getTable() {
const {
- content
+ content,total
} = await $table.get(query)
tables.hasAjax = true
+ query.totalElements=total||0
tables.originList = content
filterTableList()
}
@@ -415,11 +430,11 @@
}
watch(() => tables.area.sel, (newval) => {
console.log(newval);
- query.page = 0
+ query.page = 1
getTable()
})
watch(() => status.active, (newval) => {
- query.page = 0
+ query.page = 1
// if (newval === 0) {
// return tables.list = tables.originList
// }
diff --git a/pages/login/index.vue b/pages/login/index.vue
index e07ac31..0c14671 100644
--- a/pages/login/index.vue
+++ b/pages/login/index.vue
@@ -239,14 +239,10 @@
})
// #ifdef H5
- // vdata.formData.username = '15699991111'
- // vdata.formData.pwd = '123456'
- vdata.formData.username = ''
- vdata.formData.pwd = ''
+ vdata.formData.username = '17792050546'
+ vdata.formData.pwd = 'sy666888'
// #endif
// #ifdef MP-WEIXIN
- vdata.formData.username = ''
- vdata.formData.pwd = ''
// vdata.formData.username = '15699991111'
// vdata.formData.pwd = 'qwer1234'
// #endif
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index 81897ff..4127e57 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -333,9 +333,9 @@
}
//加入购物车
function addCart(par) {
- if (!data.table.tableId) {
- return infoBox.showToast('请先选择桌台!')
- }
+ // if (!data.table.tableId) {
+ // return infoBox.showToast('请先选择桌台!')
+ // }
const submitPar = {
masterId: data.masterId,
tableId: data.table.tableId,
From fed49cb781eaaf28ef7c82519eed5cf77379a8dc Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 25 Oct 2024 11:47:49 +0800
Subject: [PATCH 2/8] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96?=
=?UTF-8?q?=E5=8F=96=E9=A4=90=E7=A0=81=E8=AF=B7=E6=B1=82=E8=BF=87=E6=99=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesCreateOrder/index/index.vue | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/pagesCreateOrder/index/index.vue b/pagesCreateOrder/index/index.vue
index 4127e57..332bb78 100644
--- a/pagesCreateOrder/index/index.vue
+++ b/pagesCreateOrder/index/index.vue
@@ -413,6 +413,8 @@
let $originGoods = []
let $category = []
async function init() {
+ const masterRes = await getMasterId()
+ data.masterId =masterRes.masterId
const shopInfo = await tbShopInfo()
$shop.value = shopInfo
const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
@@ -440,10 +442,7 @@
$originGoods = goods
if (!data.table.tableId) {
//无桌台
- const {
- masterId
- } = await getMasterId()
- data.masterId = masterId
+
setTabBar(category, goods, [])
return
}
From 1de0a53abe21eb1317565975937a5cbd3f24120f Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 25 Oct 2024 18:09:14 +0800
Subject: [PATCH 3/8] =?UTF-8?q?=E6=A1=8C=E5=8F=B0=E5=A2=9E=E5=8A=A0?=
=?UTF-8?q?=E5=88=86=E9=A1=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pageTable/index/index.vue | 30 +++++++++++++-----------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/pageTable/index/index.vue b/pageTable/index/index.vue
index b821fc9..340597d 100644
--- a/pageTable/index/index.vue
+++ b/pageTable/index/index.vue
@@ -22,7 +22,7 @@
- 取消
+ 取消
@@ -34,7 +34,7 @@
-
{{item.label}}
@@ -246,12 +246,16 @@
function searchConfirm() {
hideSearch()
- filterTableList()
+ query.page=1;
+ getTable()
// tables.list = tables.originList.filter((v) =>
// v.name.includes(search.keyword.trim())
// );
}
-
+ function clearSearch(){
+ search.keyword=''
+ hideSearch()
+ }
function hideSearch() {
search.show = false
maskHide()
@@ -406,13 +410,14 @@
query.areaId = item.id
}
async function getTable() {
+ let state=status.list[status.active].key
+ state=state?(state=='all'?'':state):''
const {
content,total
- } = await $table.get(query)
+ } = await $table.get({...query,name:search.keyword,state})
tables.hasAjax = true
query.totalElements=total||0
- tables.originList = content
- filterTableList()
+ tables.list = content
}
const areaMap = ref({})
async function getArea() {
@@ -441,17 +446,8 @@
// tables.list = tables.originList.filter((v) => {
// return v.status == status.list[status.active].key
// });
- filterTableList()
+ getTable()
})
-
- function filterTableList() {
- tables.list = tables.originList.filter((v) => {
- console.log(status.list[status.active].key);
- return (status.active == 0 ? true : v.status == status.list[status.active].key) && (
- v.name.includes(search.keyword.trim())
- )
- });
- }
watch(() => times.active, (newval) => {
setTimer()
})
From 5fa402dca2d5f58e96889dc44d316cad14d2c33d Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Fri, 25 Oct 2024 18:09:30 +0800
Subject: [PATCH 4/8] =?UTF-8?q?=E4=BB=A3=E5=AE=A2=E4=B8=8B=E5=8D=95?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A0=E5=8F=B0=E6=A1=8C=E4=B8=8B=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../choose-table/choose-table.vue | 101 +++++++-----
.../confirm-order/confirm-order.vue | 2 +-
pagesCreateOrder/index/components/car.vue | 20 ++-
.../index/components/list-goods-item.vue | 3 +-
pagesCreateOrder/index/index.vue | 150 +++++++++++++-----
5 files changed, 185 insertions(+), 91 deletions(-)
diff --git a/pagesCreateOrder/choose-table/choose-table.vue b/pagesCreateOrder/choose-table/choose-table.vue
index 3389dda..34c7d28 100644
--- a/pagesCreateOrder/choose-table/choose-table.vue
+++ b/pagesCreateOrder/choose-table/choose-table.vue
@@ -4,7 +4,7 @@
+ v-model="searchValue">
-
-
+
+
+
+
+
@@ -65,9 +107,14 @@
padding: 0 6rpx;
border-radius: 8rpx;
font-size: 24rpx;
+
&.yitui {
background-color: rgb(188, 188, 188);
color: #fff;
}
}
+ .price-min-width{
+ min-width: 100rpx;
+ text-align: right;
+ }
\ No newline at end of file
diff --git a/pagesOrder/detail/components/list.vue b/pagesOrder/detail/components/list.vue
index a18357e..7499ef6 100644
--- a/pagesOrder/detail/components/list.vue
+++ b/pagesOrder/detail/components/list.vue
@@ -53,7 +53,7 @@
-
+
-->
-
+
+
@@ -16,7 +17,7 @@
-
+
结账
diff --git a/pagesOrder/index/compoents/order-item.vue b/pagesOrder/index/compoents/order-item.vue
index 5a8bc8c..f35e154 100644
--- a/pagesOrder/index/compoents/order-item.vue
+++ b/pagesOrder/index/compoents/order-item.vue
@@ -30,22 +30,42 @@
{{goosZhonglei}}种商品,共{{goodsNumber}}件
-
-
- {{item.productName}}
-
- {{item.productSkuName}}
+
+
+ {{item.productName}}
+
+ {{item.productSkuName}}
+
+
+
+ ×{{item.num}}
+
+ ¥{{goodsPriceAmount(item)}}
+
+ ¥0
+
+
-
- ×{{item.num}}
- ¥{{item.priceAmount}}
-
+
+
+
+ 打包费
+ ¥{{data.packFee||0}}
+
+
+ {{data.seatInfo.productName}}
+ ¥{{data.seatInfo.priceAmount}}
+
+
+
+
订单备注
{{data.remark||'无'}}
@@ -78,7 +98,14 @@
data: {
type: Object,
default: () => {
- detailList: []
+ return{
+ packFee:0,
+ seatInfo:{
+ productName:'客座费',
+ priceAmount:0
+ },
+ detailList: []
+ }
}
},
index: {
@@ -89,9 +116,16 @@
let $goodsMap = {}
let goosZhonglei = ref(0)
let goodsNumber = ref(0)
-
+
const priceSize = 9
-
+ function goodsPriceAmount(item){
+ return item.price*item.num
+ }
+ // const packeFee=computed(()=>{
+ // return props.data.detailList.reduce((prve,cur)=>{
+ // return prve+cur.packAmount
+ // },0).toFixed(2)
+ // })
function computedPriceStyle() {
const item = props.data.detailList.reduce((prev, current) => (`${prev.price}`.length > `${current.price}`
.length) ? prev : current)