Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq
This commit is contained in:
commit
5b0f00fa58
|
|
@ -345,16 +345,16 @@ export default {
|
||||||
this.resetForm = { ...this.queryForm }
|
this.resetForm = { ...this.queryForm }
|
||||||
this.tbShopPurveyorGet()
|
this.tbShopPurveyorGet()
|
||||||
console.log(this.$route.query.consdata)
|
console.log(this.$route.query.consdata)
|
||||||
if (this.$route.query.consdata) {
|
// if (this.$route.query.consdata) {
|
||||||
let arr = this.$route.query.consdata.map(item => {
|
// let arr = this.$route.query.consdata.map(item => {
|
||||||
item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
|
// item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
|
||||||
item.stockNumber = 0
|
// item.stockNumber = 0
|
||||||
item.costPrice = item.price
|
// item.costPrice = item.price
|
||||||
item.conInfoId = item.id
|
// item.conInfoId = item.id
|
||||||
return item
|
// return item
|
||||||
})
|
// })
|
||||||
this.tableData.list = [...this.tableData.list, ...arr]
|
// this.tableData.list = [...this.tableData.list, ...arr]
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async querySearchAsync(queryString, cb) {//快捷搜索
|
async querySearchAsync(queryString, cb) {//快捷搜索
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,7 @@
|
||||||
<el-form-item label="供应商">
|
<el-form-item label="供应商">
|
||||||
<el-select clearable v-model="queryForm.purveyorId" placeholder="请选择供应商"
|
<el-select clearable v-model="queryForm.purveyorId" placeholder="请选择供应商"
|
||||||
style="width: 220px;" @change="changeTypeEnum">
|
style="width: 220px;" @change="changeTypeEnum">
|
||||||
<el-option :label="item.purveyorName" :value="item.id" v-for="item in purveyorList"
|
<el-option v-for="item in purveyorList" :label="item.purveyorName" :value="item.id" :key="item.id"></el-option>
|
||||||
:key="item.id"></el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
{{ queryForm.waitAmount }}
|
{{ queryForm.waitAmount }}
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -122,11 +121,12 @@
|
||||||
<!-- {{ scope.row.costPrice }}/{{ scope.row.conUnit }} -->
|
<!-- {{ scope.row.costPrice }}/{{ scope.row.conUnit }} -->
|
||||||
{{ !scope.row.unit ?
|
{{ !scope.row.unit ?
|
||||||
(scope.row.defaultUnit ?
|
(scope.row.defaultUnit ?
|
||||||
scope.row.defaultUnit== scope.row.conUnitTwo?
|
scope.row.defaultUnit == scope.row.conUnitTwo ?
|
||||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice:scope.row.costPrice)
|
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) :
|
||||||
: scope.row.unit== scope.row.conUnitTwo?
|
scope.row.costPrice : scope.row.costPrice)
|
||||||
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice}}
|
: scope.row.unit == scope.row.conUnitTwo ?
|
||||||
/
|
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) : scope.row.costPrice }}
|
||||||
|
/
|
||||||
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
||||||
scope.row.conUnit) : scope.row.unit }}
|
scope.row.conUnit) : scope.row.unit }}
|
||||||
|
|
||||||
|
|
@ -156,10 +156,10 @@
|
||||||
<div class="tips" style="font-size: 16px;">出库前:
|
<div class="tips" style="font-size: 16px;">出库前:
|
||||||
{{ !scope.row.unit ?
|
{{ !scope.row.unit ?
|
||||||
(scope.row.defaultUnit ?
|
(scope.row.defaultUnit ?
|
||||||
scope.row.defaultUnit== scope.row.conUnitTwo?
|
scope.row.defaultUnit == scope.row.conUnitTwo ?
|
||||||
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
|
(scope.row.number / scope.row.conUnitTwoConvert) : scope.row.number : scope.row.number)
|
||||||
: scope.row.unit== scope.row.conUnitTwo?
|
: scope.row.unit == scope.row.conUnitTwo ?
|
||||||
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
|
(scope.row.number / scope.row.conUnitTwoConvert) : scope.row.number }}
|
||||||
|
|
||||||
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
|
||||||
scope.row.conUnit) : scope.row.unit }}
|
scope.row.conUnit) : scope.row.unit }}
|
||||||
|
|
@ -208,7 +208,8 @@
|
||||||
<template v-slot="scope">
|
<template v-slot="scope">
|
||||||
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
|
||||||
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
@change="modifyPrice($event, scope.row, 'number', 'totalAmount')"></el-input-number>
|
||||||
<div class="tips" style="font-size: 16px;">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName }}</div>
|
<div class="tips" style="font-size: 16px;">出库前:{{ scope.row.stockNumber }}{{ scope.row.unitName
|
||||||
|
}}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="小计">
|
<el-table-column label="小计">
|
||||||
|
|
@ -260,7 +261,7 @@ import { tbShopPurveyorGet, tbProductStockOperateOutAndOn, stockInOut, tbConsInf
|
||||||
|
|
||||||
import { formatDecimal } from '@/utils'
|
import { formatDecimal } from '@/utils'
|
||||||
export default {
|
export default {
|
||||||
name:'operation_out',
|
name: 'operation_out',
|
||||||
components: {
|
components: {
|
||||||
shopList,
|
shopList,
|
||||||
ConsumableList
|
ConsumableList
|
||||||
|
|
@ -342,6 +343,18 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
this.resetForm = { ...this.queryForm }
|
this.resetForm = { ...this.queryForm }
|
||||||
this.tbShopPurveyorGet()
|
this.tbShopPurveyorGet()
|
||||||
|
if (this.$route.query.consdata) {
|
||||||
|
this.queryForm.purveyorId = Number(this.$route.query.purveyorId)//供应商id
|
||||||
|
console.log(this.$route.query.purveyorId)
|
||||||
|
let arr = this.$route.query.consdata.map(item => {
|
||||||
|
item.number = formatDecimal(item.stockNumber - item.stockConsume, 2, true)
|
||||||
|
item.stockNumber = 0
|
||||||
|
item.costPrice = item.price
|
||||||
|
item.conInfoId = item.id
|
||||||
|
return item
|
||||||
|
})
|
||||||
|
this.tableData.list = [...this.tableData.list, ...arr]
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async querySearchAsync(queryString, cb) {//快捷搜索
|
async querySearchAsync(queryString, cb) {//快捷搜索
|
||||||
|
|
@ -562,7 +575,7 @@ export default {
|
||||||
},
|
},
|
||||||
// 切换类型
|
// 切换类型
|
||||||
changeTypeEnum(index) {
|
changeTypeEnum(index) {
|
||||||
let filterd= this.purveyorList.filter(ele=>ele.id == index)
|
let filterd = this.purveyorList.filter(ele => ele.id == index)
|
||||||
this.queryForm.waitAmount = filterd[0].waitAmount
|
this.queryForm.waitAmount = filterd[0].waitAmount
|
||||||
|
|
||||||
if (this.queryForm.purveyorId) {
|
if (this.queryForm.purveyorId) {
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@
|
||||||
gettbConsInfoFlowstock();
|
gettbConsInfoFlowstock();
|
||||||
}" /> -->
|
}" /> -->
|
||||||
<div></div>
|
<div></div>
|
||||||
<div style="color: #43a9fe;" @click="func()">转出库单</div>
|
<div v-if="consdata.length != 0" style="color: #43a9fe;" @click="func()">转出库单</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -467,26 +467,31 @@ export default {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
wstockChange(e) {
|
// wstockChange(e) {
|
||||||
this.stockData.page = e - 1;
|
// this.stockData.page = e - 1;
|
||||||
this.gettbConsInfoFlowstock();
|
// this.gettbConsInfoFlowstock();
|
||||||
},
|
// },
|
||||||
func() {
|
func() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'operation_in',
|
name: 'operation_out',
|
||||||
query: {
|
query: {
|
||||||
consdata: this.consdata
|
consdata: this.consdata,
|
||||||
|
purveyorId:this.stockData.purveyorId
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async gettbConsInfoFlowstock(item) {
|
async gettbConsInfoFlowstock(item) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (item) {
|
if (item.conFlows) {
|
||||||
this.stockData.id = item.id
|
this.stockData.id = item.id
|
||||||
|
this.stockData.purveyorId = item.purveyorId//供应商id
|
||||||
this.consdata = item.cons
|
this.consdata = item.cons
|
||||||
this.stockData.data = item.conFlows
|
this.stockData.data = item.conFlows
|
||||||
|
this.variabilityshow = true
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '暂无数据!' });
|
||||||
}
|
}
|
||||||
this.variabilityshow = true
|
|
||||||
// this.stockData.loading = true;
|
// this.stockData.loading = true;
|
||||||
let arr = []
|
let arr = []
|
||||||
// if (this.query.createdAt.length) {
|
// if (this.query.createdAt.length) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,204 @@
|
||||||
|
<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-date-picker v-model="query.date" type="date" placeholder="请选择日期" @blur="getTableData()"
|
||||||
|
@change="getTableData()">
|
||||||
|
</el-date-picker>
|
||||||
|
</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="couponCode" width="100px"></el-table-column>
|
||||||
|
<el-table-column label="店铺名称" prop="title" width="100px"></el-table-column> -->
|
||||||
|
<el-table-column label="套餐名称" prop="dealTitle"></el-table-column>
|
||||||
|
<!-- <el-table-column label="支付金额"> </el-table-column> -->
|
||||||
|
<el-table-column label="金额" prop="couponBuyPrice"> </el-table-column>
|
||||||
|
<el-table-column label="使用时间" prop="couponUseTime"></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="couponStatusDesc" width="80"> </el-table-column>
|
||||||
|
<el-table-column label="操作" width="150">
|
||||||
|
<template v-slot="scope">
|
||||||
|
<el-button type="primary" v-if="!scope.row.type" @click="showRefund(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"
|
||||||
|
@current-change="paginationChange"></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,
|
||||||
|
size: 10
|
||||||
|
},
|
||||||
|
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.$meituan_fulfilmentcertificatecancel({
|
||||||
|
couponCode: item.couponCode
|
||||||
|
}).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;
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
// 获取列表
|
||||||
|
async getTableData() {
|
||||||
|
this.tableData.loading = true;
|
||||||
|
try {
|
||||||
|
const res = await $api.$meituan_orderlist({
|
||||||
|
// ...this.query,
|
||||||
|
date: this.query.date ? dayjs(this.query.date).format("YYYY-MM-DD") : '',
|
||||||
|
page: this.tableData.page,
|
||||||
|
size: this.tableData.size,
|
||||||
|
});
|
||||||
|
this.tableData.loading = false;
|
||||||
|
// this.tableData.data = res.list;
|
||||||
|
this.tableData.data = res.list.map(item => {
|
||||||
|
// 计算60天后
|
||||||
|
item.couponUseTimes = dayjs(item.couponUseTime).add(60, 'day').format('YYYY-MM-DD HH:mm:ss')
|
||||||
|
item.type = dayjs().isAfter(dayjs(item.couponUseTime).add(60, 'day'), 'year')
|
||||||
|
return item
|
||||||
|
});
|
||||||
|
this.tableData.total = res.count;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -1049,6 +1049,25 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
await tbProductPost(this.form);
|
await tbProductPost(this.form);
|
||||||
}
|
}
|
||||||
|
// 点击确定之后自动删除上面的导航栏
|
||||||
|
try {
|
||||||
|
let view = this.$store.state.tagsView.visitedViews[this.$store.state.tagsView.visitedViews.findIndex(item => item.name === 'add_shop')]
|
||||||
|
// 删除导航栏
|
||||||
|
this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
|
||||||
|
// 默认保存成功删除上面add_shop导航栏
|
||||||
|
const latestView = visitedViews.slice(-1)[0]
|
||||||
|
if (latestView) {
|
||||||
|
this.$router.push(latestView)
|
||||||
|
} else {
|
||||||
|
if (view.name === 'Dashboard') {
|
||||||
|
// to reload home page
|
||||||
|
this.$router.replace({ path: '/redirect' + view.fullPath })
|
||||||
|
} else {
|
||||||
|
this.$router.push('/')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (error) { }
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: "成功",
|
title: "成功",
|
||||||
message: `${this.form.id ? "编辑" : "添加"}成功`,
|
message: `${this.form.id ? "编辑" : "添加"}成功`,
|
||||||
|
|
|
||||||
|
|
@ -2,28 +2,21 @@
|
||||||
<el-dialog title="选择商品" width="450px" :visible.sync="show">
|
<el-dialog title="选择商品" width="450px" :visible.sync="show">
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-table
|
<el-table :data="tableData" ref="table" @selection-change="handleSelectionChange" @cell-click="cellClick">
|
||||||
:data="tableData"
|
|
||||||
ref="table"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@cell-click="cellClick"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55"> </el-table-column>
|
<el-table-column type="selection" width="55"> </el-table-column>
|
||||||
<el-table-column label="套餐名称" prop="title"></el-table-column>
|
<el-table-column label="套餐名称" prop="title"></el-table-column>
|
||||||
<el-table-column label="原价" prop="amount"></el-table-column>
|
<el-table-column label="原价" prop="amount"></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="u-flex u-row-center u-m-t-50 gap-20">
|
<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" @click="close">取消</el-button>
|
||||||
<el-button size="medium" type="primary" @click="confirm"
|
<el-button size="medium" type="primary" @click="confirm">确认核销</el-button>
|
||||||
>确认核销</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
$douyin_certificateprepare,
|
$douyin_certificateprepare,
|
||||||
$meituan_certificateprepare,
|
$meituan_certificateprepare,
|
||||||
|
|
@ -57,7 +50,7 @@ export default {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
async confirm() {
|
async confirm() {
|
||||||
console.log(this.selArr.length);
|
console.log(this.selArr.length);
|
||||||
if (this.selArr.length <= 0) {
|
if (this.selArr.length <= 0) {
|
||||||
return this.$message.error("请选择套餐商品");
|
return this.$message.error("请选择套餐商品");
|
||||||
}
|
}
|
||||||
|
|
@ -86,15 +79,18 @@ export default {
|
||||||
},
|
},
|
||||||
open(res, types) {
|
open(res, types) {
|
||||||
this.data = res;
|
this.data = res;
|
||||||
this.types = types?types:this.types;
|
this.types = types ? types : this.types;
|
||||||
this.tableData = res.goods;
|
this.tableData = res.goods;
|
||||||
this.show = true;
|
this.show = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.table.toggleAllSelection()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.user_info {
|
.user_info {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -103,6 +99,7 @@ export default {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input--small .el-input__inner {
|
::v-deep .el-input--small .el-input__inner {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
|
|
@ -150,12 +147,13 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex {
|
.flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.gap-20 {
|
.gap-20 {
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="key-line">
|
<div class="key-line">
|
||||||
<div class="key" @click="clearFunction">
|
<div class="key" @click="clearFunction">
|
||||||
<slot name="clear"> </slot>
|
<slot name="clear"></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="key" @click="keyboradAdd('0')">0</div>
|
<div class="key" @click="keyboradAdd('0')">0</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -31,26 +31,12 @@
|
||||||
<slot name="clear"> </slot>
|
<slot name="clear"> </slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="key" @click="keyboradAdd('0')">0</div>
|
<div class="key" @click="keyboradAdd('0')">0</div>
|
||||||
<div
|
<div class="key" style="font-size: 31px" @click="keyboradReduce">
|
||||||
class="key"
|
<svg t="1723453480343" class="icon" viewBox="0 0 1664 1024" version="1.1"
|
||||||
style="font-size: 31px"
|
xmlns="http://www.w3.org/2000/svg" p-id="1467" width="32" height="32">
|
||||||
@click="keyboradReduce"
|
|
||||||
>
|
|
||||||
<svg
|
|
||||||
t="1723453480343"
|
|
||||||
class="icon"
|
|
||||||
viewBox="0 0 1664 1024"
|
|
||||||
version="1.1"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
p-id="1467"
|
|
||||||
width="32"
|
|
||||||
height="32"
|
|
||||||
>
|
|
||||||
<path
|
<path
|
||||||
d="M1526.08 1.6H459.84L41.28 416c-53.76 53.248-53.76 139.52 0 192.64l418.624 414.592v-0.064h1066.176a136.96 136.96 0 0 0 137.6-136.256V137.792a136.96 136.96 0 0 0-137.6-136.192z m-331.392 631.168c26.816 26.624 26.816 69.76 0 96.384-26.88 26.56-70.4 26.56-97.28 0l-121.28-120.128-123.328 122.112a69.76 69.76 0 0 1-97.92 0 68.096 68.096 0 0 1 0-96.96L878.208 512l-121.28-120.064a67.648 67.648 0 0 1 0-96.32c26.88-26.624 70.4-26.624 97.28 0l121.216 120.064 122.24-120.96a69.696 69.696 0 0 1 97.92 0 68.032 68.032 0 0 1 0 96.96l-122.24 120.96 121.344 120.064z"
|
d="M1526.08 1.6H459.84L41.28 416c-53.76 53.248-53.76 139.52 0 192.64l418.624 414.592v-0.064h1066.176a136.96 136.96 0 0 0 137.6-136.256V137.792a136.96 136.96 0 0 0-137.6-136.192z m-331.392 631.168c26.816 26.624 26.816 69.76 0 96.384-26.88 26.56-70.4 26.56-97.28 0l-121.28-120.128-123.328 122.112a69.76 69.76 0 0 1-97.92 0 68.096 68.096 0 0 1 0-96.96L878.208 512l-121.28-120.064a67.648 67.648 0 0 1 0-96.32c26.88-26.624 70.4-26.624 97.28 0l121.216 120.064 122.24-120.96a69.696 69.696 0 0 1 97.92 0 68.032 68.032 0 0 1 0 96.96l-122.24 120.96 121.344 120.064z"
|
||||||
fill="#333333"
|
fill="#333333" p-id="1468"></path>
|
||||||
p-id="1468"
|
|
||||||
></path>
|
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -80,7 +66,7 @@ export default {
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
max: {
|
max: {
|
||||||
type: [Number,String],
|
type: [Number, String],
|
||||||
default: Infinity,
|
default: Infinity,
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
|
|
@ -108,22 +94,23 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clearFunction() {
|
clearFunction() {
|
||||||
if(this.isFloat){
|
if (this.isFloat) {
|
||||||
return this.keyboradAdd('.')
|
return this.keyboradAdd('.')
|
||||||
}
|
}
|
||||||
this.$emit("clear", this.number);
|
// this.$emit("clear", this.number);
|
||||||
},
|
},
|
||||||
keyboradAdd(n) {
|
keyboradAdd(n) {
|
||||||
if(n=='.'&& `${this.number}`.includes('.')){
|
if (n == '.' && `${this.number}`.includes('.')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (Number(this.number) == 0) {
|
if (Number(this.number) == 0) {
|
||||||
return (this.number = n);
|
if (n == '.') {
|
||||||
|
return (this.number = 0 + n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const newval = this.number + n;
|
const newval = this.number + n;
|
||||||
console.log(newval)
|
if (newval * 1 > this.max * 1) {
|
||||||
if (newval*1 > this.max*1) {
|
return this.$message(this.maxTips);
|
||||||
return this.$message( this.maxTips);
|
|
||||||
}
|
}
|
||||||
this.number = newval;
|
this.number = newval;
|
||||||
},
|
},
|
||||||
|
|
@ -143,7 +130,7 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.yd-keyboard {
|
.yd-keyboard {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
@ -172,9 +159,11 @@ export default {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini-number-box1 .mini-number .key:hover {
|
.mini-number-box1 .mini-number .key:hover {
|
||||||
background-color: #dcdfe6;
|
background-color: #dcdfe6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mini-number-box1 .mini-number .key:not(:last-child) {
|
.mini-number-box1 .mini-number .key:not(:last-child) {
|
||||||
border-right: 1px solid #dcdfe6;
|
border-right: 1px solid #dcdfe6;
|
||||||
}
|
}
|
||||||
|
|
@ -237,6 +226,7 @@ export default {
|
||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.simple-Keyboard-number,
|
.simple-Keyboard-number,
|
||||||
.simple-Keyboard-weight {
|
.simple-Keyboard-weight {
|
||||||
min-width: 410px;
|
min-width: 410px;
|
||||||
|
|
@ -244,6 +234,7 @@ export default {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.submit {
|
.submit {
|
||||||
width: 366px;
|
width: 366px;
|
||||||
height: 44px;
|
height: 44px;
|
||||||
|
|
@ -262,6 +253,7 @@ export default {
|
||||||
margin-bottom: 40px;
|
margin-bottom: 40px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.disabled-box {
|
.disabled-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
|
|
|
||||||
|
|
@ -3,40 +3,22 @@
|
||||||
<el-dialog width="400px" :title="title" :visible.sync="show" @close="reset">
|
<el-dialog width="400px" :title="title" :visible.sync="show" @close="reset">
|
||||||
<div class="u-p-15">
|
<div class="u-p-15">
|
||||||
<div v-if="openSwitch">
|
<div v-if="openSwitch">
|
||||||
<el-button
|
<el-button size="medium" @click="changeKey('paysSel', index)" v-for="(item, index) in pays" :key="index"
|
||||||
size="medium"
|
:type="paysSel == index ? 'primary' : ''">{{ item.text }}</el-button>
|
||||||
@click="changeKey('paysSel', index)"
|
|
||||||
v-for="(item, index) in pays"
|
|
||||||
:key="index"
|
|
||||||
:type="paysSel == index ? 'primary' : ''"
|
|
||||||
>{{ item.text }}</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="u-m-t-20">
|
<div class="u-m-t-20">
|
||||||
<el-alert
|
<el-alert :closable="false" v-if="tips" :title="tips" type="warning" show-icon>
|
||||||
:closable="false"
|
|
||||||
v-if="tips"
|
|
||||||
:title="tips"
|
|
||||||
type="warning"
|
|
||||||
show-icon
|
|
||||||
>
|
|
||||||
</el-alert>
|
</el-alert>
|
||||||
</div>
|
</div>
|
||||||
<div class="u-m-t-20">
|
<div class="u-m-t-20">
|
||||||
<el-form label-width="90px" label-position="left">
|
<el-form label-width="90px" label-position="left">
|
||||||
<el-form-item label="券码">
|
<el-form-item label="券码">
|
||||||
<el-input
|
<el-input v-model="form.code" @change="codeInputChange" placeholder="请扫码或者输入券码"
|
||||||
v-model="form.code"
|
ref="refInputCode"></el-input>
|
||||||
@change="codeInputChange"
|
|
||||||
placeholder="请扫码或者输入券码"
|
|
||||||
ref="refInputCode"
|
|
||||||
></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="u-flex u-row-center u-m-t-50">
|
<div class="u-flex u-row-center u-m-t-50">
|
||||||
<el-button size="medium" @click="close">取消</el-button>
|
<el-button size="medium" @click="close">取消</el-button>
|
||||||
<el-button size="medium" type="primary" @click="confirm"
|
<el-button size="medium" type="primary" @click="confirm">确定</el-button>
|
||||||
>确定</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -44,13 +26,10 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<bind-shop ref="refBindShop"></bind-shop>
|
<bind-shop ref="refBindShop"></bind-shop>
|
||||||
<choose-goods
|
<choose-goods ref="refChooseGoods" @hexiaoSuccess="hexiaoSuccess"></choose-goods>
|
||||||
ref="refChooseGoods"
|
|
||||||
@hexiaoSuccess="hexiaoSuccess"
|
|
||||||
></choose-goods>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import * as $Api from "@/api/coup/index.js";
|
import * as $Api from "@/api/coup/index.js";
|
||||||
import { tbOrderInfoDetail } from "@/api/order";
|
import { tbOrderInfoDetail } from "@/api/order";
|
||||||
import bindShop from "./douyin-quan-bind-shop.vue";
|
import bindShop from "./douyin-quan-bind-shop.vue";
|
||||||
|
|
@ -115,8 +94,8 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
refChooseGoodsOpen(data,types) {
|
refChooseGoodsOpen(data, types) {
|
||||||
this.$refs.refChooseGoods.open(data,types);
|
this.$refs.refChooseGoods.open(data, types);
|
||||||
},
|
},
|
||||||
refBindShopOpen() {
|
refBindShopOpen() {
|
||||||
this.$refs.refBindShop.open();
|
this.$refs.refBindShop.open();
|
||||||
|
|
@ -147,6 +126,9 @@ export default {
|
||||||
},
|
},
|
||||||
changeKey(key, val) {
|
changeKey(key, val) {
|
||||||
this[key] = val;
|
this[key] = val;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.refInputCode.focus() //获取焦点
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async confirm() {
|
async confirm() {
|
||||||
|
|
@ -154,35 +136,37 @@ export default {
|
||||||
return this.$message.error("请输入或扫付券码");
|
return this.$message.error("请输入或扫付券码");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.paysSel == 1) {
|
if (this.paysSel === 1) {
|
||||||
//抖音
|
//抖音
|
||||||
const res = await $Api.$douyin_fulfilmentcertificateprepare({
|
const res = await $Api.$douyin_fulfilmentcertificateprepare({
|
||||||
object_id: this.form.code,
|
object_id: this.form.code,
|
||||||
});
|
});
|
||||||
if (res.code == 4399) {
|
if (res.code == 4399) {
|
||||||
this.refBindShopOpen();
|
this.refBindShopOpen();
|
||||||
}
|
} else {
|
||||||
if (res) {
|
console.log(res, 1111)
|
||||||
|
// if (res.code == 1) {
|
||||||
this.refChooseGoodsOpen(res);
|
this.refChooseGoodsOpen(res);
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.paysSel == 0) {
|
if (this.paysSel === 0) {
|
||||||
//美团
|
//美团
|
||||||
const res = await $Api.$meituan_searchstorestatus({
|
const res = await $Api.$meituan_searchstorestatus({
|
||||||
});
|
});
|
||||||
if(res.status==0){
|
if (res.status == 0) {
|
||||||
const res2 = await $Api.$meituan_getuisdkurl({
|
const res2 = await $Api.$meituan_getuisdkurl({
|
||||||
});
|
});
|
||||||
window.open(res2);
|
window.open(res2);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const res1 = await $Api.$meituan_fulfilmentcertificateprepare({
|
const res1 = await $Api.$meituan_fulfilmentcertificateprepare({
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
});
|
});
|
||||||
if(res1){
|
if (res1) {
|
||||||
const types='meituan'
|
const types = 'meituan'
|
||||||
this.refChooseGoodsOpen(res1,types);
|
this.refChooseGoodsOpen(res1, types);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// this.$message.success("核销成功");
|
// this.$message.success("核销成功");
|
||||||
|
|
@ -215,7 +199,7 @@ export default {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.codeImg {
|
.codeImg {
|
||||||
width: 164px;
|
width: 164px;
|
||||||
border: 1px solid rgb(220, 223, 230);
|
border: 1px solid rgb(220, 223, 230);
|
||||||
|
|
|
||||||
|
|
@ -4,61 +4,48 @@
|
||||||
<div class="select_desk_dialog u-p-b-20">
|
<div class="select_desk_dialog u-p-b-20">
|
||||||
<key-board isCanEmpty v-model="number" isFloat @clear="clear">
|
<key-board isCanEmpty v-model="number" isFloat @clear="clear">
|
||||||
<div slot="clear">.</div>
|
<div slot="clear">.</div>
|
||||||
<div
|
<div slot="input" class="u-font-14 u-row-between u-flex w-full u-text-left">
|
||||||
slot="input"
|
|
||||||
class="u-font-14 u-row-between u-flex w-full u-text-left"
|
|
||||||
>
|
|
||||||
<div class="">
|
<div class="">
|
||||||
<div>单价</div>
|
<div>单价</div>
|
||||||
<div class="u-m-t-10">
|
<div class="u-m-t-10">
|
||||||
<el-tag type="primary" size="medium">¥1/克</el-tag>
|
<el-tag type="primary" size="medium">¥{{ price }}/{{ item.unitName }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="u-font-14">重量</div>
|
<div class="u-font-14">重量</div>
|
||||||
<div class="u-m-t-10">
|
<div class="u-m-t-10">
|
||||||
<el-input
|
<el-input placeholder="请输入重量" v-model="number" @input="inputNumber" @change="inputChange"
|
||||||
placeholder="请输入挂账金额"
|
@focus="inputFocus" @blur="inputBlur" :type="focus ? 'number' : 'text'">
|
||||||
v-model="number"
|
<template slot="append">{{ item.unitName }}</template>
|
||||||
@input="inputNumber"
|
|
||||||
@change="inputChange"
|
|
||||||
@focus="inputFocus"
|
|
||||||
@blur="inputBlur"
|
|
||||||
:type="focus ? 'number' : 'text'"
|
|
||||||
>
|
|
||||||
<template slot="append">克</template>
|
|
||||||
</el-input>
|
</el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</key-board>
|
</key-board>
|
||||||
<div class="price u-text-left w-full">¥ {{ 11 }}</div>
|
<div class="price u-text-left w-full">¥ {{ allPrice }}</div>
|
||||||
|
|
||||||
<div class="confirm_btns u-flex u-m-t-20">
|
<div class="confirm_btns u-flex u-m-t-20">
|
||||||
<el-button style="width: 100%;" type="primary" size="medium" @click="confirm"
|
<el-button style="width: 100%;" type="primary" size="medium" @click="confirm">确定</el-button>
|
||||||
>确定</el-button
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<choose-guazhang
|
|
||||||
ref="refChooseGuazhang"
|
|
||||||
@confirm="chooseGuazhangConfirm"
|
|
||||||
></choose-guazhang>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import keyBoard from "./keyboard.vue";
|
import keyBoard from "./keyboard.vue";
|
||||||
import chooseGuazhang from "./choose-guazhang.vue";
|
|
||||||
export default {
|
export default {
|
||||||
components: { keyBoard, chooseGuazhang },
|
components: { keyBoard },
|
||||||
props: {
|
props: {
|
||||||
payMoney: {
|
payMoney: {
|
||||||
type: [Number, String],
|
type: [Number, String],
|
||||||
default: 0,
|
default: 0,
|
||||||
},
|
},
|
||||||
|
isShowVipPrice:{
|
||||||
|
type:Boolean,
|
||||||
|
default:false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -69,12 +56,16 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
tips: "",
|
tips: "",
|
||||||
focus: false,
|
focus: false,
|
||||||
data:{}
|
data: {},
|
||||||
|
item: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
number(newval) {
|
number(newval) {
|
||||||
console.log(newval);
|
// 处理小数点
|
||||||
|
// if (newval == '.' || newval == '0.') {
|
||||||
|
// this.number = newval;
|
||||||
|
// } else {
|
||||||
if (newval * 1 > this.payMoney * 1) {
|
if (newval * 1 > this.payMoney * 1) {
|
||||||
this.number = this.payMoney;
|
this.number = this.payMoney;
|
||||||
this.number = newval;
|
this.number = newval;
|
||||||
|
|
@ -87,8 +78,20 @@ export default {
|
||||||
this.tips =
|
this.tips =
|
||||||
shengyu > 0 ? "还需额外支付" + shengyu.toFixed(2) + "元" : "";
|
shengyu > 0 ? "还需额外支付" + shengyu.toFixed(2) + "元" : "";
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed:{
|
||||||
|
allPrice(){
|
||||||
|
return (this.price*this.number).toFixed(2);
|
||||||
|
},
|
||||||
|
price(){
|
||||||
|
if(!this.item){
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
return this.item.lowPrice;
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
inputFocus() {
|
inputFocus() {
|
||||||
this.focus = true;
|
this.focus = true;
|
||||||
|
|
@ -96,13 +99,6 @@ export default {
|
||||||
inputBlur() {
|
inputBlur() {
|
||||||
this.focus = false;
|
this.focus = false;
|
||||||
},
|
},
|
||||||
chooseGuazhangConfirm(e) {
|
|
||||||
this.guazhangRen = e;
|
|
||||||
},
|
|
||||||
guazhangShow() {
|
|
||||||
this.$refs.refChooseGuazhang.open();
|
|
||||||
},
|
|
||||||
|
|
||||||
inputNumber(e) {
|
inputNumber(e) {
|
||||||
console.log("inputNumber");
|
console.log("inputNumber");
|
||||||
if (e * 1 > this.payMoney * 1) {
|
if (e * 1 > this.payMoney * 1) {
|
||||||
|
|
@ -118,81 +114,90 @@ export default {
|
||||||
clear(e) {
|
clear(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
this.number = "";
|
this.number = "";
|
||||||
|
this.item=""
|
||||||
},
|
},
|
||||||
confirm() {
|
confirm() {
|
||||||
if (this.number * 1 > this.payMoney * 1) {
|
if(this.number*1<=0){
|
||||||
return this.$message("已超出未结账金额");
|
return this.$message("请输入重量");
|
||||||
}
|
}
|
||||||
if (this.number * 1 <= 0) {
|
this.$emit("confirm", this.item, this.number);
|
||||||
return this.$message("支付金额不正确");
|
|
||||||
}
|
|
||||||
if (!this.guazhangRen) {
|
|
||||||
return this.$message("请选择挂账人");
|
|
||||||
}
|
|
||||||
this.$emit("confirm", this.guazhangRen, this.number);
|
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
open(number) {
|
open(item) {
|
||||||
this.number = this.payMoney * 1;
|
console.log(item);
|
||||||
|
this.item = item
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.tips = "还需额外支付" + this.payMoney + "元";
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
this.number = "";
|
this.number = "";
|
||||||
|
this.item=""
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() { },
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
::v-deep.el-button {
|
::v-deep.el-button {
|
||||||
padding: 12px 20px;
|
padding: 12px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .carts .box_status {
|
::v-deep .carts .box_status {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .select_desk_dialog .el-input__inner {
|
::v-deep .select_desk_dialog .el-input__inner {
|
||||||
// border: none;
|
// border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner::-webkit-inner-spin-button {
|
::v-deep .el-input__inner::-webkit-inner-spin-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-input__inner::-webkit-outer-spin-button {
|
::v-deep .el-input__inner::-webkit-outer-spin-button {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-button--success {
|
::v-deep .el-button--success {
|
||||||
border-color: #22bf64;
|
border-color: #22bf64;
|
||||||
background-color: #22bf64;
|
background-color: #22bf64;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_desk .btn {
|
.select_desk .btn {
|
||||||
height: 34px;
|
height: 34px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
&.using {
|
&.using {
|
||||||
color: rgb(234, 64, 37);
|
color: rgb(234, 64, 37);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.wait {
|
&.wait {
|
||||||
color: rgb(252, 236, 79);
|
color: rgb(252, 236, 79);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.idle {
|
&.idle {
|
||||||
color: rgb(137, 234, 71);
|
color: rgb(137, 234, 71);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.closed {
|
&.closed {
|
||||||
color: rgb(221, 221, 221);
|
color: rgb(221, 221, 221);
|
||||||
filter: grayscale(1);
|
filter: grayscale(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .inputs .el-input__inner {
|
::v-deep .inputs .el-input__inner {
|
||||||
border-color: transparent !important;
|
border-color: transparent !important;
|
||||||
color: rgba(0, 0, 0, 0.8);
|
color: rgba(0, 0, 0, 0.8);
|
||||||
letter-spacing: 1.25px;
|
letter-spacing: 1.25px;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_desk .select_desk_dialog {
|
.select_desk .select_desk_dialog {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
|
|
@ -248,12 +253,14 @@ export default {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.price {
|
.price {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: rgb(255, 81, 82);
|
color: rgb(255, 81, 82);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.select_desk .select_desk_dialog .inputs .close {
|
.select_desk .select_desk_dialog .inputs .close {
|
||||||
color: #aaa;
|
color: #aaa;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -265,6 +272,7 @@ export default {
|
||||||
margin-top: -15px;
|
margin-top: -15px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.guazhangren {
|
.guazhangren {
|
||||||
padding: 12px 10px;
|
padding: 12px 10px;
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
|
|
@ -273,6 +281,7 @@ export default {
|
||||||
min-height: 58px;
|
min-height: 58px;
|
||||||
color: #999;
|
color: #999;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
color: #3f9eff;
|
color: #3f9eff;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1321,7 +1321,9 @@
|
||||||
<div class="key" @click="keyboradAdd('9')">9</div>
|
<div class="key" @click="keyboradAdd('9')">9</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="key-line">
|
<div class="key-line">
|
||||||
<div class="key"></div>
|
<div class="key" @click="keyboradAdd('.')">
|
||||||
|
<span v-if="selGoods.isSku=='weight'">.</span>
|
||||||
|
</div>
|
||||||
<div class="key" @click="keyboradAdd('0')">0</div>
|
<div class="key" @click="keyboradAdd('0')">0</div>
|
||||||
<div
|
<div
|
||||||
class="key"
|
class="key"
|
||||||
|
|
@ -1502,6 +1504,8 @@
|
||||||
|
|
||||||
<!-- 称重商品 -->
|
<!-- 称重商品 -->
|
||||||
<popup-weight-goods
|
<popup-weight-goods
|
||||||
|
:isShowVipPrice="isShowVipPrice"
|
||||||
|
|
||||||
ref="refWeightGoods"
|
ref="refWeightGoods"
|
||||||
@confirm="refWeightGoodsConfirm"
|
@confirm="refWeightGoodsConfirm"
|
||||||
>
|
>
|
||||||
|
|
@ -2356,12 +2360,14 @@ export default {
|
||||||
this.$refs.refQuanHexiao.open()
|
this.$refs.refQuanHexiao.open()
|
||||||
},
|
},
|
||||||
//称重商品弹窗
|
//称重商品弹窗
|
||||||
refWeightGoodsShow() {
|
refWeightGoodsShow(item) {
|
||||||
this.$refs.refWeightGoods.open();
|
this.$refs.refWeightGoods.open(item);
|
||||||
},
|
},
|
||||||
//称重商品确认
|
//称重商品确认
|
||||||
refWeightGoodsConfirm(){
|
async refWeightGoodsConfirm(item,number){
|
||||||
|
console.log(item)
|
||||||
|
console.log(number)
|
||||||
|
this.goodsClick(item,number,true)
|
||||||
},
|
},
|
||||||
//挂账人支付确认
|
//挂账人支付确认
|
||||||
guazhangPayConfirm(guazhangren, price) {
|
guazhangPayConfirm(guazhangren, price) {
|
||||||
|
|
@ -3291,6 +3297,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
keyboradAdd(n) {
|
keyboradAdd(n) {
|
||||||
|
if(this.selGoods.isSku!='weight'&&n=='.'){
|
||||||
|
return
|
||||||
|
}
|
||||||
if (Number(this.keyborad.number) === 0) {
|
if (Number(this.keyborad.number) === 0) {
|
||||||
return (this.keyborad.number = n);
|
return (this.keyborad.number = n);
|
||||||
}
|
}
|
||||||
|
|
@ -3319,9 +3328,13 @@ export default {
|
||||||
},
|
},
|
||||||
changeKeyboradShow(show) {
|
changeKeyboradShow(show) {
|
||||||
if (show) {
|
if (show) {
|
||||||
|
this.selGoods=this.order.list[this.order.selIndex]
|
||||||
this.keyborad.number = `${this.order.list[this.order.selIndex].number}`;
|
this.keyborad.number = `${this.order.list[this.order.selIndex].number}`;
|
||||||
}
|
}
|
||||||
this.keyborad.show = show;
|
this.keyborad.show = show;
|
||||||
|
if(!show){
|
||||||
|
this.selGoods=''
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 获取本地缓存挂单
|
// 获取本地缓存挂单
|
||||||
// getPrveCart() {
|
// getPrveCart() {
|
||||||
|
|
@ -3707,6 +3720,9 @@ export default {
|
||||||
name = name.substring(0, name.length - 1);
|
name = name.substring(0, name.length - 1);
|
||||||
// const item = this.selGoods.data.specList.find((v) => v.specSnap === name);
|
// const item = this.selGoods.data.specList.find((v) => v.specSnap === name);
|
||||||
const item = this.selGoods.skuMap[name];
|
const item = this.selGoods.skuMap[name];
|
||||||
|
console.log(this.selGoods,'调试1')
|
||||||
|
console.log(name,'调试2')
|
||||||
|
console.log(item,'调试1')
|
||||||
if (!item.isGrounding) {
|
if (!item.isGrounding) {
|
||||||
//该商品已经下架
|
//该商品已经下架
|
||||||
return this.$notify({
|
return this.$notify({
|
||||||
|
|
@ -4058,12 +4074,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//根据右侧商品单规格多规格做不同处理
|
//根据右侧商品单规格多规格做不同处理
|
||||||
async goodsClick(item) {
|
async goodsClick(item,number=0, isConfirm=false) {
|
||||||
// if (!this.table) {
|
// if (!this.table) {
|
||||||
// return this.$message.error("暂不支持无桌台下单,请先选择桌台");
|
// return this.$message.error("暂不支持无桌台下单,请先选择桌台");
|
||||||
// }
|
// }
|
||||||
if(item.type=='weigh'){
|
if(item.type=='weigh'&&!isConfirm){
|
||||||
return this.refWeightGoodsShow()
|
return this.refWeightGoodsShow(item)
|
||||||
}
|
}
|
||||||
if (item.typeEnum === "sku") {
|
if (item.typeEnum === "sku") {
|
||||||
this.selGoods.data = item;
|
this.selGoods.data = item;
|
||||||
|
|
@ -4096,7 +4112,8 @@ export default {
|
||||||
// tableId: this.table.tableId,
|
// tableId: this.table.tableId,
|
||||||
// num: orderGoods.number * 1 + item.specList[0].suit, // 0会删除此商品
|
// num: orderGoods.number * 1 + item.specList[0].suit, // 0会删除此商品
|
||||||
// });
|
// });
|
||||||
orderGoods.number += item.specList[0].suit;
|
const suit=number||item.specList[0].suit
|
||||||
|
orderGoods.number +=suit*1 ;
|
||||||
this.order.number = orderGoods.number;
|
this.order.number = orderGoods.number;
|
||||||
this.changeOrderSel(orderGoodsIndex);
|
this.changeOrderSel(orderGoodsIndex);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -4111,7 +4128,7 @@ export default {
|
||||||
productId: item.id,
|
productId: item.id,
|
||||||
skuId: item.specList[0].id,
|
skuId: item.specList[0].id,
|
||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
num: item.specList[0].suit, // 0会删除此商品
|
num:number|| item.specList[0].suit, // 0会删除此商品
|
||||||
isPack: false, // 是否打包
|
isPack: false, // 是否打包
|
||||||
isWaitCall:this.isAllWaitCall //是否等叫
|
isWaitCall:this.isAllWaitCall //是否等叫
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue