|
@@ -11,7 +11,10 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="项目" style="width: 215px">
|
|
|
<el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 175px">
|
|
|
- <el-option v-for="item in projectList" :key="item.id" :label="item.projectName" :value="item.id"></el-option>
|
|
|
+ <el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
|
|
|
+ <span style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
|
|
|
+ <span style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
|
|
|
+ </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!-- <el-form-item style="margin-left:20px;">
|
|
@@ -211,6 +214,14 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="date" label="操作" width="100">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type="warning" size="mini" v-if="scope.row.membdateList.length < 2 && scope.row.flg" @click="undoCli(scope.row, 0)">撤销</el-button>
|
|
|
+ <el-button size="mini" v-if="scope.row.membdateList.length >= 2 && scope.row.flg" @click="detailsClick(scope.row)">详情</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
<el-col v-if="search.value != -1" :span="24" class="toolbar">
|
|
|
<el-pagination
|
|
@@ -225,7 +236,40 @@
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
-
|
|
|
+ <!-- 审核记录撤销 -->
|
|
|
+ <el-dialog title="请输入原因" v-if="undoFormDialog" :visible.sync="undoFormDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <div>
|
|
|
+ <el-input type="textarea" v-model="undoForm.reason" rows="2" placeholder="请输入您决定撤销原因'" />
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="undoFormDialog = false" >取消</el-button>
|
|
|
+ <el-button type="primary" @click="clickCancel()">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ <!-- 审核记录详情列表 -->
|
|
|
+ <el-dialog title="审核记录" v-if="detailsDialog" :visible.sync="detailsDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
|
|
|
+ <div>
|
|
|
+ <el-table :data="detailsList" style="width: 100%">
|
|
|
+ <el-table-column prop="userName" label="员工/日期">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.row.userName}}/{{scope.row.createDate}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="date" label="操作" width="80">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ <el-button type="warning" size="mini" @click="undoCli(scope.row, 1)">撤销</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="detailsDialog = false" size="mini">取消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</section>
|
|
|
</template>
|
|
|
|
|
@@ -269,7 +313,14 @@
|
|
|
recordLists: [],
|
|
|
totals: 0,
|
|
|
pageIndexList: 1,
|
|
|
- pageSizeList: 20
|
|
|
+ pageSizeList: 20,
|
|
|
+ undoForm: {
|
|
|
+ reason: '',
|
|
|
+ userId: '',
|
|
|
+ createDate: ''
|
|
|
+ },
|
|
|
+ undoFormDialog: false,
|
|
|
+ detailsDialog: false,
|
|
|
};
|
|
|
},
|
|
|
filters: {
|
|
@@ -280,6 +331,46 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ detailsClick(item) {
|
|
|
+ this.detailsDialog = true
|
|
|
+ this.detailsList = item.membdateList
|
|
|
+ },
|
|
|
+ // 审核记录撤销点击确定
|
|
|
+ clickCancel() {
|
|
|
+ this.http.post('/report/denyHisReport', this.undoForm,
|
|
|
+ res => {
|
|
|
+ if (res.code == "ok") {
|
|
|
+ this.$message({
|
|
|
+ message: '撤销成功',
|
|
|
+ type: "success"
|
|
|
+ });
|
|
|
+ this.undoFormDialog = false
|
|
|
+ this.recordList()
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ message: res.msg,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error => {
|
|
|
+ this.$message({
|
|
|
+ message: error,
|
|
|
+ type: "error"
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ undoCli(item, i) {
|
|
|
+ console.log(item)
|
|
|
+ this.undoFormDialog = true
|
|
|
+ this.undoForm.reason = ''
|
|
|
+ this.undoForm.userId = item.userId
|
|
|
+ if(i == 0) {
|
|
|
+ this.undoForm.createDate = item.indate.split(' ')[0]
|
|
|
+ } else {
|
|
|
+ this.undoForm.createDate = item.createDate
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取审核记录
|
|
|
recordList() {
|
|
|
// this.recordDialogVisible = true
|
|
@@ -291,6 +382,9 @@
|
|
|
},
|
|
|
res => {
|
|
|
if (res.code == "ok") {
|
|
|
+ for (var i in res.data.records) {
|
|
|
+ res.data.records[i].result.indexOf('通过') == '-1' ? res.data.records[i].flg = false : res.data.records[i].flg = true
|
|
|
+ }
|
|
|
this.recordLists = res.data.records
|
|
|
this.totals = res.data.total
|
|
|
} else {
|
|
@@ -515,7 +609,6 @@
|
|
|
// 未通过日报
|
|
|
deny() {
|
|
|
this.logining = true;
|
|
|
-
|
|
|
this.http.post( this.port.report.deny, this.denyForm,
|
|
|
res => {
|
|
|
this.logining = false;
|