bug
This commit is contained in:
parent
1177caac17
commit
55e449a45d
@ -9,6 +9,15 @@ export function listSupplier(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询供应商列表
|
||||
export function listSuppliers(query) {
|
||||
return request({
|
||||
url: '/business/convenience/supplier/lists',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询供应商详细
|
||||
export function getSupplier(id) {
|
||||
return request({
|
||||
|
@ -205,7 +205,6 @@
|
||||
v-model="form.cvsGoodId"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
disabled
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
@ -282,32 +281,30 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="form.supplierId"-->
|
||||
<!-- filterable-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 300px"-->
|
||||
<!-- @change="selectSupplier"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>-->
|
||||
<!-- </el-select>-->
|
||||
<el-autocomplete
|
||||
popper-class="my-autocomplete"
|
||||
style="width: 94%"
|
||||
disabled
|
||||
v-model="supplier"
|
||||
:fetch-suggestions="querySearch"
|
||||
placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"
|
||||
@change="addSupplier"
|
||||
@select="selectSupplier">
|
||||
<template slot-scope="{ item }">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<span class="name">{{ item.name }}</span>
|
||||
<!-- <span class="addr">{{ item.memberPrice }}</span>-->
|
||||
</div>
|
||||
</template>
|
||||
</el-autocomplete>
|
||||
<el-select
|
||||
v-model="form.supplierId"
|
||||
filterable
|
||||
placeholder="请选择供应商"
|
||||
@visible-change="changeSupplier"
|
||||
clearable
|
||||
style="width: 94%">
|
||||
<el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
<!-- <el-autocomplete-->
|
||||
<!-- popper-class="my-autocomplete"-->
|
||||
<!-- style="width: 94%"-->
|
||||
<!-- v-model="supplier"-->
|
||||
<!-- :fetch-suggestions="querySearch"-->
|
||||
<!-- placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"-->
|
||||
<!-- @change="addSupplier"-->
|
||||
<!-- @select="selectSupplier">-->
|
||||
<!-- <template slot-scope="{ item }">-->
|
||||
<!-- <div style="display: flex;justify-content: space-between">-->
|
||||
<!-- <span class="name">{{ item.name }}</span>-->
|
||||
<!--<!– <span class="addr">{{ item.memberPrice }}</span>–>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-autocomplete>-->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -348,7 +345,7 @@
|
||||
|
||||
|
||||
import {cvsGoodsAll, cvsGoodsTree, selectTree} from "@/api/convenienceStore/goods";
|
||||
import {addSupplier, getSupplier, listSupplier} from "@/api/convenienceStore/supplier";
|
||||
import {addSupplier, listSuppliers} from "@/api/convenienceStore/supplier";
|
||||
import {
|
||||
addLJGoods,
|
||||
createGoodsNo,
|
||||
@ -466,6 +463,16 @@ export default {
|
||||
computed:{
|
||||
},
|
||||
methods:{
|
||||
// 修改供应商
|
||||
changeSupplier(val){
|
||||
if (val){
|
||||
listSuppliers({ifDelete:'0'}).then(response => {
|
||||
this.supplierList = response.data
|
||||
})
|
||||
}else {
|
||||
this.getSuppilers();
|
||||
}
|
||||
},
|
||||
// 模糊查询商品信息
|
||||
querySearch(queryString, cb) {
|
||||
let _this = this;
|
||||
@ -493,7 +500,7 @@ export default {
|
||||
},
|
||||
addSupplier(val){
|
||||
// console.log(val,222)
|
||||
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
||||
addSupplier({name:val,remark:"添加商品自动添加",ifDelete:'0'}).then(res => {
|
||||
// console.log(res)
|
||||
if (res.data==1){
|
||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||
@ -590,8 +597,8 @@ export default {
|
||||
});
|
||||
},
|
||||
getSuppilers(val){
|
||||
listSupplier().then(response => {
|
||||
this.supplierList = response.data.records
|
||||
listSuppliers().then(response => {
|
||||
this.supplierList = response.data
|
||||
if (val){
|
||||
this.supplierList.forEach(item => {
|
||||
if (item.name = val){
|
||||
@ -689,6 +696,7 @@ export default {
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
console.log(this.supplierList)
|
||||
this.supplierList.forEach(item => {
|
||||
if (item.id == response.data.supplierId){
|
||||
this.supplier = item.name
|
||||
|
@ -280,7 +280,7 @@ import {getAccount} from "@/api/system/account";
|
||||
import {addLJGoods, createGoodsNo, queryGoodsVoList, queryLJGoods, scanCode} from "@/api/convenienceStore/ljgoods";
|
||||
import pinyin from "js-pinyin";
|
||||
import {getSysConfig} from "@/api/staff/user/sysconfig";
|
||||
import {addSupplier, listSupplier} from "@/api/convenienceStore/supplier";
|
||||
import {addSupplier, listSuppliers} from "@/api/convenienceStore/supplier";
|
||||
export default {
|
||||
dicts:['zhzt','yes_or_no'],
|
||||
data() {
|
||||
@ -385,7 +385,7 @@ export default {
|
||||
{ required: true, message: "请选择是否能使用积分抵扣", trigger: "blur" },
|
||||
],
|
||||
supplierId: [
|
||||
{ required: true, message: "请选择供应商", trigger: "change" },
|
||||
{ required: true, message: "请选择供应商", trigger: "blur" },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "请选择商品状态", trigger: "blur" },
|
||||
@ -403,12 +403,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getSuppilers(val){
|
||||
listSupplier().then(response => {
|
||||
this.supplierList = response.data.records
|
||||
listSuppliers({ifDelete:'0'}).then(response => {
|
||||
this.supplierList = response.data
|
||||
if (val){
|
||||
this.supplierList.forEach(item => {
|
||||
if (item.name = val){
|
||||
this.form.supplierId = item.id
|
||||
if (item.name == val){
|
||||
this.form1.supplierId = item.id
|
||||
}
|
||||
})
|
||||
}
|
||||
@ -469,24 +469,25 @@ export default {
|
||||
selectSupplier(data){
|
||||
this.supplier = data.name;
|
||||
this.form1.supplierId = data.id
|
||||
this.$forceUpdate()
|
||||
// this.$forceUpdate()
|
||||
},
|
||||
addSupplier(val){
|
||||
// console.log(val,222)
|
||||
if (!val){
|
||||
return;
|
||||
}
|
||||
addSupplier({name:val,remark:"添加商品自动添加"}).then(res => {
|
||||
addSupplier({name:val,remark:"添加商品自动添加",ifDelete:'0'}).then(async res => {
|
||||
// console.log(res)
|
||||
if (res.data==1){
|
||||
if (res.data == 1) {
|
||||
this.supplier = val;
|
||||
this.$modal.msgSuccess("已为您自动添加此供应商")
|
||||
this.getSuppilers(val)
|
||||
await this.getSuppilers(val)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 提交按钮
|
||||
submitForm1: function() {
|
||||
console.log(this.form1.supplierId,8274)
|
||||
this.$refs["form1"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form1) {
|
||||
@ -669,7 +670,8 @@ export default {
|
||||
// 添加商品信息
|
||||
addGoods(data){
|
||||
this.openGoods = true
|
||||
this.form1.cvsGoodId = data.id
|
||||
this.form1 = {status:'jy', canUsePoint:'no', stock:0, sort:0, buyingPrice:0, retailPrice:0, memberPrice:0, cvsGoodId:data.id}
|
||||
// this.form1.cvsGoodId = data.id
|
||||
this.supplier = ""
|
||||
this.title = "添加商品信息"
|
||||
},
|
||||
|
@ -4,18 +4,18 @@
|
||||
<el-card >
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="商品分类" prop="cvsGoodId">
|
||||
<el-cascader v-model="cvsGoodId"
|
||||
:options="cvsGoodOptions"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable></el-cascader>
|
||||
<!-- <el-select-->
|
||||
<!-- v-model="queryParams.cvsGoodId"-->
|
||||
<!-- placeholder="全部"-->
|
||||
<!-- clearable-->
|
||||
<!-- style="width: 300px"-->
|
||||
<!-- >-->
|
||||
<!-- <el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-cascader v-model="cvsGoodId"-->
|
||||
<!-- :options="cvsGoodOptions"-->
|
||||
<!-- :props="{ checkStrictly: true }"-->
|
||||
<!-- clearable></el-cascader>-->
|
||||
<el-select
|
||||
v-model="queryParams.cvsGoodId"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
>
|
||||
<el-option v-for="item in cvsGoodList" :key="item.id" :label="item.name" :value="item.id"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应商" prop="supplierId">
|
||||
<el-select
|
||||
@ -63,19 +63,21 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="等级状态" prop="status">
|
||||
<el-form-item label="上架状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
placeholder="全部"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.zhzt"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.zhzt"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<el-option label="上架" value="qy"/>
|
||||
<el-option label="下架" value="jy"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
@ -227,8 +229,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {cvsGoodsTree, selectTree} from "@/api/convenienceStore/goods";
|
||||
import {listSupplier} from "@/api/convenienceStore/supplier";
|
||||
import {cvsGoodsTree, list, selectTree} from "@/api/convenienceStore/goods";
|
||||
import {listSupplier, listSuppliers} from "@/api/convenienceStore/supplier";
|
||||
import {exportStocks, getStock, listStock} from "@/api/convenienceStore/stockstatistic";
|
||||
import {listTrack} from "@/api/convenienceStore/stocktrack";
|
||||
|
||||
@ -290,6 +292,7 @@ export default {
|
||||
methods: {
|
||||
getName(list,id){
|
||||
let name = ""
|
||||
console.log(list)
|
||||
list.forEach(item => {
|
||||
if (item.id==id){
|
||||
name = item.name;
|
||||
@ -341,20 +344,20 @@ export default {
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
if (this.cvsGoodId.length==1){
|
||||
this.queryParams.cvsGoodId = this.cvsGoodId[0]
|
||||
}else {
|
||||
this.queryParams.cvsGoodId = this.cvsGoodId[1]
|
||||
}
|
||||
// if (this.cvsGoodId.length==1){
|
||||
// this.queryParams.cvsGoodId = this.cvsGoodId[0]
|
||||
// }else {
|
||||
// this.queryParams.cvsGoodId = this.cvsGoodId[1]
|
||||
// }
|
||||
this.getList();
|
||||
},
|
||||
// 查询搜索列表信息
|
||||
getQueryList(){
|
||||
selectTree().then(response => {
|
||||
this.cvsGoodList = response.data.records
|
||||
list().then(response => {
|
||||
this.cvsGoodList = response.data
|
||||
});
|
||||
listSupplier().then(response => {
|
||||
this.supplierList = response.data.records
|
||||
listSuppliers().then(response => {
|
||||
this.supplierList = response.data
|
||||
})
|
||||
},
|
||||
// 重置按钮操作
|
||||
|
@ -29,17 +29,30 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="交班时间">
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="dateRange"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- size="medium"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- clearable-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
size="medium"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
clearable
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
v-model="beginTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="开始日期">
|
||||
</el-date-picker>
|
||||
至
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="结束日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
@ -133,6 +146,8 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
dateRange: [new Date(),new Date()],
|
||||
beginTime:new Date(),
|
||||
endTime:new Date(),
|
||||
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||
|
||||
total: 0,
|
||||
@ -153,6 +168,11 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
getList(){
|
||||
this.dateRange = []
|
||||
if (this.beginTime && this.endTime) {
|
||||
this.dateRange.push(this.beginTime.toLocaleDateString())
|
||||
this.dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
getHandoverListApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
|
||||
this.dataList = res.data.records
|
||||
this.total = res.data.total
|
||||
@ -201,6 +221,8 @@ export default {
|
||||
pageSize:10
|
||||
},
|
||||
this.dateRange = []
|
||||
this.beginTime = "";
|
||||
this.endTime = ""
|
||||
this.getList();
|
||||
},
|
||||
printLocally(data) {
|
||||
|
@ -254,12 +254,11 @@ export default {
|
||||
})
|
||||
},
|
||||
changeCreditAmount(){
|
||||
if (this.title = "新增挂账单位") {
|
||||
if (!this.form1.id) {
|
||||
this.form1.usedCreditLimit = 0
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit
|
||||
}
|
||||
if (this.title = "修改挂账单位") {
|
||||
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
||||
}else {
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit - this.form1.usedCreditLimit
|
||||
}
|
||||
},
|
||||
getList(){
|
||||
@ -298,8 +297,8 @@ export default {
|
||||
this.$refs["formName"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form1.id){
|
||||
if (this.form1.creditLimit < this.form1.residueCreditLimit){
|
||||
this.$modal.msgError("请确保预设挂账额度大于剩余挂账额度");
|
||||
if (this.form1.creditLimit < this.form1.usedCreditLimit || this.form1.residueCreditLimit < 0){
|
||||
this.$modal.msgError("请确保预设挂账额度大于已使用挂账额度");
|
||||
return ;
|
||||
}
|
||||
editCreditUnit(this.form1).then(res => {
|
||||
|
@ -96,7 +96,7 @@
|
||||
|
||||
<!-- <img src="file://D:/certifiedPhoto/static/uploadImages/20231025/8c3dbcf4924f40ebb479c17abd573ffb.jpg">-->
|
||||
|
||||
<el-card>
|
||||
<el-card style="margin-top: 20px">
|
||||
<div v-if="activeName=='member'">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -1095,6 +1095,10 @@ export default {
|
||||
},
|
||||
// 新增按钮操作
|
||||
handleAddMember() {
|
||||
if (this.fixingLevelList.length==0){
|
||||
this.$message.error("请先设置企业会员等级")
|
||||
return;
|
||||
}
|
||||
this.openMember = true;
|
||||
this.title = "新增用户认证";
|
||||
},
|
||||
|
@ -230,6 +230,7 @@
|
||||
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="cashierOrder.payType == 'oilCard'">囤油卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'balance'">储值卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'credit'">挂账</span>
|
||||
<span v-else>小程序码</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款状态">
|
||||
|
@ -150,7 +150,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款用户" align="center" prop="payUser"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<el-table-column label="付款方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
<span v-else-if="scope.row.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="scope.row.payType == '0'">兑换券核销</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款状态" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
|
||||
|
@ -205,6 +205,7 @@
|
||||
<span>{{getType(payList,scope.row.payType)}}</span>
|
||||
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
|
||||
<span v-if="scope.row.payType=='balance'">储值卡</span>
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
|
||||
|
@ -31,7 +31,8 @@
|
||||
<!-- </el-card>-->
|
||||
<el-card class="box-card" shadow="hover" v-for="item in merchantList" :key="item.id">
|
||||
<div slot="header" class="clearfix">
|
||||
<span @click="getMerchantList(item.id)"><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>
|
||||
<!-- <span @click="getMerchantList(item.id)"><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>-->
|
||||
<span><dict-tag :options="dict.type.payment_channel" :value="item.merchantName"/></span>
|
||||
<el-button v-if="item.isUse=='0'"
|
||||
@click="editStatus(item,1)"
|
||||
style="float: right; padding: 3px 0" type="text">切换为当前通道</el-button>
|
||||
|
@ -54,7 +54,7 @@
|
||||
@click="handleAdd"
|
||||
>新增员工</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||
</el-row>
|
||||
|
||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||
|
@ -48,7 +48,7 @@ Vue.prototype.getName = getName
|
||||
Vue.prototype.download = download
|
||||
Vue.prototype.handleTree = handleTree
|
||||
// Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||
Vue.prototype.pcUrl = 'http://192.168.0.178:81/'
|
||||
Vue.prototype.pcUrl = 'http://192.168.0.121:82/'
|
||||
// Vue.prototype.pcUrl = 'http://47.95.206.185:85/'
|
||||
|
||||
// 全局组件挂载
|
||||
|
@ -49,8 +49,8 @@ public class Const {
|
||||
public static String NOTIFY_PUBLIC_KEYS="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCbBAl3xSB7YeUnze4yYZmnTeT7OtXZr0sP10TsDVRH2SY/VEjgS9KPmHMmVeKZT3+6xKsUvulgVyie46GGtZPrnoh+glF1gzsYAXJ7dvR/R5nYO5VvfwK/ChPFTiKhbTtO4OKtchgBZuqCbsemG+gFIiVJo37dY0Kg0zISmFHdOQIDAQAB";
|
||||
|
||||
//异步通知(回调地址)
|
||||
public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
// public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
// public static String notify_url = "https://www.tuofeng.cc/oilAdmin/api/fyPay/notify";
|
||||
public static String notify_url = "https://8q4f124343.yicp.fun/api/fyPay/notify";
|
||||
|
||||
//下单
|
||||
public static String fuiou_21_url = "https://fundwx.fuiou.com/preCreate";
|
||||
|
@ -37,6 +37,16 @@ public class SupplierController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据条件查询当前店铺所有供应商信息
|
||||
* @param supplier
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/lists")
|
||||
public ResponseObject lists(Supplier supplier){
|
||||
return getSuccessResult(supplierService.selectSuppliers(supplier));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询供应商信息
|
||||
* @param id
|
||||
|
@ -54,5 +54,10 @@ public class Supplier extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("商铺id")
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 是否删除 0未删除 1删除
|
||||
*/
|
||||
@ApiModelProperty("是否删除 0未删除 1删除")
|
||||
private String ifDelete;
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.convenienceSore.mapper.StockStatisticMapper">
|
||||
<sql id="selectStock">
|
||||
select st.id, st.supplier_id, st.cvs_good_id, st.goods_id, st.store_id, st.cost_amount, mg.status,
|
||||
select st.id, mg.supplier_id, mg.cvs_good_id, st.goods_id, st.store_id, st.cost_amount, mg.status,
|
||||
mg.name,mg.goods_no,mg.pinyin_code,mg.shelf_number,
|
||||
mg.retail_price,mg.unit,mg.stock,mg.buying_price,mg.update_time
|
||||
from stock_statistic st inner join mt_goods mg on st.goods_id = mg.id
|
||||
@ -13,10 +13,10 @@
|
||||
<where>
|
||||
st.store_id = #{stock.storeId} and mg.if_delete = '0'
|
||||
<if test="stock.cvsGoodId != null and stock.cvsGoodId != ''">
|
||||
and st.cvs_good_id = #{stock.cvsGoodId}
|
||||
and mg.cvs_good_id = #{stock.cvsGoodId}
|
||||
</if>
|
||||
<if test="stock.supplierId != null and stock.supplierId != ''">
|
||||
and st.supplier_id = #{stock.supplierId}
|
||||
and mg.supplier_id = #{stock.supplierId}
|
||||
</if>
|
||||
<if test="stock.name != null and stock.name != ''">
|
||||
and mg.name like concat('%', #{stock.name}, '%')
|
||||
|
@ -8,7 +8,7 @@
|
||||
<select id="selectSupplierList" resultType="com.fuint.business.convenienceSore.entity.Supplier">
|
||||
<include refid="selectSupplier"></include>
|
||||
<where>
|
||||
store_id = #{supplier.storeId}
|
||||
store_id = #{supplier.storeId} and if_delete = '0'
|
||||
<if test="supplier.name != null and supplier.name != ''">
|
||||
and name like concat('%', #{supplier.name}, '%')
|
||||
</if>
|
||||
|
@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.business.convenienceSore.entity.Supplier;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商信息 业务层
|
||||
*/
|
||||
@ -16,6 +18,12 @@ public interface SupplierService extends IService<Supplier> {
|
||||
*/
|
||||
public IPage<Supplier> selectSupplierList(Page page, Supplier supplier);
|
||||
|
||||
/**
|
||||
* 根据条件查询当前店铺所有供应商信息
|
||||
* @return
|
||||
*/
|
||||
List<Supplier> selectSuppliers(Supplier supplier);
|
||||
|
||||
/**
|
||||
* 根据id查询供应商信息
|
||||
* @param id
|
||||
|
@ -12,6 +12,8 @@ import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 供应商 业务层
|
||||
*/
|
||||
@ -31,6 +33,16 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
return supplierIPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Supplier> selectSuppliers(Supplier supplier) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(supplier) && ObjectUtil.isNotEmpty(supplier.getIfDelete()))
|
||||
queryWrapper.eq("if_delete",supplier.getIfDelete());
|
||||
return baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询供应商信息
|
||||
* @param id
|
||||
@ -38,7 +50,10 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
*/
|
||||
@Override
|
||||
public Supplier selectSupplierById(int id) {
|
||||
return baseMapper.selectById(id);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("if_delete","0");
|
||||
queryWrapper.eq("id",id);
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,6 +68,7 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("name",name);
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("if_delete","0");
|
||||
Supplier supplier = baseMapper.selectOne(queryWrapper);
|
||||
return supplier;
|
||||
}
|
||||
@ -63,7 +79,11 @@ public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> i
|
||||
*/
|
||||
@Override
|
||||
public void deleteSupplierById(Integer id) {
|
||||
baseMapper.deleteById(id);
|
||||
Supplier supplier = baseMapper.selectById(id);
|
||||
if (ObjectUtil.isNotEmpty(supplier)){
|
||||
supplier.setIfDelete("1");
|
||||
this.updateSupplier(supplier);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -691,6 +691,7 @@ public class CardValueRecordServiceImpl extends ServiceImpl<CardValueRecordMappe
|
||||
cardValueRecord.setId(id);
|
||||
cardValueRecord.setPayStatus(payStatus);
|
||||
int i = baseMapper.updateById(cardValueRecord);
|
||||
// staffCommissionService.countStaffCommission(cardValueOrders.getStaffId(),cardValueOrders.getStoreId(),cardValueOrders.getAmount(),cardValueOrders.getPayAmount(),"3",cardValueOrders.getOrderNo());
|
||||
return i>0;
|
||||
}
|
||||
|
||||
|
@ -321,7 +321,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
// 支付状态
|
||||
String payStatus = "unpaid";
|
||||
if (payType.equals("CASH") || map.get("allAmount").equals("0")){
|
||||
if (payType.equals("CASH") || payType.equals("credit") || map.get("allAmount").equals("0")){
|
||||
payStatus = "paid";
|
||||
}else {
|
||||
payStatus = "unpaid";
|
||||
@ -377,7 +377,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
// 查询商品订单号
|
||||
LJOrder ljOrder2 = orderService.selectGoodsOrder(orderNo);
|
||||
if (payType.equals("CASH")) {
|
||||
if (payType.equals("CASH") || payType.equals("credit")) {
|
||||
// 添加商品订单记录表
|
||||
OrderGoods orderGoods = new OrderGoods();
|
||||
for (JSONObject good : goods) {
|
||||
@ -448,7 +448,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
if (ObjectUtil.isNotEmpty(jsonObjects.get(i).get("type"))){
|
||||
order.setActiveType(jsonObjects.get(i).get("type").toString());
|
||||
}
|
||||
if (payType.equals("CASH")){
|
||||
if (payType.equals("CASH") || payType.equals("credit")){
|
||||
order.setPayTime(new Date());
|
||||
this.addOilTrack(jsonObjects.get(i),storeId);
|
||||
this.updateCardAndActiveById(storeId,userId,order.getActiveId(),order.getCouponId(),order.getActiveType(),order.getOrderAmount(), Integer.valueOf(order.getOils()));
|
||||
@ -471,7 +471,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setStatus(payStatus);
|
||||
cashierOrder.setOilPayAmount(oilActualPay);
|
||||
cashierOrder.setGoodsPayAmount(goodsActualPay);
|
||||
if (payType.equals("CASH")){
|
||||
if (payType.equals("CASH") || payType.equals("credit")){
|
||||
if (StringUtils.isNotEmpty(map.get("authCode"))){
|
||||
cashierOrder.setPayAmount(Double.valueOf(map.get("authCode")));
|
||||
}else {
|
||||
@ -493,7 +493,7 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount);
|
||||
|
||||
// 如果金额不等于0调用第三方支付接口
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){
|
||||
if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH") || !payType.equals("credit")){
|
||||
Integer allAmount = (int) (Double.valueOf(map.get("allAmount"))*100);
|
||||
// 判断是否开启支付规则
|
||||
List<MerchantConfig> list = merchantConfigService.selectMeChByIsOpen(storeId);
|
||||
|
@ -46,7 +46,7 @@ public class MtUserGradeChildServiceImpl extends ServiceImpl<MtUserGradeChildMap
|
||||
@Override
|
||||
public List<MtUserGradeChild> selectListByUserId(Integer userId,Integer storeId) {
|
||||
LJUserVo userVo = userService.queryUserById(userId, storeId);
|
||||
LJStore store = storeService.selectStoreById();
|
||||
LJStore store = storeService.selectStoreByStoreId(storeId);
|
||||
ChainStoreConfig chainStoreConfig = chainStoreConfigService.selectChainStoreById(store.getChainStoreId());
|
||||
String isEnableLevel = chainStoreConfig.getIsEnableLevel();
|
||||
if (isEnableLevel.equals("yes")){
|
||||
|
@ -156,7 +156,7 @@ public class AlipayController extends BaseController {
|
||||
// 获取支付宝userid
|
||||
AlipaySystemOauthTokenResponse alipayProfile = alipayService.getAlipayProfile(authCode);
|
||||
if (ObjectUtil.isEmpty(alipayProfile)) {
|
||||
return getSuccessResult("false");
|
||||
return getSuccessResult(false);
|
||||
}
|
||||
|
||||
// 判断是否为未登录状态下支付
|
||||
@ -178,7 +178,7 @@ public class AlipayController extends BaseController {
|
||||
return getSuccessResult(true);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult("false");
|
||||
if (ObjectUtil.isEmpty(alipayProfile.getUserId())) return getSuccessResult(false);
|
||||
|
||||
String userId = alipayProfile.getUserId();
|
||||
|
||||
@ -190,15 +190,15 @@ public class AlipayController extends BaseController {
|
||||
if (ObjectUtil.isNotEmpty(ljUser) && ObjectUtil.isNotEmpty(ljUser.getUserId())){
|
||||
|
||||
if (ljUser.getUserId().equals(userId)) {
|
||||
return getSuccessResult("true");
|
||||
return getSuccessResult(true);
|
||||
|
||||
}
|
||||
|
||||
}else {
|
||||
return getSuccessResult("false");
|
||||
return getSuccessResult(false);
|
||||
}
|
||||
|
||||
return getSuccessResult("false");
|
||||
return getSuccessResult(false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1243,12 +1243,11 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
this.handleQuery1();
|
||||
},
|
||||
changeCreditAmount(){
|
||||
if (this.title = "新增挂账单位") {
|
||||
if (!this.form1.id) {
|
||||
this.form1.usedCreditLimit = 0
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit
|
||||
}
|
||||
if (this.title = "修改挂账单位") {
|
||||
this.form1.usedCreditLimit = this.form1.creditLimit - this.form1.residueCreditLimit
|
||||
}else {
|
||||
this.form1.residueCreditLimit = this.form1.creditLimit - this.form1.usedCreditLimit
|
||||
}
|
||||
},
|
||||
addUnit(){
|
||||
@ -1639,8 +1638,8 @@ import {getLodop} from "@/api/LodopFuncs";
|
||||
this.$refs["formName"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form1.id){
|
||||
if (this.form1.creditLimit < this.form1.residueCreditLimit){
|
||||
this.$modal.msgError("请确保预设挂账额度大于剩余挂账额度");
|
||||
if (this.form1.creditLimit < this.form1.usedCreditLimit || this.form1.residueCreditLimit < 0){
|
||||
this.$modal.msgError("请确保预设挂账额度大于已使用挂账额度");
|
||||
return ;
|
||||
}
|
||||
editCreditUnit(this.form1).then(res => {
|
||||
|
@ -120,7 +120,7 @@
|
||||
</div>
|
||||
<div>-¥{{ oilDiscount.toFixed(2) }}</div>
|
||||
</div>
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney.length>0">
|
||||
<div class="center-left-hj" v-show="isMember && refuelMoney && refuelMoney.length>0">
|
||||
<div>
|
||||
<el-checkbox
|
||||
style="color: black;font-size: 16px"
|
||||
@ -569,7 +569,7 @@
|
||||
<span style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "0"}}</span>
|
||||
</template>
|
||||
<el-descriptions-item label="账户余额">{{member.cardBalance ? member.cardBalance : 0}}元</el-descriptions-item>
|
||||
<el-descriptions-item label="囤油卡余额">
|
||||
<el-descriptions-item label="囤油卡余额" v-if="refuelMoney">
|
||||
<div style="margin: 5px 0" v-for="(item,index) in refuelMoney" :key="index">
|
||||
{{ item.type }}卡
|
||||
<!-- <span style="color: #00afff">{{ item.oilType }}</span>-->
|
||||
@ -2516,9 +2516,8 @@
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
addHangBill(this.form1).then( async response => {
|
||||
if (response.data==0){
|
||||
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
||||
}else {
|
||||
if (response.data==1){
|
||||
await this.addOrder();
|
||||
this.$modal.msgSuccess("挂账记录添加成功");
|
||||
this.dialogVisibleCredit = false;
|
||||
this.printLocally()
|
||||
@ -2527,6 +2526,8 @@
|
||||
this.resetMember();
|
||||
this.resetting();
|
||||
this.empty();
|
||||
}else {
|
||||
this.$modal.msgError("挂账单位可用额度不足,无法进行挂账");
|
||||
}
|
||||
})
|
||||
}else {
|
||||
@ -2534,6 +2535,34 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 添加挂账订单信息
|
||||
async addOrder() {
|
||||
this.map.seekZero = this.seekZero;
|
||||
this.map.oilAmount = this.oilAmount;
|
||||
this.map.payType = this.payType;
|
||||
this.map.goodsAmount = this.goodsAmount;
|
||||
this.map.oilActualPay = this.oilActualPay;
|
||||
this.map.goodsActualPay = this.goodsActualPay;
|
||||
this.map.oilDiscount = 0.0;
|
||||
this.map.goodsDiscount = 0.0;
|
||||
this.map.goodsNum = this.goodsTotal;
|
||||
this.map.balanceAmount = 0.0;
|
||||
this.map.oilCardAmount = 0.0;
|
||||
this.map.oilOrder = JSON.stringify(this.oilOrder);
|
||||
this.map.goodsOrder = JSON.stringify(this.goodsOrder);
|
||||
this.map.authCode = this.authCode;
|
||||
this.map.allAmount = +this.oilActualPay + +this.goodsActualPay
|
||||
this.map.consumeAmount = 0.0;
|
||||
this.map.refuelMoney = JSON.stringify(this.refuelMoney)
|
||||
this.map.couponId = this.useCouponIds
|
||||
this.map.staffId = this.staff.id
|
||||
this.map.cardFavorableId = this.cardFavorableId
|
||||
this.map.recordId = this.recordId
|
||||
this.map.userId = this.member.id
|
||||
await addLJGoods(this.map).then(response => {
|
||||
|
||||
})
|
||||
},
|
||||
// 选择挂账单位
|
||||
changeUnit(val){
|
||||
this.form1.creditUnitId = val.id;
|
||||
|
@ -241,6 +241,7 @@
|
||||
<span v-else-if="cashierOrder.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="cashierOrder.payType == 'oilCard'">囤油卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'balance'">储值卡</span>
|
||||
<span v-else-if="cashierOrder.payType == 'credit'">挂账</span>
|
||||
<span v-else>小程序码</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="付款状态">
|
||||
|
@ -150,7 +150,17 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="实付金额" align="center" prop="payAmount"/>
|
||||
<el-table-column label="付款用户" align="center" prop="payUser"/>
|
||||
<el-table-column label="付款类型" align="center" prop="payType">
|
||||
<el-table-column label="付款方式" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
<span v-else-if="scope.row.payType == 'CASH'">现金</span>
|
||||
<span v-else-if="scope.row.payType == 'WECHAT'">微信</span>
|
||||
<span v-else-if="scope.row.payType == 'ALIPAY'">支付宝</span>
|
||||
<span v-else-if="scope.row.payType == 'UNIONPAY'">银联二维码</span>
|
||||
<span v-else-if="scope.row.payType == '0'">兑换券核销</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="付款状态" align="center" prop="payType">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status == 'unpaid'">未支付</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.status == 'paid'">已支付</el-tag>
|
||||
|
@ -206,6 +206,7 @@
|
||||
<span>{{getType(payList,scope.row.payType)}}</span>
|
||||
<span v-if="scope.row.payType=='oilCard'">囤油卡</span>
|
||||
<span v-if="scope.row.payType=='balance'">储值卡</span>
|
||||
<span v-if="scope.row.payType=='credit'">挂账</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
|
||||
|
@ -86,9 +86,9 @@
|
||||
|
||||
<view class="station-title" style="display: flex;justify-content: space-between;">
|
||||
{{store.name}}{{store.description ? "("+store.description+")" : ""}}
|
||||
<!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
|
||||
<view>切换位置 <uni-icons type="right" color="#304fff" size="16"></uni-icons> </view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view><!--顺通石化加油站(工业南路站)-->
|
||||
<view style="display: flex;">
|
||||
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">
|
||||
|
@ -573,8 +573,8 @@
|
||||
code: res.code,
|
||||
isRefuel: true,
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
}).then(resp => {
|
||||
if (!resp.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
@ -600,7 +600,7 @@
|
||||
isRefuel: true,
|
||||
},
|
||||
}).then((resp) => {
|
||||
if (!res.data) {
|
||||
if (!resp.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user