增加抖音美团核销
This commit is contained in:
parent
80d211ced7
commit
42b61fbfa1
|
|
@ -1,13 +1,17 @@
|
|||
// 代客下单
|
||||
import request from "@/utils/request-php";
|
||||
|
||||
import { getToken } from '@/utils/auth'
|
||||
function getLoginName() {
|
||||
const obj = localStorage.getItem("userInfo") || '';
|
||||
const { username } = obj ? JSON.parse(obj) : {};
|
||||
return username
|
||||
}
|
||||
// 抖音团购核销准备
|
||||
export function $douyin_fulfilmentcertificateprepare(data) {
|
||||
return request({
|
||||
url: 'douyin/fulfilmentcertificateprepare',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -18,7 +22,7 @@ export function $douyin_certificateprepare(data) {
|
|||
url: 'douyin/certificateprepare',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -30,7 +34,6 @@ export function $douyin_fulfilmentcertificatecancel(data) {
|
|||
url: 'douyin/fulfilmentcertificatecancel',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -41,7 +44,7 @@ export function $douyin_orderlist(data) {
|
|||
url: 'douyin/orderlist',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -54,7 +57,7 @@ export function $douyin_storelist(data) {
|
|||
url: 'douyin/storelist',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -66,7 +69,7 @@ export function $douyin_bindstore(data) {
|
|||
url: 'douyin/bindstore',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -78,7 +81,7 @@ export function $douyin_orderquery(data) {
|
|||
url: 'douyin/orderquery',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -89,7 +92,10 @@ export function $douyin_checkIn(data) {
|
|||
url: 'douyin/checkIn',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
clientType: 'ADMIN',
|
||||
token: getToken(),
|
||||
loginName: getLoginName(),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -104,7 +110,7 @@ export function $meituan_getuisdkurl(data) {
|
|||
url: 'meituan/getuisdkurl',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -116,7 +122,7 @@ export function $meituan_getuisdkuniurl(data) {
|
|||
url: 'meituan/getuisdkuniurl',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -128,7 +134,7 @@ export function $meituan_fulfilmentcertificateprepare(data) {
|
|||
url: 'meituan/fulfilmentcertificateprepare',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -140,7 +146,7 @@ export function $meituan_certificateprepare(data) {
|
|||
url: 'meituan/certificateprepare',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -153,7 +159,7 @@ export function $meituan_orderlist(data) {
|
|||
url: 'meituan/orderlist',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -167,7 +173,7 @@ export function $meituan_fulfilmentcertificatecancel(data) {
|
|||
url: 'meituan/fulfilmentcertificatecancel',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -179,7 +185,7 @@ export function $meituan_searchstorestatus(data) {
|
|||
url: 'meituan/searchstorestatus',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
@ -191,7 +197,7 @@ export function $logout(data) {
|
|||
url: 'user/logout',
|
||||
method: "post",
|
||||
data: {
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
|
||||
...data
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,10 +2,12 @@ import axios from 'axios'
|
|||
import router from '@/router/routers'
|
||||
import { Notification } from 'element-ui'
|
||||
import store from '../store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import Config from '@/settings'
|
||||
import Cookies from 'js-cookie'
|
||||
import { setToken } from '@/utils/globalCancelToken.js'
|
||||
function getToken() {
|
||||
return localStorage.getItem('bausertoken')
|
||||
}
|
||||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
// baseURL: process.env.NODE_ENV === 'production' ? process.env.VUE_APP_BASE_API : '/',
|
||||
|
|
@ -17,7 +19,7 @@ const service = axios.create({
|
|||
service.interceptors.request.use(
|
||||
config => {
|
||||
if (getToken()) {
|
||||
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
config.headers['bausertoken'] = getToken()
|
||||
}
|
||||
config.headers['Content-Type'] = 'application/json'
|
||||
// 添加可取消请求配置
|
||||
|
|
@ -32,7 +34,37 @@ service.interceptors.request.use(
|
|||
// response 拦截器
|
||||
service.interceptors.response.use(
|
||||
response => {
|
||||
return response.data
|
||||
const data = response.data
|
||||
console.log(data)
|
||||
if (data.code == 0) {
|
||||
Notification.error({
|
||||
title: data.msg,
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
if (data.code == 439) {
|
||||
Notification.error({
|
||||
title: '请登录',
|
||||
duration: 5000
|
||||
})
|
||||
return
|
||||
}
|
||||
if (data.code == 4399) {
|
||||
Notification.error({
|
||||
title: data.msg,
|
||||
duration: 5000
|
||||
})
|
||||
return data
|
||||
}
|
||||
if (data.code == 1&&!data.data) {
|
||||
// Notification.success({
|
||||
// title: data.msg,
|
||||
// duration: 5000
|
||||
// })
|
||||
return true
|
||||
}
|
||||
return data.data
|
||||
},
|
||||
error => {
|
||||
console.log(error);
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
import { encrypt } from '@/utils/rsaEncrypt'
|
||||
import Config from '@/settings'
|
||||
import { getCodeImg } from '@/api/login'
|
||||
import { $douyin_checkIn } from '@/api/coup/index'
|
||||
import Cookies from 'js-cookie'
|
||||
import qs from 'qs'
|
||||
import Background from '@/assets/images/background_img.jpg'
|
||||
|
|
@ -175,8 +176,12 @@ export default {
|
|||
// }
|
||||
// console.log(user);
|
||||
const user = { ...this.loginForm }
|
||||
console.log(user)
|
||||
user.password = encrypt(user.password)
|
||||
this.$store.dispatch('Login', user).then(() => {
|
||||
$douyin_checkIn({
|
||||
loginName:user.username
|
||||
})
|
||||
this.loading = false
|
||||
// 保存商户号
|
||||
localStorage.setItem('MerchantId', JSON.stringify({
|
||||
|
|
@ -185,7 +190,8 @@ export default {
|
|||
}))
|
||||
this.$router.push({ path: this.redirect || '/' })
|
||||
// window.location.replace = './'
|
||||
}).catch(() => {
|
||||
}).catch((err) => {
|
||||
console.log(err)
|
||||
this.loading = false
|
||||
this.getCode()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,238 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-form :model="query" inline>
|
||||
<el-form-item>
|
||||
<el-input v-model="query.d_order_id" placeholder="订单号"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="query.status" placeholder="状态">
|
||||
<el-option label="等待验券" value="0" />
|
||||
<el-option label="成功" value="1" />
|
||||
<el-option label="失败" value="2" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getTableData">查询</el-button>
|
||||
<el-button @click="resetHandle">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-table border :data="tableData.data">
|
||||
<el-table-column
|
||||
label="订单号"
|
||||
prop="d_order_id"
|
||||
width="100px"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="店铺名称"
|
||||
prop="title"
|
||||
width="100px"
|
||||
></el-table-column>
|
||||
<el-table-column label="套餐">
|
||||
<template v-slot="scope">
|
||||
<el-table border :data="scope.row.douyinCodeGoods">
|
||||
<el-table-column label="套餐名称" prop="title">
|
||||
<template v-slot="taocan">
|
||||
{{ taocan.row.title }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付金额" >
|
||||
<template v-slot="taocan">
|
||||
{{ taocan.row.pay_amount }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="原价" >
|
||||
<template v-slot="taocan">
|
||||
{{ taocan.row.market_price }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="create_time"
|
||||
></el-table-column>
|
||||
<el-table-column label="状态" width="100px">
|
||||
<template v-slot="taocan">
|
||||
<el-tag :type="statusF(scope.row.status)">
|
||||
{{ returnStatus(taocan.row.status) }}
|
||||
</el-tag>
|
||||
<span
|
||||
:style="{ color: statusList[taocan.row.status].type }"
|
||||
></span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template v-slot="taocan">
|
||||
<el-button type="primary"
|
||||
v-if="taocan.row.status == 1"
|
||||
@click="showRefund(taocan.row)"
|
||||
>撤销核销</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination
|
||||
:total="tableData.total"
|
||||
:current-page="tableData.page + 1"
|
||||
:page-size="tableData.size"
|
||||
@current-change="paginationChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as $api from "@/api/coup/index.js";
|
||||
import dayjs from "dayjs";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
d_order_id: "",
|
||||
status: "",
|
||||
},
|
||||
resetQuery: "",
|
||||
tableData: {
|
||||
data: [],
|
||||
page: 1,
|
||||
loading: false,
|
||||
total: 0,
|
||||
},
|
||||
payTypes: [
|
||||
{
|
||||
value: "wechatPay",
|
||||
label: "微信支付",
|
||||
},
|
||||
{
|
||||
value: "aliPay",
|
||||
label: "支付宝支付",
|
||||
},
|
||||
],
|
||||
statusList: [
|
||||
{
|
||||
value: "0",
|
||||
label: "等待验券",
|
||||
type: "warning",
|
||||
},
|
||||
{
|
||||
value: "1",
|
||||
label: "成功",
|
||||
type: "primary",
|
||||
},
|
||||
{
|
||||
value: "2",
|
||||
label: "失败",
|
||||
type: "success",
|
||||
},
|
||||
],
|
||||
row: "",
|
||||
showDialog: false,
|
||||
refundNumList: [],
|
||||
refundLoading: false,
|
||||
refundForm: {
|
||||
num: "",
|
||||
orderId: "",
|
||||
refundAmount: "",
|
||||
refundDesc: "",
|
||||
refundReason: "",
|
||||
},
|
||||
refundFormRules: {
|
||||
num: [
|
||||
{
|
||||
required: true,
|
||||
message: " ",
|
||||
trigger: "change",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
timeFilter(s) {
|
||||
return dayjs(s).format("YYYY-MM-DD HH:mm:ss");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getTableData();
|
||||
this.resetQuery = { ...this.query };
|
||||
},
|
||||
methods: {
|
||||
statusF(t) {
|
||||
if(!t){
|
||||
return ''
|
||||
}
|
||||
return this.statusList[t]? this.statusList[t].type:'';
|
||||
},
|
||||
returnStatus(status) {
|
||||
return this.statusList[status].label || "";
|
||||
}, // 撤销核销
|
||||
showRefund(row) {
|
||||
this.$confirm("是否确认撤销核销", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
// for(let i in row.douyinCodeGoods){
|
||||
const item = row
|
||||
$api.$douyin_fulfilmentcertificatecancel({
|
||||
verify_id: item.verify_id,
|
||||
certificate_id: item.certificate_id,
|
||||
}).then(res=>{
|
||||
this.$message.success("撤销核销成功");
|
||||
this.getTableData();
|
||||
})
|
||||
// }
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 切换状态
|
||||
async statusChange(e, row) {
|
||||
try {
|
||||
this.tableData.loading = true;
|
||||
const data = { ...row };
|
||||
data.status = e;
|
||||
await tbPrintMachine(data, "put");
|
||||
this.getTableData();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.tableData.loading = false;
|
||||
}
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query = { ...this.resetQuery };
|
||||
this.getTableData();
|
||||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1;
|
||||
this.getTableData();
|
||||
},
|
||||
// 获取列表
|
||||
async getTableData() {
|
||||
this.tableData.loading = true;
|
||||
try {
|
||||
const res = await $api.$douyin_orderlist({
|
||||
...this.query,
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
});
|
||||
this.tableData.loading = false;
|
||||
this.tableData.data = res.list;
|
||||
console.log(this.tableData.data);
|
||||
this.tableData.total = res.count;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -0,0 +1,161 @@
|
|||
<template>
|
||||
<el-dialog title="选择商品" width="450px" :visible.sync="show">
|
||||
<div class="app-container">
|
||||
<div class="head-container">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
ref="table"
|
||||
@selection-change="handleSelectionChange"
|
||||
@cell-click="cellClick"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="套餐名称" prop="title"></el-table-column>
|
||||
<el-table-column label="原价" prop="amount"></el-table-column>
|
||||
</el-table>
|
||||
<div class="u-flex u-row-center u-m-t-50 gap-20">
|
||||
<el-button size="medium" @click="close">取消</el-button>
|
||||
<el-button size="medium" type="primary" @click="confirm"
|
||||
>确认核销</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
$douyin_certificateprepare,
|
||||
$meituan_certificateprepare,
|
||||
} from "@/api/coup/index";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
data: {},
|
||||
tableData: [],
|
||||
selArr: [],
|
||||
types: "douyin", //douyin meituan
|
||||
};
|
||||
},
|
||||
filters: {},
|
||||
mounted() {
|
||||
// this.getTableData();
|
||||
},
|
||||
methods: {
|
||||
handleSelectionChange(e) {
|
||||
this.selArr = e;
|
||||
console.log(e);
|
||||
},
|
||||
cellClick(user) {
|
||||
this.$refs.table.toggleRowSelection(user);
|
||||
},
|
||||
async choose(user) {
|
||||
console.log(user);
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
async confirm() {
|
||||
console.log(this.selArr.length);
|
||||
if (this.selArr.length <= 0) {
|
||||
return this.$message.error("请选择套餐商品");
|
||||
}
|
||||
console.log(this.types);
|
||||
if (this.types == "meituan") {
|
||||
//美团
|
||||
const mRes = await $meituan_certificateprepare({
|
||||
couponCode: this.data.couponCode,
|
||||
num: this.selArr.length,
|
||||
});
|
||||
}
|
||||
//抖音
|
||||
if (this.types == "douyin") {
|
||||
const res = await $douyin_certificateprepare({
|
||||
verify_token: this.data.verify_token,
|
||||
encrypted_codes: this.selArr
|
||||
.map((item) => item.encrypted_code)
|
||||
.join(","),
|
||||
id: this.data.id,
|
||||
});
|
||||
}
|
||||
|
||||
this.$message.success("核销成功");
|
||||
this.close();
|
||||
this.$emit("hexiaoSuccess");
|
||||
},
|
||||
open(res, types) {
|
||||
this.data = res;
|
||||
this.types = types?types:this.types;
|
||||
this.tableData = res.goods;
|
||||
this.show = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-input--small .el-input__inner {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
::v-deep .image-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #efefef;
|
||||
font-size: 20px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: #f5f5f5;
|
||||
padding: 0 14px;
|
||||
|
||||
.title {
|
||||
font-size: 22px;
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
padding: 20px 0;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
|
||||
.t {
|
||||
text-align: center;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.n {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding-top: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.gap-20 {
|
||||
gap: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
<template>
|
||||
<el-dialog title="绑定门店" width="450px" :visible.sync="show" >
|
||||
<div class="app-container">
|
||||
<!-- <div class="head-container">
|
||||
<el-form :model="query" inline>
|
||||
<el-form-item label="">
|
||||
<el-input
|
||||
v-model="query.name"
|
||||
placeholder="请输入昵称或手机号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<div class="flex gap-20">
|
||||
<el-button type="primary" @click="getTableData" size="medium"
|
||||
>搜索</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="head-container">
|
||||
<el-table
|
||||
:data="tableData.data"
|
||||
v-loading="tableData.loading"
|
||||
@cell-click="cellClick"
|
||||
>
|
||||
<el-table-column label="店铺名称" prop="poi_name"></el-table-column>
|
||||
<el-table-column label="店铺地址" prop="address"></el-table-column>
|
||||
<el-table-column label="操作" width="90" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="mini" @click="choose(scope.row)"
|
||||
>绑定门店</el-button
|
||||
>
|
||||
<!-- <el-button type="text" @click="charge(scope.row)">充值</el-button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination
|
||||
:total="tableData.total"
|
||||
:current-page="tableData.page + 1"
|
||||
:page-size="tableData.size"
|
||||
@size-change="sizeChange"
|
||||
@current-change="paginationChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { $douyin_storelist,$douyin_bindstore } from "@/api/coup/index";
|
||||
import { $returnMemberPointsList } from "@/api/table";
|
||||
import dayjs from "dayjs";
|
||||
let cacheData = {};
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
query: {},
|
||||
shopInfo: {
|
||||
balanceTotal: 0,
|
||||
userTotal: 0,
|
||||
chageTotal: 0,
|
||||
},
|
||||
tableData: {
|
||||
data: [],
|
||||
page: 0,
|
||||
size: 10,
|
||||
loading: false,
|
||||
total: 0,
|
||||
},
|
||||
};
|
||||
},
|
||||
filters: {
|
||||
timeFilter(s) {
|
||||
return dayjs(s).format("YYYY-MM-DD HH:mm:ss");
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.getTableData();
|
||||
},
|
||||
methods: {
|
||||
cellClick(user) {
|
||||
this.choose(user)
|
||||
},
|
||||
async choose(user) {
|
||||
this.$emit("chooseUser", user);
|
||||
const res= $douyin_bindstore({
|
||||
poi_id:user.poi_id,
|
||||
}).then(res=>{
|
||||
this.close()
|
||||
})
|
||||
console.log(user)
|
||||
},
|
||||
charge(user) {
|
||||
console.log(user);
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
open() {
|
||||
this.getTableData();
|
||||
this.show = true;
|
||||
},
|
||||
toPage(type) {
|
||||
const pages = {
|
||||
charge: "charge_list",
|
||||
cost: "cost_list",
|
||||
};
|
||||
this.$router.push({
|
||||
name: pages[type],
|
||||
});
|
||||
console.log(pages[type]);
|
||||
},
|
||||
// 获取商家用户概述信息
|
||||
|
||||
sizeChange() {
|
||||
this.tableData.page = 0;
|
||||
this.getTableData();
|
||||
},
|
||||
// 切换状态
|
||||
async statusChange(e, row) {
|
||||
try {
|
||||
this.tableData.loading = true;
|
||||
const data = { ...row };
|
||||
data.status = e;
|
||||
await modityActivate(data);
|
||||
this.getTableData();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.tableData.loading = false;
|
||||
}
|
||||
},
|
||||
// 重置查询
|
||||
resetHandle() {
|
||||
this.query.name = "";
|
||||
this.getTableData();
|
||||
},
|
||||
// 分页回调
|
||||
paginationChange(e) {
|
||||
this.tableData.page = e - 1;
|
||||
this.getTableData();
|
||||
},
|
||||
async getTableData() {
|
||||
this.tableData.loading = true;
|
||||
try {
|
||||
const res = await $douyin_storelist({
|
||||
...this.query,
|
||||
size: this.tableData.size,
|
||||
page: this.tableData.page + 1,
|
||||
});
|
||||
console.log(res);
|
||||
this.tableData.loading = false;
|
||||
this.tableData.data = res.list;
|
||||
this.tableData.total = res.count;
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.user_info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.name {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
::v-deep .el-input--small .el-input__inner {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
::v-deep .image-slot {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #efefef;
|
||||
font-size: 20px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: #f5f5f5;
|
||||
padding: 0 14px;
|
||||
|
||||
.title {
|
||||
font-size: 22px;
|
||||
padding-top: 14px;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
padding: 20px 0;
|
||||
|
||||
.item {
|
||||
flex: 1;
|
||||
|
||||
.t {
|
||||
text-align: center;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.n {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
padding-top: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.gap-20 {
|
||||
gap: 20px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog width="400px" :title="title" :visible.sync="show" @close="reset">
|
||||
<div class="u-p-15">
|
||||
<div v-if="openSwitch">
|
||||
<el-button
|
||||
size="medium"
|
||||
@click="changeKey('paysSel', index)"
|
||||
v-for="(item, index) in pays"
|
||||
:key="index"
|
||||
:type="paysSel == index ? 'primary' : ''"
|
||||
>{{ item.text }}</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="u-m-t-20">
|
||||
<el-alert
|
||||
:closable="false"
|
||||
v-if="tips"
|
||||
:title="tips"
|
||||
type="warning"
|
||||
show-icon
|
||||
>
|
||||
</el-alert>
|
||||
</div>
|
||||
<div class="u-m-t-20">
|
||||
<el-form label-width="90px" label-position="left">
|
||||
<el-form-item label="券码">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
@change="codeInputChange"
|
||||
placeholder="请扫码或者输入券码"
|
||||
ref="refInputCode"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<div class="u-flex u-row-center u-m-t-50">
|
||||
<el-button size="medium" @click="close">取消</el-button>
|
||||
<el-button size="medium" type="primary" @click="confirm"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<bind-shop ref="refBindShop"></bind-shop>
|
||||
<choose-goods
|
||||
ref="refChooseGoods"
|
||||
@hexiaoSuccess="hexiaoSuccess"
|
||||
></choose-goods>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as $Api from "@/api/coup/index.js";
|
||||
import { tbOrderInfoDetail } from "@/api/order";
|
||||
import bindShop from "./douyin-quan-bind-shop.vue";
|
||||
import chooseGoods from "./choose-quan-goods.vue";
|
||||
export default {
|
||||
components: { bindShop, chooseGoods },
|
||||
props: {
|
||||
openSwitch: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
order: {
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: "团购券核销",
|
||||
},
|
||||
price: {
|
||||
type: [String, Number],
|
||||
default: 0,
|
||||
},
|
||||
defaultTips: {
|
||||
type: String,
|
||||
default: "请使用扫码枪扫描付券码",
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
to2(n) {
|
||||
return n.toFixed(2);
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tips: "",
|
||||
paysSel: 0,
|
||||
form: {
|
||||
code: "",
|
||||
},
|
||||
pays: [
|
||||
{
|
||||
text: "美团",
|
||||
},
|
||||
{
|
||||
text: "抖音",
|
||||
},
|
||||
],
|
||||
show: false,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
defaultTips(val) {
|
||||
this.tips = val;
|
||||
},
|
||||
price(val) {
|
||||
console.log(val);
|
||||
this.form.money = Number(val).toFixed(2);
|
||||
},
|
||||
number(newval) {
|
||||
this.$emit("input", newval);
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
refChooseGoodsOpen(data,types) {
|
||||
this.$refs.refChooseGoods.open(data,types);
|
||||
},
|
||||
refBindShopOpen() {
|
||||
this.$refs.refBindShop.open();
|
||||
},
|
||||
clear() {
|
||||
clearInterval(this.timer);
|
||||
},
|
||||
hexiaoSuccess() {
|
||||
this.reset();
|
||||
this.close();
|
||||
},
|
||||
async getOrderDetail() {
|
||||
const res = await tbOrderInfoDetail(this.order.id);
|
||||
if (res.status == "closed") {
|
||||
this.clear();
|
||||
this.$emit("paySuccess");
|
||||
}
|
||||
},
|
||||
codeInputChange(e) {
|
||||
console.log(e);
|
||||
// this.$emit("confirm", this.form.code);
|
||||
},
|
||||
reset() {
|
||||
// this.form.money=''
|
||||
this.form.code = "";
|
||||
this.paysSel = 0;
|
||||
this.clear();
|
||||
},
|
||||
changeKey(key, val) {
|
||||
this[key] = val;
|
||||
},
|
||||
|
||||
async confirm() {
|
||||
if (!this.form.code) {
|
||||
return this.$message.error("请输入或扫付券码");
|
||||
}
|
||||
|
||||
if (this.paysSel == 1) {
|
||||
//抖音
|
||||
const res = await $Api.$douyin_fulfilmentcertificateprepare({
|
||||
object_id: this.form.code,
|
||||
});
|
||||
if (res.code == 4399) {
|
||||
this.refBindShopOpen();
|
||||
}
|
||||
if (res) {
|
||||
this.refChooseGoodsOpen(res);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (this.paysSel == 0) {
|
||||
//美团
|
||||
const res = await $Api.$meituan_searchstorestatus({
|
||||
});
|
||||
if(res.status==0){
|
||||
const res2 = await $Api.$meituan_getuisdkurl({
|
||||
});
|
||||
window.open(res2);
|
||||
return;
|
||||
}
|
||||
const res1 = await $Api.$meituan_fulfilmentcertificateprepare({
|
||||
code: this.form.code,
|
||||
});
|
||||
if(res1){
|
||||
const types='meituan'
|
||||
this.refChooseGoodsOpen(res1,types);
|
||||
}
|
||||
}
|
||||
// this.$message.success("核销成功");
|
||||
},
|
||||
open(data) {
|
||||
this.show = true;
|
||||
$Api.$douyin_checkIn().then((res) => {
|
||||
console.log(res);
|
||||
localStorage.setItem("bausertoken", res.userInfo.token);
|
||||
});
|
||||
this.$nextTick(() => {
|
||||
this.$refs.refInputCode.focus();
|
||||
});
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
},
|
||||
numberInput(val) {
|
||||
console.log(val);
|
||||
this.number = `${Number(val)}`;
|
||||
},
|
||||
keyboradConfirm() {
|
||||
this.$emit("confirm", this.number);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.number = `${this.value}`;
|
||||
this.tips = this.defaultTips;
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.codeImg {
|
||||
width: 164px;
|
||||
border: 1px solid rgb(220, 223, 230);
|
||||
height: 164px;
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,343 @@
|
|||
<template>
|
||||
<div class="select_desk">
|
||||
<el-dialog width="410px" title="套餐" :visible.sync="show">
|
||||
<div class="select_desk_dialog u-p-b-20">
|
||||
<key-board isCanEmpty v-model="number" isFloat @clear="clear">
|
||||
<div slot="clear">.</div>
|
||||
<div
|
||||
slot="input"
|
||||
class="u-font-14 u-row-between u-flex w-full u-text-left"
|
||||
>
|
||||
<div class="">
|
||||
<div>单价</div>
|
||||
<div class="u-m-t-10">
|
||||
<el-tag type="primary" size="medium">¥1/克</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="u-font-14">重量</div>
|
||||
<div class="u-m-t-10">
|
||||
<el-input
|
||||
placeholder="请输入挂账金额"
|
||||
v-model="number"
|
||||
@input="inputNumber"
|
||||
@change="inputChange"
|
||||
@focus="inputFocus"
|
||||
@blur="inputBlur"
|
||||
:type="focus ? 'number' : 'text'"
|
||||
>
|
||||
<template slot="append">克</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</key-board>
|
||||
<div class="price u-text-left w-full">¥ {{ 11 }}</div>
|
||||
|
||||
<div class="confirm_btns u-flex u-m-t-20">
|
||||
<el-button style="width: 100%;" type="primary" size="medium" @click="confirm"
|
||||
>确定</el-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<choose-guazhang
|
||||
ref="refChooseGuazhang"
|
||||
@confirm="chooseGuazhangConfirm"
|
||||
></choose-guazhang>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import keyBoard from "./keyboard.vue";
|
||||
import chooseGuazhang from "./choose-guazhang.vue";
|
||||
export default {
|
||||
components: { keyBoard, chooseGuazhang },
|
||||
props: {
|
||||
payMoney: {
|
||||
type: [Number, String],
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
guazhangRen: "",
|
||||
number: "",
|
||||
show: false,
|
||||
hasOpen: false,
|
||||
loading: false,
|
||||
tips: "",
|
||||
focus: false,
|
||||
data:{}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
number(newval) {
|
||||
console.log(newval);
|
||||
if (newval * 1 > this.payMoney * 1) {
|
||||
this.number = this.payMoney;
|
||||
this.number = newval;
|
||||
}
|
||||
if (newval * 1 > this.payMoney * 1) {
|
||||
this.tips = "已超出未结账金额";
|
||||
} else {
|
||||
const shengyu = this.payMoney - this.number;
|
||||
|
||||
this.tips =
|
||||
shengyu > 0 ? "还需额外支付" + shengyu.toFixed(2) + "元" : "";
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
inputFocus() {
|
||||
this.focus = true;
|
||||
},
|
||||
inputBlur() {
|
||||
this.focus = false;
|
||||
},
|
||||
chooseGuazhangConfirm(e) {
|
||||
this.guazhangRen = e;
|
||||
},
|
||||
guazhangShow() {
|
||||
this.$refs.refChooseGuazhang.open();
|
||||
},
|
||||
|
||||
inputNumber(e) {
|
||||
console.log("inputNumber");
|
||||
if (e * 1 > this.payMoney * 1) {
|
||||
this.tips = "已超出未结账金额";
|
||||
}
|
||||
},
|
||||
inputChange(e) {
|
||||
if (e * 1 > this.payMoney * 1) {
|
||||
this.tips = "已超出未结账金额";
|
||||
}
|
||||
console.log(e);
|
||||
},
|
||||
clear(e) {
|
||||
console.log(e);
|
||||
this.number = "";
|
||||
},
|
||||
confirm() {
|
||||
if (this.number * 1 > this.payMoney * 1) {
|
||||
return this.$message("已超出未结账金额");
|
||||
}
|
||||
if (this.number * 1 <= 0) {
|
||||
return this.$message("支付金额不正确");
|
||||
}
|
||||
if (!this.guazhangRen) {
|
||||
return this.$message("请选择挂账人");
|
||||
}
|
||||
this.$emit("confirm", this.guazhangRen, this.number);
|
||||
this.close();
|
||||
},
|
||||
open(number) {
|
||||
this.number = this.payMoney * 1;
|
||||
this.show = true;
|
||||
this.tips = "还需额外支付" + this.payMoney + "元";
|
||||
},
|
||||
close() {
|
||||
this.show = false;
|
||||
this.number = "";
|
||||
},
|
||||
},
|
||||
mounted() {},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep.el-button {
|
||||
padding: 12px 20px;
|
||||
}
|
||||
::v-deep .carts .box_status {
|
||||
border: none;
|
||||
}
|
||||
::v-deep .select_desk_dialog .el-input__inner {
|
||||
// border: none;
|
||||
}
|
||||
::v-deep .el-input__inner::-webkit-inner-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
::v-deep .el-input__inner::-webkit-outer-spin-button {
|
||||
-webkit-appearance: none;
|
||||
margin: 0;
|
||||
}
|
||||
::v-deep .el-button--success {
|
||||
border-color: #22bf64;
|
||||
background-color: #22bf64;
|
||||
}
|
||||
.select_desk .btn {
|
||||
height: 34px;
|
||||
}
|
||||
.tags {
|
||||
font-size: 16px;
|
||||
&.using {
|
||||
color: rgb(234, 64, 37);
|
||||
}
|
||||
&.wait {
|
||||
color: rgb(252, 236, 79);
|
||||
}
|
||||
&.idle {
|
||||
color: rgb(137, 234, 71);
|
||||
}
|
||||
&.closed {
|
||||
color: rgb(221, 221, 221);
|
||||
filter: grayscale(1);
|
||||
}
|
||||
}
|
||||
::v-deep .inputs .el-input__inner {
|
||||
border-color: transparent !important;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
letter-spacing: 1.25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.select_desk .select_desk_dialog {
|
||||
display: flex;
|
||||
|
||||
flex-direction: column;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .nav {
|
||||
width: 286px;
|
||||
height: 38px;
|
||||
background: #dcf0e8;
|
||||
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .nav .li,
|
||||
.select_desk .select_desk_dialog .nav {
|
||||
border-radius: 4px;
|
||||
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .nav .li {
|
||||
width: 140px;
|
||||
height: 34px;
|
||||
color: #0fc161;
|
||||
|
||||
justify-content: center;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .nav .lion {
|
||||
background: #0fc161;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .inputs {
|
||||
width: 370px;
|
||||
line-height: 54px;
|
||||
margin-top: 24px;
|
||||
height: 54px;
|
||||
margin-bottom: 20px;
|
||||
background: #fff;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
color: rgba(0, 0, 0, 0.8);
|
||||
letter-spacing: 1.25px;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
position: relative;
|
||||
}
|
||||
.price {
|
||||
font-size: 18px;
|
||||
text-align: left;
|
||||
color: rgb(255, 81, 82);
|
||||
font-weight: 600;
|
||||
}
|
||||
.select_desk .select_desk_dialog .inputs .close {
|
||||
color: #aaa;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
line-height: 30px;
|
||||
top: 50%;
|
||||
margin-top: -15px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.guazhangren {
|
||||
padding: 12px 10px;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-radius: 4px;
|
||||
margin-top: 20px;
|
||||
min-height: 58px;
|
||||
color: #999;
|
||||
cursor: pointer;
|
||||
.name {
|
||||
color: #3f9eff;
|
||||
}
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .keyboard {
|
||||
display: flex;
|
||||
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
border-right: 1px solid #dcdfe6;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .keyboard .li {
|
||||
height: 60px;
|
||||
width: 33.333%;
|
||||
|
||||
display: flex;
|
||||
|
||||
justify-content: center;
|
||||
|
||||
align-items: center;
|
||||
font-size: 24px;
|
||||
color: #212121;
|
||||
cursor: pointer;
|
||||
|
||||
user-select: none;
|
||||
border-left: 1px solid #dcdfe6;
|
||||
border-top: 1px solid #dcdfe6;
|
||||
|
||||
transition: all 0.1s;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .keyboard .li:hover {
|
||||
background: #dcdfe6;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .keyboard .li .icon {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .keyboard .confirm {
|
||||
height: 140px;
|
||||
background: #ff9f2e;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.select_desk .select_desk_dialog .keyboard .confirm:hover {
|
||||
background: #f88502;
|
||||
}
|
||||
|
||||
.confirm_btns {
|
||||
display: flex;
|
||||
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.confirm_btns .el-button {
|
||||
width: 175px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -83,6 +83,13 @@
|
|||
{{ table ? "桌台号:" + table.name : "选择桌号" }}
|
||||
</div>
|
||||
</el-popover>
|
||||
|
||||
<div class="u-m-l-28">
|
||||
<el-button
|
||||
type="warning"
|
||||
@click="refQuanHexiaoOpen"
|
||||
>扫码验券</el-button>
|
||||
</div>
|
||||
<!-- 先付后付start -->
|
||||
<!-- <el-dropdown @command="changePostPay">
|
||||
<el-button plain type="primary" size="mini">
|
||||
|
|
@ -100,6 +107,7 @@
|
|||
</el-button> -->
|
||||
|
||||
<!-- 先付后付end -->
|
||||
|
||||
<span
|
||||
@click="toggleFullScreen"
|
||||
class="flex flex-xy-center cur-pointer full-screen"
|
||||
|
|
@ -808,7 +816,10 @@
|
|||
<span>{{ item | returntypeName }}</span>
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="name">{{ item.name }}</div>
|
||||
<div class="name u-flex u-flex-wrap">
|
||||
<span class="weight" v-if="item.type=='weigh'">称重</span>
|
||||
<span> {{ item.name }}</span>
|
||||
</div>
|
||||
<div>
|
||||
<template v-if="layout.sel === 'text'">
|
||||
<div class="text-sell-out flex">
|
||||
|
|
@ -1473,18 +1484,28 @@
|
|||
:vipUser="vipUser"
|
||||
@updateCart="updateCartItem"
|
||||
></cart-change-price>
|
||||
<!-- 团购券 -->
|
||||
<!-- 用户选择团购券 -->
|
||||
<pop-tuan-quan
|
||||
:cartGoods="createOrder.data.detailList || []"
|
||||
ref="refPopTuanQuan"
|
||||
@confirm="tuanQuanConfirm"
|
||||
></pop-tuan-quan>
|
||||
<!-- 美团/抖音团购券核销 -->
|
||||
<pop-quan-hexiao ref="refQuanHexiao">
|
||||
</pop-quan-hexiao>
|
||||
<!-- 挂账 -->
|
||||
<popup-choose-guazhang
|
||||
ref="refGuaZhang"
|
||||
:payMoney="yinFuJinE"
|
||||
@confirm="guazhangPayConfirm"
|
||||
></popup-choose-guazhang>
|
||||
|
||||
<!-- 称重商品 -->
|
||||
<popup-weight-goods
|
||||
ref="refWeightGoods"
|
||||
@confirm="refWeightGoodsConfirm"
|
||||
>
|
||||
</popup-weight-goods>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -1504,8 +1525,10 @@ import moneyKeyboard from "./components/money-keyboard.vue";
|
|||
import caiAdd from "./components/popup-linshiCai.vue";
|
||||
import cartChangePrice from "./components/popup-cart-changePrice.vue";
|
||||
import popTuanQuan from "./components/popup-tuan-quan.vue";
|
||||
import popQuanHexiao from "./components/popup-quan-hexiao.vue";
|
||||
import tuanQuanTable from "./components/tuan-quan-table.vue";
|
||||
import popupChooseGuazhang from "./components/popup-choose-guazhang.vue";
|
||||
import popupWeightGoods from "./components/popup-weight-goods.vue";
|
||||
|
||||
import dayjs from "dayjs";
|
||||
import { tbShopInfo } from "@/api/user";
|
||||
|
|
@ -1562,7 +1585,7 @@ import PopupChooseGuazhang from "./components/popup-choose-guazhang.vue";
|
|||
|
||||
let $originTableList = [];
|
||||
export default {
|
||||
components: {
|
||||
components: {popupWeightGoods,popQuanHexiao,
|
||||
popupChooseGuazhang,
|
||||
cartChangePrice,
|
||||
popTuanQuan,
|
||||
|
|
@ -2328,6 +2351,18 @@ export default {
|
|||
this.open(this.$route.query);
|
||||
},
|
||||
methods: {
|
||||
//美团抖音团购券核销弹窗
|
||||
refQuanHexiaoOpen(){
|
||||
this.$refs.refQuanHexiao.open()
|
||||
},
|
||||
//称重商品弹窗
|
||||
refWeightGoodsShow() {
|
||||
this.$refs.refWeightGoods.open();
|
||||
},
|
||||
//称重商品确认
|
||||
refWeightGoodsConfirm(){
|
||||
|
||||
},
|
||||
//挂账人支付确认
|
||||
guazhangPayConfirm(guazhangren, price) {
|
||||
this.guazhangRen = guazhangren;
|
||||
|
|
@ -4027,6 +4062,9 @@ export default {
|
|||
// if (!this.table) {
|
||||
// return this.$message.error("暂不支持无桌台下单,请先选择桌台");
|
||||
// }
|
||||
if(item.type=='weigh'){
|
||||
return this.refWeightGoodsShow()
|
||||
}
|
||||
if (item.typeEnum === "sku") {
|
||||
this.selGoods.data = item;
|
||||
this.selGoods.skuMap = {};
|
||||
|
|
@ -5476,7 +5514,16 @@ input[type="number"]::-webkit-outer-spin-button {
|
|||
border-radius: 4px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.weight{
|
||||
height: 15px;
|
||||
background: linear-gradient(124deg, rgb(115, 201, 105) 6%, rgb(39, 146, 27) 93%);
|
||||
border-radius: 2px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
line-height: 15px;
|
||||
padding: 0px 2px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
.cashier_left .el-form-item {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue