Merge branch 'wwz' of gitee.com:shaanxi-super-shopkeeper_1/cashierdesktop into gyq
This commit is contained in:
commit
4983ae1664
|
|
@ -24,4 +24,16 @@ export function orderorderDetail(params) {
|
|||
params
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 退单
|
||||
* @param {*} params
|
||||
* @returns
|
||||
*/
|
||||
export function payreturnOrder(data) {
|
||||
return request({
|
||||
method: "post",
|
||||
url: "pay/returnOrder",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@
|
|||
</div> -->
|
||||
</div>
|
||||
<div class="orderbox_right_input" style="margin-top:20px ;" v-if="props.membershow == '1'">
|
||||
<el-input placeholder="请输入会员手机号或者编号" v-model="tableData.phone" clearable @input="inputChange"></el-input>
|
||||
<el-input placeholder="请输入会员手机号或者编号" v-model="tableData.phone" clearable
|
||||
@input="inputChange"></el-input>
|
||||
</div>
|
||||
<keyboard v-if="props.membershow == '1'" @consumeFees="consumeFees"></keyboard>
|
||||
<div class="orderbox_right_button" v-if="props.membershow == '0'">
|
||||
|
|
@ -107,7 +108,8 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="生日" prop="birthDay">
|
||||
<el-col :span="11">
|
||||
<el-date-picker v-model="membrform.birthDay" type="date" placeholder="请选择生日" style="width: 100%" />
|
||||
<el-date-picker v-model="membrform.birthDay" type="date" placeholder="请选择生日"
|
||||
style="width: 100%" />
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="sex">
|
||||
|
|
@ -167,10 +169,13 @@ import add from '@/views/member/components/add.vue'
|
|||
import cwxeyboard from '@/components/cwx-keyboard/cwx-keyboard.vue'
|
||||
import keyboard from '@/views/home/components/keyboard.vue'
|
||||
const store = useUser()
|
||||
|
||||
const stored = ref(false)//储值余额
|
||||
|
||||
const handleClose = async () => {
|
||||
stored.value = !stored.value
|
||||
}
|
||||
|
||||
const props = defineProps({//首页传值
|
||||
membershow: {
|
||||
type: String,
|
||||
|
|
@ -181,17 +186,20 @@ const props = defineProps({//首页传值
|
|||
default: '提示'
|
||||
}
|
||||
})
|
||||
|
||||
const flowingwater = reactive({//获取流水初始化
|
||||
total: '',
|
||||
list: []
|
||||
})
|
||||
|
||||
const consumeFee = (e) => { //接收子组件值 并赋值给父组件
|
||||
moneys.value = e
|
||||
}
|
||||
|
||||
const consumeFees = (e) => {
|
||||
tableData.phone = e
|
||||
|
||||
}
|
||||
|
||||
const confirmEvent = async () => {//子组件 确认按钮
|
||||
try {
|
||||
let res = await accountPaymember({
|
||||
|
|
@ -212,6 +220,7 @@ const confirmEvent = async () => {//子组件 确认按钮
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
const MemberAccount = async () => {//获取流水
|
||||
try {
|
||||
let res = await memberqueryMemberAccount({
|
||||
|
|
@ -228,11 +237,15 @@ const MemberAccount = async () => {//获取流水
|
|||
})
|
||||
}
|
||||
}
|
||||
|
||||
const recharge = ref(false)//充值
|
||||
|
||||
const memberaddshow = ref(false) //添加会员
|
||||
|
||||
const memberaddshowclose = () => {
|
||||
memberaddshow.value = !memberaddshow.value
|
||||
}
|
||||
|
||||
const tableData = reactive({//表格数据
|
||||
list: [{
|
||||
name: "",
|
||||
|
|
@ -247,9 +260,11 @@ const tableData = reactive({//表格数据
|
|||
phone: '',
|
||||
total: ''
|
||||
})
|
||||
|
||||
const inputChange = lodash.debounce(function () { //搜索手机号
|
||||
asyncqueryMembermember()
|
||||
}, 500)
|
||||
|
||||
const asyncqueryMembermember = async () => {//会员列表数据
|
||||
let res = await queryMembermember({
|
||||
shopId: store.userInfo.shopId,
|
||||
|
|
@ -263,25 +278,31 @@ const asyncqueryMembermember = async () => {//会员列表数据
|
|||
MemberAccount()
|
||||
}
|
||||
}
|
||||
|
||||
const tableRowClassName = ({ row, rowIndex }) => {//动态给tab加样式
|
||||
if (rowIndex === datarow.value) {
|
||||
return 'warning-row'
|
||||
} return ''
|
||||
}
|
||||
|
||||
const datarow = ref(0) //初始化右边
|
||||
const cellclicktableData = (row, column, cell, event) => {
|
||||
const index = tableData.list.findIndex(item => item.id == row.id)
|
||||
datarow.value = index
|
||||
}
|
||||
|
||||
const handleCurrentChange = (val) => { //页码
|
||||
tableData.page = val
|
||||
datarow.value = 0
|
||||
asyncqueryMembermember()
|
||||
}
|
||||
|
||||
const handlerecharge = () => {
|
||||
recharge.value = !recharge.value
|
||||
}
|
||||
|
||||
const resetMembrform = ref({})
|
||||
|
||||
const membrform = ref({ //membrform 添加会员表单
|
||||
phone: '',
|
||||
nickName: '',
|
||||
|
|
@ -290,7 +311,9 @@ const membrform = ref({ //membrform 添加会员表单
|
|||
sex: '',
|
||||
level: ''
|
||||
})
|
||||
|
||||
const formRef = ref(null); //ref membrform
|
||||
|
||||
const rules = reactive({ // membrform验证
|
||||
phone: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,9 +4,8 @@
|
|||
<el-tabs v-model="ordereData.status" class="demo-tabs" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部" name="closed">
|
||||
<div class="demo_tabs_div">
|
||||
<el-input v-model="ordereData.ordernumbr" placeholder="请输入订单号查询" @input="inputChange"
|
||||
clearable />
|
||||
<el-button style="margin-left: 10px;" type="primary" @click="onSubmit">搜索</el-button>
|
||||
<el-input v-model="ordereData.orderNo" placeholder="请输入订单号查询" @input="inputChange" clearable />
|
||||
<!-- <el-button style="margin-left: 10px;" type="primary" @click="onSubmit">搜索</el-button> -->
|
||||
</div>
|
||||
<add :ordereData="ordereData" @emititemboxshow="emititemboxshow" v-if="ordereData.list.length">
|
||||
</add>
|
||||
|
|
@ -31,7 +30,7 @@
|
|||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="orderbox_right" v-if="itemboxshow">
|
||||
<div class="orderbox_right" v-if="itemboxshow" v-loading="orderDetaildata.loading">
|
||||
<div class="orderbox_right_top">
|
||||
<span>堂食订单</span>
|
||||
<el-icon :size="32" style="color: var(--primary-color) ;" @click="itemboxshow = false">
|
||||
|
|
@ -90,11 +89,12 @@
|
|||
<div class="orderbox_right_button">
|
||||
<div class="orderbox_right_buttonbutton">
|
||||
<router-link to="/" style="width: 45%;">
|
||||
<el-button style="width: 100%;" type="primary">点单</el-button>
|
||||
<el-button style="width: 100%;" type="primary">打票</el-button>
|
||||
</router-link>
|
||||
<el-button style="width: 45%;" type="danger" @click="onSubmit">取消</el-button>
|
||||
<el-button style="width: 45%;" type="danger" @click="payreturnOrderclick">退单</el-button>
|
||||
<!-- @click="recharge = true" -->
|
||||
</div>
|
||||
<el-button style="width: 100%; margin-top: 10px;" type="primary" @click="onSubmit">结算</el-button>
|
||||
<!-- <el-button style="width: 100%; margin-top: 10px;" type="primary" @click="onSubmit">结算</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="orderbox_rightbox" v-else>
|
||||
|
|
@ -135,7 +135,19 @@
|
|||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- <el-dialog v-model="recharge" title="退单" width="800" :before-close="handlerecharge">
|
||||
<div class="recharge_footer">
|
||||
<div class="recharge_footer_item">
|
||||
<el-input v-model="textarea" style="width: 100%" :rows="2" type="textarea"
|
||||
placeholder="Please input" />
|
||||
<div class="recharge_footer_items">
|
||||
<div>顾客取消</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="recharge_footer_itemright">
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -144,25 +156,38 @@ import { ref, onMounted, reactive } from 'vue'
|
|||
import { ElMessage, dayjs } from 'element-plus'
|
||||
import { useUser } from "@/store/user.js"
|
||||
import lodash from 'lodash'
|
||||
import { orderfindOrder, orderorderDetail } from '@/api/order/index.js'
|
||||
import { orderfindOrder, orderorderDetail, payreturnOrder } from '@/api/order/index.js'
|
||||
import add from '@/views/order/components/add.vue'
|
||||
const store = useUser()
|
||||
const itemboxshow = ref(false)
|
||||
const drawershow = ref(true)
|
||||
const handleClick = (Name) => {//切换teb
|
||||
ordereData.status = Name.props.name
|
||||
asyncorderfindOrder()
|
||||
}
|
||||
const firstinput = ref('')//搜索输入框
|
||||
const onSubmit = () => {
|
||||
if (firstinput.value) {
|
||||
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '请输入订单号查询',
|
||||
type: 'warning',
|
||||
const recharge = ref(true)//退单切换
|
||||
|
||||
const handlerecharge = () => {
|
||||
recharge.value = !recharge.value
|
||||
}
|
||||
|
||||
const payreturnOrderclick = async () => {
|
||||
try {
|
||||
let result = orderDetaildata.value.detailList.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
orderId: orderDetaildata.value.id
|
||||
}
|
||||
})
|
||||
await payreturnOrder(result)
|
||||
asyncorderfindOrder()
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组件
|
||||
try {
|
||||
let res = await orderorderDetail({
|
||||
|
|
@ -177,7 +202,7 @@ const emititemboxshow = async (e) => { //接收子组件值 并赋值给父组
|
|||
}
|
||||
}
|
||||
const orderDetaildata = ref({//详情数据
|
||||
|
||||
// loading
|
||||
})
|
||||
const ordereData = reactive({//表格数据
|
||||
list: [{
|
||||
|
|
@ -193,7 +218,6 @@ const ordereData = reactive({//表格数据
|
|||
status: 'closed',
|
||||
total: '',
|
||||
orderNo: '',
|
||||
ordernumbr: ''
|
||||
})
|
||||
const asyncorderfindOrder = async () => {//获取流水
|
||||
try {
|
||||
|
|
@ -202,7 +226,7 @@ const asyncorderfindOrder = async () => {//获取流水
|
|||
status: ordereData.status,
|
||||
size: ordereData.size,
|
||||
page: ordereData.page,
|
||||
ordernumbr: ordereData.ordernumbr
|
||||
orderNo: ordereData.orderNo
|
||||
})
|
||||
ordereData.total = res.total
|
||||
ordereData.list = res.list
|
||||
|
|
@ -378,6 +402,161 @@ onMounted(() => {
|
|||
|
||||
}
|
||||
|
||||
.recharge_footer {
|
||||
|
||||
// display: flex;
|
||||
// justify-content: space-between;
|
||||
.recharge_footer_item {
|
||||
background: #f2f2f2;
|
||||
width: 60%;
|
||||
background: #f2f2f2;
|
||||
border-radius: 10px;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-flow: wrap;
|
||||
|
||||
.recharge_footer_items {
|
||||
// background: #187ead;
|
||||
border: 1px solid #187ead;
|
||||
padding: 16px 22px;
|
||||
width: 30%;
|
||||
color: #187ead;
|
||||
height: fit-content;
|
||||
text-align: center;
|
||||
border-radius: 10px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.recharge_footer_itemright {
|
||||
padding-left: 20px;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
.recharge_footer_itemright_input {
|
||||
width: 100%;
|
||||
background: #333333;
|
||||
border-radius: 10px;
|
||||
padding: 0 6px;
|
||||
display: flex;
|
||||
height: 60px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
div:nth-child(1) {
|
||||
color: #56792e;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
div:nth-child(2) {
|
||||
color: #88937c;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.keyboard {
|
||||
width: 100%;
|
||||
height: 40vh;
|
||||
background: #FFFFFF;
|
||||
|
||||
.key-row {
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
position: relative;
|
||||
height: 10vh;
|
||||
line-height: 10vh;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.keyboard .key-cell {
|
||||
flex: 1;
|
||||
-webkit-box-flex: 1;
|
||||
font-size: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.keyboard .key-confirm {
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
height: 30vh;
|
||||
width: 25%;
|
||||
line-height: 30vh;
|
||||
color: #FFFFFF;
|
||||
z-index: 5;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.keyboard .key-confirm2 {
|
||||
position: absolute;
|
||||
height: 10vh;
|
||||
width: 25%;
|
||||
line-height: 10vh;
|
||||
z-index: 9999;
|
||||
right: 0;
|
||||
top: 60px;
|
||||
font-size: 30px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.key-zero-and-point {
|
||||
display: flex;
|
||||
height: 10vh;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 75%;
|
||||
font-size: 30px;
|
||||
|
||||
.zero {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 66.66%;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.point {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 33.33%;
|
||||
font-size: 30px;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.key-cell:active {
|
||||
color: white;
|
||||
background: black; //黑色
|
||||
opacity: 0.1; //这里重要,就是通过这个透明度来设置
|
||||
}
|
||||
|
||||
.a:active,
|
||||
.key-confirm2:active {
|
||||
color: white;
|
||||
background: black; //黑色
|
||||
opacity: 0.1; //这里重要,就是通过这个透明度来设置
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.orderbox_right {
|
||||
position: relative;
|
||||
width: 40%;
|
||||
|
|
|
|||
Loading…
Reference in New Issue