Commit d60df649 authored by AiNoeLiYa's avatar AiNoeLiYa

Merge branch 'newprotect' of http://gitlab.91isoft.com:90/yangshuo/template_vue into newprotect

parents 4d79c0dc 3e741e87
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="state"> <el-table-column label="状态" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.state || '-' }} <span :style="getFontColor(scope.row.state)">{{ scope.row.state || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="140px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="140px">
...@@ -248,13 +248,13 @@ export default { ...@@ -248,13 +248,13 @@ export default {
}, },
// TODO: 模拟测试数据 // TODO: 模拟测试数据
simulateDeviceList: [{ simulateDeviceList: [{
deviceName: '设备1', deviceId: '0001', flag: 1, LOT: '0001', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备1', deviceId: '0001', flag: 1, LOT: '0001', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备2', deviceId: '0002', flag: 2, LOT: '0002', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备2', deviceId: '0002', flag: 2, LOT: '0002', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备3', deviceId: '0003', flag: 2, LOT: '0003', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备3', deviceId: '0003', flag: 2, LOT: '0003', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备4', deviceId: '0004', flag: 2, LOT: '0004', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备4', deviceId: '0004', flag: 2, LOT: '0004', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备5', deviceId: '0005', flag: 2, LOT: '0005', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核' deviceName: '设备5', deviceId: '0005', flag: 2, LOT: '0005', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, { }, {
...@@ -264,9 +264,9 @@ export default { ...@@ -264,9 +264,9 @@ export default {
}, { }, {
deviceName: '设备8', deviceId: '0008', flag: 2, LOT: '0008', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核' deviceName: '设备8', deviceId: '0008', flag: 2, LOT: '0008', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, { }, {
deviceName: '设备9', deviceId: '0009', flag: 2, LOT: '0009', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过' deviceName: '设备9', deviceId: '0009', flag: 2, LOT: '0009', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
}, { }, {
deviceName: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过' deviceName: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
} }
], ],
...@@ -308,6 +308,17 @@ export default { ...@@ -308,6 +308,17 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getFontColor(state) {
if (state === '已驳回') {
return 'color: red;';
} else if (state === '待审核') {
return 'color: orange;';
} else if (state === '已通过') {
return 'color: green;';
} else {
return '';
}
},
/** 查询角色列表 */ /** 查询角色列表 */
getList() { getList() {
this.loading = true this.loading = true
...@@ -485,7 +496,7 @@ export default { ...@@ -485,7 +496,7 @@ export default {
.el-form-item{ .el-form-item{
.el-input >>> .el-input__inner { .el-input >>> .el-input__inner {
-webkit-appearance: none; -webkit-appearance: none;
background-color: #FFF; background-color: #ffffff;
background-image: none; background-image: none;
border-radius: 4px; border-radius: 4px;
border: 0; border: 0;
......
...@@ -231,7 +231,7 @@ ...@@ -231,7 +231,7 @@
</el-dialog> </el-dialog>
<!-- 导出弹窗--> <!-- 导出弹窗-->
<el-dialog <el-dialog
title="选择导出月份" title="选择盘点月份"
:visible.sync="exportVisible" :visible.sync="exportVisible"
width="30%" width="30%"
:before-close="handleClose" :before-close="handleClose"
......
...@@ -24,16 +24,6 @@ ...@@ -24,16 +24,6 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="LOT">
<el-input
v-model="queryParams.LOT"
placeholder="请输入LOT"
clearable
size="small"
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">查询</el-button>
</el-form-item> </el-form-item>
...@@ -90,20 +80,20 @@ ...@@ -90,20 +80,20 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" prop="state"> <el-table-column label="状态" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.state || '-' }} <span :style="getFontColor(scope.row.state)">{{ scope.row.state || '-' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="240px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="140px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.state !== '驳回'" type="typeParent" :size="size" @click="handleDetail(scope.row)"> <el-button v-if="scope.row.state !== '已驳回'" :type="typeParent" :size="size" @click="handleDetail(scope.row)">
详情 详情
</el-button> </el-button>
<el-button v-if="scope.row.state !== ' '" type="typeParent" :size="size" @click="handleUpdate(scope.row)"> <el-button v-if="scope.row.state === '已驳回'" :type="typeParent" :size="size" @click="handleUpdate(scope.row)">
{{ updataName }} {{ updataName }}
</el-button> </el-button>
<el-button <el-button
v-if="scope.row.state !== ' '" v-if="scope.row.state !== ' '"
type="typeParent" :type="typeParent"
:size="size" :size="size"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
>删除</el-button> >删除</el-button>
...@@ -283,13 +273,13 @@ export default { ...@@ -283,13 +273,13 @@ export default {
}, },
// TODO: 模拟测试数据 // TODO: 模拟测试数据
simulateDeviceList: [{ simulateDeviceList: [{
deviceName: '设备1', deviceId: '0001', flag: 1, LOT: '0001', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备1', deviceId: '0001', flag: 1, LOT: '0001', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备2', deviceId: '0002', flag: 2, LOT: '0002', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备2', deviceId: '0002', flag: 2, LOT: '0002', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备3', deviceId: '0003', flag: 2, LOT: '0003', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备3', deviceId: '0003', flag: 2, LOT: '0003', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备4', deviceId: '0004', flag: 2, LOT: '0004', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回' deviceName: '设备4', deviceId: '0004', flag: 2, LOT: '0004', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '驳回'
}, { }, {
deviceName: '设备5', deviceId: '0005', flag: 2, LOT: '0005', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核' deviceName: '设备5', deviceId: '0005', flag: 2, LOT: '0005', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, { }, {
...@@ -299,9 +289,9 @@ export default { ...@@ -299,9 +289,9 @@ export default {
}, { }, {
deviceName: '设备8', deviceId: '0008', flag: 2, LOT: '0008', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核' deviceName: '设备8', deviceId: '0008', flag: 2, LOT: '0008', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '待审核'
}, { }, {
deviceName: '设备9', deviceId: '0009', flag: 2, LOT: '0009', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过' deviceName: '设备9', deviceId: '0009', flag: 2, LOT: '0009', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
}, { }, {
deviceName: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过' deviceName: '设备10', deviceId: '00010', flag: 2, LOT: '0010', location: 'XXX', ply: 'YYY', createTime: new Date(), updataTime: new Date(), createBy: 'admin', state: '通过'
} }
], ],
...@@ -343,6 +333,17 @@ export default { ...@@ -343,6 +333,17 @@ export default {
this.getList() this.getList()
}, },
methods: { methods: {
getFontColor(state) {
if (state === '已驳回') {
return 'color: red;';
} else if (state === '待审核') {
return 'color: orange;';
} else if (state === '已通过') {
return 'color: green;';
} else {
return '';
}
},
/** 查询角色列表 */ /** 查询角色列表 */
getList() { getList() {
this.loading = true this.loading = true
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
<el-table-column label="操作" class-name="small-padding fixed-width" width="140px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="140px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.state !== ' '" align="center" type="typeParent" :size="size" @click="handleUpdate(scope.row)"> <el-button v-if="scope.row.state !== ' '" align="center" :type="typeParent" :size="size" @click="handleUpdate(scope.row)">
{{ updataName }} {{ updataName }}
</el-button> </el-button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment