diff --git a/commons/utils/returrn-data.js b/commons/utils/returrn-data.js
index 6cb574f..3619e8e 100644
--- a/commons/utils/returrn-data.js
+++ b/commons/utils/returrn-data.js
@@ -1,6 +1,7 @@
-export const objToArrary = (obj) => {
+export const objToArrary = (obj,keyNewName) => {
return Object.entries(obj).map(([key, value]) => ({
key,
+ [keyNewName]:key,
...value,
}))
}
\ No newline at end of file
diff --git a/components/my-components/my-steps-item.vue b/components/my-components/my-steps-item.vue
deleted file mode 100644
index d0eeb65..0000000
--- a/components/my-components/my-steps-item.vue
+++ /dev/null
@@ -1,334 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ index + 1}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/components/my-components/my-steps.vue b/components/my-components/my-steps.vue
deleted file mode 100644
index bf912b7..0000000
--- a/components/my-components/my-steps.vue
+++ /dev/null
@@ -1,90 +0,0 @@
-
-
-
-
-
-
-
-
-
diff --git a/http/yskApi/goods.js b/http/yskApi/goods.js
index 8f66df3..05a7af4 100644
--- a/http/yskApi/goods.js
+++ b/http/yskApi/goods.js
@@ -128,4 +128,9 @@ export function $tbProductV2(data) {
export function $tbProskuConV2(data) {
return http.req('/api/tbProskuCon/V2', data, 'POST')
}
+
+/* 修改商品相关(快捷接口) */
+export function $updateProductData(data) {
+ return http.req('/api/stock/updateProductData', data, 'POST')
+}
// v2 api end
\ No newline at end of file
diff --git a/http/yskApi/user.js b/http/yskApi/user.js
new file mode 100644
index 0000000..1b46450
--- /dev/null
+++ b/http/yskApi/user.js
@@ -0,0 +1,25 @@
+import http from './http.js'
+const request=http.request
+/**
+ * 用户详情
+ * @returns
+ */
+export function tbShopInfo(shopId) {
+ const _shopId=uni.getStorageSync('shopId')
+ return request({
+ url: `/api/tbShopInfo/${shopId||_shopId}`,
+ method: 'get'
+ })
+}
+
+/**
+ * 修改店铺信息
+ * @returns
+ */
+export function tbShopInfoPut(data) {
+ return request({
+ url: `/api/tbShopInfo`,
+ method: 'put',
+ data
+ })
+}
\ 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
new file mode 100644
index 0000000..5dc1ade
--- /dev/null
+++ b/pageProduct/add-Product/add-Product-9-19-back.vue
@@ -0,0 +1,2026 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.title}}
+
+ {{item.desc}}
+
+
+
+
+
+
+
+
+ 注:第一张图为商品封面图,图片尺寸为750x750
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 名称
+ 操作
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+ 添加团购券分类
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择规格
+ 编辑规格
+
+
+
+
+
+
+
+ 组合名称
+ 售价
+ 库存数量
+
+
+ {{item.specSnap}}
+ {{item.salePrice}}
+ {{item.stockNumber}}
+
+
+
+
+
+
+
+
+
+
+
+ 套餐商品
+
+
+
+
+
+
+
+ 商品信息
+
+
+ 名称
+ 数量
+ 操作
+
+
+
+
+ {{product.name}}
+
+
+
+
+ x1
+
+
+
+
+
+
+
+
+ 添加商品
+
+
+
+
+
+
+
+
+
+
+ 删除分组
+
+
+
+
+
+
+ 添加分组
+
+
+
+
+ 规格属性
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 库存开关
+
+
+ 注:关闭则不计算出入库数据
+
+
+
+ 标签打印
+
+
+ 开启后: 收银完成后会自动打印对应数量的标签数
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+ 删除该商品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 库存开关
+
+
+
+
+
+
+
+ 共享库存
+
+
+
+
+
+
+
+ 售罄
+
+
+
+
+
+
+
+
+
+ 上架
+
+
+
+
+
+
+
+ 库存记录
+
+
+ 库存盘点
+
+
+
+
+
+
+
+
+
+
+ 库存记录
+
+
+
+
+
+
+ 规格
+ 库存
+ 售罄
+ 上架
+ 操作
+
+
+
+ {{item.specSnap}}
+
+ {{item.stockNumber}}{{item.unitName}}
+
+
+
+
+
+
+ 库存盘点
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/add-Product/add-Product.vue b/pageProduct/add-Product/add-Product.vue
index b13bd6f..a954931 100644
--- a/pageProduct/add-Product/add-Product.vue
+++ b/pageProduct/add-Product/add-Product.vue
@@ -1,7 +1,7 @@
-
+
@@ -11,19 +11,30 @@
err-show-type="toast" validateTrigger="submit" label-width="350" ref="Forms">
-
+
+
+
+
+
{{item.title}}
{{item.desc}}
-
+ -->
@@ -38,11 +49,6 @@
-
@@ -50,10 +56,6 @@
-
+
+
+ 删除该商品
+
+
保存
-
-
-
+
-
+ -->
-
+
-
-
-
-
-
-
- 库存开关
-
-
-
-
-
-
-
- 共享库存
-
-
-
-
-
-
-
- 售罄
-
-
-
-
-
-
-
-
-
- 上架
-
-
-
-
-
-
-
- 库存记录
-
-
- 库存盘点
-
-
-
-
-
-
-
-
-
-
- 库存记录
-
-
-
-
-
-
- 规格
- 库存
- 售罄
- 上架
- 操作
-
-
-
- {{item.specSnap}}
-
- {{item.stockNumber}}{{item.unitName}}
-
-
-
-
-
-
- 库存盘点
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 保存
- 取消
-
-
+
@@ -894,11 +762,8 @@
-
-
-
-
-
+
+
@@ -906,6 +771,9 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/add-Product/components/choose-haocai - 副本.vue b/pageProduct/add-Product/components/choose-haocai - 副本.vue
new file mode 100644
index 0000000..7ef8774
--- /dev/null
+++ b/pageProduct/add-Product/components/choose-haocai - 副本.vue
@@ -0,0 +1,57 @@
+
+
+ 选择状态
+
+
+
+ {{statusItem.label}}
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/add-Product/components/choose-haocai.vue b/pageProduct/add-Product/components/choose-haocai.vue
new file mode 100644
index 0000000..0b5cf16
--- /dev/null
+++ b/pageProduct/add-Product/components/choose-haocai.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+
+ {{item.conName}}
+
+ 没有该耗材
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/add-Product/components/edit-haocai.vue b/pageProduct/add-Product/components/edit-haocai.vue
new file mode 100644
index 0000000..e27798d
--- /dev/null
+++ b/pageProduct/add-Product/components/edit-haocai.vue
@@ -0,0 +1,359 @@
+
+
+
+
+ 商品名称
+
+
+ 绑定至规格
+ 绑定至规格
+
+
+
+ {{goods.name}}
+
+
+
+
+ 规格名称
+ {{item.specSnap}}
+
+ 序号
+
+ 耗材名称
+ 单位
+ 用量
+
+
+
+
+
+ {{haocaiIndex+1}}
+
+
+
+ {{item.name}}
+
+
+
+
+
+ {{item.unit}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 库存:{{item.stockNumber}}
+
+
+
+
+
+
+
+
+
+
+ 添加耗材
+
+
+
+
+
+
+
+
+
+
+ 序号
+
+ 耗材名称
+ 单位
+ 用量
+
+
+
+
+ {{index+1}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 库存:{{item.stockNumber}}
+ {{item.conUnit}}
+
+
+
+
+
+
+
+
+
+
+
+ 添加耗材
+
+
+
+
+
+
+
+
+ 当某个耗材的使用库存不足时,商品自动
+ 售罄。
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/add-specifications/add-specifications - 副本 (2).vue b/pageProduct/add-specifications/add-specifications - 副本 (2).vue
new file mode 100644
index 0000000..1b8fcac
--- /dev/null
+++ b/pageProduct/add-specifications/add-specifications - 副本 (2).vue
@@ -0,0 +1,499 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加规格
+
+
+
+
+
+
+
+
+
+
+ 删除规格组
+
+
+
+
+
+
+
+
+ 添加规格组
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/add-specifications/add-specifications.vue b/pageProduct/add-specifications/add-specifications.vue
index 1b8fcac..46772d8 100644
--- a/pageProduct/add-specifications/add-specifications.vue
+++ b/pageProduct/add-specifications/add-specifications.vue
@@ -1,53 +1,62 @@
-
-
-
-
-
-
-
-
-
+
+ v-model="item.name" placeholder="规格组名" />
-
+
+
-
-
+
+ 名称
+ 加价
+
+
+
-
-
+
+ placeholder="选项名" />
-
-
+
+
-
+ type="digit" placeholder="填写价格" />
@@ -70,7 +79,7 @@
-
+
@@ -97,14 +106,10 @@
+
+
\ No newline at end of file
diff --git a/pageProduct/index/components/edit-guige.vue b/pageProduct/index/components/edit-guige.vue
new file mode 100644
index 0000000..cfb9db7
--- /dev/null
+++ b/pageProduct/index/components/edit-guige.vue
@@ -0,0 +1,141 @@
+
+
+
+
+ {{data.specSnap}}
+
+
+
+
+
+
+ 当前状态
+
+
+
+
+
+
+
+
+
+ 售罄
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/index/components/edit-price.vue b/pageProduct/index/components/edit-price.vue
new file mode 100644
index 0000000..0cfd190
--- /dev/null
+++ b/pageProduct/index/components/edit-price.vue
@@ -0,0 +1,186 @@
+
+
+
+
+ 修改价格
+
+
+
+
+
+ 商品名称
+ {{data.name}}
+
+
+
+
+ {{data.name}}
+
+ 变动金额:
+ {{data.lowPrice-data._lowPrice}}
+
+
+
+
+
+ 元
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+ 变动金额:
+ {{item.lowPrice-item._lowPrice}}
+
+
+
+
+
+ 元
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/index/components/edit-stock.vue b/pageProduct/index/components/edit-stock.vue
new file mode 100644
index 0000000..ef133de
--- /dev/null
+++ b/pageProduct/index/components/edit-stock.vue
@@ -0,0 +1,235 @@
+
+
+
+
+ 修改库存
+
+
+
+
+
+ 商品名称
+ {{data.name}}
+
+
+
+
+ {{data.name}}
+
+ 变动数量:
+ {{data.stockNumber-data._stockNumber}}
+
+
+
+
+
+ {{data.unitName||''}}
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+ 变动数量:
+ {{item.stockNumber-item._stockNumber}}
+
+
+
+
+
+ {{data.unitName||''}}
+
+
+
+
+
+
+ 备注
+
+
+
+
+
+
+
+
+
+
+
+ 保存
+
+
+
+
+
+
+ 查看记录
+
+
+
+
+
+
+
+
+
+
+
+ 收起记录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pageProduct/index/components/goods.vue b/pageProduct/index/components/goods.vue
index 09ac0ba..65359d6 100644
--- a/pageProduct/index/components/goods.vue
+++ b/pageProduct/index/components/goods.vue
@@ -7,55 +7,81 @@
{{data.sort}}
-
- 库存:
- {{data.stockNumber}}
+
+ 库存:{{data.stockNumber}}
- 修改
+
+
+ 改价
+ 报损
+
-
+
-
-
-
+
+
+
+
+
- {{data.name}}
+ {{data.name}}
+
+
+
+ {{data.lowPrice}}
+
- ¥{{data.lowPrice}}
+
+
+
+ 规格:
+
+ {{item.specSnap||item.name}}
+ 上架中
+ 已下架
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
@@ -93,7 +119,7 @@
import {
ColorMain
} from '@/commons/color.js'
- const emits = defineEmits(['radioClick', 'changeClick', 'xiajia', 'del'])
+ const emits = defineEmits(['radioClick', 'changeClick', 'xiajia', 'del', 'changePrice', 'baosun', 'guigeClick','editStock'])
const props = defineProps({
index: {
type: Number
@@ -113,7 +139,8 @@
default: false
}
})
-
+
+
function isHotChange(e) {
$goodsIsHot({
@@ -155,6 +182,20 @@
emits('del', props.index)
}
+ function changePrice() {
+ emits('changePrice', props.index)
+ }
+
+ function baosun() {
+ emits('baosun', props.index)
+ }
+
+ function guigeClick(guigeIndex) {
+ emits('guigeClick', props.index, guigeIndex)
+ }
+ function editStock(){
+ emits('editStock', props.index)
+ }
//携带参数type edit跳转到商品添加页面,编辑与添加同一页面,根据type值来判断
function toEdit() {
go.to('PAGES_PRODUCT_ADD', {
@@ -174,9 +215,12 @@
border: 2rpx solid transparent;
}
+ .gap-10 {
+ gap: 10rpx;
+ }
+
.btn-primary {
border-color: $my-main-color;
- ;
color: $my-main-color;
}
@@ -194,8 +238,15 @@
}
.img {
- width: $imgSize;
- height: $imgSize;
+ position: absolute;
+ left: 0;
+ top: 0;
+ // width: $imgSize;
+ // height: $imgSize;
+ }
+
+ .info-p-l {
+ padding-left: 71px;
}
.icon-arrow-right {
@@ -219,6 +270,10 @@
// border: 2rpx solid #333333;
}
+ .color-red {
+ color: #F0465B;
+ }
+
.goods {
border-radius: 10rpx 10rpx 10rpx 10rpx;
background-color: #fff;
@@ -239,33 +294,37 @@
.skds {
gap: 10rpx 50rpx;
}
+ }
+ }
- .skd {
- padding: 14rpx 40rpx 14rpx 20rpx;
- background: #F0F2F5;
- border-radius: 4rpx;
- position: relative;
- color: #666;
- overflow: hidden;
- margin-bottom: 10rpx;
+ .skd {
+ padding: 14rpx 40rpx 14rpx 20rpx;
+ background: #F0F2F5;
+ border-radius: 4rpx;
+ position: relative;
+ color: #666;
+ overflow: hidden;
+ margin-bottom: 10rpx;
+ font-size: 24rpx;
- .tag {
- position: absolute;
- right: 0;
- top: 0;
- font-size: 12rpx;
- right: 0;
- padding: 2rpx 4rpx;
- border-radius: 0rpx 4rpx 4rpx 4rpx;
- }
-
- .tag-primary {
- background-color: $my-main-color;
- color: #fff;
- }
- }
+ .tag {
+ position: absolute;
+ right: 0;
+ top: 0;
+ font-size: 12rpx;
+ right: 0;
+ padding: 2rpx 4rpx;
+ border-radius: 0rpx 4rpx 4rpx 4rpx;
+ }
+ .tag-primary {
+ background-color: $my-main-color;
+ color: #fff;
+ }
+ .tag-gray {
+ background-color: rgb(144, 147, 153);
+ color: #fff;
}
}
\ No newline at end of file
diff --git a/pageProduct/index/index.vue b/pageProduct/index/index.vue
index e55fdba..41625f6 100644
--- a/pageProduct/index/index.vue
+++ b/pageProduct/index/index.vue
@@ -8,7 +8,8 @@
- {{pageData.categoryName||'分类' }}
+ {{pageData.categoryName||'分类' }}
-
+
@@ -53,9 +56,8 @@
+ @offShelf="offShelf" @allCheckedChange="allCheckedChange" @controlChange="controlChange"
+ @toggleCategory="toggleCategory" :bottom="pageData.componentBottom">
@@ -113,7 +115,19 @@
-
+
+
+
+
+
+
+
+
+
@@ -136,14 +150,25 @@
import myControl from './components/control.vue'
import myCategory from './components/category.vue'
import infoBox from "@/commons/utils/infoBox.js"
+ import editPrice from './components/edit-price.vue';
+ import editGuige from './components/edit-guige.vue';
+ import editStock from './components/edit-stock.vue';
+ import baosunVue from './components/baosun.vue';
import {
$tbProduct,
$upProSort,
$updateProduct,
$getProductDetail,
$delProduct,
- $updateProductStatus
+ $tbShopCategory,
+ $updateProductStatus,
+ $tbProductV2,
+ $updateProductData
} from "@/http/yskApi/goods.js"
+ import {
+ returnAllCategory
+ } from '@/pageProduct/util.js'
+
const pageData = reactive({
modelDesc: '是否下架',
stateCurrent: 0,
@@ -154,6 +179,7 @@
},
showGoodsDetail: false,
selGoodsIndex: '',
+ selGoods: {},
totalElements: 0,
totalPage: 0,
goodsList: [],
@@ -164,24 +190,179 @@
name: ''
},
category: '',
+ categoryList: [], //分类列表
categoryShow: false,
categoryName: '',
hasAjax: false
})
- watch(()=>pageData.query.categoryId,(newval)=>{
+ watch(() => pageData.query.categoryId, (newval) => {
getGoodsList()
})
+
+ const popup = reactive({
+ price: {
+ show: false
+ },
+ guige: {
+ show: false,
+ data: {},
+ goodsIndex: '',
+ guigeIndex: '',
+ },
+ stock: {
+ show: false
+ },
+ baosun: {
+ show: false
+ }
+ })
+
+ //报损弹窗展示
+ function baosunShow(index) {
+ pageData.selGoodsIndex = index
+ const goods = pageData.goodsList[index]
+ pageData.selGoods = goods
+ popup.baosun.show = true
+ }
+
+ // 修改价格弹窗展示
+ function changePriceShow(index) {
+ pageData.selGoodsIndex = index
+ const goods = pageData.goodsList[index]
+ goods.skuList = goods.skuList.map(v => {
+ return {
+ ...v,
+ _lowPrice: v.lowPrice
+ }
+ })
+ const lowPrice = goods.lowPrice.replace('¥', '') * 1
+ pageData.selGoods = {
+ ...goods,
+ lowPrice,
+ _lowPrice: lowPrice
+ }
+ popup.price.show = true
+ }
+
+
+
+
+ async function changePriceConfirm(goods) {
+ let goodsArr = []
+ if (goods.typeEnum == '单规格') {
+ goodsArr = [{
+ shopId: uni.getStorageSync('shopId'),
+ isSku: false,
+ id: goods.id,
+ key: 'salePrice',
+ value: goods.lowPrice
+ }]
+ } else {
+ goodsArr = goods.skuList.map(v => {
+ return {
+ shopId: uni.getStorageSync('shopId'),
+ isSku: true,
+ id: v.id,
+ key: 'salePrice',
+ value: v.lowPrice
+ }
+ })
+ }
+ const res = await $updateProductData(goodsArr)
+ popup.price.show = false
+ getGoodsList()
+ }
+
+
+ // 修改库存弹窗展示
+ function changeStockShow(index) {
+ pageData.selGoodsIndex = index
+ const goods = pageData.goodsList[index]
+ goods.skuList = goods.skuList.map(v => {
+ return {
+ ...v,
+ _stockNumber: v.stockNumber
+ }
+ })
+ const stockNumber = goods.stockNumber
+ pageData.selGoods = {
+ ...goods,
+ stockNumber,
+ _stockNumber: stockNumber
+ }
+ popup.stock.show = true
+ }
+ async function changeStockConfirm(goods) {
+ let goodsArr = []
+ // if (goods.typeEnum == '单规格') {
+ // goodsArr = [{
+ // shopId: uni.getStorageSync('shopId'),
+ // isSku: false,
+ // id: goods.id,
+ // key: 'stockNumber',
+ // value: goods.stockNumber
+ // }]
+ // } else {
+ // goodsArr = goods.skuList.map(v => {
+ // return {
+ // shopId: uni.getStorageSync('shopId'),
+ // isSku: true,
+ // id: v.id,
+ // key: 'stockNumber',
+ // value: v.stockNumber
+ // }
+ // })
+ // }
+ goodsArr = [{
+ shopId: uni.getStorageSync('shopId'),
+ isSku: false,
+ id: goods.id,
+ key: 'stockNumber',
+ value: goods.stockNumber
+ }]
+ const res = await $updateProductData(goodsArr)
+ popup.stock.show = false
+ getGoodsList()
+ }
+
+ //修改规格上下架,售罄
+ function editGuigeShow(goodsIndex, guigeIndex) {
+ console.log(goodsIndex, guigeIndex);
+ const goodsGuige = pageData.goodsList[goodsIndex].skuList[guigeIndex]
+ popup.guige.data = goodsGuige
+ popup.guige.goodsIndex = goodsIndex
+ popup.guige.guigeIndex = guigeIndex
+ popup.guige.show = true
+ }
+
+ function isGroundingChange(e) {
+ const {
+ goodsIndex,
+ guigeIndex
+ } = popup.guige
+ pageData.goodsList[goodsIndex].skuList[guigeIndex].isGrounding = e
+ }
+
+ function isPauseSaleChange(e) {
+ const {
+ goodsIndex,
+ guigeIndex
+ } = popup.guige
+ pageData.goodsList[goodsIndex].skuList[guigeIndex].isPauseSale = e
+ }
+
function onCategoryShowChange(show) {
console.log(show);
pageData.categoryShow = show
}
- function setCategory(category){
+
+ function setCategory(category) {
pageData.query.categoryId = category.id
pageData.categoryName = category.name
}
function getGoodsList() {
- $tbProduct(pageData.query).then(res => {
+ $tbProductV2(pageData.query).then(res => {
pageData.hasAjax = true
console.log(res);
pageData.goodsList = res.content.map(v => {
@@ -198,9 +379,18 @@
onShow(() => {
getGoodsList()
})
+ onLoad(() => {
+ $tbShopCategory({
+ page: 0,
+ size: 200
+ }).then(res => {
+ pageData.categoryList = returnAllCategory(res.content)
+ console.log(pageData.categoryList);
+ })
+ })
const tabsList = ['简洁', '详情']
- const statesTabsList = ['全部', '已售罄','在售中', '已下架']
+ const statesTabsList = ['全部', '已售罄', '在售中', '已下架']
const control = ref(null)
const model = ref(null)
const goodsStockModel = ref(null)
diff --git a/pageProduct/util.js b/pageProduct/util.js
new file mode 100644
index 0000000..86005cd
--- /dev/null
+++ b/pageProduct/util.js
@@ -0,0 +1,41 @@
+import {
+ $types
+} from '@/pageProduct/goodsData.js'
+export function returnSkuSnap(goods) {
+ const selectSpec = typeof goods.selectSpec === 'string' ? JSON.parse(goods.selectSpec) : goods.selectSpec
+ let result = selectSpec.map(v => {
+ return {
+ name: v.name,
+ value: v.selectSpecResult.join(',')
+ }
+ })
+ return result
+}
+export function returnTypeEnum(typeEnum) {
+ const item = $types.find(v => v.title == typeEnum)
+ let result = item ? item.value : undefined
+ return result
+}
+export function returnCategory(cateName, cateList) {
+ console.log(cateName);
+ console.log(cateList);
+ const item = cateList.find(v => v.name == cateName)
+ let result = item ? item : undefined
+ return result
+}
+export function returnAllCategory(arr) {
+ const result = arr.reduce((prve, cur) => {
+ prve.push(...[{
+ ...cur,
+ name: '' + cur.name,
+ childrenList: undefined
+ }, ...cur.childrenList.map(v => {
+ return {
+ ...v,
+ name: '' + v.name
+ }
+ })])
+ return prve
+ }, [])
+ return result
+}
diff --git a/pageTable/index/components/table-item.vue b/pageTable/index/components/table-item.vue
index 8026597..0d17cd7 100644
--- a/pageTable/index/components/table-item.vue
+++ b/pageTable/index/components/table-item.vue
@@ -125,11 +125,12 @@
function more() {
emits('more')
}
-
+
+
function diancan() {
go.to('PAGES_CREATE_ORDER', {
tableId: props.data.tableId,
- tableName: props.data.name
+ name: props.data.name
})
}
@@ -140,14 +141,16 @@
name,
status,
amount,
- areaId
+ areaId,
+ orderId
} = props.data
- go.to('PAGES_CRESATE_ORDER_DETAIL', {
+ go.to('PAGES_ORDER_DETAIL', {
tableId,
name,
status,
amount,
- areaId
+ areaId,
+ id:orderId
})
}
}
diff --git a/pages.json b/pages.json
index 629844b..5b56bb2 100644
--- a/pages.json
+++ b/pages.json
@@ -1218,6 +1218,22 @@
{
"navigationBarTitleText" : "订单详情"
}
+ },
+ {
+ "pageId": "PAGES_ORDER_PAY",
+ "path" : "pay-order/pay-order",
+ "style" :
+ {
+ "navigationBarTitleText" : "结账"
+ }
+ },
+ {
+ "pageId": "PAGES_ORDER_TUIKUAN",
+ "path" : "tuikuan/tuikuan",
+ "style" :
+ {
+ "navigationBarTitleText" : "退款"
+ }
}
]
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 760b2e7..ba674c4 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -144,8 +144,7 @@
{
title: '成员管理',
icon: '/static/indexImg/icon-staff.svg',
- pageUrl: 'PAGES_USER',
- entId: 'ENT_UR_USER_LIST'
+ pageUrl: 'PAGES_USER'
},
{
title: '数据中心',
diff --git a/pagesCreateOrder/components/edit-discount.vue b/pagesCreateOrder/components/edit-discount.vue
index e1a3c8e..5ca910e 100644
--- a/pagesCreateOrder/components/edit-discount.vue
+++ b/pagesCreateOrder/components/edit-discount.vue
@@ -33,8 +33,10 @@
- 修改
- 取消
+ 修改
+
+ 取消
+
@@ -60,6 +62,10 @@
type: Array,
default: []
},
+ discount:{
+ type: [Number,String],
+ default:100
+ },
price: {
type: [Number,String],
default: 0
@@ -119,6 +125,9 @@
function open() {
model.value.open()
+ form.price=props.price
+ form.currentPrice=props.price
+ form.discount=props.discount
}
function close() {
@@ -127,11 +136,9 @@
const emits = defineEmits(['confirm'])
function confirm() {
- const {
- price,
- } = form
+ console.log(form);
+ emits('confirm',{...form,currentPrice:Number(form.currentPrice).toFixed(2)})
close()
- emits('confirm',form)
}
defineExpose({
open,
diff --git a/pagesCreateOrder/confirm-order/confirm-order.vue b/pagesCreateOrder/confirm-order/confirm-order.vue
index 359e9e7..77e253a 100644
--- a/pagesCreateOrder/confirm-order/confirm-order.vue
+++ b/pagesCreateOrder/confirm-order/confirm-order.vue
@@ -6,9 +6,10 @@
选择用户
-
+
+
{{user.nickName}}
{{user.isVip?'会员':'' }}
余额:{{user.amount}}
@@ -16,69 +17,55 @@
积分:{{user.totalScore}}
-
+
就餐类型
-
-
-
-
+
+
+
+
-
+
选择桌码
{{table.name}}
不选择桌台
-
+
-
-
-
-
- 用餐人数(人)
-
-
- {{userNumbers.defaultCateIndex||''}}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
- {{user.name}}
- {{user.isVip?'永久会员':'' }}
+ {{user.nickName}}
+ {{user.isVip?'会员':'' }}
余额
- 0.00
+ {{user.amount}}
积分
- 0
+ {{user.totalScore}}
已消费
@@ -86,10 +73,23 @@
-
-
-
-
+
+
+
+
+
+
+ 用餐人数(人)
+
+
+ {{userNumbers.defaultCateIndex||''}}
+
+
+
+
+
+
+
@@ -150,9 +150,9 @@
-
+