Merge branch 'test' of https://e.coding.net/g-cphe0354/yinshoukeguanliduan/management into dwb
This commit is contained in:
commit
833c45e566
|
|
@ -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>
|
||||||
|
|
@ -123,7 +122,8 @@
|
||||||
{{ !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.costPrice : scope.row.costPrice)
|
||||||
: scope.row.unit == scope.row.conUnitTwo ?
|
: scope.row.unit == scope.row.conUnitTwo ?
|
||||||
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) : scope.row.costPrice }}
|
((scope.row.costPrice * scope.row.conUnitTwoConvert).toFixed(2)) : scope.row.costPrice }}
|
||||||
/
|
/
|
||||||
|
|
@ -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="小计">
|
||||||
|
|
@ -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) {//快捷搜索
|
||||||
|
|
|
||||||
|
|
@ -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
|
this.variabilityshow = true
|
||||||
|
}else{
|
||||||
|
this.$message({ message: '暂无数据!' });
|
||||||
|
}
|
||||||
|
|
||||||
// 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>
|
||||||
|
|
@ -198,8 +198,10 @@
|
||||||
</el-table-column>-->
|
</el-table-column>-->
|
||||||
<el-table-column label="起售数量" prop="suit">
|
<el-table-column label="起售数量" prop="suit">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
<el-input-number @change="priceFormat(scope.row, 'suit')" @blur="priceFormat(scope.row, 'suit')" :min="0"
|
||||||
|
v-model="scope.row.suit" controls-position="right" v-if="form.type == 'weigh'"></el-input-number>
|
||||||
<el-input-number @change="priceFormat(scope.row, 'suit')" @blur="priceFormat(scope.row, 'suit')" :min="1"
|
<el-input-number @change="priceFormat(scope.row, 'suit')" @blur="priceFormat(scope.row, 'suit')" :min="1"
|
||||||
v-model="scope.row.suit" controls-position="right"></el-input-number>
|
v-model="scope.row.suit" controls-position="right" v-else></el-input-number>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="库存数量" prop="stockNumber">
|
<!-- <el-table-column label="库存数量" prop="stockNumber">
|
||||||
|
|
@ -592,7 +594,7 @@ export default {
|
||||||
isGrounding: 1,
|
isGrounding: 1,
|
||||||
productId: this.$route.query.goods_id ? this.$route.query.goods_id : "",
|
productId: this.$route.query.goods_id ? this.$route.query.goods_id : "",
|
||||||
shopId: localStorage.getItem("shopId"),
|
shopId: localStorage.getItem("shopId"),
|
||||||
suit: 0,
|
suit: '',
|
||||||
},
|
},
|
||||||
tableAddShopIndex: null,
|
tableAddShopIndex: null,
|
||||||
isEditor: false,
|
isEditor: false,
|
||||||
|
|
@ -663,11 +665,11 @@ export default {
|
||||||
singleOrderLimit: 0,
|
singleOrderLimit: 0,
|
||||||
singlePeopleLimit: 0,
|
singlePeopleLimit: 0,
|
||||||
weight: '',
|
weight: '',
|
||||||
days: [],
|
days: couponEnum.cycle.map(item => item.value),
|
||||||
startTime: '',
|
startTime: '',
|
||||||
endTime: ''
|
endTime: ''
|
||||||
},
|
},
|
||||||
useTime: ['', ''],
|
useTime: ['00:00', '23:59'],
|
||||||
imgList: [],
|
imgList: [],
|
||||||
rules: {
|
rules: {
|
||||||
typeEnum: [
|
typeEnum: [
|
||||||
|
|
@ -1049,6 +1051,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 ? "编辑" : "添加"}成功`,
|
||||||
|
|
@ -1079,6 +1100,19 @@ export default {
|
||||||
item.number = 1
|
item.number = 1
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// let newres = []
|
||||||
|
|
||||||
|
// for (let item of res) {
|
||||||
|
// item.proId = item.id
|
||||||
|
// item.proName = item.name
|
||||||
|
// item.price = item.lowPrice
|
||||||
|
// item.skuId = ''
|
||||||
|
// item.skuName = ''
|
||||||
|
// item.number = 1
|
||||||
|
// newres.push(item)
|
||||||
|
// }
|
||||||
|
|
||||||
if (this.form.groupType == 0) {
|
if (this.form.groupType == 0) {
|
||||||
let obj = {
|
let obj = {
|
||||||
title: '',
|
title: '',
|
||||||
|
|
@ -1089,6 +1123,7 @@ export default {
|
||||||
this.form.proGroupVo = [{ ...obj }]
|
this.form.proGroupVo = [{ ...obj }]
|
||||||
} else {
|
} else {
|
||||||
if (this.addGroupIndex !== false) {
|
if (this.addGroupIndex !== false) {
|
||||||
|
this.form.proGroupVo[this.addGroupIndex].count = newres.length
|
||||||
this.form.proGroupVo[this.addGroupIndex].goods = newres
|
this.form.proGroupVo[this.addGroupIndex].goods = newres
|
||||||
} else {
|
} else {
|
||||||
let arr = [...this.form.proGroupVo]
|
let arr = [...this.form.proGroupVo]
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
>
|
>
|
||||||
<div class="absolute status-box">
|
<div class="absolute status-box">
|
||||||
<span class="pack" v-if="item.isPack === 'true'"> 包 </span>
|
<span class="pack" v-if="item.isPack === 'true'"> 包 </span>
|
||||||
<span class="da" v-if="item.isPrint"> 打 </span>
|
<span class="da" v-if="item.isPrint||item.isPrint===null"> 打 </span>
|
||||||
<span class="isWaitCall" v-if="item.isWaitCall">等 </span>
|
<span class="isWaitCall" v-if="item.isWaitCall">等 </span>
|
||||||
<span class="tui" v-if="item.status === 'return'"> 退 </span>
|
<span class="tui" v-if="item.status === 'return'"> 退 </span>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -35,6 +35,9 @@
|
||||||
>赠</span
|
>赠</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
<div v-if="item.typeEnum=='weight'" class="specSnap">
|
||||||
|
¥{{ currentPrice}}/{{ item.unit }}
|
||||||
|
</div>
|
||||||
<div v-if="item.specSnap" class="specSnap">
|
<div v-if="item.specSnap" class="specSnap">
|
||||||
{{ item.specSnap }}
|
{{ item.specSnap }}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -164,6 +167,12 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
currentPrice(){
|
||||||
|
if(!this.isShowVipPrice){
|
||||||
|
return this.item.salePrice
|
||||||
|
}
|
||||||
|
return this.memberPrice?this.memberPrice:this.item.salePrice
|
||||||
|
},
|
||||||
discountNewPrice(){
|
discountNewPrice(){
|
||||||
const item = this.item;
|
const item = this.item;
|
||||||
const originPrice=this.isShowVipPrice?this.vipAllPrice:this.allPrice
|
const originPrice=this.isShowVipPrice?this.vipAllPrice:this.allPrice
|
||||||
|
|
@ -317,6 +326,7 @@ export default {
|
||||||
.pack {
|
.pack {
|
||||||
background: #35ac6a;
|
background: #35ac6a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.da {
|
.da {
|
||||||
background: #35ac6a;
|
background: #35ac6a;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,21 +2,14 @@
|
||||||
<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>
|
||||||
|
|
@ -89,6 +82,9 @@ export default {
|
||||||
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()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
@ -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>
|
||||||
|
|
||||||
|
|
@ -169,7 +169,7 @@ export default {
|
||||||
|
|
||||||
confirm() {
|
confirm() {
|
||||||
console.log(this.form.discount / 100)
|
console.log(this.form.discount / 100)
|
||||||
this.$emit("confirm", (this.form.discount / 100));
|
this.$emit("confirm", {discount:this.form.discount / 100,currentPrice:((this.form.discount*this.form.money)/100).toFixed(2)} );
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
open(data) {
|
open(data) {
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,7 @@ export default {
|
||||||
reset() {
|
reset() {
|
||||||
this.note = "";
|
this.note = "";
|
||||||
this.number = 1;
|
this.number = 1;
|
||||||
|
this.price='';
|
||||||
this.tags.map((v) => {
|
this.tags.map((v) => {
|
||||||
v.checked = false;
|
v.checked = false;
|
||||||
});
|
});
|
||||||
|
|
@ -129,11 +130,12 @@ export default {
|
||||||
open(item) {
|
open(item) {
|
||||||
this.goods = item ? item : this.goods;
|
this.goods = item ? item : this.goods;
|
||||||
this.max=returnCartPrice(this.goods,this.vipUser)
|
this.max=returnCartPrice(this.goods,this.vipUser)
|
||||||
|
console.log(this.goods);
|
||||||
this.show = true;
|
this.show = true;
|
||||||
if (item.productId != "-999") {
|
if (this.goods != "-999") {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.price = item.discountSaleAmount||'';
|
this.price =this.goods.discountSaleAmount||'';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
|
|
|
||||||
|
|
@ -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,10 +26,7 @@
|
||||||
</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>
|
||||||
|
|
@ -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,20 +136,22 @@ 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({
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,13 @@
|
||||||
<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">¥{{ item.lowPrice }}/{{ item.unitName }}</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 placeholder="请输入挂账金额" v-model="number" @input="inputNumber" @change="inputChange"
|
<el-input placeholder="请输入重量" v-model="number" @input="inputNumber" @change="inputChange"
|
||||||
@focus="inputFocus" @blur="inputBlur" :type="focus ? 'number' : 'text'">
|
@focus="inputFocus" @blur="inputBlur" :type="focus ? 'number' : 'text'">
|
||||||
<template slot="append">{{ item.unitName }}</template>
|
<template slot="append">{{ item.unitName }}</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</key-board>
|
</key-board>
|
||||||
<div class="price u-text-left w-full">¥ {{ item.lowPrice * number }}</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>
|
<el-button style="width: 100%;" type="primary" size="medium" @click="confirm">确定</el-button>
|
||||||
|
|
@ -30,20 +30,22 @@
|
||||||
</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 {
|
||||||
|
|
@ -60,25 +62,19 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
number(newval) {
|
number(newval) {
|
||||||
// 处理小数点
|
|
||||||
// if (newval == '.' || newval == '0.') {
|
|
||||||
// this.number = newval;
|
|
||||||
// } else {
|
|
||||||
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) + "元" : "";
|
|
||||||
}
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
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;
|
||||||
|
|
@ -86,51 +82,34 @@ 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(e);
|
||||||
if (e * 1 > this.payMoney * 1) {
|
|
||||||
this.tips = "已超出未结账金额";
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
inputChange(e) {
|
inputChange(e) {
|
||||||
if (e * 1 > this.payMoney * 1) {
|
|
||||||
this.tips = "已超出未结账金额";
|
|
||||||
}
|
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
},
|
||||||
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*1).toFixed(2));
|
||||||
// return this.$message("支付金额不正确");
|
|
||||||
// }
|
|
||||||
// if (!this.guazhangRen) {
|
|
||||||
// return this.$message("请选择挂账人");
|
|
||||||
// }
|
|
||||||
this.$emit("confirm", this.item, this.number);
|
|
||||||
this.close();
|
this.close();
|
||||||
},
|
},
|
||||||
open(item) {
|
open(item) {
|
||||||
|
console.log(item);
|
||||||
this.item = item
|
this.item = item
|
||||||
this.number = this.payMoney * 1;
|
|
||||||
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() { },
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
>
|
>
|
||||||
|
|
@ -1829,7 +1833,8 @@ export default {
|
||||||
if (this.order.selIndex < 0) {
|
if (this.order.selIndex < 0) {
|
||||||
return "免厨打";
|
return "免厨打";
|
||||||
}
|
}
|
||||||
return this.order.list[this.order.selIndex].isPrint
|
const cart=this.order.list[this.order.selIndex]
|
||||||
|
return (cart.isPrint||cart.isPrint===null)
|
||||||
? "免厨打"
|
? "免厨打"
|
||||||
: "打印";
|
: "打印";
|
||||||
},
|
},
|
||||||
|
|
@ -1856,10 +1861,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
gaijia() {
|
gaijia() {
|
||||||
|
if(!this.createOrder.data.amount ){
|
||||||
|
return 0
|
||||||
|
}
|
||||||
const disCountOriginPrice =
|
const disCountOriginPrice =
|
||||||
this.createOrder.data.amount - this.coupdiscount;
|
this.createOrder.data.amount - this.productCouponDiscountAmount;
|
||||||
const disocunt = (1 - this.createOrder.discount) * disCountOriginPrice;
|
const discountPrice= ((1-this.createOrder.discount)*disCountOriginPrice).toFixed(2)
|
||||||
return disocunt.toFixed(2);
|
return discountPrice;
|
||||||
},
|
},
|
||||||
pointsCanDicountMoney() {
|
pointsCanDicountMoney() {
|
||||||
return (this.yinFuJinE - this.points.toMoney).toFixed(2);
|
return (this.yinFuJinE - this.points.toMoney).toFixed(2);
|
||||||
|
|
@ -1876,11 +1884,24 @@ export default {
|
||||||
}, 0);
|
}, 0);
|
||||||
return n;
|
return n;
|
||||||
},
|
},
|
||||||
|
productCouponDiscountAmount(){
|
||||||
|
const n = this.quansSelArr.filter(v=>v.type==2).reduce((prve, cur) => {
|
||||||
|
return prve + cur.discountAmount * 1;
|
||||||
|
}, 0);
|
||||||
|
return n;
|
||||||
|
},
|
||||||
|
fullCouponDiscountAmount(){
|
||||||
|
const n = this.quansSelArr.filter(v=>v.type==1).reduce((prve, cur) => {
|
||||||
|
return prve + cur.discountAmount * 1;
|
||||||
|
}, 0);
|
||||||
|
return n;
|
||||||
|
},
|
||||||
currentPayMoney() {
|
currentPayMoney() {
|
||||||
const amount = this.createOrder.data.amount || 0;
|
const amount = this.createOrder.data.amount || 0;
|
||||||
const discount = this.createOrder.discount || 1;
|
const discount = this.createOrder.discount || 1;
|
||||||
// const total=((amount - this.coupdiscount) * this.createOrder.discount - this.points.toMoney)
|
// const total=((amount - this.coupdiscount) * this.createOrder.discount - this.points.toMoney)
|
||||||
const total = amount - this.gaijia - this.coupdiscount;
|
// const total = amount - this.gaijia - this.coupdiscount;
|
||||||
|
const total = amount - this.productCouponDiscountAmount-this.gaijia -this.fullCouponDiscountAmount;
|
||||||
return total <= 0 ? 0 : total;
|
return total <= 0 ? 0 : total;
|
||||||
},
|
},
|
||||||
yinFuJinE() {
|
yinFuJinE() {
|
||||||
|
|
@ -2088,7 +2109,8 @@ export default {
|
||||||
const cartNumber = this.order.list.reduce((a, b) => {
|
const cartNumber = this.order.list.reduce((a, b) => {
|
||||||
return a + b.number * 1;
|
return a + b.number * 1;
|
||||||
}, 0);
|
}, 0);
|
||||||
return oldNumber + cartNumber;
|
const total= oldNumber + cartNumber
|
||||||
|
return (Math.floor(total)==total?total:total.toFixed(2));
|
||||||
},
|
},
|
||||||
selGoodsHide() {
|
selGoodsHide() {
|
||||||
this.selGoods.show = false;
|
this.selGoods.show = false;
|
||||||
|
|
@ -2308,23 +2330,20 @@ export default {
|
||||||
const oldGoods = this.order.old.list.find((v) => {
|
const oldGoods = this.order.old.list.find((v) => {
|
||||||
return v.productId === productId && v.skuId === skuId;
|
return v.productId === productId && v.skuId === skuId;
|
||||||
});
|
});
|
||||||
|
const newNum=this.order.number + (oldGoods ? oldGoods.number : 0)
|
||||||
$updateCart({
|
$updateCart({
|
||||||
cartId: item.id,
|
cartId: item.id,
|
||||||
productId,
|
productId,
|
||||||
skuId,
|
skuId,
|
||||||
tableId: this.table.tableId,
|
tableId: this.table.tableId,
|
||||||
num: this.order.number + (oldGoods ? oldGoods.number : 0), // 0会删除此商品
|
num:newNum.toFixed(2) , // 0会删除此商品
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
this.$set(this.order.list, this.order.selIndex, {
|
this.$set(this.order.list, this.order.selIndex, {
|
||||||
...res,
|
...res,
|
||||||
specSnap: item.specSnap || res.skuName,
|
specSnap: item.specSnap || res.skuName,
|
||||||
number: this.order.number,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
this.updateOrder({
|
|
||||||
num: newval, // 0会删除此商品
|
|
||||||
});
|
|
||||||
}, 30),
|
}, 30),
|
||||||
"goods.query.productId": function (newval) {
|
"goods.query.productId": function (newval) {
|
||||||
if (!this.$goodsData) {
|
if (!this.$goodsData) {
|
||||||
|
|
@ -2361,15 +2380,9 @@ export default {
|
||||||
},
|
},
|
||||||
//称重商品确认
|
//称重商品确认
|
||||||
async refWeightGoodsConfirm(item,number){
|
async refWeightGoodsConfirm(item,number){
|
||||||
let {masterId} =await this.getMasterId()
|
console.log(item)
|
||||||
let obj = {
|
console.log(number)
|
||||||
num:number *1,
|
this.goodsClick(item,number,true)
|
||||||
masterId,
|
|
||||||
productId: this.selGoods.data.id,
|
|
||||||
}
|
|
||||||
// console.log(obj,'拿到的obj')
|
|
||||||
// console.log(this.selGoods,'拿到的')
|
|
||||||
this.chooseSkuConfirm()
|
|
||||||
},
|
},
|
||||||
//挂账人支付确认
|
//挂账人支付确认
|
||||||
guazhangPayConfirm(guazhangren, price) {
|
guazhangPayConfirm(guazhangren, price) {
|
||||||
|
|
@ -2583,9 +2596,9 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async returnCreateOrderData() {
|
async returnCreateOrderData() {
|
||||||
|
this.isWaitCall=false;
|
||||||
if (this.key == "isJieZhang" || this.order.list.length <= 0) {
|
if (this.key == "isJieZhang" || this.order.list.length <= 0) {
|
||||||
//结账来的下单或者已经生成订单
|
//结账来的下单或者已经生成订单
|
||||||
// this.order.old.list = formatOrderGoodsList(this.createOrder.data.detailList||[]);
|
|
||||||
this.isCreateOrder = true;
|
this.isCreateOrder = true;
|
||||||
return this.createOrder.data;
|
return this.createOrder.data;
|
||||||
}
|
}
|
||||||
|
|
@ -2920,7 +2933,8 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ChangeDiscount(discount) {
|
ChangeDiscount(e) {
|
||||||
|
const {discount,currentPrice}=e;
|
||||||
const fullCoupIndex = this.quansSelArr.findIndex((v) => v.type == 1);
|
const fullCoupIndex = this.quansSelArr.findIndex((v) => v.type == 1);
|
||||||
const fullCoup = this.quansSelArr[fullCoupIndex];
|
const fullCoup = this.quansSelArr[fullCoupIndex];
|
||||||
this.createOrder.discount = discount;
|
this.createOrder.discount = discount;
|
||||||
|
|
@ -2952,7 +2966,7 @@ export default {
|
||||||
if (!canDiscount) {
|
if (!canDiscount) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const amount = (this.createOrder.data.amount - this.coupdiscount).toFixed(
|
const amount = (this.createOrder.data.amount -this.productCouponDiscountAmount).toFixed(
|
||||||
2
|
2
|
||||||
);
|
);
|
||||||
console.log(amount);
|
console.log(amount);
|
||||||
|
|
@ -3299,6 +3313,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);
|
||||||
}
|
}
|
||||||
|
|
@ -3327,9 +3344,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() {
|
||||||
|
|
@ -3368,7 +3389,7 @@ export default {
|
||||||
return this.removeCart();
|
return this.removeCart();
|
||||||
}
|
}
|
||||||
if (key === "print") {
|
if (key === "print") {
|
||||||
const isPrint = orderGoods.isPrint;
|
const isPrint = (orderGoods.isPrint||orderGoods.isPrint===null)?true:false;
|
||||||
this.updateOrder({ isPrint: !isPrint });
|
this.updateOrder({ isPrint: !isPrint });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -3897,6 +3918,7 @@ export default {
|
||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
// this.goods.list = [];
|
// this.goods.list = [];
|
||||||
|
this.isAllWaitCall=false;
|
||||||
this.guazhangRen = "";
|
this.guazhangRen = "";
|
||||||
this.order.status = "";
|
this.order.status = "";
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
@ -4069,12 +4091,11 @@ 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){
|
||||||
console.log(item)
|
|
||||||
return this.refWeightGoodsShow(item)
|
return this.refWeightGoodsShow(item)
|
||||||
}
|
}
|
||||||
if (item.typeEnum === "sku") {
|
if (item.typeEnum === "sku") {
|
||||||
|
|
@ -4108,7 +4129,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 {
|
||||||
|
|
@ -4123,7 +4145,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