更新代客下单无台桌下单,更新台桌列表
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 {
|
import {
|
||||||
$types,
|
$types,
|
||||||
$defaultSku
|
$defaultSku
|
||||||
} from '../goodsData.js'
|
} from '@/commons/goodsData.js'
|
||||||
import {
|
import {
|
||||||
$getProductDetail,
|
$getProductDetail,
|
||||||
$tbShopCategory,
|
$tbShopCategory,
|
||||||
|
|
|
||||||
|
|
@ -546,7 +546,7 @@
|
||||||
import {
|
import {
|
||||||
$types,
|
$types,
|
||||||
$defaultSku
|
$defaultSku
|
||||||
} from '../goodsData.js'
|
} from '@/commons/goodsData.js'
|
||||||
import {
|
import {
|
||||||
$getProductDetail,
|
$getProductDetail,
|
||||||
$tbShopCategory,
|
$tbShopCategory,
|
||||||
|
|
|
||||||
|
|
@ -183,8 +183,9 @@
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import {
|
import {
|
||||||
|
$types,
|
||||||
$defaultSku
|
$defaultSku
|
||||||
} from '../goodsData.js'
|
} from '@/commons/goodsData.js'
|
||||||
import {
|
import {
|
||||||
$productSpec
|
$productSpec
|
||||||
} from '@/http/yskApi/goods.js';
|
} from '@/http/yskApi/goods.js';
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,8 @@
|
||||||
import listItem from './components/list-item';
|
import listItem from './components/list-item';
|
||||||
import {
|
import {
|
||||||
$pageData
|
$pageData
|
||||||
} from '../goodsData.js'
|
} from '@/commons/goodsData.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
|
|
|
||||||
|
|
@ -93,8 +93,9 @@
|
||||||
$getProductDetail,
|
$getProductDetail,
|
||||||
$getProductStockDetail,$getProductStockDetailSum
|
$getProductStockDetail,$getProductStockDetailSum
|
||||||
} from '@/http/yskApi/goods.js'
|
} from '@/http/yskApi/goods.js'
|
||||||
import {$invoicingType} from '../goodsData.js'
|
import {
|
||||||
|
$invoicingType
|
||||||
|
} from '@/commons/goodsData.js'
|
||||||
const search = reactive({
|
const search = reactive({
|
||||||
keyword: '',
|
keyword: '',
|
||||||
show: false
|
show: false
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import {
|
import {
|
||||||
$types
|
$types
|
||||||
} from '@/pageProduct/goodsData.js'
|
} from '@/commons/goodsData.js'
|
||||||
export function returnSkuSnap(goods) {
|
export function returnSkuSnap(goods) {
|
||||||
const selectSpec = typeof goods.selectSpec === 'string' ? JSON.parse(goods.selectSpec) : goods.selectSpec
|
const selectSpec = typeof goods.selectSpec === 'string' ? JSON.parse(goods.selectSpec) : goods.selectSpec
|
||||||
let result = selectSpec.map(v => {
|
let result = selectSpec.map(v => {
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,18 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="u-m-t-30 u-flex u-flex-wrap u-row-between">
|
<view class="u-m-t-30 ">
|
||||||
<view class="u-m-b-30" v-for="(item,index) in tables.list" :key="index">
|
<template v-if="tables.list.length">
|
||||||
<table-item @bind="unBind" @update="getTable" :areaMap="areaMap" @more="moreShow(item)" :data="item"></table-item>
|
<view class="u-flex u-flex-wrap u-row-between">
|
||||||
</view>
|
<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>
|
<my-img-empty v-if="tables.hasAjax&&!tables.list.length" tips="未找到相关桌台"></my-img-empty>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -372,10 +379,17 @@
|
||||||
mask.value.close()
|
mask.value.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
const query = {
|
const query = reactive({
|
||||||
page: 0,
|
page: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
areaId: 0
|
areaId: 0,
|
||||||
|
totalElements:0
|
||||||
|
})
|
||||||
|
// 页数改变事件
|
||||||
|
function pageChange(page) {
|
||||||
|
console.log(page);
|
||||||
|
query.page = page
|
||||||
|
getTable()
|
||||||
}
|
}
|
||||||
const tables = reactive({
|
const tables = reactive({
|
||||||
hasAjax: false,
|
hasAjax: false,
|
||||||
|
|
@ -393,9 +407,10 @@
|
||||||
}
|
}
|
||||||
async function getTable() {
|
async function getTable() {
|
||||||
const {
|
const {
|
||||||
content
|
content,total
|
||||||
} = await $table.get(query)
|
} = await $table.get(query)
|
||||||
tables.hasAjax = true
|
tables.hasAjax = true
|
||||||
|
query.totalElements=total||0
|
||||||
tables.originList = content
|
tables.originList = content
|
||||||
filterTableList()
|
filterTableList()
|
||||||
}
|
}
|
||||||
|
|
@ -415,11 +430,11 @@
|
||||||
}
|
}
|
||||||
watch(() => tables.area.sel, (newval) => {
|
watch(() => tables.area.sel, (newval) => {
|
||||||
console.log(newval);
|
console.log(newval);
|
||||||
query.page = 0
|
query.page = 1
|
||||||
getTable()
|
getTable()
|
||||||
})
|
})
|
||||||
watch(() => status.active, (newval) => {
|
watch(() => status.active, (newval) => {
|
||||||
query.page = 0
|
query.page = 1
|
||||||
// if (newval === 0) {
|
// if (newval === 0) {
|
||||||
// return tables.list = tables.originList
|
// return tables.list = tables.originList
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
|
|
@ -239,14 +239,10 @@
|
||||||
|
|
||||||
})
|
})
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
// vdata.formData.username = '15699991111'
|
vdata.formData.username = '17792050546'
|
||||||
// vdata.formData.pwd = '123456'
|
vdata.formData.pwd = 'sy666888'
|
||||||
vdata.formData.username = ''
|
|
||||||
vdata.formData.pwd = ''
|
|
||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
vdata.formData.username = ''
|
|
||||||
vdata.formData.pwd = ''
|
|
||||||
// vdata.formData.username = '15699991111'
|
// vdata.formData.username = '15699991111'
|
||||||
// vdata.formData.pwd = 'qwer1234'
|
// vdata.formData.pwd = 'qwer1234'
|
||||||
// #endif
|
// #endif
|
||||||
|
|
|
||||||
|
|
@ -333,9 +333,9 @@
|
||||||
}
|
}
|
||||||
//加入购物车
|
//加入购物车
|
||||||
function addCart(par) {
|
function addCart(par) {
|
||||||
if (!data.table.tableId) {
|
// if (!data.table.tableId) {
|
||||||
return infoBox.showToast('请先选择桌台!')
|
// return infoBox.showToast('请先选择桌台!')
|
||||||
}
|
// }
|
||||||
const submitPar = {
|
const submitPar = {
|
||||||
masterId: data.masterId,
|
masterId: data.masterId,
|
||||||
tableId: data.table.tableId,
|
tableId: data.table.tableId,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue