Merge branch 'dev_1.0.0' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into ymf
This commit is contained in:
27
commons/utils/goodsUtil.js
Normal file
27
commons/utils/goodsUtil.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
export function canComputedPackFee(v) {
|
||||||
|
return v.pack && v.status != 'return' && v.status != 'refund' && v.status != 'refunding'
|
||||||
|
}
|
||||||
|
export function returnCanComputedGoodsArr(arr) {
|
||||||
|
return arr.filter(v=>canComputedPackFee(v))
|
||||||
|
}
|
||||||
|
export function returnPackFee(arr) {
|
||||||
|
return arr.reduce((prve, cur) => {
|
||||||
|
return prve + cur.packAmount
|
||||||
|
}, 0).toFixed(2)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function canTuicai(orderInfo,item){
|
||||||
|
return orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'&& item.status!='return'
|
||||||
|
}
|
||||||
|
export function canTuiKuan(orderInfo,item){
|
||||||
|
return orderInfo.status!='unpaid'&& item.status!='return'&&item.status!='refund'&&item.status!='refunding'
|
||||||
|
}
|
||||||
|
export function isTui(item){
|
||||||
|
return item.status=='return'||item.status=='refund'||item.status=='refunding'
|
||||||
|
}
|
||||||
|
export function numSum(arr){
|
||||||
|
const sum=arr.reduce((a,b)=>{
|
||||||
|
return a+b*100
|
||||||
|
},0)
|
||||||
|
return (sum/100).toFixed(2)
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<view class="u-m-t-40 u-flex ">
|
<view class="u-m-t-40 u-flex ">
|
||||||
<view>实收金额</view>
|
<view>实收金额</view>
|
||||||
<view class="u-m-l-32 border u-p-l-10 u-p-r-10 u-flex-1">
|
<view class="u-m-l-32 border u-p-l-10 u-p-r-10 u-flex-1">
|
||||||
<uni-easyinput style="digit" @input="currentPriceInput" @change="currentPriceChange" paddingNone :inputBorder="false"
|
<uni-easyinput type="number" @input="currentPriceInput" @change="currentPriceChange" paddingNone :inputBorder="false"
|
||||||
v-model="form.currentPrice"
|
v-model="form.currentPrice"
|
||||||
placeholder="输入实际金额"></uni-easyinput>
|
placeholder="输入实际金额"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<view>优惠折扣</view>
|
<view>优惠折扣</view>
|
||||||
<view class="u-m-l-32 u-flex-1 u-flex border u-p-l-10 u-p-r-10">
|
<view class="u-m-l-32 u-flex-1 u-flex border u-p-l-10 u-p-r-10">
|
||||||
<view class="u-flex-1">
|
<view class="u-flex-1">
|
||||||
<uni-easyinput @input="discountInput" @change="discountChange" style="digit" paddingNone :inputBorder="false"
|
<uni-easyinput type="number" @input="discountInput" @change="discountChange" paddingNone :inputBorder="false"
|
||||||
v-model="form.discount"
|
v-model="form.discount"
|
||||||
placeholder="输入折扣"></uni-easyinput>
|
placeholder="输入折扣"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -467,14 +467,19 @@
|
|||||||
const startTotal = returnDateString(e.detail.value, true).getTime()
|
const startTotal = returnDateString(e.detail.value, true).getTime()
|
||||||
const endTotal = returnDateString(value1.value, true).getTime()
|
const endTotal = returnDateString(value1.value, true).getTime()
|
||||||
value.value = e.detail.value
|
value.value = e.detail.value
|
||||||
|
setTimeout(()=>{
|
||||||
nextTick(() => {
|
|
||||||
if (props.isArea) {
|
if (props.isArea) {
|
||||||
value.value = startTotal > endTotal ? value1.value : e.detail.value
|
value.value = startTotal > endTotal ? value1.value : e.detail.value
|
||||||
}
|
}
|
||||||
console.log(value.value);
|
|
||||||
debounce(changeDays(false, value.value), 100)
|
debounce(changeDays(false, value.value), 100)
|
||||||
})
|
},10)
|
||||||
|
// nextTick(() => {
|
||||||
|
// if (props.isArea) {
|
||||||
|
// value.value = startTotal > endTotal ? value1.value : e.detail.value
|
||||||
|
// }
|
||||||
|
// console.log(value.value);
|
||||||
|
// debounce(changeDays(false, value.value), 100)
|
||||||
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindChange1(e) {
|
function bindChange1(e) {
|
||||||
|
|||||||
@@ -91,9 +91,6 @@
|
|||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// console.log(props,'调试121')
|
|
||||||
// let obj = JSON.parse(props.item)
|
|
||||||
// console.log(obj,'调试121')
|
|
||||||
gettbConsTypeList()
|
gettbConsTypeList()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -112,7 +109,8 @@
|
|||||||
}
|
}
|
||||||
const refs = getCurrentInstance()
|
const refs = getCurrentInstance()
|
||||||
let sumbit = () => {
|
let sumbit = () => {
|
||||||
if (!datas.form.conUnit) {
|
let conUnitdata = datas.form.conUnit.replace(/(^\s*)|(\s*$)/g, "")
|
||||||
|
if (!conUnitdata) {
|
||||||
refs.ctx.$refs.uToastRef.show({
|
refs.ctx.$refs.uToastRef.show({
|
||||||
type: 'default',
|
type: 'default',
|
||||||
message: "单位不能为空"
|
message: "单位不能为空"
|
||||||
@@ -150,11 +148,8 @@
|
|||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
.topTitle {
|
.topTitle {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
@@ -201,6 +196,7 @@
|
|||||||
.bottombutton {
|
.bottombutton {
|
||||||
margin-top: 84rpx;
|
margin-top: 84rpx;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
|
|
||||||
>button {
|
>button {
|
||||||
width: 530rpx;
|
width: 530rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
供应商
|
<text style="color: red;">*</text> 供应商
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
|
<input type="text" placeholder="请输入供应商名称" v-model="datas.form.purveyorName" name="" id="">
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
联系电话
|
<text style="color: red;">*</text> 联系电话
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
|
<input type="text" placeholder="请输入联系电话" v-model="datas.form.purveyorTelephone" name="" id="">
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
地址
|
<text style="color: red;">*</text> 地址
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
|
<input type="text" placeholder="请输入地址" v-model="datas.form.address" name="" id="">
|
||||||
@@ -39,6 +39,8 @@
|
|||||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="sumbit" :plain="true"
|
||||||
text="保存"></up-button>
|
text="保存"></up-button>
|
||||||
</view>
|
</view>
|
||||||
|
<!-- 消息提示 -->
|
||||||
|
<up-toast ref="uToastRef"></up-toast>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
@@ -47,7 +49,8 @@
|
|||||||
ref,
|
ref,
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
onMounted
|
onMounted,
|
||||||
|
getCurrentInstance
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import color from '@/commons/color.js';
|
import color from '@/commons/color.js';
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
@@ -59,10 +62,17 @@
|
|||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
const currentInstance = getCurrentInstance()
|
||||||
function sumbit() {
|
function sumbit() {
|
||||||
|
if(!datas.form.purveyorName||!datas.form.purveyorTelephone||!datas.form.address){
|
||||||
|
currentInstance.ctx.$refs.uToastRef.show({
|
||||||
|
message: "请填写必填项",
|
||||||
|
type: 'default',
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
tbShopPurveyorpost(datas.form).then(res => {
|
tbShopPurveyorpost(datas.form).then(res => {
|
||||||
go.to('PAGES_SUPPLIER')
|
go.back()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -182,7 +182,6 @@
|
|||||||
* 确认
|
* 确认
|
||||||
*/
|
*/
|
||||||
function affirm() {
|
function affirm() {
|
||||||
console.log(consId.value,'调试1')
|
|
||||||
let params = {
|
let params = {
|
||||||
coverImg: vdata.imgUrlList,
|
coverImg: vdata.imgUrlList,
|
||||||
consId: consId.value,
|
consId: consId.value,
|
||||||
@@ -193,6 +192,7 @@
|
|||||||
show.value = false;
|
show.value = false;
|
||||||
vdata.imgUrlList = [];
|
vdata.imgUrlList = [];
|
||||||
vdata.stockNumber = 1;
|
vdata.stockNumber = 1;
|
||||||
|
emits('affirm','')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="ConsumablesTop">
|
<view class="ConsumablesTop">
|
||||||
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
<view @tap="showStatus = !showStatus" style="display: flex;align-items: center;">
|
||||||
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
{{datas.title}}<up-icon name="arrow-down" size="12"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
<input v-model="datas.conName" @input="inputEvent" type="text" placeholder="请输入耗材名称" />
|
||||||
@@ -46,12 +46,14 @@
|
|||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<view class="">
|
<view class="">
|
||||||
所属商品: {{ filtersSproductId(item.productId)}}
|
所属商品: {{ filtersSproductId(item.product)}}
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<up-button shape="circle" type="primary" size="mini" color="#999" @tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})"
|
<up-button shape="circle" type="primary" size="mini" color="#999"
|
||||||
:plain="true" text="查看记录"></up-button>
|
@tap="toUrl('PAGES_VIEWRECORDS',{item:JSON.stringify(item)})" :plain="true"
|
||||||
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true" text="更多操作"></up-button>
|
text="查看记录"></up-button>
|
||||||
|
<up-button type="primary" shape="circle" size="mini" @click="toggle(item)" :plain="true"
|
||||||
|
text="更多操作"></up-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -162,14 +164,16 @@
|
|||||||
* 报损确认
|
* 报损确认
|
||||||
*/
|
*/
|
||||||
function affirm() {
|
function affirm() {
|
||||||
console.log(2)
|
getList()
|
||||||
|
// 获取分类列表
|
||||||
|
gettbConsTypeList()
|
||||||
}
|
}
|
||||||
|
|
||||||
let toggle = (d) => {
|
let toggle = (d) => {
|
||||||
refMoreSheet.value.open()
|
refMoreSheet.value.open()
|
||||||
|
actionSheet.active = d
|
||||||
actionSheet.activeId = d.id
|
actionSheet.activeId = d.id
|
||||||
report.data.consId = d.id
|
report.data.consId = d.id
|
||||||
actionSheet.active = d
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let sheetClick = (index) => {
|
let sheetClick = (index) => {
|
||||||
@@ -217,7 +221,6 @@
|
|||||||
}
|
}
|
||||||
// async function viewpermission(d) {
|
// async function viewpermission(d) {
|
||||||
// let res = await hasPermission(d)
|
// let res = await hasPermission(d)
|
||||||
// console.log(res,'调试1')
|
|
||||||
// return res
|
// return res
|
||||||
// }
|
// }
|
||||||
async function getList(d = "") {
|
async function getList(d = "") {
|
||||||
@@ -233,19 +236,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function inputEvent(d) {
|
function inputEvent(d) {
|
||||||
datas.conName = d.detail.value.replace(/\s*/g,"");
|
datas.conName = d.detail.value.replace(/\s*/g, "");
|
||||||
getList()
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
function filtersSproductId(d) {
|
function filtersSproductId(d) {
|
||||||
if (!d) return ''
|
if (!d) return ''
|
||||||
const dataArr = d.split(',')
|
// const dataArr = d.split(',')
|
||||||
let str = ''
|
let str = ''
|
||||||
dataArr.forEach(ele => {
|
d.forEach(ele => {
|
||||||
const startIndex = ele.indexOf('_')
|
// str += ele.name
|
||||||
|
// const startIndex = ele.indexOf('_')
|
||||||
// const productId = ele.slice(0, startIndex)
|
// const productId = ele.slice(0, startIndex)
|
||||||
const productName = ele.slice(startIndex + 1, ele.length)
|
// const productName = ele.slice(startIndex + 1, ele.length)
|
||||||
str = productName + ',' + str
|
str = ele.name + ',' + str
|
||||||
})
|
})
|
||||||
|
|
||||||
return str
|
return str
|
||||||
@@ -258,10 +262,8 @@
|
|||||||
page {
|
page {
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
ul,
|
ul,
|
||||||
li {
|
li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
let showStatus = ref(false)
|
let showStatus = ref(false)
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
item: {
|
item: {
|
||||||
type: Object
|
type: ''
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
@@ -82,16 +82,19 @@
|
|||||||
})
|
})
|
||||||
let profitPrice = computed(() => {
|
let profitPrice = computed(() => {
|
||||||
// 如果剩余数量为负数
|
// 如果剩余数量为负数
|
||||||
// if (datas.item.balance < 0) {
|
if (datas.form.balance == '-') {
|
||||||
// let a = datas.item.balance * -1
|
return (0 - datas.item.balance) * datas.item.price
|
||||||
// return formatDecimal((a - datas.form.balance) * datas.item.price)
|
} else {
|
||||||
// } else {
|
return (datas.form.balance - datas.item.balance) * datas.item.price
|
||||||
return formatDecimal((datas.item.balance - datas.form.balance) * datas.item.price)
|
}
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
let profitNumber = computed(() => {
|
let profitNumber = computed(() => {
|
||||||
// 盈亏数量
|
// 盈亏数量
|
||||||
return datas.item.balance - datas.form.balance
|
if (datas.form.balance == '-') {
|
||||||
|
return 0 - datas.item.balance
|
||||||
|
} else {
|
||||||
|
return datas.form.balance - datas.item.balance
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
function toggle() {
|
function toggle() {
|
||||||
@@ -136,8 +139,6 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
|
|
||||||
.df() {
|
.df() {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -198,6 +199,7 @@
|
|||||||
.bottombutton {
|
.bottombutton {
|
||||||
margin-top: 84rpx;
|
margin-top: 84rpx;
|
||||||
padding: 0 24rpx;
|
padding: 0 24rpx;
|
||||||
|
|
||||||
>button {
|
>button {
|
||||||
width: 530rpx;
|
width: 530rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
|
|||||||
@@ -1,62 +1,66 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="supplier">
|
<view class="supplier">
|
||||||
<view v-for="item in datas.list" :key="item.id">
|
<template v-if="datas.list.length>0">
|
||||||
<view class="">
|
<view v-for="item in datas.list" :key="item.id">
|
||||||
<view style="display: flex;align-items: center;">
|
<view class="">
|
||||||
<image src="./profile.png" style="width: 64rpx;height: 64rpx;" mode=""></image>
|
<view style="display: flex;align-items: center;">
|
||||||
<view style="margin-left: 16rpx;">
|
<image src="./profile.png" style="width: 64rpx;height: 64rpx;" mode=""></image>
|
||||||
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
<view style="margin-left: 16rpx;">
|
||||||
{{item.purveyorName}}
|
<view style="font-weight: 400;font-size: 28rpx;color: #333333;">
|
||||||
|
{{item.purveyorName}}
|
||||||
|
</view>
|
||||||
|
<text style="color: #999;">{{item.purveyorTelephone}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text style="color: #999;">{{item.purveyorTelephone}}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
<text style="font-size: 28rpx;font-weight: 400;" :style="{color:item.type==0?'#FD7B49':''}">
|
||||||
|
{{ item.type == 0 ? '待支付' : '已完结' }}
|
||||||
<text style="font-size: 28rpx;font-weight: 400;" :style="{color:item.type==0?'#FD7B49':''}">
|
</text>
|
||||||
{{ item.type == 0 ? '待支付' : '已完结' }}
|
|
||||||
</text>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<view class="">
|
|
||||||
<view :style="{color:item.waitAmount>0?' #F02C45;':''}">
|
|
||||||
{{item.waitAmount}}
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
剩余支付金额
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view style="color: #318AFE;">
|
<view class="">
|
||||||
{{item.waitCount}}未付
|
<view :style="{color:item.waitAmount>0?' #F02C45;':''}">
|
||||||
|
{{item.waitAmount}}
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
剩余支付金额
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
待付款笔数
|
<view style="color: #318AFE;">
|
||||||
|
{{item.waitCount}}未付
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
待付款笔数
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="df">
|
||||||
|
<span>上次进货日期</span>
|
||||||
|
<span v-if="item.lastTransactAt">{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
||||||
|
</view>
|
||||||
|
<view class="df">
|
||||||
|
<span>地址</span>
|
||||||
|
<span>{{item.address}}</span>
|
||||||
|
</view>
|
||||||
|
<view class="df">
|
||||||
|
<span>备注</span>
|
||||||
|
<span>{{item.remark}}</span>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<up-button type="primary" shape="circle" size="mini"
|
||||||
|
@tap="toUrl('PAGES_EDIT_SUPPLIER',{item:JSON.stringify(item)})" :plain="true" text="编辑">
|
||||||
|
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||||
|
@tap="deleteEvent(item.id)" :plain="true" text="删除">
|
||||||
|
</up-button> <up-button size="mini" shape="circle" type="primary"
|
||||||
|
style="background-color: #318AFE;color: #fff;"
|
||||||
|
@tap="toUrl('PAGES_PAYMENT_SETTLEMENT',{id:item.id})" :plain="true" text="结款记录"></up-button>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="df">
|
<view style="height: 200rpx;"> </view>
|
||||||
<span>上次进货日期</span>
|
</template>
|
||||||
<span>{{dayjs(item.lastTransactAt).format('YYYY-MM-DD HH:mm:ss')}}</span>
|
<view v-else style="text-align: center;background-color: #f9f9f9;">暂无数据</view>
|
||||||
</view>
|
|
||||||
<view class="df">
|
|
||||||
<span>地址</span>
|
|
||||||
<span>{{item.address}}</span>
|
|
||||||
</view>
|
|
||||||
<view class="df">
|
|
||||||
<span>备注</span>
|
|
||||||
<span>{{item.remark}}</span>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<up-button type="primary" shape="circle" size="mini"
|
|
||||||
@tap="toUrl('PAGES_EDIT_SUPPLIER',{item:JSON.stringify(item)})" :plain="true" text="编辑">
|
|
||||||
</up-button> <up-button size="mini" shape="circle" type="primary" @tap="deleteEvent(item.id)"
|
|
||||||
:plain="true" text="删除">
|
|
||||||
</up-button> <up-button size="mini" shape="circle" type="primary"
|
|
||||||
style="background-color: #318AFE;color: #fff;"
|
|
||||||
@tap="toUrl('PAGES_PAYMENT_SETTLEMENT',{id:item.id})" :plain="true" text="结款记录"></up-button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view class="bottombutton">
|
<view class="bottombutton">
|
||||||
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="toUrl('PAGES_ADD_SUPPLIER')"
|
<up-button type="primary" style="background-color: #318AFE;color: #fff;" @tap="toUrl('PAGES_ADD_SUPPLIER')"
|
||||||
@@ -69,6 +73,9 @@
|
|||||||
onMounted,
|
onMounted,
|
||||||
reactive
|
reactive
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
|
import {
|
||||||
|
onShow,
|
||||||
|
} from '@dcloudio/uni-app';
|
||||||
import dayjs from 'dayjs' //时间格式库
|
import dayjs from 'dayjs' //时间格式库
|
||||||
import go from '@/commons/utils/go.js';
|
import go from '@/commons/utils/go.js';
|
||||||
import {
|
import {
|
||||||
@@ -78,7 +85,7 @@
|
|||||||
let datas = reactive({
|
let datas = reactive({
|
||||||
list: []
|
list: []
|
||||||
})
|
})
|
||||||
onMounted(() => {
|
onShow(() => {
|
||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
let deleteEvent = (id) => {
|
let deleteEvent = (id) => {
|
||||||
|
|||||||
@@ -18,57 +18,60 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="viewrecordsTop">
|
<view class="viewrecordsTop">
|
||||||
<view style="padding:32rpx 16rpx;">
|
<view style="padding:32rpx 16rpx;">
|
||||||
<view class="">
|
<view @tap="getNewdata('addCountNumber')">
|
||||||
增加数量 <text
|
增加数量 <text
|
||||||
style="color: #76ACF0;font-weight: bold;">{{datas.countList?datas.countList.addCountNumber:''}}</text>
|
style="color: #76ACF0;font-weight: bold;">{{datas.countList.addCountNumber?datas.countList.addCountNumber:'0'}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="df viewdf">
|
<view class="df viewdf">
|
||||||
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
|
<view @tap="getNewdata('stockInNumber')"
|
||||||
|
style="font-size: 24rpx;border-right: 1px solid #999; width: 142rpx;text-align: center;">
|
||||||
<view style="color: #999999;">
|
<view style="color: #999999;">
|
||||||
入库
|
入库
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
{{datas.countList?datas.countList.stockInNumber:''}}
|
{{datas.countList.stockInNumber?datas.countList.stockInNumber:0}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
<view @tap="getNewdata('addNumber')" style="font-size: 24rpx;width: 178rpx;text-align: center;">
|
||||||
<view style="color: #999999;">
|
<view style="color: #999999;">
|
||||||
手动增加
|
手动增加
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
{{datas.countList?datas.countList.addNumber:''}}
|
{{datas.countList.addNumber?datas.countList.addNumber:'0'}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="padding:32rpx 16rpx;">
|
<view style="padding:32rpx 16rpx;">
|
||||||
<view class="">
|
<view class="" @tap="getNewdata('subCountNumber')">
|
||||||
减少数量 <text
|
减少数量 <text
|
||||||
style="color: #52BDA4;font-weight: bold;">{{datas.countList?datas.countList.subCountNumber:0}}</text>
|
style="color: #52BDA4;font-weight: bold;">{{datas.countList.subCountNumber?datas.countList.subCountNumber:0}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="df viewdf">
|
<view class="df viewdf">
|
||||||
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;">
|
<view @tap="getNewdata('subNumber')"
|
||||||
|
style="font-size: 24rpx;border-right: 1px solid #999; width: 112rpx;text-align: center;">
|
||||||
<view style="color: #999999;">
|
<view style="color: #999999;">
|
||||||
手动减少
|
手动减少
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
{{datas.countList?datas.countList.subNumber:0}}
|
{{datas.countList.subNumber?datas.countList.subNumber:0}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
|
<view @tap="getNewdata('stockOutNumber')"
|
||||||
|
style="font-size: 24rpx;border-right: 1px solid #999; width: 82rpx;text-align: center;">
|
||||||
<view style="color: #999999;">
|
<view style="color: #999999;">
|
||||||
出库
|
出库
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
{{datas.countList?datas.countList.stockOutNumber:0}}
|
{{datas.countList.stockOutNumber?datas.countList.stockOutNumber:0}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
<view @tap="getNewdata('saleNumber')" style="font-size: 24rpx;width: 112rpx;text-align: center;">
|
||||||
<view style="color: #999999;">
|
<view style="color: #999999;">
|
||||||
商品消耗
|
商品消耗
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
{{datas.countList?datas.countList.saleNumber:0}}
|
{{datas.countList.saleNumber?datas.countList.saleNumber:0}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -88,7 +91,7 @@
|
|||||||
<view class="">
|
<view class="">
|
||||||
<view style="font-size: 24rpx;color: #666666;">
|
<view style="font-size: 24rpx;color: #666666;">
|
||||||
库存 {{ inventory(item.balance,item.bizType,item.amount)}} <text
|
库存 {{ inventory(item.balance,item.bizType,item.amount)}} <text
|
||||||
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> - {{ item.amount|0 }}</text>
|
:style="{color:item.bizType=='+'?'#1bca72':'red'}"> → {{ item.amount|0 }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view style="font-size: 24rpx;color: #666666;">
|
<view style="font-size: 24rpx;color: #666666;">
|
||||||
剩余库存 {{item.balance}}
|
剩余库存 {{item.balance}}
|
||||||
@@ -139,7 +142,6 @@
|
|||||||
let showStatus = ref(false)
|
let showStatus = ref(false)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
let items = JSON.parse(props.item)
|
let items = JSON.parse(props.item)
|
||||||
// console.log(items, '调试1')
|
|
||||||
getlist()
|
getlist()
|
||||||
})
|
})
|
||||||
const refs = getCurrentInstance()
|
const refs = getCurrentInstance()
|
||||||
@@ -161,6 +163,11 @@
|
|||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
let nowStatusIndex = ref(0)
|
let nowStatusIndex = ref(0)
|
||||||
|
let columnName = ref('')
|
||||||
|
let getNewdata = (d) => {
|
||||||
|
columnName.value = d
|
||||||
|
getlist()
|
||||||
|
}
|
||||||
|
|
||||||
function changeNowStatusIndex(i) {
|
function changeNowStatusIndex(i) {
|
||||||
nowStatusIndex.value = i
|
nowStatusIndex.value = i
|
||||||
@@ -171,14 +178,15 @@
|
|||||||
const statusHeight = computed(() => {
|
const statusHeight = computed(() => {
|
||||||
return 30 * datas.status.length + 14 + 'px'
|
return 30 * datas.status.length + 14 + 'px'
|
||||||
})
|
})
|
||||||
let getlist = (conTypeId = "", start, end) => {
|
let getlist = (conTypeId = "", start, end, ) => {
|
||||||
|
let ids = JSON.parse(props.item)
|
||||||
// 列表
|
// 列表
|
||||||
tbConsInfoFlowstock({
|
tbConsInfoFlowstock({
|
||||||
page: 0,
|
page: 0,
|
||||||
shopId: uni.getStorageSync("shopId"),
|
shopId: uni.getStorageSync("shopId"),
|
||||||
size: 30,
|
size: 30,
|
||||||
consId: JSON.parse(props.item).conTypeId,
|
consId: ids.id,
|
||||||
column: "addCountNumber",
|
column: columnName.value,
|
||||||
conTypeId,
|
conTypeId,
|
||||||
|
|
||||||
|
|
||||||
@@ -194,6 +202,7 @@
|
|||||||
conTypeId,
|
conTypeId,
|
||||||
startTime: start,
|
startTime: start,
|
||||||
endTime: end,
|
endTime: end,
|
||||||
|
consId: JSON.parse(props.item).id,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
datas.countList = res
|
datas.countList = res
|
||||||
})
|
})
|
||||||
@@ -215,7 +224,6 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
|
|
||||||
.viewrecordsType {
|
.viewrecordsType {
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
<input type="number" placeholder="请输入数量" v-model="datas.form.list.stockNumber" name="" id="">
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="justify-content: space-between;">
|
<!-- <view style="justify-content: space-between;">
|
||||||
<view>
|
<view>
|
||||||
单位
|
单位
|
||||||
</view>
|
</view>
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
{{datas.status[nowStatusIndex]}}
|
{{datas.status[nowStatusIndex]}}
|
||||||
</view>
|
</view>
|
||||||
<uni-icons type="bottom" size="16"></uni-icons>
|
<uni-icons type="bottom" size="16"></uni-icons>
|
||||||
</view>
|
</view> -->
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<text style="color: red;">*</text>单价
|
<text style="color: red;">*</text>单价
|
||||||
@@ -187,6 +187,13 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(!datas.list[nowStatusIndex.value]){
|
||||||
|
refs.ctx.$refs.uToastRef.show({
|
||||||
|
type: 'default',
|
||||||
|
message: "供应商不能为空",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
datas.form.list.conInfoId = datas.item.id
|
datas.form.list.conInfoId = datas.item.id
|
||||||
datas.form.list = [datas.form.list]
|
datas.form.list = [datas.form.list]
|
||||||
tbConsInfostockInOut({
|
tbConsInfostockInOut({
|
||||||
|
|||||||
@@ -1,83 +1,86 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 顶部菜单 -->
|
<view class="container">
|
||||||
<view class="tagClass">
|
<!-- 顶部菜单 -->
|
||||||
<view class="tag-item" @tap="tagClick(item)" :class="{active:item.type===pageData.query.type}"
|
<view class="tagClass">
|
||||||
v-for="(item,index) in pageData.status.list" :key="index">
|
<view class="tag-item" @tap="tagClick(item)" :class="{active:item.type===pageData.query.type}"
|
||||||
{{item.name}}
|
v-for="(item,index) in pageData.status.list" :key="index">
|
||||||
</view>
|
{{item.name}}
|
||||||
</view>
|
</view>
|
||||||
<!-- 搜搜 -->
|
</view>
|
||||||
<!-- <view class="search">
|
<!-- 搜搜 -->
|
||||||
<up-input
|
<!-- <view class="search">
|
||||||
placeholder="搜索优惠券名称"
|
<up-input
|
||||||
prefixIcon="search"
|
placeholder="搜索优惠券名称"
|
||||||
shape="circle"
|
prefixIcon="search"
|
||||||
border="none"
|
shape="circle"
|
||||||
fontSize="14px"
|
border="none"
|
||||||
prefixIconStyle="font-size: 28px;color: #999;"
|
fontSize="14px"
|
||||||
:customStyle="{backgroundColor:'#F9F9F9',padding: '10rpx 18rpx'}"
|
prefixIconStyle="font-size: 28px;color: #999;"
|
||||||
></up-input>
|
:customStyle="{backgroundColor:'#F9F9F9',padding: '10rpx 18rpx'}"
|
||||||
<view class="searchBtn">
|
></up-input>
|
||||||
搜索
|
<view class="searchBtn">
|
||||||
</view>
|
搜索
|
||||||
</view> -->
|
</view>
|
||||||
<!-- 内容 -->
|
</view> -->
|
||||||
<view class="couponContentList">
|
<!-- 内容 -->
|
||||||
<view class="couponContent" v-for="(item,index) in pageData.couponList" :key="index">
|
<view class="couponContentList">
|
||||||
|
<view class="couponContent" v-for="(item,index) in pageData.couponList" :key="index">
|
||||||
|
|
||||||
|
<view class="couponContentListTop">
|
||||||
|
<view class="title"> {{ item.title }} </view>
|
||||||
|
<view> ID:{{item.id}} </view>
|
||||||
|
</view>
|
||||||
|
<view class="couponContentListcontent">
|
||||||
|
<view>
|
||||||
|
<view> 使用门槛 </view>
|
||||||
|
<view v-if="item.type == 1"> 满 {{ item.fullAmount }} 元减 {{ item.discountAmount }} 元 </view>
|
||||||
|
<view v-if="item.type == 2"> 满 {{ item.fullAmount }} 元可用 </view>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view> 领取方式 </view>
|
||||||
|
<view> 用户不可自行领取 </view>
|
||||||
|
</view>
|
||||||
|
<view v-if="item.type == 1">
|
||||||
|
<view> 有效期 </view>
|
||||||
|
<view> 领券后{{ item.validDays }}天过期 </view>
|
||||||
|
</view>
|
||||||
|
<view class="JQclass">
|
||||||
|
<image :src="'/static/coupon/qrcode.svg'" mode="scaleToFill" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="couponContentListcontent2">
|
||||||
|
<view class="">
|
||||||
|
<view class="num"> {{ item.number }} </view>
|
||||||
|
<view class="lable"> 发放数量 </view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="num"> {{ item.number-item.leftNumber }} </view>
|
||||||
|
<view class="lable"> 已领取 </view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="num"> {{ item.leftNumber }} </view>
|
||||||
|
<view class="lable"> 剩余 </view>
|
||||||
|
</view>
|
||||||
|
<view class="">
|
||||||
|
<view class="num"> {{ item.useNumber }} </view>
|
||||||
|
<view class="lable"> 已使用 </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="couponContentListbottom">
|
||||||
|
<button @tap="editCoupon(item)">编辑</button>
|
||||||
|
<button @tap="delCoupon(item)">删除</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<template v-if="pageData.couponList.length">
|
||||||
|
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
||||||
|
@change="pageChange"></my-pagination>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="couponContentListTop">
|
|
||||||
<view class="title"> {{ item.title }} </view>
|
<view class="bottomPop">
|
||||||
<view> ID:{{item.id}} </view>
|
<button @click="addCoupon">+添加{{pageData.status.tagName}}</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="couponContentListcontent">
|
|
||||||
<view>
|
|
||||||
<view> 使用门槛 </view>
|
|
||||||
<view> 满 {{ item.fullAmount }} 元减 {{ item.discountAmount }} 元 </view>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<view> 领取方式 </view>
|
|
||||||
<view> 用户不可自行领取 </view>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<view> 有效期 </view>
|
|
||||||
<view> 领券后{{ item.validDays }}天过期 </view>
|
|
||||||
</view>
|
|
||||||
<view class="JQclass">
|
|
||||||
<image :src="'/static/coupon/qrcode.svg'" mode="scaleToFill" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="couponContentListcontent2">
|
|
||||||
<view class="">
|
|
||||||
<view class="num"> {{ item.number }} </view>
|
|
||||||
<view class="lable"> 发放数量 </view>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<view class="num"> {{ item.number-item.leftNumber }} </view>
|
|
||||||
<view class="lable"> 已领取 </view>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<view class="num"> {{ item.leftNumber }} </view>
|
|
||||||
<view class="lable"> 剩余 </view>
|
|
||||||
</view>
|
|
||||||
<view class="">
|
|
||||||
<view class="num"> {{ item.useNumber }} </view>
|
|
||||||
<view class="lable"> 已使用 </view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="couponContentListbottom">
|
|
||||||
<button @tap="editCoupon(item)">编辑</button>
|
|
||||||
<button @tap="delCoupon(item)">删除</button>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<template v-if="pageData.couponList.length">
|
|
||||||
<my-pagination :page="pageData.query.page" :totalElements="pageData.totalElements" :size="pageData.query.size"
|
|
||||||
@change="pageChange"></my-pagination>
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
|
||||||
<view class="bottomPop">
|
|
||||||
<button @click="addCoupon">+添加{{pageData.status.tagName}}</button>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -182,6 +185,9 @@
|
|||||||
body{
|
body{
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
|
.container{
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
.tagClass {
|
.tagClass {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -190,6 +196,9 @@
|
|||||||
padding-top: 44rpx;
|
padding-top: 44rpx;
|
||||||
padding: 32rpx 28rpx;
|
padding: 32rpx 28rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
position: fixed;
|
||||||
|
top: 79rpx;
|
||||||
|
z-index: 999;
|
||||||
.tag-item {
|
.tag-item {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 10rpx 24rpx;
|
padding: 10rpx 24rpx;
|
||||||
@@ -244,7 +253,7 @@
|
|||||||
/* height: 544rpx; */
|
/* height: 544rpx; */
|
||||||
margin: 32rpx auto 0;
|
margin: 32rpx auto 0;
|
||||||
margin-bottom: 32rpx;
|
margin-bottom: 32rpx;
|
||||||
padding: 0 28rpx 182rpx 28rpx;
|
padding: 122rpx 28rpx 182rpx 28rpx;
|
||||||
}
|
}
|
||||||
.couponContent {
|
.couponContent {
|
||||||
/* background-color: #f9f9f9; */
|
/* background-color: #f9f9f9; */
|
||||||
|
|||||||
@@ -55,7 +55,6 @@ import {rolesGet } from '@/http/yskApi/requestAll.js';
|
|||||||
params.isNotHasType2 = 1;
|
params.isNotHasType2 = 1;
|
||||||
rolesGet({
|
rolesGet({
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(res, '调试1')
|
|
||||||
})
|
})
|
||||||
return res.content
|
return res.content
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ onShow(() => {
|
|||||||
|
|
||||||
const saveImage = () => {
|
const saveImage = () => {
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
saveQrcodeImg()
|
|
||||||
uni.downloadFile({
|
uni.downloadFile({
|
||||||
url: vdata.QrcodeUrl,
|
url: vdata.QrcodeUrl,
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
@@ -92,16 +91,6 @@ function downloadQR() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//#endif
|
//#endif
|
||||||
const saveQrcodeImg = () => {
|
|
||||||
saveHeadImgFile(vdata.QrcodeUrl, 80)
|
|
||||||
.then((success) => {
|
|
||||||
infoBox.showSuccessToast('保存成功')
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err)
|
|
||||||
infoBox.showErrorToast('保存失败')
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const saveWxQrcodeImg = (data) => {
|
const saveWxQrcodeImg = (data) => {
|
||||||
const fileManager = wx.getFileSystemManager()
|
const fileManager = wx.getFileSystemManager()
|
||||||
|
|||||||
@@ -298,9 +298,11 @@
|
|||||||
const isSku = computed(() => {
|
const isSku = computed(() => {
|
||||||
return props.goods.typeEnum == 'sku'
|
return props.goods.typeEnum == 'sku'
|
||||||
})
|
})
|
||||||
let isBindGuige = ref(isSku.value)
|
let isBindGuige = ref(false)
|
||||||
watch(() => props.goods.typeEnum, (newval) => {
|
watch(() => props.goods.typeEnum, (newval) => {
|
||||||
isBindGuige.value = isSku.value
|
if(!newval){
|
||||||
|
isBindGuige.value = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -385,7 +387,6 @@
|
|||||||
$haocaiMap[item.id] = item
|
$haocaiMap[item.id] = item
|
||||||
}
|
}
|
||||||
haoCaiList.value = res.content
|
haoCaiList.value = res.content
|
||||||
|
|
||||||
})
|
})
|
||||||
tbShopCurrencyGet({
|
tbShopCurrencyGet({
|
||||||
page: 0,
|
page: 0,
|
||||||
@@ -400,6 +401,8 @@
|
|||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
init()
|
init()
|
||||||
|
const firstItem= props.goods.conInfos[0]
|
||||||
|
isBindGuige.value=firstItem?(firstItem.productSkuId==0?false:true):false
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -197,7 +197,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function confirm(e) {
|
function confirm(e) {
|
||||||
// console.log(e.value, '调试1')
|
|
||||||
datas.rolesdata = e.value[0]
|
datas.rolesdata = e.value[0]
|
||||||
show.value = false
|
show.value = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<ul class="liststyle">
|
<view class="liststyle">
|
||||||
<li v-for="item in datas.list " :key="item.id">
|
<view v-for="item in datas.list " :key="item.id">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="">
|
<view class="">
|
||||||
<span style="font-size: 28rpx;color: #333333; ">{{item.name}} </span>
|
<span style="font-size: 28rpx;color: #333333; ">{{item.name}} </span>
|
||||||
@@ -24,9 +24,9 @@
|
|||||||
text="编辑"></up-button>
|
text="编辑"></up-button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</li>
|
</view>
|
||||||
<li style="background-color: rgba(0,0,0,0);"></li>
|
<view style="background-color: rgba(0,0,0,0);"></view>
|
||||||
</ul>
|
</view>
|
||||||
<view v-if="datas.list.length==0" style="text-align: center;">
|
<view v-if="datas.list.length==0" style="text-align: center;">
|
||||||
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
<image src="./bg.png" style="width: 325rpx;height: 335rpx;" mode=""></image>
|
||||||
<view style="font-size: 28rpx;color: #999;">暂无员工</view>
|
<view style="font-size: 28rpx;color: #999;">暂无员工</view>
|
||||||
@@ -124,13 +124,9 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
ul,
|
|
||||||
li {
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.liststyle {
|
.liststyle {
|
||||||
>li {
|
>view {
|
||||||
// width: 694rpx;
|
// width: 694rpx;
|
||||||
height: 192rpx;
|
height: 192rpx;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
|
|||||||
@@ -25,15 +25,15 @@
|
|||||||
<view class="u-font-32">数据统计</view>
|
<view class="u-font-32">数据统计</view>
|
||||||
<view class="u-m-t-40 u-flex u-row-between">
|
<view class="u-m-t-40 u-flex u-row-between">
|
||||||
<view class=" ">
|
<view class=" ">
|
||||||
<view>今日新增(人)</view>
|
<view>会员数</view>
|
||||||
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.userTotal}}</view>
|
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.userTotal}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line-l-r u-p-l-30 u-p-r-30">
|
<view class="line-l-r u-p-l-30 u-p-r-30">
|
||||||
<view>总用户量(人)</view>
|
<view>会员余额</view>
|
||||||
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.balanceTotal}}</view>
|
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.balanceTotal}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="">
|
<view class="">
|
||||||
<view>总余额(元)</view>
|
<view>充值金额</view>
|
||||||
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.chageTotal}}</view>
|
<view class="u-m-t-10 u-font-36 font-bold">{{pageData.allShopInfo.chageTotal}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -139,7 +139,6 @@
|
|||||||
function changeTimeFunc(val) {
|
function changeTimeFunc(val) {
|
||||||
vdata.timeSelected = val;
|
vdata.timeSelected = val;
|
||||||
getList()
|
getList()
|
||||||
// console.log(vdata.timeSelected,'调试121')
|
|
||||||
// refData();
|
// refData();
|
||||||
// if (vdata.memberIsShow) {
|
// if (vdata.memberIsShow) {
|
||||||
// getMemberData();
|
// getMemberData();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<view class="income">
|
<view class="income">
|
||||||
<view>总收入</view>
|
<view>总收入</view>
|
||||||
<view>¥{{totalRevenuedata}}</view>
|
<view>¥{{totalRevenuedata}}</view>
|
||||||
<view>后海&双屿</view>
|
<view>{{shopName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 统计 or 快捷扫码 -->
|
<!-- 统计 or 快捷扫码 -->
|
||||||
<!-- <Stats ref="statsRef" /> -->
|
<!-- <Stats ref="statsRef" /> -->
|
||||||
@@ -46,12 +46,15 @@
|
|||||||
hasPermission
|
hasPermission
|
||||||
} from '@/commons/utils/hasPermission.js'
|
} from '@/commons/utils/hasPermission.js'
|
||||||
uni.hideTabBar()
|
uni.hideTabBar()
|
||||||
|
let shopName = ref()
|
||||||
onLoad((options) => {
|
onLoad((options) => {
|
||||||
|
shopName.value = uni.getStorageSync('shopName');
|
||||||
});
|
});
|
||||||
let totalRevenuedata = ref()
|
let totalRevenuedata = ref()
|
||||||
let totalRevenue= (d)=>{
|
let totalRevenue= (d)=>{
|
||||||
totalRevenuedata.value=d
|
totalRevenuedata.value=d
|
||||||
}
|
}
|
||||||
|
|
||||||
// 导航列表
|
// 导航列表
|
||||||
const navList = [
|
const navList = [
|
||||||
// {
|
// {
|
||||||
@@ -140,6 +143,11 @@
|
|||||||
// icon: '/static/indexImg/icon-staff.svg',
|
// icon: '/static/indexImg/icon-staff.svg',
|
||||||
// pageUrl: 'PAGES_USER'
|
// pageUrl: 'PAGES_USER'
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
title: '订阅通知',
|
||||||
|
icon: '/static/indexImg/icon-notification.svg',
|
||||||
|
pageUrl: 'PAGES_NOTIFICATION_INDEX',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '设置中心',
|
title: '设置中心',
|
||||||
icon: '/static/indexImg/icon-cashier.svg',
|
icon: '/static/indexImg/icon-cashier.svg',
|
||||||
|
|||||||
@@ -280,7 +280,6 @@
|
|||||||
// }
|
// }
|
||||||
// 获取商户信息,有就回显
|
// 获取商户信息,有就回显
|
||||||
let info = uni.getStorageSync('MerchantId')
|
let info = uni.getStorageSync('MerchantId')
|
||||||
// console.log(info.merchantName,'调试121')
|
|
||||||
if (info.merchantName) {
|
if (info.merchantName) {
|
||||||
vdata.formData.merchantName = info.merchantName
|
vdata.formData.merchantName = info.merchantName
|
||||||
vdata.formData.username = info.username
|
vdata.formData.username = info.username
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- <view class="u-p-b-24 u-m-b-24 border-bottom">
|
<!-- <view class="u-p-b-24 u-m-b-24 border-bottom">
|
||||||
<view>就餐类型</view>
|
<view>就餐类型</view>
|
||||||
<view class="u-m-t-24 u-flex ">
|
<view class="u-m-t-24 u-flex ">
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<template v-if="user">
|
<template v-if="user&&user.id">
|
||||||
<view class="block">
|
<view class="block">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="u-flex border-bottom u-p-b-24 ">
|
<view class="u-flex border-bottom u-p-b-24 ">
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
<view class="u-p-b-24 ">
|
<view class="u-p-b-24 ">
|
||||||
<view class="font-bold">订单备注</view>
|
<view class="font-bold">订单备注</view>
|
||||||
<view class="u-m-t-32 u-flex ">
|
<view class="u-m-t-32 u-flex ">
|
||||||
<uni-easyinput type="textarea" v-model="note" placeholder="请输入备注"></uni-easyinput>
|
<uni-easyinput type="textarea" v-model="note" placeholder="请输入备注"></uni-easyinput>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
<button class="tag" hover-class="hover-class"
|
<button class="tag" hover-class="hover-class"
|
||||||
@tap="toggleGoodsItemKey(item,index,'isGift')">{{item.isGift?'取消赠送':'赠送'}}</button>
|
@tap="toggleGoodsItemKey(item,index,'isGift')">{{item.isGift?'取消赠送':'赠送'}}</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-r-20 " >
|
<view class="u-flex u-m-r-20 ">
|
||||||
<button class="tag" hover-class="hover-class"
|
<button class="tag" hover-class="hover-class"
|
||||||
@tap="toggleGoodsItemKey(item,index,'isPack')">{{item.isPack?'取消打包':'打包'}}</button>
|
@tap="toggleGoodsItemKey(item,index,'isPack')">{{item.isPack?'取消打包':'打包'}}</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -201,24 +201,24 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="border-bottom">
|
<view class="border-bottom">
|
||||||
<template v-if="$seatFee&&$seatFee.totalAmount">
|
<template v-if="$seatFee&&$seatFee.totalAmount">
|
||||||
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
||||||
<view>
|
<view>
|
||||||
<text >桌位费</text>
|
<text>桌位费</text>
|
||||||
</view>
|
</view>
|
||||||
<view>¥{{$seatFee.totalAmount||'0.00'}}</view>
|
<view>¥{{$seatFee.totalAmount||'0.00'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="$packFee>0">
|
<template v-if="$packFee>0">
|
||||||
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
<view class="u-flex u-row-between u-m-t-18 u-p-b-34 ">
|
||||||
<view>
|
<view>
|
||||||
<text >打包费</text>
|
<text>打包费</text>
|
||||||
</view>
|
</view>
|
||||||
<view>¥{{$packFee||'0.00'}}</view>
|
<view>¥{{$packFee||'0.00'}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<view class="u-flex u-row-right u-m-t-38">
|
<view class="u-flex u-row-right u-m-t-38">
|
||||||
<!-- <template v-if="$shop.registerType=='munchies'">
|
<!-- <template v-if="$shop.registerType=='munchies'">
|
||||||
@@ -273,7 +273,9 @@
|
|||||||
computed,
|
computed,
|
||||||
watch
|
watch
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {getSafeBottomHeight} from '@/commons/utils/safe-bottom.js'
|
import {
|
||||||
|
getSafeBottomHeight
|
||||||
|
} from '@/commons/utils/safe-bottom.js'
|
||||||
import modelDiscount from './components/discount'
|
import modelDiscount from './components/discount'
|
||||||
import giveFood from './components/give-food'
|
import giveFood from './components/give-food'
|
||||||
import oneRemark from './components/remark'
|
import oneRemark from './components/remark'
|
||||||
@@ -291,7 +293,9 @@
|
|||||||
import {
|
import {
|
||||||
getNowCart
|
getNowCart
|
||||||
} from '@/pagesCreateOrder/util.js'
|
} from '@/pagesCreateOrder/util.js'
|
||||||
import {hasPermission} from '@/commons/utils/hasPermission.js'
|
import {
|
||||||
|
hasPermission
|
||||||
|
} from '@/commons/utils/hasPermission.js'
|
||||||
const models = new Map();
|
const models = new Map();
|
||||||
const modelData = reactive({
|
const modelData = reactive({
|
||||||
data: {},
|
data: {},
|
||||||
@@ -311,7 +315,7 @@
|
|||||||
modelData.selIndex = index
|
modelData.selIndex = index
|
||||||
const model = models.get(key)
|
const model = models.get(key)
|
||||||
model && model.open({
|
model && model.open({
|
||||||
remark: modelData.data.note||''
|
remark: modelData.data.note || ''
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -325,7 +329,7 @@
|
|||||||
const userNumbers = reactive({
|
const userNumbers = reactive({
|
||||||
list: new Array(100).fill(1).map((v, index) => {
|
list: new Array(100).fill(1).map((v, index) => {
|
||||||
// return index === 0 ? '无' : index + '人'
|
// return index === 0 ? '无' : index + '人'
|
||||||
return (index+1)+ '人'
|
return (index + 1) + '人'
|
||||||
}),
|
}),
|
||||||
defaultCateIndex: 0,
|
defaultCateIndex: 0,
|
||||||
})
|
})
|
||||||
@@ -336,15 +340,23 @@
|
|||||||
//更新就餐人数
|
//更新就餐人数
|
||||||
async function updateChoseCount() {
|
async function updateChoseCount() {
|
||||||
console.log($shop.value);
|
console.log($shop.value);
|
||||||
if (!$shop.value.isTableFee&& table.value.tableId) {
|
const maxCapacity = table.value.tableId ? (table.value.maxCapacity || 0) : 100
|
||||||
|
if (table.value.tableId && userNumbers.defaultCateIndex * 1 + 1 > maxCapacity) {
|
||||||
|
uni.showToast({
|
||||||
|
title: '当前台桌最大人数为: ' + maxCapacity
|
||||||
|
})
|
||||||
|
userNumbers.defaultCateIndex=maxCapacity-1
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!$shop.value.isTableFee && table.value.tableId) {
|
||||||
//不免餐位费
|
//不免餐位费
|
||||||
const res = await Api.$choseCount({
|
const res = await Api.$choseCount({
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId||'',
|
tableId: table.value.tableId || '',
|
||||||
num: userNumbers.defaultCateIndex+1,
|
num: userNumbers.defaultCateIndex * 1 + 1,
|
||||||
})
|
})
|
||||||
Object.assign($seatFee, res)
|
Object.assign($seatFee, res)
|
||||||
userNumbers.defaultCateIndex = res.totalNumber-1
|
userNumbers.defaultCateIndex = res.totalNumber - 1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -362,14 +374,15 @@
|
|||||||
skuId,
|
skuId,
|
||||||
id,
|
id,
|
||||||
number,
|
number,
|
||||||
isPack,isGift
|
isPack,
|
||||||
|
isGift
|
||||||
} = item
|
} = item
|
||||||
const par = {
|
const par = {
|
||||||
cartId:id,
|
cartId: id,
|
||||||
isPack,
|
isPack,
|
||||||
isGift,
|
isGift,
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId||'',
|
tableId: table.value.tableId || '',
|
||||||
productId,
|
productId,
|
||||||
num: number,
|
num: number,
|
||||||
skuId
|
skuId
|
||||||
@@ -377,7 +390,7 @@
|
|||||||
par[key] = !item[key]
|
par[key] = !item[key]
|
||||||
const res = await Api.$updateCart(par)
|
const res = await Api.$updateCart(par)
|
||||||
goods.list[index][key] = returnBoolean(res[key])
|
goods.list[index][key] = returnBoolean(res[key])
|
||||||
if(key=='isPack'){
|
if (key == 'isPack') {
|
||||||
getCart()
|
getCart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -400,11 +413,11 @@
|
|||||||
],
|
],
|
||||||
active: 'dine-in'
|
active: 'dine-in'
|
||||||
})
|
})
|
||||||
|
|
||||||
const $packFee=computed(()=>{
|
const $packFee = computed(() => {
|
||||||
return goods.list.reduce((prve,cur)=>{
|
return goods.list.reduce((prve, cur) => {
|
||||||
return prve+cur.packFee
|
return prve + cur.packFee
|
||||||
},0).toFixed(2)
|
}, 0).toFixed(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
function chooseUser() {
|
function chooseUser() {
|
||||||
@@ -427,7 +440,7 @@
|
|||||||
console.log(option);
|
console.log(option);
|
||||||
const submitPar = {
|
const submitPar = {
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId||"",
|
tableId: table.value.tableId || "",
|
||||||
vipUserId: user.value.id ? user.value.id : '',
|
vipUserId: user.value.id ? user.value.id : '',
|
||||||
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
type: user.value.id ? 0 : 1 //0 设置 1 取消
|
||||||
}
|
}
|
||||||
@@ -481,16 +494,16 @@
|
|||||||
})
|
})
|
||||||
const goodsPrice = computed(() => {
|
const goodsPrice = computed(() => {
|
||||||
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||||
const tPrice=cur.salePrice * cur.number
|
const tPrice = cur.salePrice * cur.number
|
||||||
console.log(cur.isPack);
|
console.log(cur.isPack);
|
||||||
const tpackFee=cur.isPack? cur.packFee*1:0
|
const tpackFee = cur.isPack ? cur.packFee * 1 : 0
|
||||||
return prve +(cur.isGift?0:tPrice) +tpackFee
|
return prve + (cur.isGift ? 0 : tPrice) + tpackFee
|
||||||
}, 0)
|
}, 0)
|
||||||
return (goodsTotalPrice|| 0).toFixed(2)
|
return (goodsTotalPrice || 0).toFixed(2)
|
||||||
})
|
})
|
||||||
const allPrice = computed(() => {
|
const allPrice = computed(() => {
|
||||||
console.log(goodsPrice.value);
|
console.log(goodsPrice.value);
|
||||||
const n=goodsPrice.value*1 + $seatFee.totalAmount
|
const n = goodsPrice.value * 1 + $seatFee.totalAmount
|
||||||
return n.toFixed(2)
|
return n.toFixed(2)
|
||||||
// const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
// const goodsTotalPrice = goods.list.reduce((prve, cur) => {
|
||||||
// return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
|
// return prve + cur.salePrice * cur.number * (cur.isGift ? 0 : 1)
|
||||||
@@ -510,7 +523,7 @@
|
|||||||
page: 0,
|
page: 0,
|
||||||
size: 300,
|
size: 300,
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId||''
|
tableId: table.value.tableId || ''
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
records,
|
records,
|
||||||
@@ -524,10 +537,10 @@
|
|||||||
}
|
}
|
||||||
goods.list = getNowCart(records)
|
goods.list = getNowCart(records)
|
||||||
if (seatFee && seatFee.totalNumber) {
|
if (seatFee && seatFee.totalNumber) {
|
||||||
userNumbers.defaultCateIndex = seatFee.totalNumber-1 || 0
|
userNumbers.defaultCateIndex = seatFee.totalNumber - 1 || 0
|
||||||
Object.assign($seatFee, seatFee)
|
Object.assign($seatFee, seatFee)
|
||||||
}else{
|
} else {
|
||||||
$seatFee.totalAmount=0
|
$seatFee.totalAmount = 0
|
||||||
}
|
}
|
||||||
console.log(userNumbers.defaultCateIndex);
|
console.log(userNumbers.defaultCateIndex);
|
||||||
}
|
}
|
||||||
@@ -550,20 +563,20 @@
|
|||||||
note: note.value,
|
note: note.value,
|
||||||
postPay: true,
|
postPay: true,
|
||||||
orderId: '',
|
orderId: '',
|
||||||
tableId: table.value.tableId||''
|
tableId: table.value.tableId || ''
|
||||||
}) {
|
}) {
|
||||||
if (!$shop.value.isTableFee) {
|
if (!$shop.value.isTableFee) {
|
||||||
//不免餐位费
|
//不免餐位费
|
||||||
await Api.$choseCount({
|
await Api.$choseCount({
|
||||||
masterId: option.masterId,
|
masterId: option.masterId,
|
||||||
tableId: table.value.tableId||"",
|
tableId: table.value.tableId || "",
|
||||||
num: userNumbers.defaultCateIndex+1,
|
num: userNumbers.defaultCateIndex + 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
if ($shop.value.registerType == 'munchies'||eatTypes.active=='takeout') {
|
if ($shop.value.registerType == 'munchies' || eatTypes.active == 'takeout') {
|
||||||
const canJiesuan=await hasPermission('允许收款')
|
const canJiesuan = await hasPermission('允许收款')
|
||||||
if(!canJiesuan){
|
if (!canJiesuan) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// updateChoseCount()
|
// updateChoseCount()
|
||||||
@@ -571,21 +584,20 @@
|
|||||||
uni.$emit('update:createOrderIndex')
|
uni.$emit('update:createOrderIndex')
|
||||||
console.log($shop.value);
|
console.log($shop.value);
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if ($shop.value.registerType == 'munchies'||eatTypes.active=='takeout') {
|
if ($shop.value.registerType == 'munchies' || eatTypes.active == 'takeout') {
|
||||||
//先付
|
//先付
|
||||||
return go.to('PAGES_ORDER_PAY', {
|
return go.to('PAGES_ORDER_PAY', {
|
||||||
orderId: res.id,
|
orderId: res.id,
|
||||||
isNowPay:true
|
isNowPay: true
|
||||||
},'redirect'
|
}, 'redirect')
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
//后付
|
//后付
|
||||||
console.log(option.isCreateOrderToDetail);
|
console.log(option.isCreateOrderToDetail);
|
||||||
if (option.isCreateOrderToDetail!='0') {
|
if (option.isCreateOrderToDetail != '0') {
|
||||||
console.log('PAGES_ORDER_DETAIL');
|
console.log('PAGES_ORDER_DETAIL');
|
||||||
go.to('PAGES_ORDER_DETAIL', {
|
go.to('PAGES_ORDER_DETAIL', {
|
||||||
id: res.id
|
id: res.id
|
||||||
},'redirect')
|
}, 'redirect')
|
||||||
} else {
|
} else {
|
||||||
console.log('back');
|
console.log('back');
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
@@ -616,7 +628,7 @@
|
|||||||
cartId: cart.id,
|
cartId: cart.id,
|
||||||
productId: cart.productId,
|
productId: cart.productId,
|
||||||
skuId: cart.skuId,
|
skuId: cart.skuId,
|
||||||
tableId: option.tableId||"",
|
tableId: option.tableId || "",
|
||||||
note: e.remark,
|
note: e.remark,
|
||||||
num: cart.number // 0会删除此商品
|
num: cart.number // 0会删除此商品
|
||||||
})
|
})
|
||||||
@@ -634,22 +646,27 @@
|
|||||||
|
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
Object.assign(option, opt)
|
Object.assign(option, opt)
|
||||||
console.log(option,);
|
console.log(opt);
|
||||||
if (opt) {
|
if (opt) {
|
||||||
table.value = {
|
table.value = {
|
||||||
tableId: opt.tableId||'',
|
...option,
|
||||||
|
tableId: opt.tableId || '',
|
||||||
name: opt.name
|
name: opt.name
|
||||||
}
|
}
|
||||||
|
userNumbers.list = new Array(opt.maxCapacity?opt.maxCapacity*1:100).fill(1).map((v, index) => {
|
||||||
|
return (index + 1) + '人'
|
||||||
|
})
|
||||||
|
// console.log(userNumbers.list);
|
||||||
}
|
}
|
||||||
init()
|
init()
|
||||||
|
|
||||||
// updateChoseCount()
|
// updateChoseCount()
|
||||||
})
|
})
|
||||||
let bottomHeight=ref(100)
|
let bottomHeight = ref(100)
|
||||||
onReady(()=>{
|
onReady(() => {
|
||||||
getSafeBottomHeight('safe-bottom').then(res=>{
|
getSafeBottomHeight('safe-bottom').then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
bottomHeight.value=res
|
bottomHeight.value = res
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -668,12 +685,12 @@
|
|||||||
uni.setStorageSync("useType", useType);
|
uni.setStorageSync("useType", useType);
|
||||||
}
|
}
|
||||||
const tableId = useType == 'takeout' ? undefined : table.value.tableId;
|
const tableId = useType == 'takeout' ? undefined : table.value.tableId;
|
||||||
if(!goods.list.length){
|
if (!goods.list.length) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const res = await Api.$changeUseType({
|
const res = await Api.$changeUseType({
|
||||||
useType,
|
useType,
|
||||||
tableId:tableId||'',
|
tableId: tableId || '',
|
||||||
cartIds: goods.list.map((v) => v.id),
|
cartIds: goods.list.map((v) => v.id),
|
||||||
})
|
})
|
||||||
getCart()
|
getCart()
|
||||||
@@ -712,6 +729,7 @@
|
|||||||
border-radius: 18rpx;
|
border-radius: 18rpx;
|
||||||
margin-bottom: 32rpx;
|
margin-bottom: 32rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea {
|
.textarea {
|
||||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
padding: 32rpx 0 32rpx 24rpx;
|
padding: 32rpx 0 32rpx 24rpx;
|
||||||
@@ -722,6 +740,7 @@
|
|||||||
.goods {
|
.goods {
|
||||||
// padding-bottom: 30rpx;
|
// padding-bottom: 30rpx;
|
||||||
border-bottom: 1px dashed #E5E5E5;
|
border-bottom: 1px dashed #E5E5E5;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
.img {
|
.img {
|
||||||
width: 84rpx;
|
width: 84rpx;
|
||||||
|
|||||||
@@ -448,21 +448,26 @@
|
|||||||
})
|
})
|
||||||
console.log(res);
|
console.log(res);
|
||||||
if (res && res.content[0]) {
|
if (res && res.content[0]) {
|
||||||
// data.table=res.content[0]
|
data.table={...res.content[0],...data.table}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let $originGoods = []
|
let $originGoods = []
|
||||||
let $category = []
|
let $category = []
|
||||||
async function init() {
|
async function init() {
|
||||||
const masterRes = await getMasterId()
|
if(option.type=='add'){
|
||||||
data.masterId = masterRes.masterId
|
data.masterId = option.masterId
|
||||||
|
setTabBar($category, $originGoods, [])
|
||||||
|
}else{
|
||||||
|
const masterRes = await getMasterId()
|
||||||
|
data.masterId = masterRes.masterId
|
||||||
|
}
|
||||||
const shopInfo = await tbShopInfo()
|
const shopInfo = await tbShopInfo()
|
||||||
$shop.value = shopInfo
|
$shop.value = shopInfo
|
||||||
const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
|
const useType = data.table.status == 'using' ? data.table.useType : $returnUseType(shopInfo)
|
||||||
uni.setStorageSync('useType', useType)
|
uni.setStorageSync('useType', useType)
|
||||||
console.log(shopInfo);
|
console.log(shopInfo);
|
||||||
getTableInfo()
|
await getTableInfo()
|
||||||
const categoryRes = await getCategory()
|
const categoryRes = await getCategory()
|
||||||
const category = categoryRes.content.reduce((prve, cur) => {
|
const category = categoryRes.content.reduce((prve, cur) => {
|
||||||
prve.push({
|
prve.push({
|
||||||
@@ -482,16 +487,24 @@
|
|||||||
return isShow;
|
return isShow;
|
||||||
});
|
});
|
||||||
$originGoods = goods
|
$originGoods = goods
|
||||||
if (!data.table.tableId) {
|
console.log(option);
|
||||||
//无桌台
|
if(option.type=='add'){
|
||||||
|
cars.length = 0
|
||||||
setTabBar(category, goods, [])
|
setTabBar(category, goods, [])
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const {
|
if (!data.table.tableId) {
|
||||||
masterId
|
//无桌台
|
||||||
} = await getMasterId()
|
const cartRes = await getCart()
|
||||||
data.masterId = masterId
|
cars.length = 0
|
||||||
|
const cartArr = getNowCart(cartRes.records)
|
||||||
|
for (let i in cartArr) {
|
||||||
|
cars.push(cartArr[i])
|
||||||
|
}
|
||||||
|
setTabBar(category, goods, cars)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const cartRes = await getCart()
|
const cartRes = await getCart()
|
||||||
cars.length = 0
|
cars.length = 0
|
||||||
const cartArr = getNowCart(cartRes.records)
|
const cartArr = getNowCart(cartRes.records)
|
||||||
@@ -1089,7 +1102,9 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
watch(() => data.table.tableId, (newval, oldval) => {
|
watch(() => data.table.tableId, (newval, oldval) => {
|
||||||
onSelTable()
|
if(option.type!='add'){
|
||||||
|
onSelTable()
|
||||||
|
}
|
||||||
})
|
})
|
||||||
async function onSelTable() {
|
async function onSelTable() {
|
||||||
const {
|
const {
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="default-box-padding bg-fff border-r-12 u-m-t-20" v-if="packeFee>0||data.totalAmount>0">
|
<view class="default-box-padding bg-fff border-r-12 u-m-t-20" v-if="packeFee>0||data.priceAmount>0">
|
||||||
<view class="u-flex u-row-between">
|
<view class="u-flex u-row-between">
|
||||||
<view class="font-bold">附加费</view>
|
<view class="font-bold">附加费</view>
|
||||||
<template v-if="orderInfo.status=='unpaid'&&data.status!='return'">
|
<template v-if="extraCanTuicai(orderInfo,data)">
|
||||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
|
<my-button plain shape="circle" :width="160" :height="56" @click="tuicai">退菜</my-button>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="orderInfo.status=='closed'&&data.status!='return'">
|
<template v-if=" extraCanTuiKuan(orderInfo,data)">
|
||||||
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
<my-button plain shape="circle" :width="160" :height="56" @click="tuikuan">退款</my-button>
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
<view>
|
<view>
|
||||||
<template v-if="data.status!='return'">
|
<template v-if="data.status!='return'&&data.status!='refund'&&data.status!='refunding'">
|
||||||
<view class="u-flex u-row-between u-m-t-24">
|
<view class="u-flex u-row-between u-m-t-24" v-if="data.priceAmount*1>0">
|
||||||
<view>{{data.name||'餐位费'}}</view>
|
<view>{{data.productName||'餐位费'}}</view>
|
||||||
<view>x{{data.number||0}}</view>
|
<view>x{{data.num||0}}</view>
|
||||||
<view class="price-min-width">¥{{data.totalAmount}}</view>
|
<view class="price-min-width">¥{{data.priceAmount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view class="u-flex u-row-between u-m-t-24 color-999">
|
<view class="u-flex u-row-between u-m-t-24 color-999">
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<view class="line-th ">{{data.name||'餐位费'}}</view>
|
<view class="line-th ">{{data.productName||'餐位费'}}</view>
|
||||||
<view class="tag yitui u-m-l-10">已退</view>
|
<view class="tag yitui u-m-l-10">{{data.status=='refunding'?'退款中': '已退'}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line-th">x{{data.number||0}}</view>
|
<view class="line-th">x{{data.num||0}}</view>
|
||||||
<view class="line-th">¥{{data.totalAmount}}</view>
|
<view class="line-th">¥{{data.priceAmount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<!-- <view class="u-flex u-row-right u-m-t-24">
|
<!-- <view class="u-flex u-row-right u-m-t-24">
|
||||||
@@ -49,6 +49,16 @@
|
|||||||
import {
|
import {
|
||||||
computed
|
computed
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
|
import {
|
||||||
|
returnCanComputedGoodsArr,canComputedPackFee,
|
||||||
|
returnPackFee
|
||||||
|
} from '@/commons/utils/goodsUtil.js'
|
||||||
|
function extraCanTuicai(orderInfo,data){
|
||||||
|
return orderInfo.status=='unpaid'&&data.status!='return'&&data.priceAmount*1>0
|
||||||
|
}
|
||||||
|
function extraCanTuiKuan(orderInfo,data){
|
||||||
|
return orderInfo.status=='closed'&&data.status!='return'&&data.priceAmount*1>0
|
||||||
|
}
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -72,16 +82,16 @@
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return props.orderInfo.detailList.reduce((prve, cur) => {
|
return props.orderInfo.detailList.reduce((prve, cur) => {
|
||||||
return prve + (cur.packAmount>0?cur.num:0)
|
return prve + (cur.packAmount > 0 ? cur.num : 0)
|
||||||
}, 0)
|
}, 0)
|
||||||
})
|
})
|
||||||
const packeFee = computed(() => {
|
const packeFee = computed(() => {
|
||||||
if (!props.orderInfo.detailList) {
|
if (!props.orderInfo.detailList) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
return props.orderInfo.detailList.reduce((prve, cur) => {
|
const arr = returnCanComputedGoodsArr(props.orderInfo.detailList)
|
||||||
return prve + cur.packAmount
|
console.log(arr);
|
||||||
}, 0).toFixed(2)
|
return returnPackFee(arr)
|
||||||
})
|
})
|
||||||
|
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
@@ -113,7 +123,8 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.price-min-width{
|
|
||||||
|
.price-min-width {
|
||||||
min-width: 100rpx;
|
min-width: 100rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
|
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="u-flex">
|
<view class="u-flex">
|
||||||
<view class="tui" v-if="item.status=='return'||item.status=='refund'">
|
<view class="tui" v-if="isTui(item)">
|
||||||
已退
|
{{item.status=='refunding'?'退款中':'已退'}}
|
||||||
</view>
|
</view>
|
||||||
<view :class="{'line-th':item.status=='return'||item.status=='refund'}">{{item.name||item.productName}}
|
<view :class="{'line-th':item.status=='return'||item.status=='refund'||item.status=='refunding'}">{{item.name||item.productName}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-8">
|
<view class="u-flex u-m-t-8">
|
||||||
@@ -49,7 +49,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-text-right u-m-t-28">
|
<view class="u-text-right u-m-t-28">
|
||||||
<template v-if="item.status=='return'||item.gift||item.status=='refund'">
|
<template v-if="isTui(item)">
|
||||||
<view>¥0.00</view>
|
<view>¥0.00</view>
|
||||||
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}
|
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}
|
||||||
</view>
|
</view>
|
||||||
@@ -62,20 +62,18 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<template v-if="orderInfo.status=='unpaid'&&orderInfo.useType!='dine-in-before'">
|
<template v-if="canTuicai(orderInfo,item)">
|
||||||
<view class="u-flex u-row-right gap-20 u-m-t-24" v-if="item.status!='return'">
|
<view class="u-flex u-row-right gap-20 u-m-t-24">
|
||||||
<!-- <my-button :height="60" color="#333" plain type="cancel" shape="circle">更多操作</my-button> -->
|
<!-- <my-button :height="60" color="#333" plain type="cancel" shape="circle">更多操作</my-button> -->
|
||||||
<my-button :width="128" :height="48" plain shape="circle" @tap="tuicai(item,index)"><text
|
<my-button :width="128" :height="48" plain shape="circle" @tap="tuicai(item,index)"><text
|
||||||
class="no-wrap">退菜</text></my-button>
|
class="no-wrap">退菜</text></my-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="item.status!='refund'&&!item.gift">
|
<template v-if="canTuiKuan(orderInfo,item)">
|
||||||
<template v-if="orderInfo.status=='closed'||orderInfo.status=='refund'">
|
<view class="u-flex u-row-right gap-20 u-m-t-20">
|
||||||
<view class="u-flex u-row-right gap-20 u-m-t-20" v-if="item.status!='return'">
|
|
||||||
<my-button :width="128" :height="48" plain shape="circle"
|
<my-button :width="128" :height="48" plain shape="circle"
|
||||||
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
@tap="tuikuan(item,index)"><text class="no-wrap">退款</text> </my-button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@@ -131,6 +129,7 @@
|
|||||||
<view></view>
|
<view></view>
|
||||||
<view>
|
<view>
|
||||||
<text>总计¥</text>
|
<text>总计¥</text>
|
||||||
|
<!-- <text class="font-bold u-font-32">{{numSum([allPrice,seatFeePrice,packFee]) }}</text> -->
|
||||||
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}</text>
|
<text class="font-bold u-font-32">{{to2(allPrice*1+seatFeePrice*1+packFee*1) }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -149,6 +148,7 @@
|
|||||||
import {
|
import {
|
||||||
hasPermission
|
hasPermission
|
||||||
} from '@/commons/utils/hasPermission.js'
|
} from '@/commons/utils/hasPermission.js'
|
||||||
|
import {isTui,canTuiKuan,canTuicai,numSum} from '@/commons/utils/goodsUtil.js'
|
||||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||||
|
|
||||||
function returnTotalMoney(item) {
|
function returnTotalMoney(item) {
|
||||||
@@ -193,10 +193,10 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
const seatFeePrice = computed(() => {
|
const seatFeePrice = computed(() => {
|
||||||
if (!props.seatFee.totalAmount) {
|
if (!props.seatFee.priceAmount) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
const n = props.seatFee.totalAmount * (props.seatFee.status == 'return' ? 0 : 1)
|
const n = props.seatFee.priceAmount * (props.seatFee.status == 'return' ? 0 : 1)
|
||||||
return n.toFixed(2)
|
return n.toFixed(2)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -26,11 +26,21 @@
|
|||||||
</view> -->
|
</view> -->
|
||||||
<view class="u-flex u-row-between u-m-t-24">
|
<view class="u-flex u-row-between u-m-t-24">
|
||||||
<view>下单时间</view>
|
<view>下单时间</view>
|
||||||
<view><up-text v-if="data.createdAt" mode="date" format="yyyy-mm-dd hh:MM:ss" :text="data.createdAt"></up-text></view>
|
<view><up-text v-if="data.createdAt" mode="date" format="yyyy-mm-dd hh:MM:ss"
|
||||||
|
:text="data.createdAt"></up-text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between u-m-t-24">
|
<view class="u-flex u-row-between u-m-t-24">
|
||||||
<view>订单编号</view>
|
<view>订单编号</view>
|
||||||
<view>{{data.orderNo}}</view>
|
<view class="u-flex">
|
||||||
|
<view>{{data.orderNo}}</view>
|
||||||
|
<view v-if="data.orderNo" class="u-m-l-6">
|
||||||
|
<up-copy :content="data.orderNo" >
|
||||||
|
<up-icon name="/static/copy.svg" :size="16"></up-icon>
|
||||||
|
</up-copy>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-between u-m-t-24 u-col-top">
|
<view class="u-flex u-row-between u-m-t-24 u-col-top">
|
||||||
<view class="no-wrap">商家备注</view>
|
<view class="no-wrap">商家备注</view>
|
||||||
|
|||||||
@@ -5,21 +5,24 @@
|
|||||||
<view>
|
<view>
|
||||||
{{data.productName}}
|
{{data.productName}}
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-m-t-32">
|
<view class="u-flex u-m-t-32" :class="{'gray':data.productId=='-999'}">
|
||||||
<up-number-box :min="1" :max="data.num" :buttonSize="44" v-model="number" integer>
|
<up-number-box :min="1" :max="data.num" :buttonSize="44" v-model="number" integer :disabled="data.productId=='-999'">
|
||||||
<template #minus>
|
<template #minus>
|
||||||
<view class="minus number-box-btn">
|
<view class="minus number-box-btn">
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #input>
|
<template #input>
|
||||||
<view class="u-flex-1 u-row-center u-text-center input">
|
<view class="u-flex-1 u-row-center u-text-center input">
|
||||||
<up-input @change="parseIntNumber($event,false)" @blur="parseIntNumber($event,true)"
|
<up-input
|
||||||
|
:disabled="data.productId=='-999'"
|
||||||
|
@change="parseIntNumber($event,false)" @blur="parseIntNumber($event,true)"
|
||||||
v-model="number" border="none" type="number"></up-input>
|
v-model="number" border="none" type="number"></up-input>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<template #plus>
|
<template #plus>
|
||||||
<view class="plus number-box-btn">
|
<view class="plus number-box-btn">
|
||||||
<up-icon name="plus" color="#999" size="16" bold></up-icon>
|
<up-icon v-if="data.productId=='-999'" name="plus" color="#ccc" size="16" bold></up-icon>
|
||||||
|
<up-icon v-else name="plus" color="#999" size="16" bold></up-icon>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</up-number-box>
|
</up-number-box>
|
||||||
@@ -66,7 +69,11 @@
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => {}
|
default: () => {
|
||||||
|
return {
|
||||||
|
productId:'-999'
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
show: {
|
show: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
@@ -143,10 +150,17 @@
|
|||||||
|
|
||||||
function open() {
|
function open() {
|
||||||
model.value.open()
|
model.value.open()
|
||||||
|
if(props.data.productId=='-999'){
|
||||||
|
number.value=props.data.num
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
model.value.close()
|
model.value.close()
|
||||||
|
tags.value.map(v=>{
|
||||||
|
v.checked=false
|
||||||
|
})
|
||||||
|
form.note=''
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirm() {
|
function confirm() {
|
||||||
@@ -191,7 +205,12 @@
|
|||||||
::v-deep .uni-input-input {
|
::v-deep .uni-input-input {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.gray{
|
||||||
|
.minus::after{
|
||||||
|
border-color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
.minus {
|
.minus {
|
||||||
&::after {
|
&::after {
|
||||||
content: '';
|
content: '';
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
function onSeatFeeTuicai(seatFee) {
|
function onSeatFeeTuicai(seatFee) {
|
||||||
seatFee={...seatFee,num:seatFee.number,productName:seatFee.name}
|
seatFee={...seatFee,num:seatFee.num,productName:seatFee.productName}
|
||||||
console.log(seatFee);
|
console.log(seatFee);
|
||||||
tuicai.show = true
|
tuicai.show = true
|
||||||
tuicai.isSeatFee = seatFee
|
tuicai.isSeatFee = seatFee
|
||||||
@@ -94,26 +94,26 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const {
|
const {
|
||||||
id,
|
id,cartId,
|
||||||
productId,
|
productId,
|
||||||
productSkuId,
|
productSkuId,
|
||||||
name,
|
productName,
|
||||||
cartId,
|
num,
|
||||||
number,
|
priceAmount,
|
||||||
totalAmount,
|
price
|
||||||
salePrice
|
|
||||||
} = seatFee
|
} = seatFee
|
||||||
go.to('PAGES_ORDER_TUIKUAN', {
|
go.to('PAGES_ORDER_TUIKUAN', {
|
||||||
orderId:orderDetail.info.id,
|
orderId:orderDetail.info.id,
|
||||||
id:seatFee.id,
|
id,
|
||||||
|
cartId,
|
||||||
productId,
|
productId,
|
||||||
productSkuId,
|
productSkuId,
|
||||||
productName:name,
|
productName,
|
||||||
num:number,
|
num,
|
||||||
number: 0,
|
number: 0,
|
||||||
productSkuName: '',
|
productSkuName: '',
|
||||||
priceAmount:totalAmount,
|
priceAmount,
|
||||||
price:salePrice
|
price
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -211,6 +211,7 @@
|
|||||||
go.to('PAGES_CREATE_ORDER', {
|
go.to('PAGES_CREATE_ORDER', {
|
||||||
tableId: options.tableId || orderDetail.info.tableId,
|
tableId: options.tableId || orderDetail.info.tableId,
|
||||||
name: options.name || orderDetail.info.tableName,
|
name: options.name || orderDetail.info.tableName,
|
||||||
|
masterId:orderDetail.info.masterId,
|
||||||
type: 'add'
|
type: 'add'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -282,12 +283,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
console.log(res.seatInfo);
|
||||||
orderDetail.seatFee = res.seatInfo|| {
|
orderDetail.seatFee = res.seatInfo|| {
|
||||||
name: '客座费',
|
// name: '客座费',
|
||||||
number: res.seatCount,
|
// number: res.seatCount,
|
||||||
totalNumber: res.seatCount,
|
// num: res.seatCount,
|
||||||
totalAmount: res.seatAmount,
|
// totalNumber: res.seatCount,
|
||||||
status:''
|
// priceAmount: res.seatAmount,
|
||||||
|
// status:'',
|
||||||
|
totalNumber:0,
|
||||||
}
|
}
|
||||||
orderDetail.goodsList = Object.entries(goodsMap).map(([key, value]) => ({
|
orderDetail.goodsList = Object.entries(goodsMap).map(([key, value]) => ({
|
||||||
info: value,
|
info: value,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[1]"></uni-dateformat>
|
<uni-dateformat format="yyyy-MM-dd hh:mm:ss" :date="time[1]"></uni-dateformat>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker"></my-date-pickerview>
|
<my-date-pickerview @confirm="datePickerConfirm" ref="datePicker" mode="all"></my-date-pickerview>
|
||||||
<!-- 更多状态选择筛选 -->
|
<!-- 更多状态选择筛选 -->
|
||||||
<up-popup :round="10" :show="statusData.moreShow" :closeable="true" @close="moreShowHide">
|
<up-popup :round="10" :show="statusData.moreShow" :closeable="true" @close="moreShowHide">
|
||||||
<view class="u-text-center font-bold u-font-32 u-p-t-30">选择状态</view>
|
<view class="u-text-center font-bold u-font-32 u-p-t-30">选择状态</view>
|
||||||
|
|||||||
@@ -59,6 +59,7 @@
|
|||||||
<view class="no-wrap u-m-r-32">打包费</view>
|
<view class="no-wrap u-m-r-32">打包费</view>
|
||||||
<view>¥{{data.packFee||0}}</view>
|
<view>¥{{data.packFee||0}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view style="height: 32rpx;" v-if="data.packFee>0&&data.seatInfo&&data.seatInfo.priceAmount>0"></view>
|
||||||
<view class="u-flex u-row-between u-col-top" v-if="data.seatInfo&&data.seatInfo.priceAmount>0">
|
<view class="u-flex u-row-between u-col-top" v-if="data.seatInfo&&data.seatInfo.priceAmount>0">
|
||||||
<view class="no-wrap u-m-r-32">{{data.seatInfo.productName}}</view>
|
<view class="no-wrap u-m-r-32">{{data.seatInfo.productName}}</view>
|
||||||
<view>¥{{data.seatInfo.priceAmount}}</view>
|
<view>¥{{data.seatInfo.priceAmount}}</view>
|
||||||
@@ -72,7 +73,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-32">
|
<view class="u-m-t-32">
|
||||||
<view class="u-flex u-row-right">
|
<view class="u-flex u-row-right">
|
||||||
<text>小计¥</text>
|
<text>总计¥</text>
|
||||||
<text class="font-bold u-font-32">{{data.orderAmount}}</text>
|
<text class="font-bold u-font-32">{{data.orderAmount}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-row-right u-m-t-24">
|
<view class="u-flex u-row-right u-m-t-24">
|
||||||
@@ -87,6 +88,7 @@
|
|||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import orderEnum from '@/commons/orderEnum.js'
|
import orderEnum from '@/commons/orderEnum.js'
|
||||||
import go from '@/commons/utils/go.js'
|
import go from '@/commons/utils/go.js'
|
||||||
|
import {isTui,canTuiKuan,canTuicai} from '@/commons/utils/goodsUtil.js'
|
||||||
import {
|
import {
|
||||||
computed,
|
computed,
|
||||||
reactive,
|
reactive,
|
||||||
@@ -119,7 +121,7 @@
|
|||||||
|
|
||||||
const priceSize = 9
|
const priceSize = 9
|
||||||
function goodsPriceAmount(item){
|
function goodsPriceAmount(item){
|
||||||
return item.price*item.num
|
return (item.price*item.num).toFixed(2)
|
||||||
}
|
}
|
||||||
// const packeFee=computed(()=>{
|
// const packeFee=computed(()=>{
|
||||||
// return props.data.detailList.reduce((prve,cur)=>{
|
// return props.data.detailList.reduce((prve,cur)=>{
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
<view class="bg-fff u-p-24 border-r-12 u-flex u-row-between">
|
<view class="bg-fff u-p-24 border-r-12 u-flex u-row-between">
|
||||||
<view>全退</view>
|
<view>全退</view>
|
||||||
<view>
|
<view>
|
||||||
<my-radio v-model="allTui"></my-radio>
|
<my-radio v-model="allTui" :disabled="option.productId=='-999'"></my-radio>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="u-m-t-24 u-font-24 u-font-24">
|
||||||
|
<text class="color-red">*</text>
|
||||||
|
<text>客座费只能全退</text>
|
||||||
|
</view>
|
||||||
<view class="bg-fff border-r-12 list u-m-t-32">
|
<view class="bg-fff border-r-12 list u-m-t-32">
|
||||||
<view class="u-flex u-row-between border-top item u-p-t-32 u-p-b-32"
|
<view class="u-flex u-row-between border-top item u-p-t-32 u-p-b-32"
|
||||||
v-for="(item,index) in orderDetail.goodsList" :key="index">
|
v-for="(item,index) in orderDetail.goodsList" :key="index">
|
||||||
@@ -14,15 +18,25 @@
|
|||||||
<view class="u-m-t-10 color-999 u-font-24">{{item.productSkuName||""}}</view>
|
<view class="u-m-t-10 color-999 u-font-24">{{item.productSkuName||""}}</view>
|
||||||
<view class="u-m-t-10 color-999 u-font-24">最多可退×{{item.num}}</view>
|
<view class="u-m-t-10 color-999 u-font-24">最多可退×{{item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex">
|
<template v-if="option.productId=='-999'">
|
||||||
<view class="color-red">¥{{item.priceAmount}}</view>
|
<view class="u-flex">
|
||||||
<view class="u-flex u-m-l-32 u-col-center">
|
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||||
<up-icon @click="changeItem(item,-1)" :size="20" name="minus-circle"></up-icon>
|
<view class="u-flex u-m-l-32 u-col-center">
|
||||||
<view class="u-m-l-28 u-m-r-28">{{item.number}}</view>
|
<view class="u-m-l-28 u-m-r-28">x{{item.number}}</view>
|
||||||
<up-icon @click="changeItem(item,1)" :color="color.ColorMain" :size="20"
|
</view>
|
||||||
name="plus-circle-fill"></up-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view class="u-flex">
|
||||||
|
<view class="color-red">¥{{item.priceAmount}}</view>
|
||||||
|
<view class="u-flex u-m-l-32 u-col-center">
|
||||||
|
<up-icon @click="changeItem(item,-1)" :size="20" name="minus-circle"></up-icon>
|
||||||
|
<view class="u-m-l-28 u-m-r-28">{{item.number}}</view>
|
||||||
|
<up-icon @click="changeItem(item,1)" :color="color.ColorMain" :size="20"
|
||||||
|
name="plus-circle-fill"></up-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between">
|
<view class="bg-fff u-m-t-32 u-p-24 border-r-12 u-flex u-row-between">
|
||||||
@@ -139,6 +153,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function changeItem(item, step) {
|
function changeItem(item, step) {
|
||||||
|
if(item.productId=='-999'){
|
||||||
|
return
|
||||||
|
}
|
||||||
console.log(item);
|
console.log(item);
|
||||||
let newval = item.number * 1 + step * 1;
|
let newval = item.number * 1 + step * 1;
|
||||||
if (newval <= 0) {
|
if (newval <= 0) {
|
||||||
@@ -179,9 +196,14 @@
|
|||||||
uni.navigateBack({delta:1})
|
uni.navigateBack({delta:1})
|
||||||
},500)
|
},500)
|
||||||
}
|
}
|
||||||
const option=reactive({})
|
const option=reactive({
|
||||||
|
productId:'-999'
|
||||||
|
})
|
||||||
onLoad((opt) => {
|
onLoad((opt) => {
|
||||||
Object.assign(option,opt)
|
Object.assign(option,opt)
|
||||||
|
if(opt.productId=='-999'){
|
||||||
|
allTui.value=true
|
||||||
|
}
|
||||||
if (Array.isArray(opt)) {
|
if (Array.isArray(opt)) {
|
||||||
orderDetail.goodsList = opt
|
orderDetail.goodsList = opt
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
1
static/copy.svg
Normal file
1
static/copy.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1730281062594" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4292" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M394.666667 106.666667h448a74.666667 74.666667 0 0 1 74.666666 74.666666v448a74.666667 74.666667 0 0 1-74.666666 74.666667H394.666667a74.666667 74.666667 0 0 1-74.666667-74.666667V181.333333a74.666667 74.666667 0 0 1 74.666667-74.666666z m0 64a10.666667 10.666667 0 0 0-10.666667 10.666666v448a10.666667 10.666667 0 0 0 10.666667 10.666667h448a10.666667 10.666667 0 0 0 10.666666-10.666667V181.333333a10.666667 10.666667 0 0 0-10.666666-10.666666H394.666667z m245.333333 597.333333a32 32 0 0 1 64 0v74.666667a74.666667 74.666667 0 0 1-74.666667 74.666666H181.333333a74.666667 74.666667 0 0 1-74.666666-74.666666V394.666667a74.666667 74.666667 0 0 1 74.666666-74.666667h74.666667a32 32 0 0 1 0 64h-74.666667a10.666667 10.666667 0 0 0-10.666666 10.666667v448a10.666667 10.666667 0 0 0 10.666666 10.666666h448a10.666667 10.666667 0 0 0 10.666667-10.666666v-74.666667z" fill="#8a8a8a" p-id="4293"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
Reference in New Issue
Block a user