This commit is contained in:
liushuai
2020-03-31 17:56:21 +08:00
parent ba7cf068ad
commit 0522ce916e
7 changed files with 107 additions and 46 deletions

View File

@@ -82,10 +82,10 @@
<el-table-column label="操作" fixed="right" align="center" width="100">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="编辑零件数量" placement="top">
<el-button :disabled="scope.row.考核状态>=6&&scope.row.状态==='已加工'" size="mini" type="text" plain icon="el-icon-edit" @click="type=1;handleEdit(scope.row)"/>
<el-button :disabled="scope.row.考核状态>=6&&scope.row.状态==='已加工'" size="mini" type="text" icon="el-icon-edit" @click="type=1;handleEdit(scope.row)"/>
</el-tooltip>
<el-tooltip :open-delay="1000" effect="dark" content="删除该行" placement="top">
<el-button size="mini" type="text" plain icon="el-icon-delete" @click="handleDelete(scope.row)"/>
<el-button :disabled="scope.row.考核状态>=6&&scope.row.状态==='已加工'" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"/>
</el-tooltip>
</template>
</el-table-column>
@@ -175,16 +175,14 @@
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
type="text"
icon="el-icon-edit"
@click="type=1;handleEdit(scope.row)">编辑</el-button>
@click="type=1;handleEdit(scope.row)"/>
<el-button
size="mini"
type="danger"
plain
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
@click="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -246,9 +244,8 @@
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
@click="type=1;handleEdit(scope.row)">编辑</el-button>
type="text"
@click="type=1;handleEdit(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -306,9 +303,8 @@
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
@click="handleEdit(scope.row)">编辑</el-button>
type="text"
@click="handleEdit(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -378,9 +374,8 @@
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
plain
@click="type=2;handleEdit(scope.row)">编辑</el-button>
type="text"
@click="type=2;handleEdit(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -442,8 +437,8 @@
<template slot-scope="scope">
<el-button
size="mini"
type="primary"
@click="type=2;handleEdit(scope.row)">编辑</el-button>
type="text"
@click="type=2;handleEdit(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -807,6 +802,7 @@ export default {
const part_check = this.partNumber ? 1 : 0
this.loading = true
basicPartsData(machine_check, this.machineValue, group_check, this.groupValue, part_check, this.partNumber).then(response => {
console.log(response, 111)
this.loading = false
const res = response.data
this.total = res.total

View File

@@ -14,7 +14,7 @@
end-placeholder="结束日期"/>
<el-button type="primary" class="el-icon-search" plain size="small" @click="searchTable();">查询</el-button>
<el-tooltip :open-delay="1000" content="导出人员工时统计表" placement="right">
<el-button type="primary" size="small" plain icon="el-icon-download" @click="exportTable()">导出</el-button>
<el-button type="success" size="small" plain icon="el-icon-download" @click="exportTable()">导出</el-button>
</el-tooltip>
</el-card>
<el-card style="width: 720px">
@@ -186,13 +186,13 @@ export default {
var param = []
param[0] = ['操作者_check', check]
param[1] = ['姓名', this.workerName]
param[6] = ['时间_check', check1]
param[2] = ['时间_check', check1]
if (check1 === 0) {
param[7] = ['开始时间', '']
param[8] = ['结束时间', '']
param[3] = ['开始时间', '']
param[4] = ['结束时间', '']
} else {
param[7] = ['开始时间', this.dateRange[0]]
param[8] = ['结束时间', this.dateRange[1]]
param[3] = ['开始时间', this.dateRange[0]]
param[4] = ['结束时间', this.dateRange[1]]
}
var Data = this.CreateData('2001', '报表_人员工时查询', param)
this.exportExcel_NPOI(Data)

View File

@@ -297,6 +297,13 @@ export default {
this.finishTime ? check5 = 1 : (check5 = 0, this.finishTime = '')
search(this.pageCurrent, this.pageSize, check1, this.machineNumberValue, check2, this.groupNumberValue, check3, this.PrNum, check4, this.personValue, check5, this.finishTime[0], this.finishTime[1]).then(response => {
this.tableData = response.data.rows
this.tableData.map(v => {
this.$set(v)
if (v.工艺员 === '超级管理员') {
v.工艺员 = ''
}
return v
})
this.total = response.data.total
this.loading = false
})

View File

@@ -87,9 +87,14 @@
{{ scope.row.申请时间 ? scope.row.申请时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" min-width="60">
<el-table-column label="审核结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审核' }}
{{ scope.row.审批1结果 }}
</template>
</el-table-column>
<el-table-column label="审核未过原因" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批1未过原因 ? scope.row.审批1未过原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
@@ -97,9 +102,14 @@
{{ scope.row.审批1时间 ? scope.row.审批1时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="审批" align="center" min-width="60">
<el-table-column label="审批结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
{{ scope.row.审批4结果 }}
</template>
</el-table-column>
<el-table-column label="审批未过原因" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批4未过原因 ? scope.row.审批4未过原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
@@ -109,7 +119,12 @@
</el-table-column>
<el-table-column label="财务" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
{{ scope.row.审批3结果 }}
</template>
</el-table-column>
<el-table-column label="财务未过原因" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.审批3未过原因 ? scope.row.审批3未过原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="90" show-overflow-tooltip>
@@ -121,7 +136,7 @@
<template slot-scope="scope">
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" size="mini" style="margin-left:10px" @click="submitApply(scope.row)">提交申请</el-button>
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" icon="el-icon-edit" size="mini" style="margin-left:10px" @click="handleEdit(scope.row)"/>
<el-button :disabled="Number(scope.row.是否提交申请)===1" type="text" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)"/>
<el-button :disabled="!(Number(scope.row.审批1流水号)!==1 || Number(scope.row.审批3流水号)===2 || Number(scope.row.审批4流水号)===2)" type="text" icon="el-icon-delete" size="mini" style="margin-left:10px" @click="handleDelete(scope.row)"/>
</template>
</el-table-column>
</el-table>
@@ -459,7 +474,7 @@ export default {
limit: 1,
tableData01: [],
tableData02: [],
tableDara03: [],
tableData03: [],
inboundCardNumber: '', // 入库单号
group: [] // 发票结算申请单明细流水号组
}

View File

@@ -103,9 +103,13 @@
{{ scope.row.审批3时间 ? scope.row.审批3时间.split(' ')[0] : '—' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="100" fixed="right">
<el-table-column label="操作" align="center" width="140" fixed="right">
<!--<template slot-scope="scope">-->
<!--<el-button :disabled="false" type="primary" plain size="mini" @click="excuteApprove(scope.row)">审批</el-button>-->
<!--</template>-->
<template slot-scope="scope">
<el-button :disabled="false" type="primary" plain size="mini" @click="excuteApprove(scope.row)">审批</el-button>
<el-button type="text" size="mini" icon="el-icon-check" @click="yesApproval(scope.row)">通过</el-button>
<el-button type="text" size="mini" icon="el-icon-close" @click="noApproval(scope.row)">不通过</el-button>
</template>
</el-table-column>
</el-table>
@@ -268,27 +272,66 @@ export default {
this.pageCurrent1 = val
this.searchTable1()
},
excuteApprove(row) {
this.$confirm('确认审批签字?', '提示', {
yesApproval(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
if (response.data[0].result === '审批成功') {
this.$message.success('审批成功')
excuteApprove(row.发票结算申请单流水号, this.id, this.token, 1, '').then(response => {
console.log(response, 11)
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else if (response.data[0].result === '已完成审批') {
this.$message.warning('已完成审批,不可重复审批')
} else { this.$message.error('审批失败') }
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消审批'
message: '取消操作'
})
})
},
noApproval(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
excuteApprove(row.发票结算申请单流水号, this.id, this.token, 2, value).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.tableData2 = []
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
// excuteApprove(row) {
// this.$confirm('确认审批签字?', '提示', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// }).then(() => {
// excuteApprove(row.发票结算申请单流水号, this.id, this.token).then(response => {
// if (response.data[0].result === '审批成功') {
// this.$message.success('审批成功')
// this.searchTable1()
// } else if (response.data[0].result === '已完成审批') {
// this.$message.warning('已完成审批,不可重复审批')
// } else { this.$message.error('审批失败') }
// })
// }).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消审批'
// })
// })
// },
searchTable2(row) {
this.invoiceNumber = row.发票号
searchTable2(row.发票结算申请单流水号).then(response => {