bug
This commit is contained in:
parent
922cfcb017
commit
4af99bb62e
@ -181,11 +181,11 @@
|
|||||||
<el-form-item label="商品条码" prop="goodsNo">
|
<el-form-item label="商品条码" prop="goodsNo">
|
||||||
<el-input v-model="form.goodsNo"
|
<el-input v-model="form.goodsNo"
|
||||||
@keydown.enter.native="getGoods(form)"
|
@keydown.enter.native="getGoods(form)"
|
||||||
:disabled="title == '编辑商品'"
|
:disabled="title == '商品维护'"
|
||||||
v-focus
|
v-focus
|
||||||
clearable
|
clearable
|
||||||
placeholder="商品的条码信息">
|
placeholder="商品的条码信息">
|
||||||
<el-button slot="append" @click="getGoods(form)">查询</el-button>
|
<!-- <el-button slot="append" @click="getGoods(form)">查询</el-button>-->
|
||||||
</el-input>
|
</el-input>
|
||||||
<!-- <div style="text-align: right;color: grey;font-size: 12px">-->
|
<!-- <div style="text-align: right;color: grey;font-size: 12px">-->
|
||||||
<!-- 商品无条码?您可以<span style="color: #00afff" @click="createGoodNo">生成条码</span>-->
|
<!-- 商品无条码?您可以<span style="color: #00afff" @click="createGoodNo">生成条码</span>-->
|
||||||
@ -474,7 +474,6 @@ export default {
|
|||||||
results = [];
|
results = [];
|
||||||
let falg = false;
|
let falg = false;
|
||||||
_this.supplierList.forEach(item => {
|
_this.supplierList.forEach(item => {
|
||||||
console.log(item)
|
|
||||||
if(item.name.includes(queryString)){
|
if(item.name.includes(queryString)){
|
||||||
results.push(item)
|
results.push(item)
|
||||||
falg = true
|
falg = true
|
||||||
@ -498,6 +497,7 @@ export default {
|
|||||||
// console.log(res)
|
// console.log(res)
|
||||||
if (res.data==1){
|
if (res.data==1){
|
||||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||||
|
this.supplier = val;
|
||||||
this.getSuppilers(val)
|
this.getSuppilers(val)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -697,7 +697,7 @@ export default {
|
|||||||
// this.cvsGoodId = response.data.cvsGoodId
|
// this.cvsGoodId = response.data.cvsGoodId
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.isAdd = true;
|
this.isAdd = true;
|
||||||
this.title = "编辑商品";
|
this.title = "商品维护";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 删除按钮操作
|
// 删除按钮操作
|
||||||
|
@ -454,7 +454,6 @@ export default {
|
|||||||
results = [];
|
results = [];
|
||||||
let falg = false;
|
let falg = false;
|
||||||
_this.supplierList.forEach(item => {
|
_this.supplierList.forEach(item => {
|
||||||
console.log(item)
|
|
||||||
if(item.name.includes(queryString)){
|
if(item.name.includes(queryString)){
|
||||||
results.push(item)
|
results.push(item)
|
||||||
falg = true
|
falg = true
|
||||||
@ -480,6 +479,7 @@ export default {
|
|||||||
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
if (res.data==1){
|
if (res.data==1){
|
||||||
|
this.supplier = val;
|
||||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||||
this.getSuppilers(val)
|
this.getSuppilers(val)
|
||||||
}
|
}
|
||||||
@ -680,7 +680,7 @@ export default {
|
|||||||
selectParentById(id).then(response => {
|
selectParentById(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "编辑品类";
|
this.title = "修改品类信息";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 删除按钮操作
|
// 删除按钮操作
|
||||||
@ -725,7 +725,7 @@ export default {
|
|||||||
}
|
}
|
||||||
.app-container{
|
.app-container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100vh;
|
height: 100%;
|
||||||
background: #f6f8f9;
|
background: #f6f8f9;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -31,16 +31,29 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="销售时间">
|
<el-form-item label="销售时间">
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="dateRange"-->
|
||||||
|
<!-- style="width: 240px"-->
|
||||||
|
<!-- size="medium"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="-"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="beginTime"
|
||||||
style="width: 240px"
|
style="width: 160px"
|
||||||
size="medium"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
placeholder="开始日期">
|
||||||
type="daterange"
|
</el-date-picker>
|
||||||
range-separator="-"
|
至
|
||||||
start-placeholder="开始日期"
|
<el-date-picker
|
||||||
end-placeholder="结束日期"
|
v-model="endTime"
|
||||||
></el-date-picker>
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
@ -173,6 +186,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
beginTime:"",
|
||||||
|
endTime:"",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: false,
|
loading: false,
|
||||||
@ -192,6 +207,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 导出信息
|
// 导出信息
|
||||||
exportSale(){
|
exportSale(){
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
exportSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
exportSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
const blob = new Blob([response], { type: 'application/json' })
|
const blob = new Blob([response], { type: 'application/json' })
|
||||||
this.$download.saveAs(blob,'商品销售统计.xlsx')
|
this.$download.saveAs(blob,'商品销售统计.xlsx')
|
||||||
@ -202,7 +221,11 @@ export default {
|
|||||||
detail(data){
|
detail(data){
|
||||||
this.table = true;
|
this.table = true;
|
||||||
this.queryParam.saleId = data.id;
|
this.queryParam.saleId = data.id;
|
||||||
listSaleDetail(this.queryParam).then(response => {
|
if (this.beginTime && this.endTime) {
|
||||||
|
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
|
listSaleDetail(this.addDateRange(this.queryParam, this.dateRange)).then(response => {
|
||||||
this.detailList = response.data.records;
|
this.detailList = response.data.records;
|
||||||
this.total1 = response.data.total;
|
this.total1 = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -211,6 +234,10 @@ export default {
|
|||||||
// 获取销售统计列表
|
// 获取销售统计列表
|
||||||
getList(){
|
getList(){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
listSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
listSale(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
this.list = response.data.records;
|
this.list = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
@ -229,6 +256,8 @@ export default {
|
|||||||
// 重置按钮操作
|
// 重置按钮操作
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
|
this.beginTime = ""
|
||||||
|
this.endTime = ""
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
@ -271,6 +271,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd(){
|
handleAdd(){
|
||||||
|
this.form1 = {}
|
||||||
this.title = "新增挂账单位"
|
this.title = "新增挂账单位"
|
||||||
this.open1 = true
|
this.open1 = true
|
||||||
},
|
},
|
||||||
@ -307,7 +308,7 @@ export default {
|
|||||||
this.open1 = false;
|
this.open1 = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
}else {
|
}else {
|
||||||
this.$modal.msgError("挂账单位信息修改失败");
|
this.$modal.msgError("挂账单位信息修改失败,挂账单位名称不可重复");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else {
|
}else {
|
||||||
@ -317,7 +318,7 @@ export default {
|
|||||||
this.open1 = false;
|
this.open1 = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
}else {
|
}else {
|
||||||
this.$modal.msgError("挂账单位信息创建失败,挂站单位名称不可重复");
|
this.$modal.msgError("挂账单位信息创建失败,挂账单位名称不可重复");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -69,16 +69,29 @@
|
|||||||
<!-- </el-select>-->
|
<!-- </el-select>-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-form-item label="注册时间">
|
<el-form-item label="注册时间">
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="dateRange"-->
|
||||||
|
<!-- style="width: 240px"-->
|
||||||
|
<!-- size="medium"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="至"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="beginTime"
|
||||||
style="width: 240px"
|
style="width: 160px"
|
||||||
size="medium"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
placeholder="开始日期">
|
||||||
type="daterange"
|
</el-date-picker>
|
||||||
range-separator="至"
|
至
|
||||||
start-placeholder="开始日期"
|
<el-date-picker
|
||||||
end-placeholder="结束日期"
|
v-model="endTime"
|
||||||
></el-date-picker>
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -522,6 +535,8 @@ export default {
|
|||||||
openPoint: false,
|
openPoint: false,
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
beginTime:"",
|
||||||
|
endTime:"",
|
||||||
// 默认排序
|
// 默认排序
|
||||||
defaultSort: {prop: 'updateTime', order: 'descending'},
|
defaultSort: {prop: 'updateTime', order: 'descending'},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
@ -594,7 +609,13 @@ export default {
|
|||||||
// 查询列表
|
// 查询列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
|
||||||
|
let dateRange = []
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
|
listUser(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||||
this.list = response.data.records;
|
this.list = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -602,7 +623,12 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获得统计信息
|
// 获得统计信息
|
||||||
getStatistic(){
|
getStatistic(){
|
||||||
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
let dateRange = []
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
|
listStatistic(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||||
this.addNum = response.data.addNum;
|
this.addNum = response.data.addNum;
|
||||||
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
||||||
if (!response.data.balance) {
|
if (!response.data.balance) {
|
||||||
@ -648,6 +674,8 @@ export default {
|
|||||||
this.queryParams.official = "";
|
this.queryParams.official = "";
|
||||||
this.ifBalance = ""
|
this.ifBalance = ""
|
||||||
this.storeIds = [];
|
this.storeIds = [];
|
||||||
|
this.beginTime = ""
|
||||||
|
this.endTime = ""
|
||||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
@ -20,16 +20,29 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间">
|
<el-form-item label="创建时间">
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="dateRange"-->
|
||||||
|
<!-- style="width: 240px"-->
|
||||||
|
<!-- size="medium"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="-"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="beginTime"
|
||||||
style="width: 240px"
|
style="width: 160px"
|
||||||
size="medium"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
placeholder="开始日期">
|
||||||
type="daterange"
|
</el-date-picker>
|
||||||
range-separator="-"
|
至
|
||||||
start-placeholder="开始日期"
|
<el-date-picker
|
||||||
end-placeholder="结束日期"
|
v-model="endTime"
|
||||||
></el-date-picker>
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
@ -328,16 +341,29 @@
|
|||||||
<el-input v-model="queryParams2.orderNo" placeholder="请输入订单号"></el-input>
|
<el-input v-model="queryParams2.orderNo" placeholder="请输入订单号"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="创建时间">
|
<el-form-item label="创建时间">
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="dateRange"-->
|
||||||
|
<!-- style="width: 240px"-->
|
||||||
|
<!-- size="medium"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="-"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="beginTime"
|
||||||
style="width: 240px"
|
style="width: 160px"
|
||||||
size="medium"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
placeholder="开始日期">
|
||||||
type="daterange"
|
</el-date-picker>
|
||||||
range-separator="-"
|
至
|
||||||
start-placeholder="开始日期"
|
<el-date-picker
|
||||||
end-placeholder="结束日期"
|
v-model="endTime"
|
||||||
></el-date-picker>
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
||||||
@ -452,6 +478,8 @@ export default {
|
|||||||
staffList:[],
|
staffList:[],
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
beginTime:"",
|
||||||
|
endTime:"",
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
type:'orderAmount',
|
type:'orderAmount',
|
||||||
@ -498,6 +526,10 @@ export default {
|
|||||||
methods:{
|
methods:{
|
||||||
getStaffCommissionList(){
|
getStaffCommissionList(){
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
listStaffCommissionRecord(this.addDateRange(this.queryParams1, this.dateRange)).then(res => {
|
listStaffCommissionRecord(this.addDateRange(this.queryParams1, this.dateRange)).then(res => {
|
||||||
this.staffCommissionList = res.data.records;
|
this.staffCommissionList = res.data.records;
|
||||||
this.total1 = res.data.total;
|
this.total1 = res.data.total;
|
||||||
@ -586,6 +618,10 @@ export default {
|
|||||||
// 查询员工提成记录信息
|
// 查询员工提成记录信息
|
||||||
getCommissionList(){
|
getCommissionList(){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
listCommissionRecord(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
listCommissionRecord(this.addDateRange(this.queryParams2, this.dateRange)).then(res => {
|
||||||
this.commissionList = res.data.records;
|
this.commissionList = res.data.records;
|
||||||
this.total2 = res.data.total;
|
this.total2 = res.data.total;
|
||||||
@ -655,6 +691,8 @@ export default {
|
|||||||
page: 1,
|
page: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
}
|
}
|
||||||
|
this.beginTime = ""
|
||||||
|
this.endTime = ""
|
||||||
// this.resetForm("queryForm");
|
// this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
@ -7,6 +7,8 @@ import com.fuint.business.convenienceSore.entity.SaleDetail;
|
|||||||
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
|
public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询销售详情信息
|
* 根据条件分页查询销售详情信息
|
||||||
@ -14,4 +16,11 @@ public interface SaleDetailMapper extends BaseMapper<SaleDetail> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public IPage<SaleDetailVo> selectSaleDetailList(Page page, @Param("saleDetail") SaleDetailVo saleDetail);
|
public IPage<SaleDetailVo> selectSaleDetailList(Page page, @Param("saleDetail") SaleDetailVo saleDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件查询销售详情信息
|
||||||
|
* @param saleDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SaleDetailVo> selectSaleDetails(@Param("saleDetail") SaleDetailVo saleDetail);
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,26 @@
|
|||||||
<where>
|
<where>
|
||||||
sd.store_id = #{saleDetail.storeId}
|
sd.store_id = #{saleDetail.storeId}
|
||||||
and sd.sale_id = #{saleDetail.saleId}
|
and sd.sale_id = #{saleDetail.saleId}
|
||||||
|
<if test="saleDetail.params.beginTime != null and saleDetail.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(sd.create_time,'%y%m%d') >= date_format(#{saleDetail.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="saleDetail.params.endTime != null and saleDetail.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(sd.create_time,'%y%m%d') <= date_format(#{saleDetail.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="selectSaleDetails" resultType="com.fuint.business.convenienceSore.vo.SaleDetailVo"
|
||||||
|
parameterType="com.fuint.business.convenienceSore.vo.SaleDetailVo">
|
||||||
|
<include refid="selectSaleDetail"></include>
|
||||||
|
<where>
|
||||||
|
sd.store_id = #{saleDetail.storeId}
|
||||||
|
and sd.sale_id = #{saleDetail.saleId}
|
||||||
|
<if test="saleDetail.params.beginTime != null and saleDetail.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(sd.create_time,'%y%m%d') >= date_format(#{saleDetail.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="saleDetail.params.endTime != null and saleDetail.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(sd.create_time,'%y%m%d') <= date_format(#{saleDetail.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -19,12 +19,6 @@
|
|||||||
<if test="sale.goodsNo != null and sale.goodsNo != ''">
|
<if test="sale.goodsNo != null and sale.goodsNo != ''">
|
||||||
and mg.goods_no like concat('%', #{sale.goodsNo}, '%')
|
and mg.goods_no like concat('%', #{sale.goodsNo}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="sale.params.beginTime != null and sale.params.beginTime != ''"><!-- 开始时间检索 -->
|
|
||||||
and date_format(sa.update_time,'%y%m%d') >= date_format(#{sale.params.beginTime},'%y%m%d')
|
|
||||||
</if>
|
|
||||||
<if test="sale.params.endTime != null and sale.params.endTime != ''"><!-- 结束时间检索 -->
|
|
||||||
and date_format(sa.update_time,'%y%m%d') <= date_format(#{sale.params.endTime},'%y%m%d')
|
|
||||||
</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSales" resultType="com.fuint.business.convenienceSore.vo.SaleStatisticVo"
|
<select id="selectSales" resultType="com.fuint.business.convenienceSore.vo.SaleStatisticVo"
|
||||||
|
@ -7,6 +7,8 @@ import com.fuint.business.convenienceSore.entity.SaleDetail;
|
|||||||
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售详情信息 业务层
|
* 销售详情信息 业务层
|
||||||
*/
|
*/
|
||||||
@ -19,6 +21,13 @@ public interface SaleDetailService extends IService<SaleDetail> {
|
|||||||
*/
|
*/
|
||||||
public IPage<SaleDetailVo> selectSaleDetailList(Page page, SaleDetailVo saleDetail);
|
public IPage<SaleDetailVo> selectSaleDetailList(Page page, SaleDetailVo saleDetail);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件查询销售详情信息
|
||||||
|
* @param saleDetail
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<SaleDetailVo> selectSaleDetails(SaleDetailVo saleDetail);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加销售详情信息
|
* 添加销售详情信息
|
||||||
* @param saleDetail
|
* @param saleDetail
|
||||||
|
@ -213,7 +213,9 @@ public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> im
|
|||||||
public int updateCvsGood(CvsGoods goods) {
|
public int updateCvsGood(CvsGoods goods) {
|
||||||
CvsGoods cvsGoods = this.selectCvsGoodsByName(goods.getName(), goods.getStoreId());
|
CvsGoods cvsGoods = this.selectCvsGoodsByName(goods.getName(), goods.getStoreId());
|
||||||
int row = 0;
|
int row = 0;
|
||||||
if (ObjectUtil.isEmpty(cvsGoods)){
|
if (ObjectUtil.isNotEmpty(cvsGoods) && goods.getId()!=cvsGoods.getId()){
|
||||||
|
row = 0;
|
||||||
|
}else {
|
||||||
row = baseMapper.updateById(goods);
|
row = baseMapper.updateById(goods);
|
||||||
}
|
}
|
||||||
return row;
|
return row;
|
||||||
|
@ -16,6 +16,8 @@ import com.fuint.common.util.TokenUtil;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售详情信息 业务层
|
* 销售详情信息 业务层
|
||||||
*/
|
*/
|
||||||
@ -40,6 +42,13 @@ public class SaleDetailServiceImpl extends ServiceImpl<SaleDetailMapper, SaleDet
|
|||||||
return saleDetailVoIPage;
|
return saleDetailVoIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SaleDetailVo> selectSaleDetails(SaleDetailVo saleDetail) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
saleDetail.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return baseMapper.selectSaleDetails(saleDetail);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加销售详情信息
|
* 添加销售详情信息
|
||||||
* @param saleDetail
|
* @param saleDetail
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
package com.fuint.business.convenienceSore.service.impl;
|
package com.fuint.business.convenienceSore.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.convenienceSore.entity.SaleStatistic;
|
import com.fuint.business.convenienceSore.entity.SaleStatistic;
|
||||||
import com.fuint.business.convenienceSore.mapper.SaleStatisticMapper;
|
import com.fuint.business.convenienceSore.mapper.SaleStatisticMapper;
|
||||||
|
import com.fuint.business.convenienceSore.service.SaleDetailService;
|
||||||
import com.fuint.business.convenienceSore.service.SaleStatisticService;
|
import com.fuint.business.convenienceSore.service.SaleStatisticService;
|
||||||
|
import com.fuint.business.convenienceSore.vo.SaleDetailVo;
|
||||||
import com.fuint.business.convenienceSore.vo.SaleStatisticVo;
|
import com.fuint.business.convenienceSore.vo.SaleStatisticVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -19,6 +24,10 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, SaleStatistic> implements SaleStatisticService {
|
public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, SaleStatistic> implements SaleStatisticService {
|
||||||
|
@Autowired
|
||||||
|
@Lazy
|
||||||
|
private SaleDetailService saleDetailService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询销售统计信息
|
* 根据条件分页查询销售统计信息
|
||||||
* @param page
|
* @param page
|
||||||
@ -30,6 +39,28 @@ public class SaleStatisticServiceImpl extends ServiceImpl<SaleStatisticMapper, S
|
|||||||
Integer storeId = nowAccountInfo.getStoreId();
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
saleStatisticVo.setStoreId(storeId);
|
saleStatisticVo.setStoreId(storeId);
|
||||||
IPage<SaleStatisticVo> saleStatisticVoIPage = baseMapper.selectSaleList(page, saleStatisticVo);
|
IPage<SaleStatisticVo> saleStatisticVoIPage = baseMapper.selectSaleList(page, saleStatisticVo);
|
||||||
|
for (SaleStatisticVo record : saleStatisticVoIPage.getRecords()) {
|
||||||
|
SaleDetailVo saleDetailVo = new SaleDetailVo();
|
||||||
|
saleDetailVo.setSaleId(record.getId());
|
||||||
|
saleDetailVo.setParams(saleStatisticVo.getParams());
|
||||||
|
List<SaleDetailVo> saleDetailVos = saleDetailService.selectSaleDetails(saleDetailVo);
|
||||||
|
Integer saleNumber = 0;
|
||||||
|
Double saleTotal = 0.0;
|
||||||
|
Double costTotal = 0.0;
|
||||||
|
Double profitTotal = 0.0;
|
||||||
|
if (CollectionUtil.isNotEmpty(saleDetailVos)){
|
||||||
|
for (SaleDetailVo detailVo : saleDetailVos) {
|
||||||
|
saleNumber += detailVo.getSaleNumber();
|
||||||
|
saleTotal += detailVo.getSaleTotal();
|
||||||
|
costTotal += detailVo.getCostTotal();
|
||||||
|
profitTotal += detailVo.getProfitTotal();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
record.setSaleNumber(saleNumber);
|
||||||
|
record.setSaleTotal(saleTotal);
|
||||||
|
record.setCostTotal(costTotal);
|
||||||
|
record.setProfitTotal(profitTotal);
|
||||||
|
}
|
||||||
return saleStatisticVoIPage;
|
return saleStatisticVoIPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,17 @@ public class CreditUnitServiceImpl extends ServiceImpl<CreditUnitMapper, CreditU
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int updateCreditUnit(CreditUnit creditUnit) {
|
public int updateCreditUnit(CreditUnit creditUnit) {
|
||||||
int row = baseMapper.updateById(creditUnit);
|
// 查询挂账单位是否存在相同名字
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("unit_name",creditUnit.getUnitName());
|
||||||
|
queryWrapper.eq("store_id",creditUnit.getStoreId());
|
||||||
|
CreditUnit creditUnit1 = baseMapper.selectOne(queryWrapper);
|
||||||
|
int row = 0;
|
||||||
|
if (ObjectUtil.isNotEmpty(creditUnit1) && creditUnit1.getId() != creditUnit.getId()){
|
||||||
|
row = 0;
|
||||||
|
}else {
|
||||||
|
row = baseMapper.updateById(creditUnit);
|
||||||
|
}
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,17 +128,19 @@ public class LJStoreServiceImpl extends ServiceImpl<LJStoreMapper, LJStore> impl
|
|||||||
}else {
|
}else {
|
||||||
LJStore store = this.selectStoreByStoreId(Integer.valueOf(storeId));
|
LJStore store = this.selectStoreByStoreId(Integer.valueOf(storeId));
|
||||||
if (store.getStatus().equals("qy") && store.getIfDelete().equals("0")){
|
if (store.getStatus().equals("qy") && store.getIfDelete().equals("0")){
|
||||||
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
if (StringUtils.isNotEmpty(store.getLatitude()) && StringUtils.isNotEmpty(store.getLongitude())) {
|
||||||
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
double dLat = Math.toRadians(Double.parseDouble(store.getLatitude()) - lat);
|
||||||
|
double dLon = Math.toRadians(Double.parseDouble(store.getLongitude()) - lon);
|
||||||
|
|
||||||
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
|
||||||
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
|
Math.cos(Math.toRadians(lat)) * Math.cos(Math.toRadians(Double.parseDouble(store.getLatitude()))) *
|
||||||
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
Math.sin(dLon / 2) * Math.sin(dLon / 2);
|
||||||
|
|
||||||
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||||
|
|
||||||
double min = earthRadius * c;
|
double min = earthRadius * c;
|
||||||
distance = min;
|
distance = min;
|
||||||
|
}
|
||||||
ljStore = store;
|
ljStore = store;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +162,7 @@
|
|||||||
and date_format(mub.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
and date_format(mub.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
ORDER BY mub.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 查询会员统计信息-->
|
<!-- 查询会员统计信息-->
|
||||||
|
@ -226,15 +226,15 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
|
|||||||
this.insertUserGrade(userGrade,storeId);
|
this.insertUserGrade(userGrade,storeId);
|
||||||
userGrade.setGrade(2);
|
userGrade.setGrade(2);
|
||||||
userGrade.setName("白金会员");
|
userGrade.setName("白金会员");
|
||||||
userGrade.setGrowthValue(200);
|
userGrade.setGrowthValue(500);
|
||||||
this.insertUserGrade(userGrade,storeId);
|
this.insertUserGrade(userGrade,storeId);
|
||||||
userGrade.setGrade(3);
|
userGrade.setGrade(3);
|
||||||
userGrade.setName("黄金会员");
|
userGrade.setName("黄金会员");
|
||||||
userGrade.setGrowthValue(300);
|
userGrade.setGrowthValue(2000);
|
||||||
this.insertUserGrade(userGrade,storeId);
|
this.insertUserGrade(userGrade,storeId);
|
||||||
userGrade.setGrade(4);
|
userGrade.setGrade(4);
|
||||||
userGrade.setName("钻石会员");
|
userGrade.setName("钻石会员");
|
||||||
userGrade.setGrowthValue(400);
|
userGrade.setGrowthValue(5000);
|
||||||
this.insertUserGrade(userGrade,storeId);
|
this.insertUserGrade(userGrade,storeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<div class="center-left">
|
<div class="center-left">
|
||||||
<div class="center-vh">
|
<div class="center-vh">
|
||||||
<div class="center-left-top">
|
<div class="center-left-top">
|
||||||
<div class="vip-bottom" v-if="isMember == false" @click="dialogVisiblevip = true">
|
<div class="vip-bottom" v-if="isMember == false" @click="queryUser">
|
||||||
<div>会员搜索</div>
|
<div>会员搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else style="width: 96%;margin: 0 auto;display: flex;justify-content: space-between">
|
<div v-else style="width: 96%;margin: 0 auto;display: flex;justify-content: space-between">
|
||||||
@ -863,7 +863,7 @@
|
|||||||
<el-input v-model="authCode"
|
<el-input v-model="authCode"
|
||||||
v-focus ref="getFocus"
|
v-focus ref="getFocus"
|
||||||
autofocus
|
autofocus
|
||||||
@input="changeSeekZero"
|
@input="changeSeekZero1"
|
||||||
@keydown.enter.native="collection1"
|
@keydown.enter.native="collection1"
|
||||||
placeholder="请输入收款金额">
|
placeholder="请输入收款金额">
|
||||||
</el-input>
|
</el-input>
|
||||||
@ -1103,7 +1103,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- 支付成功后小票打印内容-->
|
<!-- 支付成功后小票打印内容 收银台订单-->
|
||||||
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
<div id="reportSuccess" ref="report" class="box-center" v-show="false">
|
||||||
<div class="box-title">订单统计</div>
|
<div class="box-title">订单统计</div>
|
||||||
<div class="box-ge">
|
<div class="box-ge">
|
||||||
@ -1116,10 +1116,6 @@
|
|||||||
<div v-if="isMember == false">{{ item.retailPrice }}</div>
|
<div v-if="isMember == false">{{ item.retailPrice }}</div>
|
||||||
<div v-else>¥{{ item.memberPrice }}</div>
|
<div v-else>¥{{ item.memberPrice }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" v-if="rechargeBalCard">
|
|
||||||
<div>充值金额</div>
|
|
||||||
<div>{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-box">
|
<div class="input-box">
|
||||||
<div>支付方式</div>
|
<div>支付方式</div>
|
||||||
<div v-if="payType == 'CASH'">现金</div>
|
<div v-if="payType == 'CASH'">现金</div>
|
||||||
@ -1129,23 +1125,11 @@
|
|||||||
<div v-else-if="payType == 'credit'">挂账</div>
|
<div v-else-if="payType == 'credit'">挂账</div>
|
||||||
<div v-else>小程序码</div>
|
<div v-else>小程序码</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" v-if="rechargeBalCard">
|
|
||||||
<div>赠送金额</div>
|
|
||||||
<div>¥{{ rechargeBalCard.giftBalance }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-box" v-if="rechargeBalCard">
|
|
||||||
<div>到账金额</div>
|
|
||||||
<div>¥{{ rechargeBalCard.amount ? rechargeBalCard.giftBalance + rechargeBalCard.amount : rechargeBalCard.giftBalance + rechargeBalCard.rechargeBalance }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-box" v-if="rechargeBalCard">
|
|
||||||
<div>实付款</div>
|
|
||||||
<div>¥{{ rechargeBalCard.amount ? rechargeBalCard.amount : rechargeBalCard.rechargeBalance }}</div>
|
|
||||||
</div>
|
|
||||||
<div class="input-box1">
|
<div class="input-box1">
|
||||||
<div v-if="payType == 'credit'">挂账单位</div>
|
<div v-if="payType == 'credit'">挂账单位</div>
|
||||||
<div>{{ form1.unitName }}</div>
|
<div>{{ form1.unitName }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
|
<div class="input-box">
|
||||||
<div v-if="payType != 'credit'">合计</div>
|
<div v-if="payType != 'credit'">合计</div>
|
||||||
<div v-else>挂账金额</div>
|
<div v-else>挂账金额</div>
|
||||||
<div>¥{{ (oilAmount+(+goodsAmount)).toFixed(2) }}</div>
|
<div>¥{{ (oilAmount+(+goodsAmount)).toFixed(2) }}</div>
|
||||||
@ -1162,7 +1146,7 @@
|
|||||||
<div>囤油卡付款</div>
|
<div>囤油卡付款</div>
|
||||||
<div>¥{{ consumeRefuelMoney.toFixed(2) }}</div>
|
<div>¥{{ consumeRefuelMoney.toFixed(2) }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-box" v-if="!rechargeBalCard && rechargeOilCard">
|
<div class="input-box">
|
||||||
<div>实付款</div>
|
<div>实付款</div>
|
||||||
<div v-if="payType == 'credit'">¥0.00</div>
|
<div v-if="payType == 'credit'">¥0.00</div>
|
||||||
<div v-else>¥{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
|
<div v-else>¥{{ ((+oilActualPay)+(+goodsActualPay)).toFixed(2) }}</div>
|
||||||
@ -1173,6 +1157,79 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 支付成功后小票打印内容 充值订单-->
|
||||||
|
<div id="reportSuccess" ref="report1" class="box-center" v-show="false">
|
||||||
|
<div class="box-title">订单统计</div>
|
||||||
|
<div class="box-ge">
|
||||||
|
<div class="input-box">
|
||||||
|
<div>充值金额</div>
|
||||||
|
<div>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>赠送金额</div>
|
||||||
|
<div>¥{{ cardValueForm.giftBalance }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>到账金额</div>
|
||||||
|
<div>¥{{ cardValueForm.giftBalance + realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>支付方式</div>
|
||||||
|
<div v-if="cardValueForm.paymentType == 'CASH'">现金</div>
|
||||||
|
<div v-else-if="cardValueForm.paymentType == 'WECHAT'">微信</div>
|
||||||
|
<div v-else-if="cardValueForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||||
|
<div v-else-if="cardValueForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>实付款</div>
|
||||||
|
<div v-if="cardValueForm.paymentType == 'CASH'">¥{{ authCode }}</div>
|
||||||
|
<div v-else>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box" v-if="seekZero>0">
|
||||||
|
<div>找零</div>
|
||||||
|
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 支付成功后小票打印内容 充值订单-->
|
||||||
|
<div id="reportSuccess" ref="report2" class="box-center" v-show="false">
|
||||||
|
<div class="box-title">订单统计</div>
|
||||||
|
<div class="box-ge">
|
||||||
|
<div class="input-box">
|
||||||
|
<div>充值油品</div>
|
||||||
|
<div>{{ cardFuelDieselForm.type }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>充值升数</div>
|
||||||
|
<div>{{ cardFuelDieselForm.incomeLitres }}L</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>订单金额</div>
|
||||||
|
<div>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>锁价金额</div>
|
||||||
|
<div>¥{{ cardFuelDieselForm.lockupPrice }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>支付方式</div>
|
||||||
|
<div v-if="cardFuelDieselForm.paymentType == 'CASH'">现金</div>
|
||||||
|
<div v-else-if="cardFuelDieselForm.paymentType == 'WECHAT'">微信</div>
|
||||||
|
<div v-else-if="cardFuelDieselForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||||
|
<div v-else-if="cardFuelDieselForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>实付款</div>
|
||||||
|
<div>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box" v-if="seekZero>0">
|
||||||
|
<div>找零</div>
|
||||||
|
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -1209,8 +1266,8 @@
|
|||||||
components: {SelectStaff},
|
components: {SelectStaff},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
rechargeBalCard:{},
|
rechargeBalCard:false,
|
||||||
rechargeOilCard:{},
|
rechargeOilCard:false,
|
||||||
openStaff:false,
|
openStaff:false,
|
||||||
cardFuelDieselForm: {
|
cardFuelDieselForm: {
|
||||||
mtStaffId: '',
|
mtStaffId: '',
|
||||||
@ -1594,6 +1651,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
queryUser(){
|
||||||
|
this.refuelMoney = null
|
||||||
|
this.dialogVisiblevip = true
|
||||||
|
},
|
||||||
handleDataFromChild(data) {
|
handleDataFromChild(data) {
|
||||||
this.openStaff = false
|
this.openStaff = false
|
||||||
// this.cardFuelDieselForm= {
|
// this.cardFuelDieselForm= {
|
||||||
@ -1776,13 +1837,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 充值后更新会员信息
|
// 充值后更新会员信息
|
||||||
getMemberAfter(){
|
async getMemberAfter(){
|
||||||
getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
await getUserInfoMobile({mobile:this.member.mobile}).then(res => {
|
||||||
if (res.data){
|
if (res.data){
|
||||||
this.member = res.data
|
this.member = res.data
|
||||||
if (res.data.refuelMoney){
|
if (res.data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(res.data.refuelMoney)
|
this.refuelMoney = JSON.parse(res.data.refuelMoney)
|
||||||
}
|
}
|
||||||
|
this.rechargeBalCard = false
|
||||||
|
this.rechargeOilCard = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -1829,19 +1892,20 @@
|
|||||||
let this_ = this
|
let this_ = this
|
||||||
//
|
//
|
||||||
let timer = setInterval(async () => {
|
let timer = setInterval(async () => {
|
||||||
await getCheckTheStatusOfYourPaymentApi(id).then(response => {
|
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||||
if (response.data != null) {
|
if (response.data != null) {
|
||||||
const payStatus = response.data.payStatus
|
const payStatus = response.data.payStatus
|
||||||
if (payStatus === "unpaid") {
|
if (payStatus === "unpaid") {
|
||||||
this_.isQuery = true;
|
this_.isQuery = true;
|
||||||
}else if (payStatus === "paid") {
|
} else if (payStatus === "paid") {
|
||||||
// 当支付成功时
|
// 当支付成功时
|
||||||
this_.isPaySuccess = true;
|
this_.isPaySuccess = true;
|
||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
// this_.rechargeBalCard = response.data
|
this_.rechargeBalCard = true
|
||||||
// this_.printLocally()
|
await this_.printLocally1()
|
||||||
this_.getMemberAfter();
|
await this_.getMemberAfter();
|
||||||
}else if (payStatus === "payFail") {
|
clearInterval(timer);
|
||||||
|
} else if (payStatus === "payFail") {
|
||||||
this_.isPaySuccess = false;
|
this_.isPaySuccess = false;
|
||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
}
|
}
|
||||||
@ -1906,7 +1970,7 @@
|
|||||||
|
|
||||||
|
|
||||||
let timer = setInterval(async () => {
|
let timer = setInterval(async () => {
|
||||||
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
|
getCheckTheStatusOfYourPaymentByFuelApi(id).then(async response => {
|
||||||
if (response.data != null) {
|
if (response.data != null) {
|
||||||
if (response.data.payStatus == "unpaid") {
|
if (response.data.payStatus == "unpaid") {
|
||||||
this_.isQuery = true;
|
this_.isQuery = true;
|
||||||
@ -1914,9 +1978,10 @@
|
|||||||
if (response.data.payStatus == "paid") {
|
if (response.data.payStatus == "paid") {
|
||||||
this_.isPaySuccess = true;
|
this_.isPaySuccess = true;
|
||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
this_.rechargeOilCard = response.data
|
this_.rechargeOilCard = true
|
||||||
this_.printLocally()
|
await this_.printLocally2()
|
||||||
this_.getMemberAfter();
|
await this_.getMemberAfter();
|
||||||
|
clearInterval(timer);
|
||||||
}
|
}
|
||||||
if (response.data.payStatus == "payFail") {
|
if (response.data.payStatus == "payFail") {
|
||||||
this_.isPaySuccess = false;
|
this_.isPaySuccess = false;
|
||||||
@ -2193,6 +2258,176 @@
|
|||||||
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
var fromHtml = bodyStyle+this.$refs.report.innerHTML
|
||||||
|
|
||||||
|
|
||||||
|
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||||
|
|
||||||
|
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||||
|
|
||||||
|
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||||
|
// let preview = LODOP.PREVIEW();
|
||||||
|
// console.log("preview",preview);
|
||||||
|
LODOP.PRINT();
|
||||||
|
|
||||||
|
},
|
||||||
|
async printLocally1() {
|
||||||
|
//初始化打印函数
|
||||||
|
let LODOP = getLodop(); // 初始化打印
|
||||||
|
LODOP.PRINT_INIT();
|
||||||
|
var bodyStyle = `<style>
|
||||||
|
.input-box{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-box1{
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.box-ge{
|
||||||
|
border-bottom: 1px solid #000000 ;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.box-title{
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.input-hui{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-hui-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-box-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box-center{
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
`
|
||||||
|
var fromHtml = bodyStyle+this.$refs.report1.innerHTML
|
||||||
|
|
||||||
|
|
||||||
|
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||||
|
|
||||||
|
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||||
|
|
||||||
|
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||||
|
// let preview = LODOP.PREVIEW();
|
||||||
|
// console.log("preview",preview);
|
||||||
|
LODOP.PRINT();
|
||||||
|
|
||||||
|
},
|
||||||
|
async printLocally2() {
|
||||||
|
//初始化打印函数
|
||||||
|
let LODOP = getLodop(); // 初始化打印
|
||||||
|
LODOP.PRINT_INIT();
|
||||||
|
var bodyStyle = `<style>
|
||||||
|
.input-box{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-box1{
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.box-ge{
|
||||||
|
border-bottom: 1px solid #000000 ;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.box-title{
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.input-hui{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-hui-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-box-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box-center{
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
`
|
||||||
|
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||||
|
|
||||||
|
|
||||||
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||||
|
|
||||||
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||||
@ -2310,16 +2545,19 @@
|
|||||||
obj = item;
|
obj = item;
|
||||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||||
results.push(obj)
|
results.push(obj)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (item.personCredit.includes(queryString)){
|
if (item.personCredit.includes(queryString)){
|
||||||
obj = item;
|
obj = item;
|
||||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||||
results.push(obj)
|
results.push(obj)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (item.contactMobile.includes(queryString)){
|
if (item.contactMobile.includes(queryString)){
|
||||||
obj = item;
|
obj = item;
|
||||||
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
obj.value = `${item.unitName}(${item.personCredit} ${item.contactMobile})`
|
||||||
results.push(obj)
|
results.push(obj)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -2329,6 +2567,10 @@
|
|||||||
changeSeekZero(){
|
changeSeekZero(){
|
||||||
this.seekZero = this.authCode - this.oilActualPay - this.goodsActualPay
|
this.seekZero = this.authCode - this.oilActualPay - this.goodsActualPay
|
||||||
},
|
},
|
||||||
|
// 计算找零金额
|
||||||
|
changeSeekZero1(){
|
||||||
|
this.seekZero = this.authCode - this.realyPayBills
|
||||||
|
},
|
||||||
// 获取会员等级id
|
// 获取会员等级id
|
||||||
getGradeName(list,id){
|
getGradeName(list,id){
|
||||||
let name = "";
|
let name = "";
|
||||||
@ -2500,7 +2742,8 @@
|
|||||||
this.countAmountFull();
|
this.countAmountFull();
|
||||||
},
|
},
|
||||||
// 模糊查询商品信息
|
// 模糊查询商品信息
|
||||||
querySearch(queryString, cb) {
|
async querySearch(queryString, cb) {
|
||||||
|
await this.getGoods()
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let results = _this.goodsList;
|
let results = _this.goodsList;
|
||||||
if (queryString != ""){
|
if (queryString != ""){
|
||||||
@ -2508,9 +2751,11 @@
|
|||||||
_this.goodsList.forEach(item => {
|
_this.goodsList.forEach(item => {
|
||||||
if(item.name.includes(queryString)){
|
if(item.name.includes(queryString)){
|
||||||
results.push(item)
|
results.push(item)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if(item.goodsNo.includes(queryString)){
|
if(item.goodsNo.includes(queryString)){
|
||||||
results.push(item)
|
results.push(item)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -3155,6 +3400,8 @@
|
|||||||
this.member = data;
|
this.member = data;
|
||||||
if (data.refuelMoney){
|
if (data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(data.refuelMoney)
|
this.refuelMoney = JSON.parse(data.refuelMoney)
|
||||||
|
}else {
|
||||||
|
this.refuelMoney = null
|
||||||
}
|
}
|
||||||
this.dialogVisibleMember = false;
|
this.dialogVisibleMember = false;
|
||||||
},
|
},
|
||||||
@ -3476,6 +3723,8 @@
|
|||||||
this.member = response.data
|
this.member = response.data
|
||||||
if (response.data.refuelMoney){
|
if (response.data.refuelMoney){
|
||||||
this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
this.refuelMoney = JSON.parse(response.data.refuelMoney)
|
||||||
|
}else {
|
||||||
|
this.refuelMoney = null
|
||||||
}
|
}
|
||||||
this.storeId = response.data.storeId
|
this.storeId = response.data.storeId
|
||||||
this.isSure = false
|
this.isSure = false
|
||||||
|
@ -69,16 +69,29 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="注册时间">
|
<el-form-item label="注册时间">
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- v-model="dateRange"-->
|
||||||
|
<!-- style="width: 240px"-->
|
||||||
|
<!-- size="medium"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- type="daterange"-->
|
||||||
|
<!-- range-separator="至"-->
|
||||||
|
<!-- start-placeholder="开始日期"-->
|
||||||
|
<!-- end-placeholder="结束日期"-->
|
||||||
|
<!-- ></el-date-picker>-->
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="dateRange"
|
v-model="beginTime"
|
||||||
style="width: 240px"
|
style="width: 160px"
|
||||||
size="medium"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
placeholder="开始日期">
|
||||||
type="daterange"
|
</el-date-picker>
|
||||||
range-separator="至"
|
至
|
||||||
start-placeholder="开始日期"
|
<el-date-picker
|
||||||
end-placeholder="结束日期"
|
v-model="endTime"
|
||||||
></el-date-picker>
|
style="width: 160px"
|
||||||
|
type="date"
|
||||||
|
placeholder="结束日期">
|
||||||
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -203,11 +216,7 @@
|
|||||||
<div>{{ scope.row.consumeNum }}</div>
|
<div>{{ scope.row.consumeNum }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="注册时间" align="center" width="160" prop="createTime">
|
<el-table-column label="注册时间" align="center" width="160" prop="balCreateTime"/>
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.status == 'qy'">启用</el-tag>
|
<el-tag v-if="scope.row.status == 'qy'">启用</el-tag>
|
||||||
@ -521,6 +530,8 @@
|
|||||||
openPoint: false,
|
openPoint: false,
|
||||||
// 日期范围
|
// 日期范围
|
||||||
dateRange: [],
|
dateRange: [],
|
||||||
|
beginTime:"",
|
||||||
|
endTime:"",
|
||||||
// 默认排序
|
// 默认排序
|
||||||
defaultSort: {prop: 'updateTime', order: 'descending'},
|
defaultSort: {prop: 'updateTime', order: 'descending'},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
@ -587,7 +598,12 @@
|
|||||||
// 查询列表
|
// 查询列表
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listUser(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
let dateRange = []
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
|
listUser(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||||
this.list = response.data.records;
|
this.list = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -596,7 +612,12 @@
|
|||||||
},
|
},
|
||||||
// 获得统计信息
|
// 获得统计信息
|
||||||
getStatistic(){
|
getStatistic(){
|
||||||
listStatistic(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
let dateRange = []
|
||||||
|
if (this.beginTime && this.endTime) {
|
||||||
|
dateRange.push(this.beginTime.toLocaleDateString())
|
||||||
|
dateRange.push(this.endTime.toLocaleDateString())
|
||||||
|
}
|
||||||
|
listStatistic(this.addDateRange(this.queryParams, dateRange)).then( response => {
|
||||||
this.addNum = response.data.addNum;
|
this.addNum = response.data.addNum;
|
||||||
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
this.yesterdayAddNum = response.data.yesterdayAddNum;
|
||||||
if (!response.data.balance) {
|
if (!response.data.balance) {
|
||||||
@ -636,6 +657,8 @@
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams.storeIds = '';
|
this.queryParams.storeIds = '';
|
||||||
this.storeIds = [];
|
this.storeIds = [];
|
||||||
|
this.beginTime = ""
|
||||||
|
this.endTime = ""
|
||||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order);
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
@ -814,6 +814,80 @@
|
|||||||
<el-button type="primary" @click="submitSubCard">确 定</el-button>
|
<el-button type="primary" @click="submitSubCard">确 定</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- 支付成功后小票打印内容 充值订单-->
|
||||||
|
<div id="reportSuccess" ref="report1" class="box-center" v-show="false">
|
||||||
|
<div class="box-title">订单统计</div>
|
||||||
|
<div class="box-ge">
|
||||||
|
<div class="input-box">
|
||||||
|
<div>充值金额</div>
|
||||||
|
<div>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>赠送金额</div>
|
||||||
|
<div>¥{{ cardValueForm.giftBalance }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>到账金额</div>
|
||||||
|
<div>¥{{ cardValueForm.giftBalance + realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>支付方式</div>
|
||||||
|
<div v-if="cardValueForm.paymentType == 'CASH'">现金</div>
|
||||||
|
<div v-else-if="cardValueForm.paymentType == 'WECHAT'">微信</div>
|
||||||
|
<div v-else-if="cardValueForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||||
|
<div v-else-if="cardValueForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>实付款</div>
|
||||||
|
<div v-if="cardValueForm.paymentType == 'CASH'">¥{{ authCode }}</div>
|
||||||
|
<div v-else>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box" v-if="seekZero>0">
|
||||||
|
<div>找零</div>
|
||||||
|
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- 支付成功后小票打印内容 充值订单-->
|
||||||
|
<div id="reportSuccess" ref="report2" class="box-center" v-show="false">
|
||||||
|
<div class="box-title">订单统计</div>
|
||||||
|
<div class="box-ge">
|
||||||
|
<div class="input-box">
|
||||||
|
<div>充值油品</div>
|
||||||
|
<div>{{ cardFuelDieselForm.type }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>充值升数</div>
|
||||||
|
<div>{{ cardFuelDieselForm.incomeLitres }}L</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>订单金额</div>
|
||||||
|
<div>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>锁价金额</div>
|
||||||
|
<div>¥{{ cardFuelDieselForm.lockupPrice }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>支付方式</div>
|
||||||
|
<div v-if="cardFuelDieselForm.paymentType == 'CASH'">现金</div>
|
||||||
|
<div v-else-if="cardFuelDieselForm.paymentType == 'WECHAT'">微信</div>
|
||||||
|
<div v-else-if="cardFuelDieselForm.paymentType == 'ALIPAY'">支付宝</div>
|
||||||
|
<div v-else-if="cardFuelDieselForm.paymentType == 'UNIONPAY'">银联二维码</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box">
|
||||||
|
<div>实付款</div>
|
||||||
|
<div>¥{{ realyPayBills }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="input-box" v-if="seekZero>0">
|
||||||
|
<div>找零</div>
|
||||||
|
<div>¥{{ seekZero.toFixed(2) }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -853,6 +927,7 @@ import {getUserGradeInfo} from "@/api/cashier/usergrade";
|
|||||||
import {getDicts} from "@/api/dict/data";
|
import {getDicts} from "@/api/dict/data";
|
||||||
import {getSysConfig} from "@/api/cashier/user/sysconfig";
|
import {getSysConfig} from "@/api/cashier/user/sysconfig";
|
||||||
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
|
import {giftCardExchange} from "@/api/cashier/giftCard/giftcard";
|
||||||
|
import {getLodop} from "@/api/LodopFuncs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -874,6 +949,8 @@ export default {
|
|||||||
dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type','pay_status'],
|
dicts: ['official', 'zhzt', 'zcrzdj', 'payment_type','pay_status'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
rechargeBalCard:false,
|
||||||
|
rechargeOilCard:false,
|
||||||
orderList:[],
|
orderList:[],
|
||||||
openSubCard1:false,
|
openSubCard1:false,
|
||||||
baseUrl: process.env.VUE_APP_BASE_API,
|
baseUrl: process.env.VUE_APP_BASE_API,
|
||||||
@ -1460,6 +1537,8 @@ export default {
|
|||||||
// _this.refuelMoney = parseFloat(refuelMoney[0].refuelMoney)
|
// _this.refuelMoney = parseFloat(refuelMoney[0].refuelMoney)
|
||||||
}
|
}
|
||||||
this.getGrade(response.data.gradeId);
|
this.getGrade(response.data.gradeId);
|
||||||
|
this.rechargeBalCard = false
|
||||||
|
this.rechargeOilCard = false
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getAllAmount(){
|
getAllAmount(){
|
||||||
@ -1550,6 +1629,176 @@ export default {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async printLocally1() {
|
||||||
|
//初始化打印函数
|
||||||
|
let LODOP = getLodop(); // 初始化打印
|
||||||
|
LODOP.PRINT_INIT();
|
||||||
|
var bodyStyle = `<style>
|
||||||
|
.input-box{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-box1{
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.box-ge{
|
||||||
|
border-bottom: 1px solid #000000 ;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.box-title{
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.input-hui{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-hui-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-box-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box-center{
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
`
|
||||||
|
var fromHtml = bodyStyle+this.$refs.report1.innerHTML
|
||||||
|
|
||||||
|
|
||||||
|
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||||
|
|
||||||
|
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||||
|
|
||||||
|
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||||
|
// let preview = LODOP.PREVIEW();
|
||||||
|
// console.log("preview",preview);
|
||||||
|
LODOP.PRINT();
|
||||||
|
|
||||||
|
},
|
||||||
|
async printLocally2() {
|
||||||
|
//初始化打印函数
|
||||||
|
let LODOP = getLodop(); // 初始化打印
|
||||||
|
LODOP.PRINT_INIT();
|
||||||
|
var bodyStyle = `<style>
|
||||||
|
.input-box{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-box1{
|
||||||
|
width: 100%;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
}
|
||||||
|
.box-ge{
|
||||||
|
border-bottom: 1px solid #000000 ;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
.box-title{
|
||||||
|
font-size: 18px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
margin-top: 15px;
|
||||||
|
}
|
||||||
|
.input-hui{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
}
|
||||||
|
.input-hui-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 15px 0px;
|
||||||
|
background: #b2b2b2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-box-frou{
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-size: 14px;
|
||||||
|
margin: 5px 0px;
|
||||||
|
div{
|
||||||
|
width: 25%;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.box-center{
|
||||||
|
height: 500px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
`
|
||||||
|
var fromHtml = bodyStyle+this.$refs.report2.innerHTML
|
||||||
|
|
||||||
|
|
||||||
|
LODOP.ADD_PRINT_HTM(0, 0, "100%", "100%", fromHtml);
|
||||||
|
|
||||||
|
LODOP.SET_PRINT_MODE("FULL_WIDTH_FOR_OVERFLOW",true);
|
||||||
|
|
||||||
|
// LODOP.ADD_PRINT_BARCODE(10,40,100,100,'QRCode','123456789');
|
||||||
|
// let preview = LODOP.PREVIEW();
|
||||||
|
// console.log("preview",preview);
|
||||||
|
LODOP.PRINT();
|
||||||
|
|
||||||
|
},
|
||||||
async collection() {
|
async collection() {
|
||||||
let actualPayment = 0
|
let actualPayment = 0
|
||||||
let makeChange = 0
|
let makeChange = 0
|
||||||
@ -1593,16 +1842,20 @@ export default {
|
|||||||
let this_ = this
|
let this_ = this
|
||||||
//
|
//
|
||||||
let timer = setInterval(async () => {
|
let timer = setInterval(async () => {
|
||||||
await getCheckTheStatusOfYourPaymentApi(id).then(response => {
|
await getCheckTheStatusOfYourPaymentApi(id).then(async response => {
|
||||||
if (response.data != null) {
|
if (response.data != null) {
|
||||||
const payStatus = response.data.payStatus
|
const payStatus = response.data.payStatus
|
||||||
if (payStatus === "unpaid") {
|
if (payStatus === "unpaid") {
|
||||||
this_.isQuery = true;
|
this_.isQuery = true;
|
||||||
}else if (payStatus === "paid") {
|
} else if (payStatus === "paid") {
|
||||||
// 当支付成功时
|
// 当支付成功时
|
||||||
this_.isPaySuccess = true;
|
this_.isPaySuccess = true;
|
||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
}else if (payStatus === "payFail") {
|
this_.rechargeBalCard = true
|
||||||
|
await this_.printLocally1()
|
||||||
|
await this_.getUserInfo()
|
||||||
|
clearInterval(timer);
|
||||||
|
} else if (payStatus === "payFail") {
|
||||||
this_.isPaySuccess = false;
|
this_.isPaySuccess = false;
|
||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
}
|
}
|
||||||
@ -1667,7 +1920,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
let timer = setInterval(async () => {
|
let timer = setInterval(async () => {
|
||||||
getCheckTheStatusOfYourPaymentByFuelApi(id).then(response => {
|
getCheckTheStatusOfYourPaymentByFuelApi(id).then(async response => {
|
||||||
if (response.data != null) {
|
if (response.data != null) {
|
||||||
if (response.data.payStatus == "unpaid") {
|
if (response.data.payStatus == "unpaid") {
|
||||||
this_.isQuery = true;
|
this_.isQuery = true;
|
||||||
@ -1675,6 +1928,10 @@ export default {
|
|||||||
if (response.data.payStatus == "paid") {
|
if (response.data.payStatus == "paid") {
|
||||||
this_.isPaySuccess = true;
|
this_.isPaySuccess = true;
|
||||||
this_.isQuery = false;
|
this_.isQuery = false;
|
||||||
|
this_.rechargeOilCard = true
|
||||||
|
await this_.printLocally2()
|
||||||
|
await this_.getUserInfo()
|
||||||
|
clearInterval(timer);
|
||||||
}
|
}
|
||||||
if (response.data.payStatus == "payFail") {
|
if (response.data.payStatus == "payFail") {
|
||||||
this_.isPaySuccess = false;
|
this_.isPaySuccess = false;
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
<view class="dis-bt">
|
<view class="dis-bt">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="hui1">{{ store.address }}</view>
|
<view class="hui1">{{ store.address }}</view>
|
||||||
<view class="hui2" v-if="distance!=''">{{ distance }}km</view>
|
<view class="hui2" v-if="distance">{{ distance }}km</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="lananniu" @click="goGoGo" v-if="distance!=''">
|
<view class="lananniu" @click="goGoGo" v-if="distance!=''">
|
||||||
<uni-icons type="paperplane-filled" color="#195ADA" size="16"></uni-icons>
|
<uni-icons type="paperplane-filled" color="#195ADA" size="16"></uni-icons>
|
||||||
@ -363,7 +363,6 @@
|
|||||||
// this.getAddress();
|
// this.getAddress();
|
||||||
uni.getSetting({
|
uni.getSetting({
|
||||||
async success(res) {
|
async success(res) {
|
||||||
// console.log(res, 111,"dingw")
|
|
||||||
if (!res.authSetting['scope.userLocation']) {
|
if (!res.authSetting['scope.userLocation']) {
|
||||||
// uni.authorize({
|
// uni.authorize({
|
||||||
// scope: 'scope.userLocation',
|
// scope: 'scope.userLocation',
|
||||||
@ -518,6 +517,7 @@
|
|||||||
_this.distance = (Math.ceil(response.data.distance))
|
_this.distance = (Math.ceil(response.data.distance))
|
||||||
.toFixed(1)
|
.toFixed(1)
|
||||||
_this.store = response.data.store
|
_this.store = response.data.store
|
||||||
|
console.log(response,"storeId");
|
||||||
uni.setStorageSync("storeId", response.data.store.id)
|
uni.setStorageSync("storeId", response.data.store.id)
|
||||||
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
|
uni.setStorageSync("chainStoreId", response.data.store.chainStoreId)
|
||||||
// console.log(uni.getStorageSync("chainStoreId"));
|
// console.log(uni.getStorageSync("chainStoreId"));
|
||||||
@ -572,6 +572,7 @@
|
|||||||
let params = {
|
let params = {
|
||||||
storeId: uni.getStorageSync("storeId")
|
storeId: uni.getStorageSync("storeId")
|
||||||
}
|
}
|
||||||
|
console.log(uni.getStorageSync("storeId"));
|
||||||
request({
|
request({
|
||||||
url: 'business/petrolStationManagement/oilNumber/getList2',
|
url: 'business/petrolStationManagement/oilNumber/getList2',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
@ -361,7 +361,7 @@
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
_this.oilNumberList = res.data;
|
_this.oilNumberList = res.data;
|
||||||
if (res.data) {
|
if (res.data.length>0) {
|
||||||
// _this.getOilGun(res.data[0].numberId);
|
// _this.getOilGun(res.data[0].numberId);
|
||||||
_this.oilPrice = res.data[0].oilPrice
|
_this.oilPrice = res.data[0].oilPrice
|
||||||
_this.oilUnit = res.data[0].unit
|
_this.oilUnit = res.data[0].unit
|
||||||
|
@ -63,7 +63,7 @@ const request = config => {
|
|||||||
})
|
})
|
||||||
reject('无效的会话,或者会话已过期,请重新登录。')
|
reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
} else if (code === 1001) {
|
} else if (code === 1001) {
|
||||||
showConfirm('您暂未登录,您可以继续留在该页面,或者重新登录?').then(res => {
|
showConfirm('登录状态已过期,您可以继续留在该页面,或者重新登录?').then(res => {
|
||||||
console.log("res", res)
|
console.log("res", res)
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
|
Loading…
Reference in New Issue
Block a user