Merge remote-tracking branch 'origin/master'

This commit is contained in:
齐天大圣 2024-01-13 09:49:54 +08:00
commit 3ee4bd0073
31 changed files with 341 additions and 115 deletions

View File

@ -291,6 +291,8 @@ export default {
this.$modal.msgSuccess("添加成功");
this.getList()
this.dialogVisible = false
}else {
this.$modal.msgError("添加失败,此通道暂未配置");
}
})
}

View File

@ -26,6 +26,15 @@ export function getInfo() {
})
}
// 获取手机验证码
export function gettelcode(data) {
return request({
url: 'backendApi/login/sendMsg',
method: 'post',
data:data
})
}
// 退出方法
export function logout() {
return request({

View File

@ -28,6 +28,15 @@ export function editMerchant(data) {
})
}
// 修改商户备注信息
export function editMerchantRemark(data) {
return request({
url: '/api/merchantConfig/edit',
method: 'post',
data: data,
})
}
// 添加商户使用状态
export function addMerchantApi(data) {

View File

@ -38,7 +38,23 @@
<el-tag v-else effect="dark" type="success" style="float: right">当前使用中</el-tag>
</div>
<div>商户编号: {{ item.mchntCd }}</div>
<div>备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span></div>
<div style="margin-top: 5px">
备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span>
<span style="margin-left: 150px">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(item)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(item)"
>删除</el-button>
</span>
</div>
</el-card>
</div>
<el-divider></el-divider>
@ -268,6 +284,16 @@ export default {
this.getList();
},
methods:{
handleUpdate(data){
merchantInfo(data.id).then(res => {
this.title = "商户信息"
this.dialogVisible = true
this.form1 = res.data
})
},
handleDelete(data){
},
//
submitRemark(){
editMerchantRemark(this.merchantConfig).then(res => {

View File

@ -66,8 +66,9 @@ public class MerchantConfigController extends BaseController {
public ResponseObject selectMerchant(@PathVariable Integer id){
return getSuccessResult(merchantConfigService.selectMerchById(id));
}
/**
* 修改商户备注信息
* 修改商户信息
* @param merchantConfig
* @return
*/
@ -75,4 +76,14 @@ public class MerchantConfigController extends BaseController {
public ResponseObject editMerchantRemark(@RequestBody MerchantConfig merchantConfig){
return getSuccessResult(merchantConfigService.updateMerchRemark(merchantConfig));
}
/**
* 删除商户信息
* @param id
* @return
*/
@DeleteMapping("{id}")
public ResponseObject delete(@PathVariable Integer id){
return getSuccessResult(merchantConfigService.deleteMerch(id));
}
}

View File

@ -90,4 +90,11 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
* @return
*/
public int insertMerch(MerchantConfig merchantConfig);
/**
* 根据id删除配置信息
* @param id
* @return
*/
public int deleteMerch(Integer id);
}

View File

@ -145,7 +145,7 @@ public class FyPayServiceImpl implements FyPayService {
ReceiveParameter receiveParameter = new ReceiveParameter();
receiveParameter.setOrderNo(orderNo);
receiveParameter.setGoodsMoney(allAmount*100);
receiveParameter.setGoodsMoney(allAmount/100);
receiveParameter.setStoreId(storeId1);
receiveParameter.setPayType(payType);
@ -381,8 +381,10 @@ public class FyPayServiceImpl implements FyPayService {
receiveParameter.setContent("积分订单");
}
if (!reqMap.get("trans_stat").equals("USERPAYING")){
this.insertAllOrderInfo(receiveParameter,payStatus);
}
}
}catch (Exception e){
log.error(e.getMessage());
}

View File

@ -99,10 +99,9 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
@Override
public int updateMerchStatus(MerchantConfig merchantConfig) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_use",1);
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
queryWrapper.eq("store_id",merchantConfig.getStoreId());
List<MerchantConfig> list = baseMapper.selectList(queryWrapper);
for (MerchantConfig config : list) {
config.setIsUse("0");
@ -149,6 +148,7 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
merchantConfig.setPrivateKey(FuYouPublicMerchant.privateKey);
}else {
row = 0;
return row;
}
merchantConfig.setAppid(FuYouPublicMerchant.appid);
merchantConfig.setAlipayAppid(FuYouPublicMerchant.alipayAppid);
@ -163,4 +163,9 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
row = baseMapper.insert(merchantConfig);
return row;
}
@Override
public int deleteMerch(Integer id) {
return baseMapper.deleteById(id);
}
}

View File

@ -45,7 +45,7 @@ public interface OilOrderMapper extends BaseMapper<OilOrder> {
* @param orderNo
* @return
*/
public List<OilOrderVo> selectOilOrderByOrderNo(@Param("orderNo") String orderNo);
public List<OilOrderVo> selectOilOrderByOrderNo(@Param("orderNo") String orderNo,@Param("storeId") Integer storeId);
public Map<String, String> orderAmountStatistics(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("storeId") Integer storeId);

View File

@ -45,9 +45,10 @@
<select id="selectOilOrderByOrderNo" resultType="com.fuint.business.order.vo.OilOrderVo"
parameterType="string">
select oil.*,onu.oil_price from oil_order oil
inner join oil_number onu on oil.oils = onu.oil_name
left join oil_number onu on oil.oils = onu.oil_name
<where>
oil.order_no like concat(#{orderNo}, '%')
and onu.store_id = #{storeId}
</where>
</select>

View File

@ -12,6 +12,7 @@
<include refid="selectReturnRecord"></include>
<where>
rd.hang_bill_id = #{returnRecord.hangBillId}
order by pay_time desc
</where>
</select>
<!-- <select id="selectHangBillById" resultType="com.fuint.business.order.vo.HangBillVo" parameterType="int">-->

View File

@ -11,10 +11,12 @@ import com.fuint.api.fuyou.entity.MerchantConfig;
import com.fuint.api.fuyou.service.FyPayService;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.api.fuyou.service.OilConfigService;
import com.fuint.business.order.entity.AllOrderInfo;
import com.fuint.business.order.entity.CreditUnit;
import com.fuint.business.order.entity.HangBill;
import com.fuint.business.order.entity.ReturnRecord;
import com.fuint.business.order.mapper.HangBillMapper;
import com.fuint.business.order.service.AllOrderInfoService;
import com.fuint.business.order.service.CreditUnitService;
import com.fuint.business.order.service.HangBillService;
import com.fuint.business.order.service.ReturnRecordService;
@ -209,6 +211,7 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
returnRecord.setPayTime(new Date());
Double amount = Double.valueOf(jsonObject.get("repaidAmount").toString());
this.updateHangBill(returnRecord.getHangBillId(), amount);
this.insertAllOrderInfo(orderNo,(Integer) jsonObject.get("storeId"),Double.valueOf(jsonObject.get("repaidAmount").toString()),map.get("payType"),(Integer) jsonObject.get("creditUnitId"),"PC");
}else {
returnRecord.setCollectAmount(Double.valueOf(jsonObject.get("repaidAmount").toString()));
returnRecord.setReturnType("0");
@ -222,6 +225,26 @@ public class HangBillServiceImpl extends ServiceImpl<HangBillMapper, HangBill> i
return orderNo;
}
@Autowired
private AllOrderInfoService allOrderInfoService;
/**
* 添加所有订单信息
*/
private void insertAllOrderInfo(String orderNo,Integer storeId,Double goodsMoney,String payType,Integer userId,String payChannel){
AllOrderInfo allOrderInfo = new AllOrderInfo();
allOrderInfo.setOrderNo(orderNo);
allOrderInfo.setType("7");
allOrderInfo.setStoreId(storeId);
allOrderInfo.setGoodsMoney(goodsMoney);
allOrderInfo.setPayType(payType);
allOrderInfo.setUserId(userId);
allOrderInfo.setPayChannel(payChannel);
allOrderInfo.setStatus("paid");
allOrderInfo.setContent("挂账订单");
allOrderInfoService.insertAllOrderInfo(allOrderInfo);
}
@Override
public int updateHangBills(HangBill hangBill, Double repaidAmount,String status) {
HangBill hangBill1 = this.updateStatus(hangBill, repaidAmount);

View File

@ -151,7 +151,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
@Override
public List<OilOrderVo> queryOilOrderByOrderNo(String orderNo) {
List<OilOrderVo> oilOrderVos = baseMapper.selectOilOrderByOrderNo(orderNo);
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
List<OilOrderVo> oilOrderVos = baseMapper.selectOilOrderByOrderNo(orderNo,nowAccountInfo.getStoreId());
return oilOrderVos;
}

View File

@ -115,5 +115,14 @@ public class OilGunController extends BaseController {
public ResponseObject queryGunList(@PathVariable Integer numberId){
return getSuccessResult(oilGunService.selectOilGunByNumberId(numberId));
}
/**
* 查询当前店铺所有油枪列表信息
* @return
*/
@GetMapping("/queryOilGunList")
public ResponseObject selectGunList(){
return getSuccessResult(oilGunService.selectOilGuns());
}
}

View File

@ -129,6 +129,15 @@ public class OilNumberController extends BaseController {
return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(storeId));
}
/**
* 根据店铺id查询油号信息
* @return
*/
@GetMapping("/getOilNumber")
public ResponseObject queryOilNumbers(){
return getSuccessResult(oilPresetPricesService.selectOilNumberNameByStoreId(null));
}
}

View File

@ -67,4 +67,10 @@ public interface OilGunService {
* @return
*/
List<OilGun> selectOilGunByNumberId(Integer numberId);
/**
* 根据油号id查询油枪列表信息
* @return
*/
List<OilGun> selectOilGuns();
}

View File

@ -140,7 +140,17 @@ public class OilGunServiceImpl implements OilGunService {
public List<OilGun> selectOilGunByNumberId(Integer numberId) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("number_id",numberId);
queryWrapper.eq("status","启用");
List<OilGun> list = oilGunDao.selectList(queryWrapper);
return list;
}
@Override
public List<OilGun> selectOilGuns() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
queryWrapper.eq("status","启用");
return oilGunDao.selectList(queryWrapper);
}
}

View File

@ -96,6 +96,10 @@ public class OilNumberServiceImpl extends ServiceImpl<OilNumberMapper, OilNumber
@Override
public List<OilNumberNameVo> selectOilNumberNameByStoreId(Integer storeId) {
if (storeId==null){
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
storeId = nowAccountInfo.getStoreId();
}
return baseMapper.selectOilNumberNameByStoreId(storeId);
}

View File

@ -165,8 +165,10 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
LJUserVo ljUserVo = new LJUserVo();
if (ObjectUtil.isNotEmpty(store)){
ljUserVo = baseMapper.selectUserByMobileAndChantStoreId(mobile,store.getChainStoreId());
}
if (ObjectUtil.isNotEmpty(ljUserVo)){
ljUserVo.setStoreId(store.getId());
}
}
return ljUserVo;
}

View File

@ -35,6 +35,8 @@ public class ShiroConfig {
filterMap.put("/clientApi/captcha/getCode","anon");
filterMap.put("/clientApi/sign/**","anon");
filterMap.put("/backendApi/login/loginByPhone","anon");
filterMap.put("/backendApi/login/getInfo","anon");
filterMap.put("/backendApi/login/logout","anon");
/*filterMap.put("/business/largeSscreen","anon");
filterMap.put("/business/largeSscreen/goods","anon");
filterMap.put("/business/largeSscreen/staff","anon");

View File

@ -16,3 +16,27 @@ export function getOilTank(id) {
method: 'get',
})
}
// 查询油罐信息
export function getOilGunInfo(numberId) {
return request({
url: '/business/petrolStationManagement/oilGun/queryGunList/'+numberId,
method: 'get',
})
}
// 查询油罐信息
export function getOilGuns() {
return request({
url: '/business/petrolStationManagement/oilGun/queryOilGunList',
method: 'get',
})
}
// 查询油罐信息
export function getOilNumberGun() {
return request({
url: '/business/petrolStationManagement/oilGun/selectByNumberTGUn',
method: 'get',
})
}

View File

@ -17,3 +17,13 @@ export function oilNumberList() {
// data: data
})
}
// 查询所有油号
export function oilNumbers() {
return request({
url: '/business/petrolStationManagement/oilNumber/getOilNumber',
method: 'get',
// data: data
})
}

View File

@ -15,7 +15,7 @@
background-color: rgb(67,119,204)">
<div>
<template>
<img v-if="member.avatar" class="list-avatar" :src="member.avatar">
<img v-if="member.avatar" class="list-avatar" :src="baseUrl + member.avatar">
<img v-else class="list-avatar" src="@/assets/images/avatar.png">
</template>
</div>
@ -218,12 +218,12 @@
title="请选择会员"
:visible.sync="dialogVisibleMember"
:close-on-click-modal="false">
<div class="wrap-wrap">
<div class="wrap-wrap" style="height:700px;overflow-y: scroll;">
<el-table ref="tables" :data="memberList">
<el-table-column label="ID" align="center" prop="id" width="80" />
<el-table-column label="头像" align="center" width="70">
<template slot-scope="scope">
<img v-if="scope.row.avatar" class="list-avatar" :src="scope.row.avatar">
<img v-if="scope.row.avatar" class="list-avatar" :src="baseUrl + scope.row.avatar">
<img v-else class="list-avatar" src="@/assets/images/avatar.png">
</template>
</el-table-column>
@ -408,6 +408,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
dict: [],
data(){
return{
baseUrl:process.env.VUE_APP_BASE_API,
shoppingCart:[],
giftList:'',
giftCategoryList:'',
@ -573,7 +574,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
})
}else {
getUserVoName({name:this.userNo}).then( response => {
this.memberList = response.data
this.memberList = response.data.userVo
})
this.dialogVisibleMember = true;
}
@ -623,6 +624,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
this.allAmout=0
this.allMoneyRatio=0
this.paymentType = ''
this.resetMember()
},
//
shoppingCartMethod() {
@ -888,7 +890,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
}
this.paymentType = ''
this.reset()
},
//
handClose(){
@ -1149,7 +1151,7 @@ import {getUserInfoMobile, getUserVoMobile, getUserVoName} from "@/api/cashier/u
}
.wrap-box2{
background: #36b713 !important;
background: #30a1ff !important;
color: white;
//width: 100%;
//height: 100%;

View File

@ -139,7 +139,7 @@
</el-form>
</template>
</el-table-column>
<el-table-column prop="orderNo" label="单据号" width="200"></el-table-column>
<el-table-column prop="orderNo" label="单据号" width="220"></el-table-column>
<el-table-column label="挂账单位">
<el-table-column prop="unitName" label="单位名称"> </el-table-column>
<el-table-column prop="personCredit" label="挂账人"> </el-table-column>

View File

@ -196,10 +196,12 @@
<div class="wrap-box" v-for="item in payList"
:key="item.dictValue"
:value="item.dictValue"
:class="{ 'wrap-box2': item.dictValue === map.payType }"
@click="payMethod(item.dictValue)">
<span>{{ item.dictLabel }}</span>
</div>
<div class="wrap-box" >
<div class="wrap-box" value="credit"
:class="{ 'wrap-box2': 'credit' === map.payType }" >
<span @click="addCredits">挂账</span>
</div>
</div>
@ -1114,6 +1116,7 @@
},
//
addCredits(){
this.map.payType = "credit"
this.dialogVisibleCredit = true
this.form1.amount = this.oilAmount + this.goodsAmount
},
@ -2237,6 +2240,7 @@
chooseStaff(data){
this.staff = data;
this.map.staffId = this.staff.id;
this.dialogVisible = false
},
//
delGoods(index){
@ -2553,7 +2557,7 @@
this.gunList.forEach(item => {
if (item.id==data.id){
this.form.id = item.id
this.form.gunName = item.gunName
this.form.gunName = item.id
}
})
})
@ -3083,6 +3087,20 @@
margin-bottom: 10px;
}
.wrap-box2{
background: #30a1ff !important;
color: white;
//width: 100%;
//height: 100%;
//border-radius: 8px;
//height: 80px;
//display: flex;
//align-items: center;
//justify-content: center;
//border: 1px solid #20b400;
//cursor: pointer;
//color: #20b400;
}
.wrap-box :hover{
/*background: #00afff !important;*/
width: 100%;

View File

@ -203,9 +203,9 @@
<!-- <Handover v-if="leftindex == 7"></Handover>-->
<router-view/>
<div style="width: 100%;padding:200px " v-if="leftindex != 0 && leftindex != 1 && leftindex != 2 && leftindex != 3 && leftindex != 4 && leftindex != 5 && leftindex != 6 && leftindex != 7 && leftindex != 9">
<el-empty description="暂未开发"></el-empty>
</div>
<!-- <div style="width: 100%;padding:200px " v-if="leftindex != 0 && leftindex != 1 && leftindex != 2 && leftindex != 3 && leftindex != 4 && leftindex != 5 && leftindex != 6 && leftindex != 7 && leftindex != 9">-->
<!-- <el-empty description="暂未开发"></el-empty>-->
<!-- </div>-->

View File

@ -2,18 +2,6 @@
<template>
<div>
<el-card class="box-card">
<!-- <div style="display: flex;">-->
<!-- <div class="top-app-sou">-->
<!-- <el-form :label-position="labelPosition" label-width="40px" :model="formLabelAlign">-->
<!-- <el-form-item label="名称">-->
<!-- <el-input v-model="formLabelAlign.name" placeholder="请输入要搜索的内容"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </div>-->
<!-- <div style="margin-left: 10px">-->
<!-- <el-button type="primary" icon="el-icon-search">搜索</el-button>-->
<!-- </div>-->
<!-- </div>-->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
<el-form-item label="交易员工" prop="staffId">
<el-select
@ -28,7 +16,7 @@
</el-select>
</el-form-item>
<el-form-item label="订单号">
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker
@ -104,31 +92,24 @@
</el-form>
</template>
</el-table-column>
<el-table-column prop="orderNo" label="订单号" width="180"> </el-table-column>
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
<el-table-column prop="amount" label="订单金额"> </el-table-column>
<el-table-column
prop="payAmount"
label="实付金额">
</el-table-column>
<el-table-column prop="payAmount" label="实付金额"> </el-table-column>
<el-table-column label="订单金额组成">
<el-table-column
prop="oilOrderAmount"
label="油品金额">
<el-table-column prop="oilOrderAmount" label="油品金额">
<template slot-scope="scope">
<span>{{scope.row.oilOrderAmount ? scope.row.oilOrderAmount : '0'}}</span>
</template>
</el-table-column>
<el-table-column
prop="goodsOrderAmount"
label="商品金额">
<el-table-column prop="goodsOrderAmount" label="商品金额">
<template slot-scope="scope">
<span>{{scope.row.goodsOrderAmount ? scope.row.goodsOrderAmount : '0'}}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="payUser"
label="付款用户">
</el-table-column>
<el-table-column
prop="status"
label="状态">
<el-table-column prop="payUser" label="付款用户"> </el-table-column>
<el-table-column prop="status" label="状态">
<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>
@ -208,7 +189,7 @@
</el-table-column>
<el-table-column label="油号油枪" align="center" prop="terminal">
<template slot-scope="scope">
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ scope.row.oilGunNum }}号枪</span>
<span>{{ getName(oilNameList,scope.row.oils) }}/{{ scope.row.oilGunNum }}</span>
</template>
</el-table-column>
<el-table-column label="加油升数" align="center" prop="oilNum" >

View File

@ -45,7 +45,7 @@
</el-select>
</el-form-item>
<el-form-item label="手机号">
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input>
<el-input v-model="queryParams.payUser" clearable placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="油枪号" prop="oilGunNum">
<el-select
@ -54,17 +54,17 @@
clearable
placeholder="全部"
>
<el-option v-for="item in oilNumList"
<el-option v-for="item in oilGunList"
:key="item.id"
:label="item.oilGunNum"
:label="item.gunName"
:value="item.id">
<span style="float: left">{{ getName(oilNameList,item.oilName) }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilGunNum }}号枪</span>
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号">
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
</el-form-item>
<el-form-item label="交易时间">
<el-date-picker
@ -166,47 +166,26 @@
<span>{{ getVal(terminalList,props.row.terminal) }}</span>
</template>
</el-table-column>
<el-table-column
prop="orderNo"
label="订单号"
width="200">
</el-table-column>
<el-table-column prop="orderNo" label="订单号" width="220"> </el-table-column>
<el-table-column label="订单信息" align="center">
<el-table-column
prop="oilGunNum"
label="油品/油枪" align="center"
width="120">
<el-table-column prop="oilGunNum" label="油品/油枪" align="center" width="120">
<template slot-scope="props">
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}</span>
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
</template>
</el-table-column>
<el-table-column
prop="orderAmount"
label="订单金额" align="center"
width="120">
</el-table-column>
<el-table-column
prop="discountAmount"
label="优惠金额" align="center"
width="120">
</el-table-column>
<el-table-column prop="orderAmount" label="订单金额" align="center" width="120"> </el-table-column>
<el-table-column prop="discountAmount" label="优惠金额" align="center" width="120"> </el-table-column>
</el-table-column>
<el-table-column label="付款信息" align="center">
<el-table-column
prop="payAmount"
label="实付金额" align="center"
width="120">
<el-table-column prop="payAmount" label="实付金额" align="center" width="120"> </el-table-column>
<el-table-column prop="payUser" label="付款用户" align="center" > </el-table-column>
<el-table-column prop="payType" label="付款方式" align="center" width="120">
<template slot-scope="scope">
<span>{{getType(payList,scope.row.payType)}}</span>
</template>
</el-table-column>
<el-table-column
prop="payUser"
label="付款用户" align="center"
width="120">
</el-table-column>
<el-table-column
prop="orderStatus"
label="付款状态" align="center"
width="120">
<el-table-column prop="orderStatus" label="付款状态" align="center" width="120">
<template slot-scope="scope">
<el-tag v-if="scope.row.orderStatus == 'unpaid'">未支付</el-tag>
<el-tag type="success" v-else-if="scope.row.orderStatus == 'paid'">已支付</el-tag>
@ -214,11 +193,7 @@
</template>
</el-table-column>
</el-table-column>
<el-table-column
prop="invoicing"
label="开票标识" align="center"
width="220">
</el-table-column>
<el-table-column prop="invoicing" label="开票标识" align="center" > </el-table-column>
<el-table-column label="交易时间" align="center" width="160" prop="payTime">
<template slot-scope="scope">
@ -228,7 +203,6 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<!-- <el-button size="mini" type="text" icon="el-icon-edit" >更多操作</el-button>-->
<el-button style="width: 60px" size="mini"
@click="patchwork(scope.row)"
type="primary" plain round>补打</el-button>
@ -289,6 +263,8 @@
import {getOilNameList, getOilNumGun } from "@/api/cashier/oilnumgun";
import {listOilOrder, oilOrderInfo, orderStatisticsApi} from "@/api/cashier/oilorder";
import {getUser} from "@/api/cashier/user/user";
import {oilNumberList, oilNumbers} from "@/api/cashier/oilnumber";
import {getOilGuns, getOilNumberGun} from "@/api/cashier/oilGuns";
export default {
name: "order_Cashier",
@ -313,12 +289,15 @@
dateRange: [],
//
oilOrderList:[],
payTypeList:[],
//
queryParams: {
page: 1,
pageSize: 10,
},
total:0,
//
oilGunList:[],
orderStatistics: {
numberOfOilPens:'0',
@ -336,8 +315,29 @@
this.getStaffList();
this.getOrderStatistics();
this.getList();
this.getPayType();
this.getOilGunList();
},
methods:{
//
getOilGunList(){
getOilNumberGun().then(res => {
console.log(res)
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
i.oilName = item.oilName
this.oilGunList.push(i)
})
}
})
})
},
getPayType(){
getDicts("payment_type").then(res => {
this.payTypeList = res.data
})
},
//
getOrderStatistics() {
orderStatisticsApi().then(res=>{
@ -370,6 +370,15 @@
})
return name;
},
getType(list,val){
let name = "";
list.forEach(item => {
if (item.dictValue == val){
name = item.dictLabel
}
})
return name;
},
// id
async queryUser(id){
let result = "";
@ -428,8 +437,8 @@
getOilNameList().then( response => {
this.oilNameList = response.data;
})
getOilNumGun({oilNum : "全部"}).then( response => {
this.oilNumList = response.data
oilNumbers().then(response => {
this.oilNumList = response.data;
})
},
//
@ -446,6 +455,19 @@
}
return name;
},
//
getName1(oilNameList,id){
let name = ""
let _this = this;
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
}
}
</script>

View File

@ -41,7 +41,7 @@
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="手机号">
<el-input v-model="queryParams.payUser" placeholder="请输入手机号"></el-input>
<el-input v-model="queryParams.payUser" clearable placeholder="请输入手机号"></el-input>
</el-form-item>
<el-form-item label="油枪号" prop="oilGunNum">
<el-select
@ -50,17 +50,17 @@
clearable
placeholder="全部"
>
<el-option v-for="item in oilNumList"
<el-option v-for="item in oilGunList"
:key="item.id"
:label="item.oilGunNum"
:label="item.gunName"
:value="item.id">
<span style="float: left">{{ getName(oilNameList,item.oilName) }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.oilGunNum }}号枪</span>
<span style="float: left">{{ item.oilName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.gunName }}号枪</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="订单号">
<el-input v-model="queryParams.orderNo" placeholder="订单号、官方单号检索"></el-input>
<el-input v-model="queryParams.orderNo" clearable placeholder="订单号、官方单号检索"></el-input>
</el-form-item>
<!-- <el-form-item label="交易时间">-->
<!-- <el-date-picker-->
@ -148,7 +148,7 @@
<el-table-column prop="terminal" label="终端" align="center" width="80"></el-table-column>
<el-table-column prop="oils" label="油品/油枪" align="center">
<template slot-scope="props">
<span>{{ getName(oilNameList,props.row.oils) }}/{{ props.row.oilGunNum }}号枪</span>
<span>{{ getName(oilNameList,props.row.oils) }}/{{ getName1(oilGunList,props.row.oilGunNum) }}</span>
</template>
</el-table-column>
<el-table-column label="订单信息" align="center">
@ -209,6 +209,7 @@
import {getDicts} from "@/api/dict/data";
import {getOilNameList, getOilNumGun} from "@/api/cashier/oilnumgun";
import {queryStaffs} from "@/api/cashier/staff";
import {getOilNumberGun} from "@/api/cashier/oilGuns";
export default {
name: "order_Cashier",
@ -249,15 +250,44 @@
wechat:'0',
alipay:'0',
cash:'0',
}
},
oilGunList:[],
}
},
created() {
this.getList();
this.getOrderStatistics();
this.getPayList();
this.getOilGunList();
},
methods:{
//
getOilGunList(){
getOilNumberGun().then(res => {
console.log(res)
res.data.forEach(item => {
if (item.oilGunList.length>0){
item.oilGunList.forEach(i => {
i.oilName = item.oilName
this.oilGunList.push(i)
})
}
})
})
},
//
getName1(oilNameList,id){
let name = ""
let _this = this;
if(oilNameList!=null && oilNameList!=""){
oilNameList.forEach(item => {
if (item.id == id){
name = item.gunName;
}
})
}
return name;
},
//
getOrderStatistics() {

View File

@ -3,7 +3,7 @@ module.exports = {
// baseUrl: 'https://vue.ruoyi.vip/prod-api',
// baseUrl: 'http://192.168.0.196:8081/',
// baseUrl: 'http://192.168.1.4:8080/',
baseUrl: 'http://192.168.0.178:8008/',
baseUrl: 'http://192.168.0.138:8008/',
// baseUrl: 'http://192.168.1.5:8002/cdJdc',

View File

@ -71,7 +71,7 @@
authCode: authCode,
storeId: 0,
staffId: "",
phone: "16548796325",
phone: "18457621459",
},
}).then((resp) => {
console.log(resp)