Merge branch 'test' of e.coding.net:g-cphe0354/yinshoukeguanliduan/management into gyq

This commit is contained in:
gyq 2024-12-04 10:30:05 +08:00
commit 5b0f00fa58
11 changed files with 431 additions and 190 deletions

View File

@ -345,16 +345,16 @@ export default {
this.resetForm = { ...this.queryForm }
this.tbShopPurveyorGet()
console.log(this.$route.query.consdata)
if (this.$route.query.consdata) {
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]
}
// if (this.$route.query.consdata) {
// 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: {
async querySearchAsync(queryString, cb) {//

View File

@ -40,8 +40,7 @@
<el-form-item label="供应商">
<el-select clearable v-model="queryForm.purveyorId" placeholder="请选择供应商"
style="width: 220px;" @change="changeTypeEnum">
<el-option :label="item.purveyorName" :value="item.id" v-for="item in purveyorList"
:key="item.id"></el-option>
<el-option v-for="item in purveyorList" :label="item.purveyorName" :value="item.id" :key="item.id"></el-option>
</el-select>
{{ queryForm.waitAmount }}
</el-form-item>
@ -120,13 +119,14 @@
@change="consCountTotal($event, scope.row, 'price')"></el-input-number>
<div class="tips" style="font-size: 16px;">原价
<!-- {{ scope.row.costPrice }}/{{ scope.row.conUnit }} -->
{{ !scope.row.unit ?
(scope.row.defaultUnit ?
scope.row.defaultUnit== scope.row.conUnitTwo?
((scope.row.costPrice*scope.row.conUnitTwoConvert).toFixed(2)): scope.row.costPrice: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.conUnitTwo ?
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) :
scope.row.costPrice : 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.conUnit) : scope.row.unit }}
@ -154,13 +154,13 @@
<!-- <div class="tips" style="font-size: 16px;">出库前{{ scope.row.number }}{{ scope.row.conUnit }}</div> -->
<div class="tips" style="font-size: 16px;">出库前
{{ !scope.row.unit ?
(scope.row.defaultUnit ?
scope.row.defaultUnit== scope.row.conUnitTwo?
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number:scope.row.number)
: scope.row.unit== scope.row.conUnitTwo?
(scope.row.number/scope.row.conUnitTwoConvert): scope.row.number}}
{{ !scope.row.unit ?
(scope.row.defaultUnit ?
scope.row.defaultUnit == scope.row.conUnitTwo ?
(scope.row.number / scope.row.conUnitTwoConvert) : scope.row.number : scope.row.number)
: scope.row.unit == scope.row.conUnitTwo ?
(scope.row.number / scope.row.conUnitTwoConvert) : scope.row.number }}
{{ !scope.row.unit ? (scope.row.defaultUnit ? scope.row.defaultUnit :
scope.row.conUnit) : scope.row.unit }}
</div>
@ -208,7 +208,8 @@
<template v-slot="scope">
<el-input-number v-model="scope.row.number" :min="0" controls-position="right"
@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>
</el-table-column>
<el-table-column label="小计">
@ -260,7 +261,7 @@ import { tbShopPurveyorGet, tbProductStockOperateOutAndOn, stockInOut, tbConsInf
import { formatDecimal } from '@/utils'
export default {
name:'operation_out',
name: 'operation_out',
components: {
shopList,
ConsumableList
@ -342,6 +343,18 @@ export default {
mounted() {
this.resetForm = { ...this.queryForm }
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: {
async querySearchAsync(queryString, cb) {//
@ -562,7 +575,7 @@ export default {
},
//
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
if (this.queryForm.purveyorId) {

View File

@ -210,7 +210,7 @@
gettbConsInfoFlowstock();
}" /> -->
<div></div>
<div style="color: #43a9fe;" @click="func()">转出库单</div>
<div v-if="consdata.length != 0" style="color: #43a9fe;" @click="func()">转出库单</div>
</div>
</el-dialog>
</div>
@ -467,26 +467,31 @@ export default {
console.log(error)
}
},
wstockChange(e) {
this.stockData.page = e - 1;
this.gettbConsInfoFlowstock();
},
// wstockChange(e) {
// this.stockData.page = e - 1;
// this.gettbConsInfoFlowstock();
// },
func() {
this.$router.push({
name: 'operation_in',
name: 'operation_out',
query: {
consdata: this.consdata
consdata: this.consdata,
purveyorId:this.stockData.purveyorId
}
})
},
async gettbConsInfoFlowstock(item) {
console.log(item)
if (item) {
if (item.conFlows) {
this.stockData.id = item.id
this.stockData.purveyorId = item.purveyorId//id
this.consdata = item.cons
this.stockData.data = item.conFlows
this.variabilityshow = true
}else{
this.$message({ message: '暂无数据!' });
}
this.variabilityshow = true
// this.stockData.loading = true;
let arr = []
// if (this.query.createdAt.length) {

View File

@ -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>

View File

@ -1049,6 +1049,25 @@ export default {
} else {
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({
title: "成功",
message: `${this.form.id ? "编辑" : "添加"}成功`,

View File

@ -2,28 +2,21 @@
<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 :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
>
<el-button size="medium" type="primary" @click="confirm">确认核销</el-button>
</div>
</div>
</div>
</el-dialog>
</template>
<script>
<script>
import {
$douyin_certificateprepare,
$meituan_certificateprepare,
@ -57,7 +50,7 @@ export default {
this.show = false;
},
async confirm() {
console.log(this.selArr.length);
console.log(this.selArr.length);
if (this.selArr.length <= 0) {
return this.$message.error("请选择套餐商品");
}
@ -86,15 +79,18 @@ export default {
},
open(res, types) {
this.data = res;
this.types = types?types:this.types;
this.types = types ? types : this.types;
this.tableData = res.goods;
this.show = true;
this.$nextTick(() => {
this.$refs.table.toggleAllSelection()
})
},
},
};
</script>
<style scoped lang="scss">
<style scoped lang="scss">
.user_info {
display: flex;
align-items: center;
@ -103,6 +99,7 @@ export default {
margin-left: 10px;
}
}
::v-deep .el-input--small .el-input__inner {
height: 36px;
line-height: 36px;
@ -150,12 +147,13 @@ export default {
}
}
}
.flex {
display: flex;
align-items: center;
}
.gap-20 {
gap: 20px;
}
</style>
</style>

View File

@ -27,7 +27,7 @@
</div>
<div class="key-line">
<div class="key" @click="clearFunction">
<slot name="clear"> </slot>
<slot name="clear"></slot>
</div>
<div class="key" @click="keyboradAdd('0')">0</div>
<div

View File

@ -31,26 +31,12 @@
<slot name="clear"> </slot>
</div>
<div class="key" @click="keyboradAdd('0')">0</div>
<div
class="key"
style="font-size: 31px"
@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"
>
<div class="key" style="font-size: 31px" @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
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"
p-id="1468"
></path>
fill="#333333" p-id="1468"></path>
</svg>
</div>
</div>
@ -80,7 +66,7 @@ export default {
default: false,
},
max: {
type: [Number,String],
type: [Number, String],
default: Infinity,
},
value: {
@ -108,22 +94,23 @@ export default {
},
methods: {
clearFunction() {
if(this.isFloat){
if (this.isFloat) {
return this.keyboradAdd('.')
}
this.$emit("clear", this.number);
// this.$emit("clear", this.number);
},
keyboradAdd(n) {
if(n=='.'&& `${this.number}`.includes('.')){
if (n == '.' && `${this.number}`.includes('.')) {
return
}
if (Number(this.number) == 0) {
return (this.number = n);
if (n == '.') {
return (this.number = 0 + n);
}
}
const newval = this.number + n;
console.log(newval)
if (newval*1 > this.max*1) {
return this.$message( this.maxTips);
if (newval * 1 > this.max * 1) {
return this.$message(this.maxTips);
}
this.number = newval;
},
@ -143,7 +130,7 @@ export default {
};
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.yd-keyboard {
justify-content: center;
margin-bottom: 20px;
@ -172,9 +159,11 @@ export default {
border-radius: 0;
margin-left: 0;
}
.mini-number-box1 .mini-number .key:hover {
background-color: #dcdfe6;
}
.mini-number-box1 .mini-number .key:not(:last-child) {
border-right: 1px solid #dcdfe6;
}
@ -237,6 +226,7 @@ export default {
-ms-user-select: none;
user-select: none;
}
.simple-Keyboard-number,
.simple-Keyboard-weight {
min-width: 410px;
@ -244,6 +234,7 @@ export default {
border-radius: 4px;
overflow: hidden;
}
.submit {
width: 366px;
height: 44px;
@ -262,6 +253,7 @@ export default {
margin-bottom: 40px;
cursor: pointer;
}
.disabled-box {
position: absolute;
inset: 0;

View File

@ -3,40 +3,22 @@
<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
>
<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 :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-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
>
<el-button size="medium" type="primary" @click="confirm">确定</el-button>
</div>
</el-form>
</div>
@ -44,13 +26,10 @@
</el-dialog>
<bind-shop ref="refBindShop"></bind-shop>
<choose-goods
ref="refChooseGoods"
@hexiaoSuccess="hexiaoSuccess"
></choose-goods>
<choose-goods ref="refChooseGoods" @hexiaoSuccess="hexiaoSuccess"></choose-goods>
</div>
</template>
<script>
<script>
import * as $Api from "@/api/coup/index.js";
import { tbOrderInfoDetail } from "@/api/order";
import bindShop from "./douyin-quan-bind-shop.vue";
@ -115,8 +94,8 @@ export default {
},
},
methods: {
refChooseGoodsOpen(data,types) {
this.$refs.refChooseGoods.open(data,types);
refChooseGoodsOpen(data, types) {
this.$refs.refChooseGoods.open(data, types);
},
refBindShopOpen() {
this.$refs.refBindShop.open();
@ -147,6 +126,9 @@ export default {
},
changeKey(key, val) {
this[key] = val;
this.$nextTick(() => {
this.$refs.refInputCode.focus() //
})
},
async confirm() {
@ -154,35 +136,37 @@ export default {
return this.$message.error("请输入或扫付券码");
}
if (this.paysSel == 1) {
if (this.paysSel === 1) {
//
const res = await $Api.$douyin_fulfilmentcertificateprepare({
object_id: this.form.code,
});
if (res.code == 4399) {
this.refBindShopOpen();
}
if (res) {
} else {
console.log(res, 1111)
// if (res.code == 1) {
this.refChooseGoodsOpen(res);
// }
}
return;
}
if (this.paysSel == 0) {
if (this.paysSel === 0) {
//
const res = await $Api.$meituan_searchstorestatus({
});
if(res.status==0){
const res2 = await $Api.$meituan_getuisdkurl({
});
window.open(res2);
return;
if (res.status == 0) {
const res2 = await $Api.$meituan_getuisdkurl({
});
window.open(res2);
return;
}
const res1 = await $Api.$meituan_fulfilmentcertificateprepare({
code: this.form.code,
code: this.form.code,
});
if(res1){
const types='meituan'
this.refChooseGoodsOpen(res1,types);
if (res1) {
const types = 'meituan'
this.refChooseGoodsOpen(res1, types);
}
}
// this.$message.success("");
@ -214,8 +198,8 @@ export default {
},
};
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.codeImg {
width: 164px;
border: 1px solid rgb(220, 223, 230);

View File

@ -4,61 +4,48 @@
<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 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>
<el-tag type="primary" size="medium">{{ price }}/{{ item.unitName }}</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 placeholder="请输入重量" v-model="number" @input="inputNumber" @change="inputChange"
@focus="inputFocus" @blur="inputBlur" :type="focus ? 'number' : 'text'">
<template slot="append">{{ item.unitName }}</template>
</el-input>
</div>
</div>
</div>
</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">
<el-button style="width: 100%;" type="primary" size="medium" @click="confirm"
>确定</el-button
>
<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>
<script>
import keyBoard from "./keyboard.vue";
import chooseGuazhang from "./choose-guazhang.vue";
export default {
components: { keyBoard, chooseGuazhang },
components: { keyBoard },
props: {
payMoney: {
type: [Number, String],
default: 0,
},
isShowVipPrice:{
type:Boolean,
default:false
}
},
data() {
return {
@ -69,12 +56,16 @@ export default {
loading: false,
tips: "",
focus: false,
data:{}
data: {},
item: ""
};
},
watch: {
number(newval) {
console.log(newval);
//
// if (newval == '.' || newval == '0.') {
// this.number = newval;
// } else {
if (newval * 1 > this.payMoney * 1) {
this.number = this.payMoney;
this.number = newval;
@ -87,8 +78,20 @@ export default {
this.tips =
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: {
inputFocus() {
this.focus = true;
@ -96,13 +99,6 @@ export default {
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) {
@ -118,81 +114,90 @@ export default {
clear(e) {
console.log(e);
this.number = "";
this.item=""
},
confirm() {
if (this.number * 1 > this.payMoney * 1) {
return this.$message("已超出未结账金额");
if(this.number*1<=0){
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.$emit("confirm", this.item, this.number);
this.close();
},
open(number) {
this.number = this.payMoney * 1;
open(item) {
console.log(item);
this.item = item
this.show = true;
this.tips = "还需额外支付" + this.payMoney + "元";
},
close() {
this.show = false;
this.number = "";
this.item=""
},
},
mounted() {},
mounted() { },
};
</script>
<style lang="scss" scoped>
<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;
@ -248,12 +253,14 @@ export default {
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;
@ -265,6 +272,7 @@ export default {
margin-top: -15px;
cursor: pointer;
}
.guazhangren {
padding: 12px 10px;
border: 1px solid #dcdfe6;
@ -273,6 +281,7 @@ export default {
min-height: 58px;
color: #999;
cursor: pointer;
.name {
color: #3f9eff;
}

View File

@ -1321,7 +1321,9 @@
<div class="key" @click="keyboradAdd('9')">9</div>
</div>
<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"
@ -1502,6 +1504,8 @@
<!-- 称重商品 -->
<popup-weight-goods
:isShowVipPrice="isShowVipPrice"
ref="refWeightGoods"
@confirm="refWeightGoodsConfirm"
>
@ -2356,12 +2360,14 @@ export default {
this.$refs.refQuanHexiao.open()
},
//
refWeightGoodsShow() {
this.$refs.refWeightGoods.open();
refWeightGoodsShow(item) {
this.$refs.refWeightGoods.open(item);
},
//
refWeightGoodsConfirm(){
async refWeightGoodsConfirm(item,number){
console.log(item)
console.log(number)
this.goodsClick(item,number,true)
},
//
guazhangPayConfirm(guazhangren, price) {
@ -3291,6 +3297,9 @@ export default {
});
},
keyboradAdd(n) {
if(this.selGoods.isSku!='weight'&&n=='.'){
return
}
if (Number(this.keyborad.number) === 0) {
return (this.keyborad.number = n);
}
@ -3319,9 +3328,13 @@ export default {
},
changeKeyboradShow(show) {
if (show) {
this.selGoods=this.order.list[this.order.selIndex]
this.keyborad.number = `${this.order.list[this.order.selIndex].number}`;
}
this.keyborad.show = show;
if(!show){
this.selGoods=''
}
},
//
// getPrveCart() {
@ -3707,6 +3720,9 @@ export default {
name = name.substring(0, name.length - 1);
// const item = this.selGoods.data.specList.find((v) => v.specSnap === name);
const item = this.selGoods.skuMap[name];
console.log(this.selGoods,'调试1')
console.log(name,'调试2')
console.log(item,'调试1')
if (!item.isGrounding) {
//
return this.$notify({
@ -4058,12 +4074,12 @@ export default {
}
},
//
async goodsClick(item) {
async goodsClick(item,number=0, isConfirm=false) {
// if (!this.table) {
// return this.$message.error("");
// }
if(item.type=='weigh'){
return this.refWeightGoodsShow()
if(item.type=='weigh'&&!isConfirm){
return this.refWeightGoodsShow(item)
}
if (item.typeEnum === "sku") {
this.selGoods.data = item;
@ -4096,7 +4112,8 @@ export default {
// tableId: this.table.tableId,
// 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.changeOrderSel(orderGoodsIndex);
} else {
@ -4111,7 +4128,7 @@ export default {
productId: item.id,
skuId: item.specList[0].id,
tableId: this.table.tableId,
num: item.specList[0].suit, // 0
num:number|| item.specList[0].suit, // 0
isPack: false, //
isWaitCall:this.isAllWaitCall //
});