更新代客下单无台桌下单,更新台桌列表
This commit is contained in:
parent
3dea396d0d
commit
6c4786876e
|
|
@ -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,
|
||||
}
|
||||
|
|
@ -930,7 +930,7 @@
|
|||
import {
|
||||
$types,
|
||||
$defaultSku
|
||||
} from '../goodsData.js'
|
||||
} from '@/commons/goodsData.js'
|
||||
import {
|
||||
$getProductDetail,
|
||||
$tbShopCategory,
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@
|
|||
import {
|
||||
$types,
|
||||
$defaultSku
|
||||
} from '../goodsData.js'
|
||||
} from '@/commons/goodsData.js'
|
||||
import {
|
||||
$getProductDetail,
|
||||
$tbShopCategory,
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@
|
|||
import listItem from './components/list-item';
|
||||
import {
|
||||
$pageData
|
||||
} from '../goodsData.js'
|
||||
} from '@/commons/goodsData.js'
|
||||
|
||||
import {
|
||||
computed,
|
||||
reactive,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
|
|||
|
|
@ -54,11 +54,18 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-30 u-flex u-flex-wrap u-row-between">
|
||||
<view class="u-m-b-30" v-for="(item,index) in tables.list" :key="index">
|
||||
<table-item @bind="unBind" @update="getTable" :areaMap="areaMap" @more="moreShow(item)" :data="item"></table-item>
|
||||
</view>
|
||||
|
||||
<view class="u-m-t-30 ">
|
||||
<template v-if="tables.list.length">
|
||||
<view class="u-flex u-flex-wrap u-row-between">
|
||||
<view class="u-m-b-30" v-for="(item,index) in tables.list" :key="index">
|
||||
<table-item @bind="unBind" @update="getTable" :areaMap="areaMap" @more="moreShow(item)" :data="item"></table-item>
|
||||
</view>
|
||||
</view>
|
||||
<my-pagination :page="query.page" :totalElements="query.totalElements" :size="query.size"
|
||||
@change="pageChange"></my-pagination>
|
||||
</template>
|
||||
|
||||
<my-img-empty v-if="tables.hasAjax&&!tables.list.length" tips="未找到相关桌台"></my-img-empty>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -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
|
||||
// }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue