提交修改

This commit is contained in:
quyixiao 2020-08-24 19:59:01 +08:00
parent f742001b22
commit 32a3a7bdd8
12 changed files with 216 additions and 79 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -3,7 +3,7 @@
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
<el-form-item label="一级部门"> <el-form-item label="一级部门">
<el-select v-model="dataForm.department1" placeholder="请选择" @change="changeDepartment('2')"> <el-select v-model="dataForm.department1" @change="changeDepartment('2')">
<el-option <el-option
v-for="item in departmentList1" v-for="item in departmentList1"
:key="item.departmentId" :key="item.departmentId"
@ -13,7 +13,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="二级部门"> <el-form-item label="二级部门">
<el-select v-model="dataForm.department2" placeholder="请选择" @change="changeDepartment('3')"> <el-select v-model="dataForm.department2" placeholder="请选择" @change="changeDepartment('3')">
<el-option <el-option
@ -65,16 +64,7 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="审批状态">
<el-select v-model="dataForm.status" placeholder="请选择">
<el-option
v-for="item in stateList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="dataForm.remark" placeholder="备注" clearable></el-input> <el-input v-model="dataForm.remark" placeholder="备注" clearable></el-input>
@ -89,12 +79,20 @@
<div> <div>
<el-button type="primary" style="margin-bottom: 10px" @click="submitBt()">批量提交</el-button> <el-button type="primary" style="margin-bottom: 10px" @click="submitBt()">批量提交</el-button>
</div> </div>
<el-tabs type="border-card" v-model="tabValue" @tab-click="tabChange">
<el-tab-pane label="审批中" name="0"></el-tab-pane>
<el-tab-pane label="全部" name="1"></el-tab-pane>
<el-tab-pane label="侍提交" name="3"></el-tab-pane>
<el-tab-pane label="审批通过" name="4"></el-tab-pane>
<el-table <el-table
:data="dataList" :data="dataList"
border border
v-loading="dataListLoading" v-loading="dataListLoading" border fit highlight-current-row
@selection-change="selectionChangeHandle" @selection-change="selectionChangeHandle"
:cell-style="cellStyle" :cell-style="cellStyle"
style="width: 100%;" > style="width: 100%;" >
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column> <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
<el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column> <el-table-column prop="id" header-align="center" align="center" label="ID"></el-table-column>
@ -124,10 +122,14 @@
width="150" width="150"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id,3)">详情</el-button> <el-button type="text" size="small" v-if="scope.row.status !== 1" @click="addOrUpdateHandle(scope.row.id,3)">详情</el-button>
<el-button type="text" size="small" v-if="scope.row.status === 1" @click="addOrUpdateHandle(scope.row.id,3)">审批</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
@size-change="sizeChangeHandle" @size-change="sizeChangeHandle"
@current-change="currentChangeHandle" @current-change="currentChangeHandle"
@ -137,9 +139,18 @@
:total="totalPage" :total="totalPage"
layout="total, sizes, prev, pager, next, jumper"> layout="total, sizes, prev, pager, next, jumper">
</el-pagination> </el-pagination>
</el-tabs>
<!-- 弹窗, 新增 / 修改 --> <!-- 弹窗, 新增 / 修改 -->
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
</div> </div>
</template> </template>
<script> <script>
@ -152,7 +163,6 @@ export default {
formaterDate (val) { formaterDate (val) {
var date = new Date(val) var date = new Date(val)
var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1 var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
return date.getFullYear() + '-' + month return date.getFullYear() + '-' + month
}, },
getStatusStr (status) { getStatusStr (status) {
@ -161,7 +171,7 @@ export default {
} else if (status === 1) { } else if (status === 1) {
return '侍审批' return '侍审批'
} else if (status === 2) { } else if (status === 2) {
return '拒绝' return '己审批'
} else if (status === 3) { } else if (status === 3) {
return '侍提交' return '侍提交'
} else if (status === 4) { } else if (status === 4) {
@ -227,7 +237,7 @@ export default {
AddOrUpdate AddOrUpdate
}, },
activated () { activated () {
this.getDataList() this.getDataList(1)
}, },
methods: { methods: {
async handleChangeData (data) { async handleChangeData (data) {
@ -292,14 +302,23 @@ export default {
this.dataListLoading = false this.dataListLoading = false
}) })
}, },
tabChange (row) {
let status = row.name
if (row.name === '0') {
status = 1
} else if (row.name === '1') {
status = ''
}
this.getDataList(status)
},
// //
getDataList () { getDataList (status = this.dataForm.status) {
apiGetResultRecordList({ apiGetResultRecordList({
'page': this.pageIndex, 'page': this.pageIndex,
'limit': this.pageSize, 'limit': this.pageSize,
'monthBeginDate': this.dataForm.beginDate, 'monthBeginDate': this.dataForm.beginDate,
'monthEndDate': this.dataForm.endDate, 'monthEndDate': this.dataForm.endDate,
'status': this.dataForm.status, 'status': status,
'department1': this.dataForm.department1, 'department1': this.dataForm.department1,
'department2': this.dataForm.department2, 'department2': this.dataForm.department2,
'department3': this.dataForm.department3, 'department3': this.dataForm.department3,
@ -311,6 +330,11 @@ export default {
this.dataList = data.page.list this.dataList = data.page.list
this.totalPage = data.page.totalCount this.totalPage = data.page.totalCount
this.departmentList1 = data.departmentList1 this.departmentList1 = data.departmentList1
this.departmentList2 = data.departmentList2
this.departmentList3 = data.departmentList3
this.dataForm.department1 = data.department1
this.dataForm.department2 = data.department2
this.dataForm.department3 = data.department3
} else { } else {
this.dataList = [] this.dataList = []
this.totalPage = 0 this.totalPage = 0
@ -325,8 +349,12 @@ export default {
this.dataForm.endDate = data[1] this.dataForm.endDate = data[1]
}, },
cellStyle ({row, column, rowIndex, columnIndex}) { cellStyle ({row, column, rowIndex, columnIndex}) {
if (columnIndex === 5 && row.status === 3) { if (columnIndex === 5 && row.status === 5) {
return 'color:red!important;'
} else if (columnIndex === 5 && row.status === 4) {
return 'color:blue!important;' return 'color:blue!important;'
} else if (columnIndex === 6 && row.type === 2) {
return 'font-weight:bold!important;'
} else { } else {
return '' return ''
} }

View File

@ -86,9 +86,11 @@ export default {
callback() callback()
} }
var validPriority = async (rule, value, callback) => { var validPriority = async (rule, value, callback) => {
if (value !== 0) {
if (!value) { if (!value) {
callback(new Error('优先级不能为空')) callback(new Error('优先级不能为空'))
} }
}
if (!/^(0|[1-9][0-9]*)$/.test(value)) { if (!/^(0|[1-9][0-9]*)$/.test(value)) {
callback(new Error('请输入大于或等于0的整数')) callback(new Error('请输入大于或等于0的整数'))
} }
@ -321,11 +323,17 @@ export default {
} }
} }
if (this.auth.priority === 2) { if (this.auth.priority === 2) {
if (this.stringIsNull(this.dataForm.priority)) { if (this.dataForm.priority !== 0) {
if (!this.dataForm.priority) {
this.alertInfo('优先级不能为空') this.alertInfo('优先级不能为空')
return return
} }
} }
if (!/^(0|[1-9][0-9]*)$/.test(this.dataForm.priority)) {
this.alertInfo('请输入大于或等于0的整数')
return
}
}
const score1 = this.superScoreData.filter(i => this.dataForm.acquireScore === i.score) const score1 = this.superScoreData.filter(i => this.dataForm.acquireScore === i.score)
let superScore1 = '' let superScore1 = ''
if (score1 !== null && score1 !== '' && score1.length > 0) { if (score1 !== null && score1 !== '' && score1.length > 0) {
@ -343,7 +351,7 @@ export default {
'scoreComment': Base64.encode(this.scoreCommentEditor.txt.html()), 'scoreComment': Base64.encode(this.scoreCommentEditor.txt.html()),
'recordId': this.recordResultId, 'recordId': this.recordResultId,
'recordType': this.recordType, 'recordType': this.recordType,
'priority': this.priority 'priority': this.dataForm.priority
}).then(res => { }).then(res => {
if (res && res.code === 0) { if (res && res.code === 0) {
this.$message({ this.$message({

View File

@ -29,15 +29,22 @@
</div> </div>
<div class="bottom" v-show="this.auth.approvel == 1"> <div class="bottom" v-show="this.auth.approvel == 1">
<p><span style="cursor: pointer" @click="commitApprovalAddOrUpdate(1)">审批</span></p> <p>
<span @click="commitApprovalAddOrUpdate(1)">
<label :class="'label bg-order my_pointer'">审批</label>
</span>
</p>
</div> </div>
<div class="bottom" v-show="this.auth.confirmCommit == 1"> <div class="bottom" v-show="this.auth.confirmCommit == 1">
<p><span style="cursor: pointer" @click="commitApprovalYes('你要确认得分吗?')">确认得分</span></p> <p><span style="" @click="commitApprovalYes('你要确认得分吗?')">确认得分</span></p>
</div> </div>
<div class="bottom" v-show="this.auth.reject == 1"> <div class="bottom" v-show="this.auth.reject == 1">
<p><span style="cursor: pointer" @click="commitApprovalAddOrUpdate(5)" >驳回</span></p> <p><span @click="commitApprovalAddOrUpdate(5)" ><label :class="'label bg-danger my_pointer'">驳回</label></span></p>
</div> </div>
</div> </div>
@ -243,7 +250,7 @@ export default {
}, },
cellStyle ({row, column, rowIndex, columnIndex}) { cellStyle ({row, column, rowIndex, columnIndex}) {
if (rowIndex === this.yeJiCheckNum || rowIndex === this.yeJiCheckNum + this.wenHuaJiaZhiGuanNum + 1 || rowIndex === this.yeJiCheckNum + this.wenHuaJiaZhiGuanNum + this.lastResultNum + 2) { if (rowIndex === this.yeJiCheckNum || rowIndex === this.yeJiCheckNum + this.wenHuaJiaZhiGuanNum + 1 || rowIndex === this.yeJiCheckNum + this.wenHuaJiaZhiGuanNum + this.lastResultNum + 2) {
return 'background:#FFC400;font-weight:bolder!important;' return 'background:#DABBAF ;font-weight:bolder!important;'
} else { } else {
return '' return ''
} }
@ -300,10 +307,6 @@ export default {
return [1, 2] return [1, 2]
} else if (columnIndex === 1) { } else if (columnIndex === 1) {
return [0, 0] return [0, 0]
} else if (columnIndex === 2) {
return [1, 4]
} else if (columnIndex >= 3 && columnIndex <= 5) {
return [0, 0]
} }
} }
if (rowIndex > this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum) { if (rowIndex > this.yeJiCheckNum + 1 + this.wenHuaJiaZhiGuanNum + this.lastResultNum) {
@ -566,5 +569,103 @@ export default {
left: 146px; left: 146px;
font-size: 12px; font-size: 12px;
} }
.label{
display: inline-block;
padding: 3px 5px;
font-size: 75%;
font-weight: bold;
text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
line-height: 1;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
// label
.bg-info {
color: #dcf2f8;
background-color: #23b7e5;
}
.bg-order {
color: #dcf2f8;
background: #1f07d2;
}
.bg-type{
color: #dcf2f8;
background-color: #4e3692;
}
.bg-success {
color: #c6efd0;
background-color: #27c24c;
}
.bg-danger {
color: #ffffff;
background-color: #f05050;
}
.bg-gray {
color: #ffffff;
background-color: #666;
}
.tableTitle{
display:flex;
justify-content:space-between;
align-items:flex-end;
background-color: #D9EDF7;
border: 2px solid #BCE8F1;
color: #31708f;
}
//
.icon-img{
display:inline-block;
vertical-align:-2px;
width:12px;
height:14px;
background-position:center center;
background-size:12px 14px;
}
.icon-through{
background-image:url("~@/assets/img/icon/icon-through.png");
}
.icon-audit-success{
background-image:url("~@/assets/img/icon/icon-audit-success.png");
}
.icon-audit-fail{
background-image:url("~@/assets/img/icon/icon-audit-fail.png");
}
.icon-confirm-good{
background-image:url("~@/assets/img/icon/icon-confirm-goods.png")
}
.icon-returnMoney{
background-image:url("~@/assets/img/icon/icon-returnMoney.png")
}
.icon-returnGood{
background-image:url("~@/assets/img/login/bbb.png")
}
.thumb-wrapper {
padding: 2px;
border: 1px solid #dee5e7;
}
.underline:hover{
cursor:pointer;
text-decoration:underline;
}
.red{
color:red;
}
.blue{
color:blue;
}
b{
font-size:14px;
}
.page {
text-align: right;
padding: 15px;
}
.my_pointer{
cursor: pointer
}
</style> </style>