收银台
This commit is contained in:
parent
092ce688cc
commit
17661f6115
@ -37,6 +37,12 @@ public class OilNameController extends BaseController {
|
||||
public ResponseObject selectAll (OilName oilName) {
|
||||
return getSuccessResult(oilNameService.oilNameListByType(oilName));
|
||||
}
|
||||
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject oilNameInfo(@PathVariable Integer id){
|
||||
return getSuccessResult(oilNameService.selectOilNameById(id));
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 分页查询所有数据
|
||||
// */
|
||||
@ -113,5 +119,15 @@ public class OilNameController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分组查询所有的油类名称
|
||||
*/
|
||||
|
||||
@GetMapping("/queryOilName")
|
||||
public ResponseObject getAllOilNameGroup() {
|
||||
return getSuccessResult(oilNameService.getAllOilNameGroup());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.petrolStationManagement.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilName;
|
||||
import com.fuint.business.petrolStationManagement.entity.OilNumber;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -13,4 +14,7 @@ public interface OilNameMapper extends BaseMapper<OilName> {
|
||||
|
||||
public List<OilName> getAllOilName();
|
||||
|
||||
public List<OilName> getAllOilNameGroup();
|
||||
|
||||
public OilName selectOilNameById(@Param("id") int id);
|
||||
}
|
||||
|
@ -18,7 +18,14 @@
|
||||
FROM
|
||||
oil_name NA
|
||||
</select>
|
||||
<!-- SELECT-->
|
||||
<select id="selectOilNameById" resultType="com.fuint.business.petrolStationManagement.entity.OilName"
|
||||
parameterType="int">
|
||||
select id, oil_type, oil_name from oil_name where id = #{id}
|
||||
</select>
|
||||
<select id="getAllOilNameGroup" resultType="com.fuint.business.petrolStationManagement.entity.OilName">
|
||||
select id, oil_type, oil_name from oil_name group by oil_name
|
||||
</select>
|
||||
<!-- SELECT-->
|
||||
<!-- NA.id AS id,-->
|
||||
<!-- NA.oil_name AS oilName,-->
|
||||
<!-- dict.dict_label AS oilType-->
|
||||
|
@ -23,6 +23,14 @@ public interface OilNameService extends IService<OilName> {
|
||||
|
||||
public List<OilName> getAllOilName();
|
||||
|
||||
public List<OilName> getAllOilNameGroup();
|
||||
|
||||
/**
|
||||
* 根据id查询油号信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public OilName selectOilNameById(int id);
|
||||
|
||||
// /**
|
||||
// * 根据条件分页查询员工信息
|
||||
|
@ -33,6 +33,17 @@ public class OilNameServiceImpl extends ServiceImpl<OilNameMapper, OilName> impl
|
||||
return baseMapper.getAllOilName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OilName> getAllOilNameGroup() {
|
||||
return baseMapper.getAllOilNameGroup();
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilName selectOilNameById(int id) {
|
||||
OilName oilName = baseMapper.selectOilNameById(id);
|
||||
return oilName;
|
||||
}
|
||||
|
||||
|
||||
// @Override
|
||||
// public IPage<OilNumber> selectOilNumberList(Page page, OilNumber oilNumber) {
|
||||
|
@ -75,6 +75,18 @@ public class LJUserController extends BaseController {
|
||||
return getSuccessResult(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据手机号查询会员信息
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/getMobile")
|
||||
public ResponseObject userVoByMobile(@Validated @RequestBody Map<String ,String > map){
|
||||
String mobile = map.get("mobile");
|
||||
LJUserVo userVo = userService.queryUserByMobile(mobile);
|
||||
return getSuccessResult(userVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除会员信息
|
||||
* @return
|
||||
|
@ -19,5 +19,18 @@ public interface LJUserMapper extends BaseMapper<LJUser> {
|
||||
*/
|
||||
public IPage<LJUserVo> selectUserList(Page page, @Param("user") LJUserVo user);
|
||||
|
||||
/**
|
||||
* 根据手机号查询用户信息
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
public LJUserVo selectUserByMobile(@Param("mobile") String mobile);
|
||||
|
||||
/**
|
||||
* 统计信息
|
||||
* @param storeId
|
||||
* @param sumValue
|
||||
* @return
|
||||
*/
|
||||
public Double selectSumByStore(@Param("storeId") int storeId,@Param("sumValue") String sumValue);
|
||||
}
|
||||
|
@ -39,7 +39,16 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<!-- 查询会员统计信息-->
|
||||
<select id="selectSumByStore" resultType="java.lang.Double" parameterType="int">
|
||||
select sum(${sumValue}) from mt_user_balance where store_id = #{storeId}
|
||||
</select>
|
||||
<!-- 根据手机号查询会员信息-->
|
||||
<select id="selectUserByMobile" resultType="com.fuint.business.userManager.vo.LJUserVo"
|
||||
parameterType="java.lang.String">
|
||||
<include refid="selectUser"></include>
|
||||
<where>
|
||||
mu.mobile = #{mobile}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
@ -40,6 +40,13 @@ public interface LJUserService extends IService<LJUser> {
|
||||
*/
|
||||
public LJUser selectUserByMobile(String mobile);
|
||||
|
||||
/**
|
||||
* 根据手机号查询会员信息
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
public LJUserVo queryUserByMobile(String mobile);
|
||||
|
||||
/**
|
||||
* 根据id删除会员信息
|
||||
* @param id
|
||||
|
@ -98,6 +98,17 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据手机号查询会员信息
|
||||
* @param mobile
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public LJUserVo queryUserByMobile(String mobile) {
|
||||
LJUserVo userVo = baseMapper.selectUserByMobile(mobile);
|
||||
return userVo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除会员信息
|
||||
* @param id
|
||||
|
@ -1,18 +1,14 @@
|
||||
package com.fuint.api.cashier.coltroller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import com.fuint.api.cashier.service.OilNumGunConfigService;
|
||||
import com.fuint.api.cashier.vo.OilNumGunConfigVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 油号油枪对应信息 controller层
|
||||
@ -29,18 +25,30 @@ public class OilNumGunConfigController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public ResponseObject list(){
|
||||
List<OilNumGunConfig> list = configService.selectList();
|
||||
List<OilNumGunConfigVo> list = configService.selectList();
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据油号查询油号油枪对应信息
|
||||
* @param oilNum
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{oilNum}")
|
||||
public ResponseObject getOilGun(@PathVariable String oilNum){
|
||||
List<OilNumGunConfig> list = configService.selectListByOilNum(oilNum);
|
||||
@PostMapping("/oilNum")
|
||||
public ResponseObject getOilGun(@RequestBody Map<String,String> map){
|
||||
String oilNum = map.get("oilNum");
|
||||
List<OilNumGunConfigVo> list = configService.selectListByOilNum(oilNum);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询油号油枪配置信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public ResponseObject oilNumGunInfo(@PathVariable Integer id){
|
||||
OilNumGunConfigVo oilNumGunConfigVo = configService.selectOilNumGunById(id);
|
||||
return getSuccessResult(oilNumGunConfigVo);
|
||||
}
|
||||
}
|
||||
|
@ -26,14 +26,14 @@ public class OilNumGunConfig extends BaseEntity implements Serializable {
|
||||
@ApiModelProperty("自增ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 油号
|
||||
*/
|
||||
private String oilNum;
|
||||
/**
|
||||
* 油枪号
|
||||
*/
|
||||
private String oilGunNum;
|
||||
/**
|
||||
* 油号id
|
||||
*/
|
||||
private Integer numberId;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2,6 +2,29 @@ package com.fuint.api.cashier.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import com.fuint.api.cashier.vo.OilNumGunConfigVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OilNumGunConfigMapper extends BaseMapper<OilNumGunConfig> {
|
||||
/**
|
||||
* 查询油号油枪信息
|
||||
* @return
|
||||
*/
|
||||
public List<OilNumGunConfigVo> selectOilNumGunList();
|
||||
|
||||
/**
|
||||
* 根据油号查询油枪信息
|
||||
* @param numberId
|
||||
* @return
|
||||
*/
|
||||
public List<OilNumGunConfigVo> selectListByOilNum(@Param("numberId") String numberId);
|
||||
|
||||
/**
|
||||
* 根据id查询油号油枪配置信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public OilNumGunConfigVo selectOilNumGunById(@Param("id") int id);
|
||||
}
|
||||
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.api.cashier.mapper.OilNumGunConfigMapper">
|
||||
<sql id="selectOilNumGun">
|
||||
select ong.*,onm.oil_name,onm.oil_price from oil_num_gun_config ong
|
||||
inner join oil_number onm on ong.number_id = onm.number_id
|
||||
</sql>
|
||||
<select id="selectOilNumGunList" resultType="com.fuint.api.cashier.vo.OilNumGunConfigVo">
|
||||
<include refid="selectOilNumGun"></include>
|
||||
group by ong.number_id
|
||||
</select>
|
||||
|
||||
<select id="selectListByOilNum" resultType="com.fuint.api.cashier.vo.OilNumGunConfigVo"
|
||||
parameterType="java.lang.String">
|
||||
<include refid="selectOilNumGun"></include>
|
||||
<where>
|
||||
ong.number_id = #{numberId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOilNumGunById" resultType="com.fuint.api.cashier.vo.OilNumGunConfigVo"
|
||||
parameterType="int">
|
||||
<include refid="selectOilNumGun"></include>
|
||||
<where>
|
||||
ong.id = #{id}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -2,6 +2,7 @@ package com.fuint.api.cashier.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import com.fuint.api.cashier.vo.OilNumGunConfigVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -13,12 +14,19 @@ public interface OilNumGunConfigService extends IService<OilNumGunConfig> {
|
||||
* 查询所有油号油枪配置信息
|
||||
* @return
|
||||
*/
|
||||
public List<OilNumGunConfig> selectList();
|
||||
public List<OilNumGunConfigVo> selectList();
|
||||
|
||||
/**
|
||||
* 根据油号查询油枪信息
|
||||
* @param oilNum
|
||||
* @return
|
||||
*/
|
||||
public List<OilNumGunConfig> selectListByOilNum(String oilNum);
|
||||
public List<OilNumGunConfigVo> selectListByOilNum(String oilNum);
|
||||
|
||||
/**
|
||||
* 根据id查询油号油枪配置信息
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public OilNumGunConfigVo selectOilNumGunById(int id);
|
||||
}
|
||||
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import com.fuint.api.cashier.mapper.OilNumGunConfigMapper;
|
||||
import com.fuint.api.cashier.service.OilNumGunConfigService;
|
||||
import com.fuint.api.cashier.vo.OilNumGunConfigVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
@ -16,20 +17,25 @@ import java.util.List;
|
||||
@Service
|
||||
public class OilNumGunConfigServiceImpl extends ServiceImpl<OilNumGunConfigMapper, OilNumGunConfig> implements OilNumGunConfigService {
|
||||
@Override
|
||||
public List<OilNumGunConfig> selectList() {
|
||||
LambdaQueryWrapper<OilNumGunConfig> queryWrapper = new LambdaQueryWrapper<OilNumGunConfig>();
|
||||
queryWrapper.groupBy(OilNumGunConfig::getOilNum);
|
||||
List list = baseMapper.selectMaps(queryWrapper);
|
||||
public List<OilNumGunConfigVo> selectList() {
|
||||
List<OilNumGunConfigVo> list = baseMapper.selectOilNumGunList();
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OilNumGunConfig> selectListByOilNum(String oilNum) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
if (!oilNum.equals("1")){
|
||||
queryWrapper.eq("oil_num",oilNum);
|
||||
public List<OilNumGunConfigVo> selectListByOilNum(String oilNum) {
|
||||
List<OilNumGunConfigVo> list = null;
|
||||
if (oilNum.equals("全部")){
|
||||
list = baseMapper.selectOilNumGunList();
|
||||
}else {
|
||||
list = baseMapper.selectListByOilNum(oilNum);
|
||||
}
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public OilNumGunConfigVo selectOilNumGunById(int id) {
|
||||
OilNumGunConfigVo oilNumGunConfigVo = baseMapper.selectOilNumGunById(id);
|
||||
return oilNumGunConfigVo;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.api.cashier.vo;
|
||||
|
||||
import com.fuint.api.cashier.entity.OilNumGunConfig;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OilNumGunConfigVo extends OilNumGunConfig {
|
||||
// 油品号
|
||||
private String oilName;
|
||||
// 油品单价
|
||||
private Double oilPrice;
|
||||
}
|
@ -0,0 +1,41 @@
|
||||
package com.fuint.api.fuyou.entity;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.fuint.api.fuyou.util.Utils;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentHelper;
|
||||
import org.dom4j.Element;
|
||||
|
||||
import java.net.URLDecoder;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
public class Message {
|
||||
public static String requestMsg(Map<String, String> map) throws Exception {
|
||||
Map<String, String> reqs = new HashMap<>();
|
||||
reqs.putAll(map);
|
||||
String sign = Utils.getSign(reqs);
|
||||
reqs.put("sign", sign);
|
||||
Document doc = DocumentHelper.createDocument();
|
||||
Element root = doc.addElement("xml");
|
||||
Iterator it = reqs.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
String key = it.next().toString();
|
||||
String value = reqs.get(key);
|
||||
root.addElement(key).addText(value);
|
||||
}
|
||||
String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML();
|
||||
reqBody = URLEncoder.encode(reqBody, Const.charset);
|
||||
return reqBody;
|
||||
}
|
||||
|
||||
public static String responseMsg(String reqBody,String url) throws Exception {
|
||||
Map<String, Object> reqParam = new HashMap<>();
|
||||
reqParam.put("req",reqBody);
|
||||
String resMsg = HttpUtil.post(url, reqParam);
|
||||
String rspXml = URLDecoder.decode(resMsg, Const.charset);
|
||||
return rspXml;
|
||||
}
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package com.fuint.api.fuyou.service.impl;
|
||||
|
||||
import cn.hutool.core.thread.ThreadUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.fuint.api.fuyou.entity.Builder;
|
||||
import com.fuint.api.fuyou.entity.Const;
|
||||
import com.fuint.api.fuyou.entity.Message;
|
||||
import com.fuint.api.fuyou.service.FyPayService;
|
||||
import com.fuint.api.fuyou.util.Utils;
|
||||
import org.dom4j.Document;
|
||||
@ -30,29 +32,38 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
Map<String, String> map = Builder.buildFuiou22();
|
||||
map.put("auth_code",authCode);
|
||||
map.put("mchnt_order_no",orderNo);
|
||||
Map<String, String> reqs = new HashMap<>();
|
||||
reqs.putAll(map);
|
||||
String sign = Utils.getSign(reqs);
|
||||
reqs.put("sign", sign);
|
||||
Document doc = DocumentHelper.createDocument();
|
||||
Element root = doc.addElement("xml");
|
||||
Iterator it = reqs.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
String key = it.next().toString();
|
||||
String value = reqs.get(key);
|
||||
root.addElement(key).addText(value);
|
||||
}
|
||||
String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML();
|
||||
reqBody = URLEncoder.encode(reqBody, Const.charset);
|
||||
|
||||
Map<String, Object> reqParam = new HashMap<>();
|
||||
reqParam.put("req",reqBody);
|
||||
String resMsg = HttpUtil.post(Const.fuiou_22_url, reqParam);
|
||||
String rspXml = URLDecoder.decode(resMsg, Const.charset);
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_22_url);
|
||||
|
||||
//响应报文验签
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
String str = resMap.get("sign");
|
||||
if (Utils.verifySign(resMap, str)){
|
||||
String resultCode = resMap.get("result_code");
|
||||
if (resultCode.equals("000000")){
|
||||
return resMap;
|
||||
}else {
|
||||
ThreadUtil.execAsync(() -> {
|
||||
try {
|
||||
long startTime = System.currentTimeMillis();
|
||||
long endTime = startTime + 5000;
|
||||
while (System.currentTimeMillis() < endTime){
|
||||
Map<String, String> queryOrder = this.queryOrder(map1);
|
||||
String resultCode1 = queryOrder.get("result_code");
|
||||
if (resultCode1.equals("000000")){
|
||||
// 修改已支付
|
||||
}else {
|
||||
// 支付失败
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
});
|
||||
}
|
||||
return resMap;
|
||||
}
|
||||
return null;
|
||||
@ -63,25 +74,12 @@ public class FyPayServiceImpl implements FyPayService {
|
||||
String orderNo = map1.get("orderNo");
|
||||
Map<String, String> map = Builder.buildFuiou30();
|
||||
map.put("mchnt_order_no",orderNo);
|
||||
Map<String, String> reqs = new HashMap<>();
|
||||
reqs.putAll(map);
|
||||
String sign = Utils.getSign(reqs);
|
||||
reqs.put("sign", sign);
|
||||
Document doc = DocumentHelper.createDocument();
|
||||
Element root = doc.addElement("xml");
|
||||
Iterator it = reqs.keySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
String key = it.next().toString();
|
||||
String value = reqs.get(key);
|
||||
root.addElement(key).addText(value);
|
||||
}
|
||||
String reqBody = "<?xml version=\"1.0\" encoding=\"GBK\" standalone=\"yes\"?>" + doc.getRootElement().asXML();
|
||||
reqBody = URLEncoder.encode(reqBody, Const.charset);
|
||||
|
||||
Map<String, Object> reqParam = new HashMap<>();
|
||||
reqParam.put("req",reqBody);
|
||||
String resMsg = HttpUtil.post(Const.fuiou_30_url, reqParam);
|
||||
String rspXml = URLDecoder.decode(resMsg, Const.charset);
|
||||
// 请求报文
|
||||
String reqBody = Message.requestMsg(map);
|
||||
// 响应报文
|
||||
String rspXml = Message.responseMsg(reqBody,Const.fuiou_30_url);
|
||||
|
||||
//响应报文验签
|
||||
Map<String, String> resMap = Utils.xmlStr2Map(rspXml);
|
||||
String str = resMap.get("sign");
|
||||
|
70
fuintCashierWeb/src/api/cashier/ljgoods.js
Normal file
70
fuintCashierWeb/src/api/cashier/ljgoods.js
Normal file
@ -0,0 +1,70 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询商品列表
|
||||
export function listLJGoods(query) {
|
||||
return request({
|
||||
url: '/business/convenience/goods/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询商品详细
|
||||
export function getLJGoods(id) {
|
||||
return request({
|
||||
url: '/business/convenience/goods/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据商品条码查询商品详细
|
||||
export function queryLJGoods(data) {
|
||||
return request({
|
||||
url: '/business/convenience/goods/getGoods',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 生成13位二维码
|
||||
export function createGoodsNo() {
|
||||
return request({
|
||||
url: '/business/convenience/goods/createGoodsNo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 对接扫码枪
|
||||
export function scanCode(goodsNo) {
|
||||
return request({
|
||||
url: '/business/convenience/goods/scanCode/'+goodsNo,
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增商品
|
||||
export function addLJGoods(data) {
|
||||
return request({
|
||||
url: '/business/convenience/goods',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改商品
|
||||
export function updateLJGoods(data) {
|
||||
return request({
|
||||
url: '/business/convenience/goods',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除商品
|
||||
export function delLJGoods(id) {
|
||||
return request({
|
||||
url: '/business/convenience/goods/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询字典类型列表
|
||||
// 查询油号油枪列表
|
||||
export function listOilNumGun() {
|
||||
return request({
|
||||
url: '/api/cashier/list',
|
||||
@ -8,10 +8,38 @@ export function listOilNumGun() {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询字典类型列表
|
||||
export function getOilNumGun(oilNum) {
|
||||
// 查询油号油枪列表
|
||||
export function getOilNumGun(data) {
|
||||
return request({
|
||||
url: '/api/cashier/' + oilNum,
|
||||
method: 'get',
|
||||
url: '/api/cashier/oilNum' ,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询油号油枪列表
|
||||
export function getOilNumGunById(id) {
|
||||
return request({
|
||||
url: '/api/cashier/' +id ,
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id油品名称
|
||||
export function getOilNameById(id) {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilName/' +id ,
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id油品名称
|
||||
export function getOilNameList() {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilName/queryOilName' ,
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
61
fuintCashierWeb/src/api/cashier/staff.js
Normal file
61
fuintCashierWeb/src/api/cashier/staff.js
Normal file
@ -0,0 +1,61 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询员工列表
|
||||
export function listStaff(query) {
|
||||
return request({
|
||||
url: '/business/member/staff/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有员工
|
||||
export function queryStaffs() {
|
||||
return request({
|
||||
url: '/business/member/staff/query',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询员工详细
|
||||
export function getStaff(id) {
|
||||
return request({
|
||||
url: '/business/member/staff/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 根据手机号查询员工详情
|
||||
export function queryStaff(data) {
|
||||
return request({
|
||||
url: '/business/member/staff/mobile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 新增员工
|
||||
export function addStaff(data) {
|
||||
return request({
|
||||
url: '/business/member/staff',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改员工
|
||||
export function updateStaff(data) {
|
||||
return request({
|
||||
url: '/business/member/staff',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除员工
|
||||
export function delStaff(id) {
|
||||
return request({
|
||||
url: '/business/member/staff/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
39
fuintCashierWeb/src/api/cashier/user.js
Normal file
39
fuintCashierWeb/src/api/cashier/user.js
Normal file
@ -0,0 +1,39 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员列表
|
||||
export function listUser(query) {
|
||||
return request({
|
||||
url: '/business/userManager/user/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询会员列表
|
||||
export function listStatistic(query) {
|
||||
return request({
|
||||
url: '/business/userManager/user/statistic',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 根据手机号查询会员详细
|
||||
export function getUserMobile(data) {
|
||||
return request({
|
||||
url: '/business/userManager/user/mobile' ,
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据手机号查询会员详细
|
||||
export function getUserVoMobile(data) {
|
||||
return request({
|
||||
url: '/business/userManager/user/getMobile',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -49,13 +49,14 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="center-right">
|
||||
<div class="center-top">
|
||||
<div class="center-top-tab">
|
||||
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="全部" name="1"></el-tab-pane>
|
||||
<el-tab-pane v-for="item in oilNumList" :key="item.id"
|
||||
:label="item.oil_num" :name="item.oil_num"></el-tab-pane>
|
||||
<el-tab-pane v-for="item in oilNameList" :key="item.id"
|
||||
:label="item.oilName" :name="item.id+''"></el-tab-pane>
|
||||
<!-- <el-tab-pane label="95#" name="third"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="98#" name="fourth"></el-tab-pane>-->
|
||||
<!-- <el-tab-pane label="0#" name="one"></el-tab-pane>-->
|
||||
@ -67,12 +68,23 @@
|
||||
</div>
|
||||
|
||||
<div class="center-top-data">
|
||||
<div class="center-top-of" >
|
||||
<div class="center-top-of">
|
||||
<div class="wrap-wrap">
|
||||
<div class="of-box" v-for="(item,index) in 17" :key="index" :style="{'background-color': colorList[index%5].color}">
|
||||
<div>92#</div>
|
||||
<!-- <div class="of-box" v-for="(item,index) in 17" :key="index"
|
||||
:style="{'background-color': colorList[index%5].color}">-->
|
||||
<!-- <div>92#</div>-->
|
||||
|
||||
<div class="of-title" >{{index+1}}号枪</div>
|
||||
<!-- <div class="of-title" >{{index+1}}号枪</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<div class="of-box" v-for="(item,index) in oilNumGunList" :key="index"
|
||||
:style="{'background-color': colorList[index%5].color}"
|
||||
@click="refuel(item.id)">
|
||||
<div>{{ getName(oilNameList,item.oilName) }}</div>
|
||||
|
||||
<div class="of-title" >{{item.oilGunNum}}号枪</div>
|
||||
<div>
|
||||
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
||||
</div>
|
||||
@ -92,12 +104,21 @@
|
||||
<div class="bottom-qk">解锁</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="center-app">
|
||||
<div class="center-top">
|
||||
<div class="center-top-title">非油商品</div>
|
||||
<div class="center-top-input">
|
||||
<input type="text" placeholder="请输入商品名称,条码,商品关键词">
|
||||
<input v-model="goods" type="text"
|
||||
@input="queryGoods"
|
||||
placeholder="请输入商品名称,条码,商品关键词">
|
||||
</div>
|
||||
<el-autocomplete
|
||||
v-model="goods"
|
||||
:fetch-suggestions="querySearchAsync"
|
||||
placeholder="请输入内容"
|
||||
@select="handleSelect"
|
||||
></el-autocomplete>
|
||||
<div class="center-top-data">
|
||||
<div class="data-top">
|
||||
<div class="data-top-title">商品</div>
|
||||
@ -130,24 +151,30 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 加油员姓名-->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
title="选择加油员"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<div class="wrap-wrap">
|
||||
<div class="of-box" v-for="(item,index) in 7" :key="index" :style="{'background-color': item.color}">
|
||||
<div>92#</div>
|
||||
<div class="of-title" >加油员姓名</div>
|
||||
<div>
|
||||
<img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">
|
||||
</div>
|
||||
:close-on-click-modal="false">
|
||||
<div class="wrap-wrap">
|
||||
<div class="of-box" v-for="(item,index) in staffList" :key="index"
|
||||
:style="{'background-color': item.color}">
|
||||
<div>{{ item.name }}</div>
|
||||
<div class="of-title" >{{ item.mobile }}</div>
|
||||
</div>
|
||||
<!-- <div class="of-box" v-for="(item,index) in 7" :key="index" :style="{'background-color': item.color}">-->
|
||||
<!-- <div>92#</div>-->
|
||||
<!-- <div class="of-title" >加油员姓名</div>-->
|
||||
<!-- <div>-->
|
||||
<!-- <img src="../../../assets/images/jya.png" style="width: 18px;height: 18px;">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
<!-- <el-button type="primary" @click="dialogVisible = false">确 定</el-button>-->
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 立即结算-->
|
||||
@ -155,7 +182,7 @@
|
||||
title="提示"
|
||||
:visible.sync="dialogVisiblej"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
:close-on-click-modal="false">
|
||||
<div style="text-align: center;font-size: 15px;font-weight: bold">付款金额</div>
|
||||
<div style="text-align: center;font-size: 30px;font-weight: bold;color: red;margin: 10px 0">
|
||||
¥300.00
|
||||
@ -167,6 +194,7 @@
|
||||
<div style="text-align: center;margin-bottom: 10px">赠送金额</div>
|
||||
<div>
|
||||
<el-input v-model="authCode"
|
||||
autofocus="autofocus"
|
||||
@keydown.enter.native="collection"
|
||||
placeholder="扫描或输入付款码、支持微信、支付宝、云闪付">
|
||||
<i
|
||||
@ -185,19 +213,46 @@
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisiblej = false">取 消</el-button>
|
||||
<el-button type="primary" @click="collection">确 定 收 款</el-button>
|
||||
<el-button @click="dialogVisiblej = false" class="but">取 消</el-button>
|
||||
<el-button type="primary" class="but" @click="collection">确 定 收 款</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 会员登录-->
|
||||
<el-dialog
|
||||
title="提示"
|
||||
title="会员信息"
|
||||
:visible.sync="dialogVisiblevip"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
:close-on-click-modal="false">
|
||||
<div >
|
||||
会员登录
|
||||
<el-input placeholder="会员手机号、用户昵称、实体卡号" v-model="userNo"
|
||||
class="input-with-select" style="text-align: center;">
|
||||
<el-select v-model="select1" slot="prepend" placeholder="请选择" style="width: 120px">
|
||||
<el-option label="会员手机号" value="会员手机号"></el-option>
|
||||
<el-option label="用户昵称" value="用户昵称"></el-option>
|
||||
</el-select>
|
||||
<el-button slot="append" @click="getUser">查询</el-button>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-descriptions title="会员信息" :column="2">
|
||||
<el-descriptions-item label="手机号">{{member.mobile ? member.mobile : "--"}}</el-descriptions-item>
|
||||
<el-descriptions-item label="会员昵称">{{member.name ? member.name : "--"}}</el-descriptions-item>
|
||||
<el-descriptions-item label="积分">{{member.points ? member.points : "--"}}</el-descriptions-item>
|
||||
<!-- <el-descriptions-item label="加油金余额">0</el-descriptions-item>-->
|
||||
<el-descriptions-item label="车牌号">{{member.carNo ? member.carNo : "--"}}</el-descriptions-item>
|
||||
<el-descriptions-item label="会员备注">{{member.remark ? member.remark : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="会员等级">
|
||||
<el-descriptions-item label="等级名称">{{member.gradeId ? member.gradeId : "--"}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions title="储值余额">
|
||||
<template slot="extra">
|
||||
<sapn style="color: red;margin-right: 20px">余额充值</sapn>
|
||||
<sapn style="font-weight: bold">¥{{member.cardBalance ? member.cardBalance : "--"}}</sapn>
|
||||
</template>
|
||||
<el-descriptions-item v-if="member.cardBalance!=0" label="账户余额">{{member.cardBalance ? member.cardBalance : "--"}}元</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisiblevip = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisiblevip = false">确 定</el-button>
|
||||
@ -205,7 +260,43 @@
|
||||
</el-dialog>
|
||||
<!-- 油号选择-->
|
||||
|
||||
|
||||
<!-- 加油枪加油金额-->
|
||||
<el-dialog
|
||||
title="加油金额"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="dialogVisibleamount"
|
||||
width="30%">
|
||||
<div class="amount">
|
||||
<span>已选油品</span>
|
||||
<span class="amountBlue">{{ getName(oilNameList,form.oilName) }}</span>
|
||||
</div>
|
||||
<div class="amount">
|
||||
<span>已选油枪</span>
|
||||
<span class="amountBlue">{{ form.oilGunNum }}号枪</span>
|
||||
</div>
|
||||
<div class="amount">
|
||||
<span>油品单价</span>
|
||||
<span class="amountBlue">{{ form.oilPrice }}元/L</span>
|
||||
</div>
|
||||
<div >
|
||||
<el-input v-model="form.amount" placeholder="请输入加油金额" autofocus="autofocus"
|
||||
style="font-weight: 700;text-align: center;font-size: 20px;">
|
||||
<el-select v-model="select" style="width: 70px" @change="changeSelect" slot="append" placeholder="请选择">
|
||||
<el-option label="元" value="元"></el-option>
|
||||
<el-option label="L" value="L"></el-option>
|
||||
</el-select>
|
||||
</el-input>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="6" v-for="(item,index) in rise" :key="index">
|
||||
<el-button class="grid-content bg-purple" @click="changeAmount(item.value)">{{ item.value }}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<span slot="footer" class="dialog-footer" style="display: flex;justify-content: space-around">
|
||||
<el-button @click="dialogVisibleamount = false" class="but">取 消</el-button>
|
||||
<el-button type="primary" @click="getOilOrder" class="but">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
@ -213,16 +304,44 @@
|
||||
|
||||
<script>
|
||||
import {getDicts} from "@/api/dict/data";
|
||||
import {getOilNumGun, listOilNumGun} from "@/api/cashier/oilnumgun";
|
||||
import {getOilNameList, getOilNumGun, getOilNumGunById, listOilNumGun} from "@/api/cashier/oilnumgun";
|
||||
import {fyPay} from "@/api/cashier/pay";
|
||||
import {listLJGoods} from "@/api/cashier/ljgoods";
|
||||
import {getUserVoMobile} from "@/api/cashier/user";
|
||||
import {queryStaffs} from "@/api/cashier/staff";
|
||||
|
||||
export default {
|
||||
name: "homeindex",
|
||||
data(){
|
||||
return{
|
||||
// 油品订单
|
||||
oilOrder:[],
|
||||
// 油品订单数
|
||||
oilTotal:0,
|
||||
// 加油金额
|
||||
rise:[
|
||||
{value:"¥100"},
|
||||
{value:"¥150"},
|
||||
{value:"¥200"},
|
||||
{value:"¥300"},
|
||||
],
|
||||
// 会员信息
|
||||
member:{},
|
||||
select1:'会员手机号',
|
||||
// 会员信息
|
||||
userNo:"",
|
||||
// 查询的商品信息
|
||||
goods:"",
|
||||
select:"元",
|
||||
form:{
|
||||
amount : ""
|
||||
},
|
||||
oilNumGunList:[],
|
||||
authCode:'',
|
||||
// 油号列表
|
||||
oilNumList:[],
|
||||
// 商品列表
|
||||
goodsList:[],
|
||||
// 油枪列表
|
||||
oilGunList:[],
|
||||
// 支付方式列表
|
||||
@ -230,7 +349,8 @@
|
||||
dialogVisible: false,
|
||||
dialogVisiblej: false,
|
||||
dialogVisiblevip:false,
|
||||
activeName: 'second',
|
||||
dialogVisibleamount:false,
|
||||
activeName: '1',
|
||||
tabarr:[
|
||||
{name:'收银台',icon:'el-icon-s-platform'},
|
||||
{name:'充值',icon: 'el-icon-s-finance'},
|
||||
@ -252,25 +372,137 @@
|
||||
{color:'#fafafa'}
|
||||
],
|
||||
num: 1,
|
||||
// 油号名称
|
||||
oilNameList:'',
|
||||
// 员工列表
|
||||
staffList:[],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getPayList();
|
||||
this.queryGoods();
|
||||
this.getOilName();
|
||||
},
|
||||
methods:{
|
||||
getStaffList(){
|
||||
queryStaffs().then( response => {
|
||||
this.staffList = response.data
|
||||
})
|
||||
},
|
||||
// 订单信息
|
||||
getOilOrder(){
|
||||
this.dialogVisibleamount = false
|
||||
this.oilOrder.push(this.form)
|
||||
this.oilTotal += 1;
|
||||
},
|
||||
// 选择“元”或“L”
|
||||
changeSelect(){
|
||||
if(this.select == "元"){
|
||||
this.rise = [
|
||||
{value:"¥100"},
|
||||
{value:"¥150"},
|
||||
{value:"¥200"},
|
||||
{value:"¥300"},
|
||||
];
|
||||
}else {
|
||||
this.rise = [
|
||||
{value:"100L"},
|
||||
{value:"150L"},
|
||||
{value:"200L"},
|
||||
{value:"300L"},
|
||||
];
|
||||
}
|
||||
},
|
||||
// 改变加油金额
|
||||
changeAmount(amount){
|
||||
if (this.select == "元"){
|
||||
this.form.amount = amount.slice(1)
|
||||
}else {
|
||||
this.form.amount = amount.slice(0,3)
|
||||
}
|
||||
},
|
||||
// 获取油号名称
|
||||
getName(oilNameList,id){
|
||||
let name = ""
|
||||
if(oilNameList!=null && oilNameList!=""){
|
||||
oilNameList.forEach(item => {
|
||||
if (item.id == id){
|
||||
name = item.oilName
|
||||
}
|
||||
})
|
||||
}
|
||||
return name;
|
||||
},
|
||||
// 获取油号信息
|
||||
getOilName(){
|
||||
getOilNameList().then( response => {
|
||||
this.oilNameList = response.data;
|
||||
})
|
||||
},
|
||||
getUser(){
|
||||
getUserVoMobile({mobile:this.userNo}).then( response => {
|
||||
this.member = response.data
|
||||
// console.log(this.member)
|
||||
})
|
||||
},
|
||||
querySearchAsync(queryString, cb) {
|
||||
var restaurants = this.goodsList;
|
||||
// console.log(queryString)
|
||||
this.goodsList.forEach(item => {
|
||||
item.indexOf(queryString)
|
||||
})
|
||||
},
|
||||
handleSelect(item) {
|
||||
// console.log(item);
|
||||
},
|
||||
// 查询商品信息
|
||||
queryGoods(val){
|
||||
// console.log(this.goods)
|
||||
let map = {
|
||||
page:1,
|
||||
pageSize:40,
|
||||
name:this.goods,
|
||||
isRecovery:0,
|
||||
}
|
||||
let map1 = {
|
||||
page:1,
|
||||
pageSize:40,
|
||||
goodsNo:this.goods,
|
||||
isRecovery:0,
|
||||
}
|
||||
listLJGoods(map).then( response => {
|
||||
if(response.data.records!=null){
|
||||
this.goodsList = response.data.records
|
||||
}
|
||||
})
|
||||
listLJGoods(map1).then( response => {
|
||||
if(response.data.records!=null){
|
||||
this.goodsList = response.data.records
|
||||
}
|
||||
})
|
||||
// console.log(this.goodsList)
|
||||
},
|
||||
// 加油金额
|
||||
refuel(id){
|
||||
this.form.amount = ""
|
||||
this.dialogVisibleamount = true;
|
||||
getOilNumGunById(id).then( response => {
|
||||
this.form = response.data;
|
||||
})
|
||||
},
|
||||
// 确定收款
|
||||
collection(){
|
||||
let map = {
|
||||
authCode : this.authCode,
|
||||
orderNo : "0000055"
|
||||
}
|
||||
console.log(map)
|
||||
// console.log(map)
|
||||
fyPay(map).then( response => {
|
||||
console.log(response)
|
||||
// console.log(response)
|
||||
})
|
||||
},
|
||||
payMethod(payType){
|
||||
console.log(payType)
|
||||
// console.log(payType)
|
||||
},
|
||||
// 获取支付方式
|
||||
getPayList(){
|
||||
@ -281,6 +513,10 @@
|
||||
listOilNumGun().then( response => {
|
||||
this.oilNumList = response.data
|
||||
})
|
||||
// 获取油号油枪对应信息
|
||||
getOilNumGun({oilNum : "全部"}).then( response => {
|
||||
this.oilNumGunList = response.data
|
||||
})
|
||||
},
|
||||
handleClose(done) {
|
||||
this.$confirm('确认关闭?')
|
||||
@ -293,9 +529,17 @@
|
||||
// console.log(value);
|
||||
},
|
||||
handleClick(tab, event) {
|
||||
console.log(tab.label)
|
||||
getOilNumGun(tab.label).then( response => {
|
||||
console.log(response)
|
||||
let oilNum = ""
|
||||
this.oilNumList.forEach(item => {
|
||||
if (item.oilName == tab.name){
|
||||
oilNum = item.numberId
|
||||
}
|
||||
})
|
||||
if (tab.label == "全部"){
|
||||
oilNum = "全部"
|
||||
}
|
||||
getOilNumGun({oilNum : oilNum}).then( response => {
|
||||
this.oilNumGunList = response.data
|
||||
})
|
||||
},
|
||||
gocomponents(index){
|
||||
@ -307,6 +551,28 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.but{
|
||||
width: 150px;
|
||||
height: 50px;
|
||||
border-radius: 50px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.amountBlue{
|
||||
color: #00afff;
|
||||
font-weight: bold;
|
||||
}
|
||||
.amount{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 16px;
|
||||
width: 100%;
|
||||
padding: 0 10px;
|
||||
margin: 10px auto;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
background-color: #f6f6f6;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.app-center{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -612,5 +878,38 @@
|
||||
color: white;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
.el-col {
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
}
|
||||
.bg-purple-dark {
|
||||
background: #eeeeee;
|
||||
}
|
||||
.bg-purple {
|
||||
background: #d3dce6;
|
||||
}
|
||||
.bg-purple-light {
|
||||
background: #e5e9f2;
|
||||
}
|
||||
.grid-content {
|
||||
height: 50px;
|
||||
font-size: 20px;
|
||||
width: 120px;
|
||||
border-radius: 4px;
|
||||
min-height: 36px;
|
||||
}
|
||||
.row-bg {
|
||||
padding: 10px 0;
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user