优化项
This commit is contained in:
parent
14f1b6fdd4
commit
683b41e456
@ -181,6 +181,7 @@
|
|||||||
<el-form-item label="商品条码" prop="goodsNo">
|
<el-form-item label="商品条码" prop="goodsNo">
|
||||||
<el-input v-model="form.goodsNo"
|
<el-input v-model="form.goodsNo"
|
||||||
@keydown.enter.native="getGoods(form)"
|
@keydown.enter.native="getGoods(form)"
|
||||||
|
:disabled="title == '编辑商品'"
|
||||||
v-focus
|
v-focus
|
||||||
clearable
|
clearable
|
||||||
placeholder="商品的条码信息">
|
placeholder="商品的条码信息">
|
||||||
@ -283,7 +284,7 @@
|
|||||||
style="width: 94%"
|
style="width: 94%"
|
||||||
v-model="supplier"
|
v-model="supplier"
|
||||||
:fetch-suggestions="querySearch"
|
:fetch-suggestions="querySearch"
|
||||||
placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即自动添加"
|
placeholder="供应商名称,如果是未添加的供应商,输完名称点回车即可自动添加"
|
||||||
@change="addSupplier"
|
@change="addSupplier"
|
||||||
@select="selectSupplier">
|
@select="selectSupplier">
|
||||||
<template slot-scope="{ item }">
|
<template slot-scope="{ item }">
|
||||||
|
@ -1235,28 +1235,42 @@ export default {
|
|||||||
this.form1.attestationData = JSON.stringify(this.imageUrl)
|
this.form1.attestationData = JSON.stringify(this.imageUrl)
|
||||||
if (this.form1.id) {
|
if (this.form1.id) {
|
||||||
updateCertifiedMember(this.form1).then(response => {
|
updateCertifiedMember(this.form1).then(response => {
|
||||||
this.$modal.msgSuccess("用户认证信息更新成功");
|
if (response.data==1){
|
||||||
this.openMember = false;
|
this.$modal.msgSuccess("用户认证信息更新成功");
|
||||||
this.isEdit = false;
|
this.openMember = false;
|
||||||
this.reset1();
|
this.isEdit = false;
|
||||||
this.getListMember();
|
this.reset1();
|
||||||
|
this.getListMember();
|
||||||
|
}else {
|
||||||
|
this.$modal.msgError("手机号已存在")
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getUserMobile({mobile:this.form1.mobile}).then( response => {
|
getUserMobile({mobile:this.form1.mobile}).then( response => {
|
||||||
if (response.data==null){
|
if (!response.data){
|
||||||
this.$modal.msgError("用户信息不存在,请检查当前用户是否已注册")
|
this.$modal.msgError("用户信息不存在,请检查当前用户是否已注册")
|
||||||
}else {
|
}else {
|
||||||
this.form1.userId = response.data.id
|
this.form1.userId = response.data.id
|
||||||
getCertifiedMemberByUserId(this.form1.userId).then( res => {
|
getCertifiedMemberByUserId(this.form1.userId).then( res => {
|
||||||
if(res.data!=null){
|
if(res.data){
|
||||||
this.$modal.msgError("当前用户已存在认证记录,请检索后编辑对应用户资料处理")
|
this.$modal.msgError("当前用户已存在认证记录,请检索后编辑对应用户资料处理")
|
||||||
}
|
}else {
|
||||||
if(res.data==null){
|
addCertifiedMember(this.form1).then(resp => {
|
||||||
addCertifiedMember(this.form1).then(response => {
|
// console.log(resp)
|
||||||
this.$modal.msgSuccess("新增用户认证信息成功");
|
if (resp.data==1){
|
||||||
this.openMember = false;
|
this.$modal.msgSuccess("新增用户认证信息成功");
|
||||||
this.reset1();
|
this.openMember = false;
|
||||||
this.getListMember();
|
this.reset1();
|
||||||
|
this.getListMember();
|
||||||
|
}else if (resp.data==2){
|
||||||
|
this.$modal.msgError("认证手机号不可为空")
|
||||||
|
}else if (resp.data==3){
|
||||||
|
this.$modal.msgError("用户信息不存在,请检查当前用户是否已注册")
|
||||||
|
}else{
|
||||||
|
this.$modal.msgError("认证失败,每位会员只可认证一条信息")
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -128,6 +128,8 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertCertifiedMember(CertifiedMember certifiedMember) {
|
public int insertCertifiedMember(CertifiedMember certifiedMember) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
Integer storeId = nowAccountInfo.getStoreId();
|
||||||
if (certifiedMember.getMobile()==null || certifiedMember.getMobile().equals("")){
|
if (certifiedMember.getMobile()==null || certifiedMember.getMobile().equals("")){
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
@ -137,6 +139,7 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
|
|||||||
}
|
}
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
queryWrapper.eq("mobile",certifiedMember.getMobile());
|
queryWrapper.eq("mobile",certifiedMember.getMobile());
|
||||||
|
queryWrapper.eq("store_id",storeId);
|
||||||
CertifiedMember member = baseMapper.selectOne(queryWrapper);
|
CertifiedMember member = baseMapper.selectOne(queryWrapper);
|
||||||
if (member!=null){
|
if (member!=null){
|
||||||
return 4;
|
return 4;
|
||||||
@ -146,8 +149,6 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
|
|||||||
certifiedMember.setName(ljUser.getName());
|
certifiedMember.setName(ljUser.getName());
|
||||||
certifiedMember.setUserId(ljUser.getId());
|
certifiedMember.setUserId(ljUser.getId());
|
||||||
}
|
}
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
|
||||||
Integer storeId = nowAccountInfo.getStoreId();
|
|
||||||
certifiedMember.setStoreId(storeId);
|
certifiedMember.setStoreId(storeId);
|
||||||
int row = baseMapper.insert(certifiedMember);
|
int row = baseMapper.insert(certifiedMember);
|
||||||
return row;
|
return row;
|
||||||
@ -160,7 +161,17 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateCertifiedMember(CertifiedMember certifiedMember) {
|
public int updateCertifiedMember(CertifiedMember certifiedMember) {
|
||||||
int row = baseMapper.updateById(certifiedMember);
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
int row = 0;
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("mobile",certifiedMember.getMobile());
|
||||||
|
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||||
|
CertifiedMember member = baseMapper.selectOne(queryWrapper);
|
||||||
|
if (ObjectUtil.isNotEmpty(member)){
|
||||||
|
row = 0;
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
row = baseMapper.updateById(certifiedMember);
|
||||||
return row;
|
return row;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2543,12 +2543,14 @@
|
|||||||
if (response.data.oilOrder.orderStatus == "paid"){
|
if (response.data.oilOrder.orderStatus == "paid"){
|
||||||
_this.isPaySuccess = true;
|
_this.isPaySuccess = true;
|
||||||
_this.seekZero = 0
|
_this.seekZero = 0
|
||||||
|
_this.amount = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response.data.goodsOrder!=null){
|
if (response.data.goodsOrder!=null){
|
||||||
if (response.data.goodsOrder.status == "paid"){
|
if (response.data.goodsOrder.status == "paid"){
|
||||||
_this.isPaySuccess = true;
|
_this.isPaySuccess = true;
|
||||||
_this.seekZero = 0
|
_this.seekZero = 0
|
||||||
|
_this.amount = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response.data.error==1){
|
if (response.data.error==1){
|
||||||
@ -2560,7 +2562,7 @@
|
|||||||
if (response.data.error=="请先配置支付通道"){
|
if (response.data.error=="请先配置支付通道"){
|
||||||
this.$modal.msgError(response.data.error)
|
this.$modal.msgError(response.data.error)
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogVisiblej = false;
|
// this.dialogVisiblej = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -2580,6 +2582,7 @@
|
|||||||
_this.resetting1();
|
_this.resetting1();
|
||||||
},
|
},
|
||||||
resetting1(){
|
resetting1(){
|
||||||
|
console.log(111)
|
||||||
let _this = this;
|
let _this = this;
|
||||||
this.authCode = "";
|
this.authCode = "";
|
||||||
if (_this.isPaySuccess == true){
|
if (_this.isPaySuccess == true){
|
||||||
@ -2594,6 +2597,9 @@
|
|||||||
_this.oilTotal = 0;
|
_this.oilTotal = 0;
|
||||||
_this.goodsTotal = 0;
|
_this.goodsTotal = 0;
|
||||||
_this.isMember = false;
|
_this.isMember = false;
|
||||||
|
_this.oilOrder = []
|
||||||
|
_this.goodsOrder = []
|
||||||
|
_this.amount = 0
|
||||||
};
|
};
|
||||||
this.map = {
|
this.map = {
|
||||||
allAmount:0,
|
allAmount:0,
|
||||||
@ -2665,12 +2671,14 @@
|
|||||||
if (response.data.orderStatus == "paid"){
|
if (response.data.orderStatus == "paid"){
|
||||||
_this.isPaySuccess = true;
|
_this.isPaySuccess = true;
|
||||||
_this.isQuery = false;
|
_this.isQuery = false;
|
||||||
|
_this.amount = 0
|
||||||
}
|
}
|
||||||
if (response.data.orderStatus == "payFail"){
|
if (response.data.orderStatus == "payFail"){
|
||||||
_this.isPaySuccess = false;
|
_this.isPaySuccess = false;
|
||||||
_this.isQuery = false;
|
_this.isQuery = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_this.resetting1();
|
||||||
})
|
})
|
||||||
goodsOrder({orderNo:_this.orderNo}).then( response => {
|
goodsOrder({orderNo:_this.orderNo}).then( response => {
|
||||||
if (response.data!=null){
|
if (response.data!=null){
|
||||||
@ -2680,12 +2688,14 @@
|
|||||||
if (response.data.status == "paid"){
|
if (response.data.status == "paid"){
|
||||||
_this.isPaySuccess = true;
|
_this.isPaySuccess = true;
|
||||||
_this.isQuery = false;
|
_this.isQuery = false;
|
||||||
|
_this.amount = 0
|
||||||
}
|
}
|
||||||
if (response.data.status == "payFail"){
|
if (response.data.status == "payFail"){
|
||||||
_this.isPaySuccess = false;
|
_this.isPaySuccess = false;
|
||||||
_this.isQuery = false;
|
_this.isQuery = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
_this.resetting1();
|
||||||
})
|
})
|
||||||
},500)
|
},500)
|
||||||
},
|
},
|
||||||
|
@ -280,6 +280,7 @@
|
|||||||
// 查询我的油品订单信息
|
// 查询我的油品订单信息
|
||||||
getMyOrder() {
|
getMyOrder() {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
|
_this.map.storeId = uni.getStorageSync("storeId")
|
||||||
request({
|
request({
|
||||||
url: "business/oilOrder/userOrders",
|
url: "business/oilOrder/userOrders",
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
Loading…
Reference in New Issue
Block a user