This commit is contained in:
cun-nan 2024-10-24 16:25:56 +08:00
parent 0ca0656f4d
commit 846ce4c33f
5 changed files with 59 additions and 28 deletions

View File

@ -7,6 +7,12 @@ export function getListByPageApi(query) {
params: query
})
}
export function getInfoByPageApi(id) {
return request({
url: 'oilEngineConfig/'+id,
method: 'get',
})
}
export function addOilEngineConfigApi(data) {
return request({
url: 'oilEngineConfig',

View File

@ -95,6 +95,7 @@
clearable
placeholder="设备类型"
style="width: 300px;"
@change="chooseType"
>
<el-option v-for="item in deviceTypeList" :key="item" :label="item" :value="item">
</el-option>
@ -129,7 +130,7 @@
import {
addOilEngineConfigApi,
delOilEngineConfigApi,
editOilEngineConfigApi,
editOilEngineConfigApi, getInfoByPageApi,
getListByPageApi
} from "@/api/seeting/youqiji";
@ -182,7 +183,12 @@ export default {
this.getDeptList()
},
methods: {
//
chooseType(){
if (this.deviceInfo.deviceType!='BY'){
this.deviceInfo.deviceId = ''
}
},
getList(){
let dateRange = []
if (this.beginTime && this.endTime) {
@ -247,8 +253,14 @@ export default {
this.clean()
this.open = true;
this.title = "编辑设备"
this.deviceInfo = e
console.log('提交设备信息数据:', this.deviceInfo);
getInfoByPageApi(e.id).then(res => {
this.deviceInfo = res.data
if (this.deviceInfo.deviceType!='BY'){
this.deviceInfo.deviceId = ''
}
console.log('提交设备信息数据:', this.deviceInfo);
})
},
del(e) {

View File

@ -11,37 +11,36 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="" prop="payChannel">
<el-form-item label="" prop="deviceAb">
<el-select
v-model="queryParams.payChannel"
v-model="queryParams.deviceAb"
clearable
placeholder="请选择设备功能"
>
<el-option label="小程序" value="applet"/>
<el-option label="收银台" value="cashier"/>
<el-option label="POS端" value="POS"/>
<el-option label="打印小票" value="打印小票"/>
<el-option label="语音播报" value="语音播报"/>
</el-select>
</el-form-item>
<el-form-item label="" prop="payChannel">
<el-form-item label="" prop="staffIds">
<el-select
v-model="queryParams.payChannel"
v-model="queryParams.staffIds"
clearable
placeholder="请选择关联员工"
>
<el-option label="小程序" value="applet"/>
<el-option label="收银台" value="cashier"/>
<el-option label="POS端" value="POS"/>
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id+''">
<span style="float: left">{{ item.realName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="" prop="payChannel">
<el-form-item label="" prop="acquiesce">
<el-select
v-model="queryParams.payChannel"
v-model="queryParams.acquiesce"
clearable
placeholder="请选择设备状态"
>
<el-option label="小程序" value="applet"/>
<el-option label="收银台" value="cashier"/>
<el-option label="POS端" value="POS"/>
<el-option label="启用" value="1"/>
<el-option label="停用" value="0"/>
</el-select>
</el-form-item>
<el-form-item style="float: right; margin-right: 0px">
@ -108,15 +107,15 @@
/>
</div>
<el-dialog :title="title" :close-on-click-modal="false" :before-close="handleCancel" :visible.sync="open" width="24%"
<el-dialog :title="title" :close-on-click-modal="false" :before-close="handleCancel" :visible.sync="open" width="30%"
append-to-body >
<el-form :model="deviceInfo" :rules="rules" ref="deviceForm" label-width="95px">
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="deviceInfo.deviceName" style="width: 300px"></el-input>
<el-input v-model="deviceInfo.deviceName" ></el-input>
</el-form-item>
<el-form-item label="设备品牌" prop="deviceSi">
<el-input v-model="deviceInfo.deviceSi" style="width: 300px"></el-input>
<el-input v-model="deviceInfo.deviceSi" ></el-input>
</el-form-item>
<el-form-item label="设备功能" prop="deviceAb">
<el-checkbox-group v-model="deviceInfo.deviceAb">
@ -125,17 +124,17 @@
</el-checkbox-group>
</el-form-item>
<el-form-item label="设备终端号" prop="machineCode">
<el-input v-model="deviceInfo.machineCode" style="width: 300px"></el-input>
<el-input v-model="deviceInfo.machineCode"></el-input>
</el-form-item>
<el-form-item label="设备密钥" prop="msign">
<el-input v-model="deviceInfo.msign" style="width: 300px"></el-input>
<el-input v-model="deviceInfo.msign"></el-input>
</el-form-item>
<el-form-item label="选择员工" prop="staffId">
<el-select
v-model="staffIds"
clearable
placeholder=""
style="width: 300px"
style="width: 100%"
multiple
collapse-tags
>
@ -150,7 +149,7 @@
v-model="deviceInfo.deptId"
clearable
placeholder=""
style="width: 300px"
style="width: 100%"
collapse-tags
>
<el-option
@ -170,7 +169,7 @@
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input type="textarea" v-model="deviceInfo.remark" style="width: 300px"></el-input>
<el-input type="textarea" v-model="deviceInfo.remark" ></el-input>
</el-form-item>
<el-form-item>
<el-button type="" @click="handleCancel">取消</el-button>

View File

@ -803,10 +803,12 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
// 调用消费有礼接口
public void updateCardAndActiveById(Integer storeId, Integer userId, Integer orderId) {
if (ObjectUtil.isNotEmpty(userId)) {
OilOrder oilOrder = selectOilOrderById(orderId);
AllOrderInfo allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(oilOrder.getOrderNo());
Map<String, String> map = new HashMap<>();
map.put("userId", userId.toString());
map.put("storeId", storeId.toString());
map.put("orderId", orderId.toString());
map.put("orderId", allOrderInfo.getId().toString());
payCenterService.cashRegisterSpendWisely(map);
}
}

View File

@ -68,6 +68,18 @@
<if test="printDeviceInfo.storeId != null">
and store_id = #{printDeviceInfo.storeId}
</if>
<if test="printDeviceInfo.acquiesce != null">
and acquiesce = #{printDeviceInfo.acquiesce}
</if>
<if test="printDeviceInfo.status != null">
and status = #{printDeviceInfo.status}
</if>
<if test="printDeviceInfo.deviceAb != null and printDeviceInfo.deviceAb != ''">
and device_ab like concat('%', #{printDeviceInfo.deviceAb}, '%')
</if>
<if test="printDeviceInfo.staffIds != null and printDeviceInfo.staffIds != ''">
and staff_ids like concat('%', #{printDeviceInfo.staffIds}, '%')
</if>
</where>
order by create_time desc
</select>