更新
This commit is contained in:
parent
e55d2df123
commit
d0b3a9d1bd
@ -71,6 +71,7 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-if="scope.row.handleStatus!=1"
|
||||
>处理
|
||||
</el-button>
|
||||
<el-button
|
||||
|
@ -102,16 +102,16 @@
|
||||
|
||||
</div>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="42.5%" append-to-body>
|
||||
<el-form :model="form" label-width="120px">
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="42%" append-to-body>
|
||||
<el-form :model="form" label-width="120px" >
|
||||
<!-- 通知名称 -->
|
||||
<el-form-item label="通知名称" :required="true">
|
||||
<el-input v-model="form.notificationName" placeholder="请输入通知名称" style="width: 480px"></el-input>
|
||||
<el-input v-model="form.notificationName" placeholder="请输入通知名称" style="width: 474px"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- 通知类型 -->
|
||||
<el-form-item label="通知类型" :required="true">
|
||||
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 480px">
|
||||
<el-select v-model="form.notificationType" placeholder="请选择通知类型" style="width: 474px">
|
||||
<el-option label="到期通知" value="到期通知"></el-option>
|
||||
<el-option label="库存预警" value="库存预警"></el-option>
|
||||
<el-option label="其他" value="其他"></el-option>
|
||||
@ -122,7 +122,7 @@
|
||||
<!-- 通知模板 -->
|
||||
<el-form-item label="通知模板" :required="true">
|
||||
<el-input type="textarea" v-model="form.templateContent" :rows="3" placeholder="请输入通知内容"
|
||||
:maxlength="200" show-word-limit style="width: 480px"></el-input>
|
||||
:maxlength="200" show-word-limit style="width: 474px"></el-input>
|
||||
<div>
|
||||
<span @click="insertText('{油罐名称}')">{油罐名称}</span>
|
||||
<span @click="insertText('{商品名称}')">{商品名称}</span>
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
<!-- 接收角色 -->
|
||||
<el-form-item label="接收角色" :required="true">
|
||||
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 480px">
|
||||
<el-select v-model="form.recipientRoles" multiple placeholder="请选择角色" style="width: 474px">
|
||||
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -326,6 +326,7 @@ export default {
|
||||
},
|
||||
handleReset() {
|
||||
this.open = false
|
||||
// this.form.conditions = []
|
||||
|
||||
},
|
||||
handleQuery() {
|
||||
@ -343,6 +344,7 @@ export default {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.getDutyList()
|
||||
this.form.conditions = [{}]
|
||||
|
||||
this.title = "增加通知模板"
|
||||
},
|
||||
@ -482,5 +484,6 @@ export default {
|
||||
height: 50px;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="card-change">
|
||||
<el-card>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px">
|
||||
<el-form-item label="" prop="name">
|
||||
<el-input
|
||||
@ -20,40 +20,55 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<div style="height: 69vh;overflow:auto;">
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceSi" label="品牌"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceAb" label="设备功能"></el-table-column>
|
||||
<el-table-column align="center" prop="deptName" label="所属机构"></el-table-column>
|
||||
<el-table-column align="center" prop="staffIds" label="关联员工">
|
||||
<template slot-scope="scope">
|
||||
{{ jsonChange(scope.row.staffIds) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="machineCode" label="设备终端号"></el-table-column>
|
||||
<el-table-column align="center" prop="msign" label="设备密钥"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="edit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="del(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<el-table :data="tableData" style="width: 100%" border>
|
||||
<el-table-column align="center" type="index" label="序号"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceSi" label="品牌"></el-table-column>
|
||||
<el-table-column align="center" prop="deviceAb" label="设备功能"></el-table-column>
|
||||
<el-table-column align="center" prop="deptName" label="所属机构"></el-table-column>
|
||||
<el-table-column align="center" prop="staffIds" label="关联员工">
|
||||
<template slot-scope="scope">
|
||||
{{ jsonChange(scope.row.staffIds) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="machineCode" label="设备终端号"></el-table-column>
|
||||
<el-table-column align="center" prop="msign" label="设备密钥"></el-table-column>
|
||||
|
||||
<!-- <el-table-column align="center" prop="userId" label="用户id"></el-table-column>-->
|
||||
<!-- <el-table-column prop="appKey" label="应用id(APP_KEY)"></el-table-column>-->
|
||||
<!-- <el-table-column prop="appSecret" label="应用密钥(APP_SECRET)"></el-table-column>-->
|
||||
<!-- <el-table-column prop="appPublicKey" label="应用公钥(key)"></el-table-column>-->
|
||||
<!-- <el-table-column prop="platformPublicKey" label="平台公钥(publicKey)"></el-table-column>-->
|
||||
<!-- <el-table-column prop="accessToken" label="token"></el-table-column>-->
|
||||
<!-- <el-table-column prop="isAcquiesce" label="isAcquiesce">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-switch-->
|
||||
<!-- v-model="scope.row.isAcquiesce"-->
|
||||
<!-- @change="submitDeviceInfo(scope.row)"-->
|
||||
<!-- active-color="#13ce66"-->
|
||||
<!-- inactive-color="#ff4949">-->
|
||||
<!-- </el-switch>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="edit(scope.row)"
|
||||
>编辑
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="del(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -62,9 +77,10 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
</div>
|
||||
</el-card>
|
||||
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body>
|
||||
<el-dialog :title="title" :close-on-click-modal="false" :before-close="handleCancel" :visible.sync="open" width="30%"
|
||||
append-to-body >
|
||||
<el-form ref="form" :model="deviceInfo" label-width="80px">
|
||||
<el-form :model="deviceInfo" :rules="rules" ref="deviceForm" label-width="120px">
|
||||
<el-form-item label="设备名称" prop="deviceName">
|
||||
@ -74,10 +90,10 @@
|
||||
<el-input v-model="deviceInfo.deviceSi" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备功能" prop="deviceAb">
|
||||
<el-radio-group v-model="deviceInfo.deviceAb">
|
||||
<el-radio label="打印小票"></el-radio>
|
||||
<el-radio label="语音播报"></el-radio>
|
||||
</el-radio-group>
|
||||
<el-checkbox-group v-model="deviceInfo.deviceAb">
|
||||
<el-checkbox name="deviceAb" label="打印小票"></el-checkbox>
|
||||
<el-checkbox name="deviceAb" label="语音播报"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备终端号" prop="machineCode">
|
||||
<el-input v-model="deviceInfo.machineCode" style="width: 300px"></el-input>
|
||||
@ -130,7 +146,7 @@
|
||||
<el-input type="textarea" v-model="deviceInfo.appPublicKey" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="" @click="open = false">取消</el-button>
|
||||
<el-button type="" @click="handleCancel">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -167,7 +183,7 @@ export default {
|
||||
accessToken: '', // token
|
||||
deviceSi: '', // 设备品牌
|
||||
staffIds: '', // 员工
|
||||
deviceAb: '', // 设备功能
|
||||
deviceAb: [], // 设备功能
|
||||
staffName: '', // 设备员工名字
|
||||
acquiesce: false // token
|
||||
},
|
||||
@ -178,9 +194,7 @@ export default {
|
||||
deviceSi: [
|
||||
{required: true, message: '设备品牌不能为空', trigger: 'blur'}
|
||||
],
|
||||
deviceAb: [
|
||||
{required: true, message: '设备功能不能为空', trigger: 'change'}
|
||||
],
|
||||
deviceAb: [{type: 'array', required: true, message: '设备功能不能为空', trigger: 'change'}],
|
||||
machineCode: [
|
||||
{required: true, message: '设备终端号不能为空', trigger: 'blur'}
|
||||
],
|
||||
@ -213,6 +227,10 @@ export default {
|
||||
this.tableData = res.data.records;
|
||||
this.total = res.data.total
|
||||
})
|
||||
|
||||
}, handleCancel() {
|
||||
this.$refs.deviceForm.resetFields(); // 重置表单
|
||||
this.open = false;
|
||||
},
|
||||
|
||||
// 获取员工
|
||||
@ -222,6 +240,7 @@ export default {
|
||||
})
|
||||
},
|
||||
submitForm(formName) {
|
||||
this.deviceInfo.deviceAb = this.deviceInfo.deviceAb.join(',')
|
||||
this.$refs[formName].validate(valid => {
|
||||
if (valid) {
|
||||
// 表单验证通过,可以提交数据
|
||||
@ -345,8 +364,10 @@ export default {
|
||||
appPublicKey: '', // 应用公钥(key)
|
||||
platformPublicKey: '', // 平台公钥(publicKey)
|
||||
accessToken: '', // token
|
||||
acquiesce: false // token
|
||||
acquiesce: false, // token
|
||||
deviceAb: ['打印小票']
|
||||
}
|
||||
// this.deviceInfo.deviceAb = []
|
||||
},
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user