This commit is contained in:
cun-nan 2024-07-27 11:58:41 +08:00
parent f0f45c6dfa
commit c54811e52a
10 changed files with 653 additions and 508 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

View File

@ -252,7 +252,7 @@
<el-input type="textarea" v-model="formRule.description" placeholder="请输入规则描述" autocomplete="off" <el-input type="textarea" v-model="formRule.description" placeholder="请输入规则描述" autocomplete="off"
style="width: 350px"></el-input> style="width: 350px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="规则类型" :label-width="formLabelWidth"> <el-form-item label="规则类型" :label-width="formLabelWidth" prop="ruleType">
<div style="display: flex"> <div style="display: flex">
<div class="xz_box" :class=" {'active' : formRule.ruleType == 1 } " @click="formRule.ruleType = 1"><i <div class="xz_box" :class=" {'active' : formRule.ruleType == 1 } " @click="formRule.ruleType = 1"><i
class="el-icon-aim"></i> 按比例分账 class="el-icon-aim"></i> 按比例分账
@ -274,7 +274,7 @@
<el-option <el-option
v-for="(item1,i) in merchantList" v-for="(item1,i) in merchantList"
:key="item1.id" :key="item1.id"
:label="item1.remark ? (item1.merchantName+''+item1.remark+'') : (item1.merchantName+'--')" :label="item1.mchntCd ? (item1.merchantName+''+item1.mchntCd+'') : (item1.merchantName+'--')"
:value="item1.id"></el-option> :value="item1.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -300,7 +300,7 @@
<el-option <el-option
v-for="(item1,i) in merchantList" v-for="(item1,i) in merchantList"
:key="item1.id" :key="item1.id"
:label="item1.remark ? (item1.merchantName+''+item1.remark+'') : (item1.merchantName+'--')" :label="item1.mchntCd ? (item1.merchantName+''+item1.mchntCd+'') : (item1.merchantName+'--')"
:value="item1.id"></el-option> :value="item1.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -724,6 +724,9 @@ export default {
ruleName: [ ruleName: [
{required: true, message: '请输入规则名称', trigger: 'blur'}, {required: true, message: '请输入规则名称', trigger: 'blur'},
], ],
ruleType: [
{required: true, message: '请选择规则类型', trigger: 'blur'},
],
} }
} }
}, },

View File

@ -3,8 +3,10 @@
<div class="bai-box" style="margin-top: 20px"> <div class="bai-box" style="margin-top: 20px">
<div class="top-box"> <div class="top-box">
<div class="d-s"> <div class="d-s">
<el-input v-model="queryParams.realName" placeholder="请输入用户姓名" style="width: 240px;margin-right: 15px"></el-input> <el-input v-model="queryParams.realName" placeholder="请输入用户姓名"
<el-input v-model="queryParams.mobile" placeholder="请输入登录账号" style="width: 240px;margin-right: 15px"></el-input> style="width: 240px;margin-right: 15px"></el-input>
<el-input v-model="queryParams.mobile" placeholder="请输入登录账号"
style="width: 240px;margin-right: 15px"></el-input>
<el-select v-model="queryParams.status" placeholder="请选择状态"> <el-select v-model="queryParams.status" placeholder="请选择状态">
<el-option <el-option
v-for="dict in dict.type.zhzt" v-for="dict in dict.type.zhzt"
@ -19,22 +21,26 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="handleQuery" @click="handleQuery"
>搜索</el-button> >搜索
</el-button>
<el-button <el-button
icon="el-icon-refresh-right" icon="el-icon-refresh-right"
@click="resetQuery" @click="resetQuery"
>重置</el-button> >重置
</el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-plus" icon="el-icon-plus"
@click="handleAdd" @click="handleAdd"
>新增员工</el-button> >新增员工
</el-button>
</div> </div>
</div> </div>
<el-table ref="tables" border v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange"> <el-table ref="tables" border v-loading="loading" :data="list" @selection-change="handleSelectionChange"
:default-sort="defaultSort" @sort-change="handleSortChange">
<el-table-column <el-table-column
type="index" type="index"
align="center" align="center"
@ -83,13 +89,15 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>修改</el-button> >修改
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -108,26 +116,34 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="所属机构" prop="storeId"> <el-form-item label="所属机构" prop="storeId">
<el-select v-model="form.storeId" placeholder="请选择角色" style="width: 270px"> <el-select v-model="form.storeId+''" placeholder="请选择角色" style="width: 270px">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.dutyId+''" :key="item.id+''"
:label="item.dutyName" :label="item.name"
:value="item.dutyId+''" :value="item.id+''"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="姓名" prop="realName"> <el-form-item label="员工姓名" prop="realName">
<el-input v-model="form.realName" placeholder="请输入姓名" maxlength="30" style="width: 270px"/> <el-input v-model="form.realName" placeholder="请输入姓名" maxlength="30" style="width: 270px"/>
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="mobile"> <el-form-item label="联系方式" prop="mobile">
<el-input v-model="form.mobile" placeholder="请输入联系人电话" maxlength="30" style="width: 270px"/> <el-input v-model="form.mobile" placeholder="请输入联系人电话" maxlength="30" style="width: 270px"/>
</el-form-item> </el-form-item>
<el-form-item label="登录账号" prop="accountName">
<el-input v-model="form.accountName" placeholder="请输入登录账号" maxlength="30" style="width: 270px"/>
</el-form-item>
<el-form-item label="角色组" prop="roleId"> <el-form-item label="登录密码" prop="password">
<el-input v-model="form.password" placeholder="请输入登录密码" type="password" maxlength="30" style="width: 270px"/>
</el-form-item>
<el-form-item label="用户角色" prop="roleId">
<el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px"> <el-select v-model="form.roleId" placeholder="请选择角色" style="width: 270px">
<el-option <el-option
v-for="item in roleList" v-for="item in roleList"
@ -139,72 +155,53 @@
</el-form-item> </el-form-item>
<el-form-item label="账号状态" prop="status"> <el-form-item label="账号状态" prop="status">
<el-select v-model="form.status"style="width: 270px"> <el-switch
<el-option v-model="form.status"
v-for="dict in dict.type.zhzt" active-value="qy"
:key="dict.value" inactive-value="jy"
:label="dict.label" active-color="#13ce66"
:value="dict.value" inactive-color="#ff4949">
/> </el-switch>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 状态禁用后,当前账号则无法进行<br/>登录和操作</div>
<span>状态禁用后,当前账号则无法进行登...</span>
</el-tooltip>
</el-form-item> </el-form-item>
<el-form-item label="一键加油" prop="isRefuel"> <el-form-item label="一键加油" prop="isRefuel">
<el-select v-model="form.isRefuel" style="width: 270px"> <!-- <el-select v-model="form.isRefuel" style="width: 270px">-->
<el-option <!-- <el-option-->
v-for="dict in dict.type.display" <!-- v-for="dict in dict.type.display"-->
:key="dict.value" <!-- :key="dict.value"-->
:label="dict.label" <!-- :label="dict.label"-->
:value="dict.value" <!-- :value="dict.value"-->
/> <!-- />-->
</el-select> <!-- </el-select>-->
<br/> <div style="display: flex;" v-if="form.isRefuel=='xs'" @click="form.isRefuel='yc'">
<el-tooltip <div>
class="item" <img src="@/assets/images/danxuan_c.png"/>
effect="dark" <span class="text_49">显示</span>
placement="bottom"> </div>
<div slot="content">加油时选择加油员场景使用,选择不显示加油员将无法被指定<br/>(需系统开启加油选择加油员功能)终端支持:(PCPOS小程序)</div> <div style="margin-left: 15px">
<span>加油时选择加油员场景使用,选择...</span> <img src="@/assets/images/danxuan_h.png"/>
</el-tooltip> <span class="text_50">隐藏</span>
</el-form-item> </div>
</div>
<div style="display: flex;" v-else @click="form.isRefuel='xs'">
<div>
<img src="@/assets/images/danxuan_h.png"/>
<span class="text_50">显示</span>
</div>
<div style="margin-left: 15px">
<img src="@/assets/images/danxuan_c.png"/>
<span class="text_49">隐藏</span>
</div>
</div>
<el-form-item label="收款通知" prop="notice"> <span class="text_51" >*&nbsp;若用户的一键加油设置为隐藏则收银台无法选择该员工</span>
<el-select v-model="form.notice" style="width: 270px">
<el-option
v-for="dict in dict.type.notice"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<br/>
<el-tooltip
class="item"
effect="dark"
placement="bottom">
<div slot="content"> 收款成功接收的公众号模板消息通知,<br/>关注公众号,且本站小程序中会员手机号<br/>信息与当前员工手机号一致 </div>
<span>收款成功接收的公众号模板消息...</span>
</el-tooltip>
</el-form-item> </el-form-item>
<!-- </el-row>--> <!-- </el-row>-->
<!-- <el-row>--> <!-- <el-row>-->
<el-form-item label="备注信息">
<el-input style="width: 270px" v-model="form.description" type="textarea" placeholder="请输入内容"></el-input>
</el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -220,6 +217,7 @@
import {addStaff, delStaff, getStaff, listStaff, updateStaff} from "../../../api/staff/staff"; import {addStaff, delStaff, getStaff, listStaff, updateStaff} from "../../../api/staff/staff";
import {dutyList} from "@/api/duty/duty"; import {dutyList} from "@/api/duty/duty";
import {searchStore} from "@/api/store"; import {searchStore} from "@/api/store";
import {getStoreListByDeptId} from "../../../api/store";
// import {getDuty, listDuty} from "@/api/staff/duty"; // import {getDuty, listDuty} from "@/api/staff/duty";
export default { export default {
@ -297,10 +295,37 @@
roleList: [], roleList: [],
// //
form: { form: {
id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:this.id, auditedStatus:'', id: '',
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl', category: '',
merchantStatus:'qy',screen:'qy', posPrem:'', appletPrem:'', notice:'advice_jy', oilGunId:'', timeFrame:'bx', refund:'yqx', userId: '',
transaction:'qbjy', writeOff:'',specialPrem:'', official:'', status:'qy',pos:'jy',role:'' mobile: '',
realName: '',
wechat: '',
merchantId: '',
storeId: this.id,
auditedStatus: '',
auditedTime: '',
description: '',
isRefuel: 'yc',
handoverMode: 'dqmdtyjb',
handoverPrem: 'yqx',
handoverOut: 'jbtc',
record: 'qbjl',
merchantStatus: 'qy',
screen: 'qy',
posPrem: '',
appletPrem: '',
notice: 'advice_jy',
oilGunId: '',
timeFrame: 'bx',
refund: 'yqx',
transaction: 'qbjy',
writeOff: '',
specialPrem: '',
official: '',
status: 'qy',
pos: 'jy',
role: ''
}, },
// //
queryParams: { queryParams: {
@ -320,6 +345,12 @@
{required: true, message: "手机号不能为空", trigger: "blur"}, {required: true, message: "手机号不能为空", trigger: "blur"},
{min: 11, max: 20, message: '手机号长度必须11', trigger: 'blur'} {min: 11, max: 20, message: '手机号长度必须11', trigger: 'blur'}
], ],
accountName: [
{required: true, message: "请填写登录账号", trigger: "blur"}
],
password: [
{required: true, message: "请填写登录密码", trigger: "blur"}
],
roleId: [ roleId: [
{required: true, message: "请选择员工角色", trigger: "blur"} {required: true, message: "请选择员工角色", trigger: "blur"}
], ],
@ -420,8 +451,8 @@
// this.storeOptions = response.data.records; // this.storeOptions = response.data.records;
// } // }
// ); // );
searchStore({deptId:this.deptId}).then(response => { getStoreListByDeptId(this.deptId).then(response => {
this.options = response.data.storeList; this.options = response.data;
} }
); );
}, },
@ -491,10 +522,37 @@
this.appletPrem = ''; this.appletPrem = '';
this.writeOff = [] this.writeOff = []
this.form = { this.form = {
id:'', category:'', userId:'', mobile:'', realName:'', wechat:'', merchantId:'', storeId:this.id, auditedStatus:'A', id: '',
auditedTime:'', description:'', isRefuel:'yc', handoverMode:'dqmdtyjb', handoverPrem:'yqx', handoverOut:'jbtc', record:'qbjl', category: '',
merchantStatus:'qy',screen:'qy', posPrem:'', appletPrem:'', notice:'advice_jy', oilGunId:'', timeFrame:'bx', refund:'yqx', userId: '',
transaction:'qbjy', writeOff:'',specialPrem:'', official:'', status:'qy',pos:'jy',role:'' mobile: '',
realName: '',
wechat: '',
merchantId: '',
storeId: this.id,
auditedStatus: 'A',
auditedTime: '',
description: '',
isRefuel: 'xs',
handoverMode: 'dqmdtyjb',
handoverPrem: 'yqx',
handoverOut: 'jbtc',
record: 'qbjl',
merchantStatus: 'qy',
screen: 'qy',
posPrem: '',
appletPrem: '',
notice: 'advice_jy',
oilGunId: '',
timeFrame: 'bx',
refund: 'yqx',
transaction: 'qbjy',
writeOff: '',
specialPrem: '',
official: '',
status: 'qy',
pos: 'jy',
role: ''
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -551,7 +609,8 @@
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {
});
} }
} }
}; };
@ -565,22 +624,26 @@
background: #f9f9f9; background: #f9f9f9;
margin: 20px auto; margin: 20px auto;
} }
.bai-box { .bai-box {
background: #fff; background: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
} }
.pagin-box { .pagin-box {
background: white; background: white;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
} }
.baoguo { .baoguo {
background: white; background: white;
box-sizing: border-box; box-sizing: border-box;
padding: 20px; padding: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.top-box { .top-box {
width: 100%; width: 100%;
display: flex; display: flex;
@ -588,8 +651,59 @@
justify-content: space-between; justify-content: space-between;
margin-bottom: 15px; margin-bottom: 15px;
} }
.d-s { .d-s {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.thumbnail_8 {
width: 20px;
height: 20px;
margin-left: 10px;
}
.text_49 {
width: 24px;
height: 12px;
overflow-wrap: break-word;
color: rgba(255, 150, 85, 1);
font-size: 12px;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 18px;
margin-top: 3px;
}
.thumbnail_9 {
width: 20px;
height: 20px;
margin-left: 20px;
}
.text_50 {
width: 24px;
height: 12px;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 12px;
font-weight: normal;
text-align: left;
white-space: nowrap;
line-height: 18px;
margin-top: 3px;
}
.text_51 {
width: 257px;
height: 10px;
overflow-wrap: break-word;
color: rgba(153, 153, 153, 1);
font-size: 10px;
font-weight: normal;
text-align: right;
white-space: nowrap;
line-height: 15px;
}
</style> </style>

View File

@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.api.fuyou.entity.OilConfig; import com.fuint.api.fuyou.entity.OilConfig;
import com.fuint.api.fuyou.entity.PaymentRuleConfig; import com.fuint.api.fuyou.entity.PaymentRuleConfig;
import com.fuint.api.fuyou.mapper.PaymentRuleConfigMapper; import com.fuint.api.fuyou.mapper.PaymentRuleConfigMapper;
import com.fuint.api.fuyou.service.MerchantConfigService;
import com.fuint.api.fuyou.service.OilConfigService; import com.fuint.api.fuyou.service.OilConfigService;
import com.fuint.api.fuyou.service.PaymentRuleConfigService; import com.fuint.api.fuyou.service.PaymentRuleConfigService;
import com.fuint.api.fuyou.vo.OilConfigVo; import com.fuint.api.fuyou.vo.OilConfigVo;
@ -24,6 +25,8 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
@Autowired @Autowired
private OilConfigService oilConfigService; private OilConfigService oilConfigService;
@Autowired
private MerchantConfigService merchantConfigService;
@Override @Override
public List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig) { public List<PaymentRuleConfigVo> selectList(PaymentRuleConfig paymentRuleConfig) {
@ -106,6 +109,10 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
baseMapper.updateById(paymentRuleConfig); baseMapper.updateById(paymentRuleConfig);
} }
int i = 1; int i = 1;
if (ruleConfig.getStatus().equals("jy")){
// 将其他使用的账户关掉
merchantConfigService.updateMerchOrter(ruleConfig.getStoreId());
}
if (ruleConfig.getStatus().equals("qy") && ruleConfig.getRuleType().equals("1")){ if (ruleConfig.getStatus().equals("qy") && ruleConfig.getRuleType().equals("1")){
i = oilConfigService.judgmentProportion1(ruleConfig.getStoreId(), ruleConfig.getId()); i = oilConfigService.judgmentProportion1(ruleConfig.getStoreId(), ruleConfig.getId());
} }

View File

@ -131,4 +131,7 @@ public class LJStaff extends BaseEntity implements Serializable {
//码牌绑定状态 0未绑定 1已绑定 //码牌绑定状态 0未绑定 1已绑定
@TableField(exist = false) @TableField(exist = false)
private String tagStatus; private String tagStatus;
// 登录账号
@TableField(exist = false)
private String accountName;
} }

View File

@ -234,7 +234,11 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
String timestamp = dateFormat.format(new Date()); String timestamp = dateFormat.format(new Date());
String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6); String randomString = UUID.randomUUID().toString().replace("-","").substring(0,6);
account.setAccountKey(timestamp+randomString); account.setAccountKey(timestamp+randomString);
if (ObjectUtil.isNotEmpty(staff.getAccountName())){
account.setAccountName(staff.getAccountName());
}else {
account.setAccountName(staff.getMobile()); account.setAccountName(staff.getMobile());
}
account.setAccountStatus(1); account.setAccountStatus(1);
account.setRealName(staff.getRealName()); account.setRealName(staff.getRealName());
account.setRoleIds(staff.getRoleId()); account.setRoleIds(staff.getRoleId());

View File

@ -375,4 +375,8 @@ public class BackendStoreController extends BaseController {
return getSuccessResult(storeService.getStoreAmountByTime(store)); return getSuccessResult(storeService.getStoreAmountByTime(store));
} }
@GetMapping("/getStoreByDeptId/{deptId}")
public ResponseObject getStoreByDeptId(@PathVariable Integer deptId){
return getSuccessResult(storeService.getStoreByDeptId(deptId));
}
} }

View File

@ -137,4 +137,6 @@ public interface StoreService extends IService<MtStore> {
* @return * @return
*/ */
List<StoreNumVo> getStoreAmountByTime(MtStore store); List<StoreNumVo> getStoreAmountByTime(MtStore store);
List<MtStore> getStoreByDeptId(Integer deptId);
} }

View File

@ -754,6 +754,14 @@ public class StoreServiceImpl extends ServiceImpl<MtStoreMapper, MtStore> implem
return baseMapper.selectStoreNum(store,storeIds); return baseMapper.selectStoreNum(store,storeIds);
} }
@Override
public List<MtStore> getStoreByDeptId(Integer deptId) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("if_delete","0");
queryWrapper.eq("contract_dept_id",deptId);
return baseMapper.selectList(queryWrapper);
}
// 将在部门里面删除的在油站中删除 // 将在部门里面删除的在油站中删除
public void beachDelStore() { public void beachDelStore() {
LambdaQueryWrapper<SysDept> lambdaQueryWrapper = new LambdaQueryWrapper(); LambdaQueryWrapper<SysDept> lambdaQueryWrapper = new LambdaQueryWrapper();