This commit is contained in:
liushuai
2020-04-14 20:17:06 +08:00
parent 958997fa36
commit d40d67c5ca
13 changed files with 819 additions and 374 deletions

View File

@@ -19,7 +19,7 @@
<el-button size="small" type="primary" icon="el-icon-download" style="margin: 0 0 0 10px" plain @click="exportExcel()">导出</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" highlight-current-row show-summary border style="width: 1360px;" size="mini" height="590">
<el-table v-loading="loading" :data="tableData" :summary-method="getSummaries" show-summary highlight-current-row border style="width: 1360px;" size="mini" height="590">
<el-table-column label="跟单号" align="center" width="140">
<template slot-scope="scope">
{{ scope.row.跟单号 }}
@@ -122,7 +122,7 @@
</template>
<script>
import { initProject, initMachine, searchatabledata } from '@/api/ManufacturingCenter/ContractDetailsInquiryMetalworking'
import { initProject, initMachine, searchatabledata, searchtabletotal } from '@/api/ManufacturingCenter/ContractDetailsInquiryMetalworking'
export default {
data() {
return {
@@ -133,6 +133,11 @@ export default {
loading: false,
part: [], // 分組
partValue: '',
完成总数量: '',
投产总数: '',
总加工工时: '',
总修补工时: '',
总扫码工时: '',
specificationValue: '', // 规格型号
totalProcessingHours: '', // 加工总工时
totalPlannedHours: '', // 计划总工时
@@ -164,6 +169,7 @@ export default {
},
// 分页查询
searchTable() {
this.searchTableTotal()
this.tableData = []
if (this.machineValue) {
this.loading = true
@@ -202,6 +208,47 @@ export default {
this.$message.warning('请选择要查询的机床')
}
},
searchTableTotal() {
searchtabletotal(this.projectValue, this.machineValue).then(response => {
console.log(response, 'response1')
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.完成总数量 = response.data[i].总完成数量
this.投产总数 = response.data[i].投产总数
this.总加工工时 = response.data[i].总加工工时
this.总修补工时 = response.data[i].总修补工时
this.总扫码工时 = response.data[i].总扫码工时
}
}
})
},
getSummaries(param) { // 合计
const { columns } = param
const sums = []
console.log(this.投产总数, '投产总数')
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
} else if (index === 3) {
sums[index] = Number(this.投产总数)
return
} else if (index === 4) {
sums[index] = Number(this.完成总数量)
return
} else if (index === 6) {
sums[index] = Number(this.总加工工时)
return
} else if (index === 7) {
sums[index] = Number(this.总修补工时)
return
} else if (index === 8) {
sums[index] = Number(this.总扫码工时)
return
}
})
return sums
},
exportExcel() {
if (this.tableData.length === 0) {
this.$message.warning('请查询出要导出的数据')

View File

@@ -21,7 +21,7 @@
<el-button size="small" type="success" icon="el-icon-download" plain @click="exportExcel">导出</el-button>
</el-card>
<el-card>
<el-table v-loading="loading" :data="tableData" size="mini" style="max-height: 590px;width: 1370px" height="720px" border @sort-change="sortChange">
<el-table v-loading="loading" :data="tableData" :summary-method="getSummaries" show-summary size="mini" style="max-height: 590px;width: 1370px" height="720px" border @sort-change="sortChange">
<el-table-column align="center" label="跟单号" width="120px">
<template slot-scope="scope">
{{ scope.row.跟单号 }}
@@ -148,7 +148,7 @@
</div>
</template>
<script>
import { searchTable } from '@/api/ManufacturingCenter/MonthEndHourAccountingMetalworking'
import { searchTable, searchtabletotal } from '@/api/ManufacturingCenter/MonthEndHourAccountingMetalworking'
export default {
data() {
return {
@@ -160,6 +160,10 @@ export default {
partNumber: '',
tableData: [],
loading: false,
完成总数: '',
总完成工时: '',
总修补工时: '',
总扫码工时: '',
total: 0, // 总条数
pageSize: 50, // 每页显示条数
pageCurrent: 1 // 后台获取页
@@ -201,7 +205,28 @@ export default {
}
this.searchTable()
},
searchTableTotal() {
if (this.startTime[0] && this.startTime[1]) {
let check, check1, check2
this.name ? check = 1 : check = 0
this.partNumber ? check1 = 1 : check1 = 0
this.loading = true
this.check ? check2 = 1 : check2 = 0
searchtabletotal(check2, this.startTime[0], this.startTime[1], this.orderName, this.order, check, this.name, check1, this.partNumber).then(response => {
console.log(response, 'response1')
if (response.data.length !== 0) {
for (let i = 0; i < response.data.length; i++) {
this.完成总数 = response.data[i].完成总数
this.总完成工时 = response.data[i].总完成工时
this.总修补工时 = response.data[i].总修补工时
this.总扫码工时 = response.data[i].总扫码工时
}
}
})
}
},
searchTable() {
this.searchTableTotal()
if (this.startTime[0] && this.startTime[1]) {
let check, check1, check2
this.name ? check = 1 : check = 0
@@ -212,6 +237,7 @@ export default {
response.data.rows.map(v => {
this.$set(v, '工时比值', parseInt(v.计划工时) === 0 ? 0 : (Math.round(parseInt(v.完成工时) / parseInt(v.计划工时) * 100) / 100.00))
})
console.log(response, 'response')
this.tableData = response.data.rows
this.total = response.data.total
this.loading = false
@@ -220,6 +246,30 @@ export default {
this.$message.warning('请选择时间段')
}
},
getSummaries(param) { // 合计
const { columns } = param
const sums = []
console.log(this.投产总数, '投产总数')
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
return
} else if (index === 6) {
sums[index] = Number(this.完成总数)
return
} else if (index === 8) {
sums[index] = Number(this.总完成工时)
return
} else if (index === 9) {
sums[index] = Number(this.总修补工时)
return
} else if (index === 11) {
sums[index] = Number(this.总扫码工时)
return
}
})
return sums
},
// 分页
handleSizeChange(val) {
this.pageCurrent = 1

View File

@@ -1,39 +1,125 @@
<template>
<div class="app-container">
<el-card>
<!-- <h3 style="margin-top: 0">采购合同</h3>-->
<el-table v-loading="" :data="tableData1" border stripe style="width: 100%;max-height: 300px;" height="200px" size="mini" highlight-current-row @row-click="searchTable01">
<el-table-column label="供应商" align="center" min-width="170">
<!-- <el-input v-model="billNames" clearable filterable size="small" placeholder="供应商或合同编号" style="width: 200px;margin: 5px"/>-->
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" style="margin-left: 5px" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
<el-option
v-for="item in supplier"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<el-select v-model="personValue" placeholder="采购员" size="small" style="width: 120px" clearable>
<el-option
v-for="item in person"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
<span style="margin-left: 0">审核时间:</span>
<el-date-picker
v-model="dateRange"
size="small"
type="daterange"
align="center"
style="width: 300px"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="total1=0;pageCurrent1=1;pageSize1=50;searchTable1()">查询</el-button>
<el-radio v-model="radio" label="1" style="margin: 0 0 0 10px">全部</el-radio>
<el-radio v-model="radio" label="2" style="margin: 0 0 0 10px">通过</el-radio>
<el-radio v-model="radio" label="3" style="margin: 0 0 0 10px">未过</el-radio>
<el-button type="success" size="small" icon="el-icon-download" style="margin-left:10px;margin-top: 3px;margin-right: 20px;float: right" plain @click="exportTable('')">导出</el-button>
</el-card>
<el-card style="margin-top: 5px">
<el-table v-loading="loading1" :data="tableData1" size="mini" border stripe style="width: 100%" height="600px" highlight-current-row>
<el-table-column label="供应商" align="center" min-width="150" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column label="请款时间" align="center" min-width="140">
<template slot-scope="scope">
{{ scope.row.请款时间.substr(0,10) }}
</template>
</el-table-column>
<el-table-column label="请款人" align="center" min-width="80">
<el-table-column label="请款" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.姓名 }}
</template>
</el-table-column>
<el-table-column label="请款金额(元)" align="center" min-width="80" prop="请款金额">
<el-table-column label="请款金额(元)" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.请款金额 }}
</template>
</el-table-column>
<el-table-column label="审核" align="center" width="200">
<el-table-column label="提交时间" align="center" min-width="60">
<template slot-scope="scope">
<el-button type="text" size="mini" icon="el-icon-check" plain @click="yesApproval(scope.row)">通过</el-button>
<el-button type="text" size="mini" icon="el-icon-close" plain @click="noApproval(scope.row)">不通过</el-button>
{{ scope.row.请款时间 ? scope.row.请款时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="审核人" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.审核人姓名 }}
</template>
</el-table-column>
<el-table-column label="审核时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核时间 ? scope.row.审核时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="审核结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审核情况内容 }}
</template>
</el-table-column>
<el-table-column label="未过原因" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.未通过审核原因 }}
</template>
</el-table-column>
<el-table-column label="审批人" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.审批人姓名 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批时间 ? scope.row.审批时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="审批结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.审批情况内容 }}
</template>
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.付款人 }}
</template>
</el-table-column>
<el-table-column label="财务审批时间" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.付款时间 ? scope.row.付款时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="财务审批结果" align="center" min-width="60">
<template slot-scope="scope">
{{ scope.row.付款情况内容 }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="90px" fixed="right">
<template slot-scope="scope">
<el-tooltip :open-delay="1000" effect="dark" content="查看详情" placement="top">
<div style="display: inline-block">
<el-button type="text" size="mini" @click="searchTable2(scope.row)">详情</el-button>
</div>
</el-tooltip>
</template>
</el-table-column>
</el-table>
<div class="block" style="margin-top: 10px;">
<el-pagination
:current-page="pageCurrent1"
:page-sizes="[10, 20, 30, 40]"
:page-sizes="[50, 100, 150, 200]"
:page-size="pageSize1"
:total="total1"
style="display:inline-block;width:50%"
@@ -42,114 +128,60 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<!-- <h3 style="">合同明细</h3>-->
<el-row>
<el-col :span="10">
<el-card>
<el-table :data="gridData1" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContactDetail">
<el-table-column min-width="120" align="center" label="合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="合同总额(元)" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.合同总金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="110" align="center" label="到货金额(元)" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="105" align="center" label="已付金额(元)" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="105" align="center" label="请款金额(元)" prop="请款金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
<el-col :span="14">
<el-card>
<el-table :data="contractDetail2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary>
<el-table-column label="物料名称" align="center" min-width="150">
<template slot-scope="scope">
{{ scope.row.物料名称 ? scope.row.物料名称 : scope.row.零件名称 }}
</template>
</el-table-column>
<el-table-column label="物料规格" align="center" min-width="260">
<template slot-scope="scope">
{{ scope.row.物料规格 ? scope.row.物料规格 : scope.row.规格 }}
</template>
</el-table-column>
<el-table-column label="物料型号" align="center" width="150">
<template slot-scope="scope">
{{ scope.row.物料型号 ? scope.row.物料型号 : scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="数量" align="center" width="70">
<template slot-scope="scope">
{{ scope.row.数量 }}
</template>
</el-table-column>
<el-table-column label="到货数量" align="center" width="80">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.已到货数量 : scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="合计(元)" align="center" min-width="100" prop="合计">
<template slot-scope="scope">
{{ (parseFloat(scope.row.单价||0) * parseInt(scope.row.数量||0)).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="单价(元)" align="center" min-width="100" prop="单价">
<template slot-scope="scope">
{{ parseFloat(scope.row.单价||0).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="交货期要求" align="center" min-width="100" prop="交货期要求">
<template slot-scope="scope">
{{ scope.row.合同类型 === 1 ? scope.row.交货期.split(' ')[0] === '1900-01-01' ? '-' : scope.row.交货期.split(' ')[0] : scope.row.交货期要求 }}
</template>
</el-table-column>
<el-table-column label="备注" align="center" min-width="150" prop="备注">
<template slot-scope="scope">
{{ scope.row.备注 }}
</template>
</el-table-column>
</el-table>
</el-card>
</el-col>
</el-row>
<el-dialog v-el-drag-dialog :visible.sync="dialogFormVisible" title="请款信息明细" center width="800px">
<el-table :data="gridData1" border highlight-current-row size="mini">
<el-table-column min-width="150" align="center" label="合同编号">
<template slot-scope="scope">
{{ scope.row.采购合同编号 ? scope.row.采购合同编号 : scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="合同金额(元)" prop="到货金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.合同总金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="到货金额(元)" prop="到货金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.到货金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="已付金额(元)" prop="已付金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.已付金额).toFixed(2) }}
</template>
</el-table-column>
<el-table-column width="120" align="center" label="请款金额(元)" prop="请款金额">
<template slot-scope="scope">
{{ parseFloat(scope.row.请款金额).toFixed(2) }}
</template>
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
<script>
import { initApproval, execApproval, initApprovalOffline, searchRequsetFundDetail1, searchRequsetFundDetail2, execApprovalOffline, searchContactDetail, searchMateriel } from '@/api/PurchasingCenter/FundApproval'
import { initBuyer, searchTable1, searchTable2, searchSupplier } from '@/api/ManufacturingCenter/RequestApprovalQuery'
import { mapGetters } from 'vuex'
export default {
name: '', // 出纳付款
data() {
return {
contractDetail1: '',
contractDetail2: [],
tableData1: [],
pageSize1: 10,
pageCurrent1: 1,
radio: '1',
billNames: '',
supplier: [],
supplierValue: '',
person: [],
personValue: '',
dateRange: '',
total1: 0,
tableData2: [],
pageSize2: 10,
pageCurrent2: 1,
total2: 0,
gridData1: [],
gridData2: []
pageCurrent1: 1,
pageSize1: 50,
tableData1: [],
loading1: false,
dialogFormVisible: false,
gridData1: []
}
},
computed: {
@@ -162,230 +194,82 @@ export default {
},
created() {
this.fetchData()
this.searchTable1()
this.searchSupplier()
},
methods: {
getSummaries2(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
return
} else if (index === 2 || index === 3) {
const values = data.map(item => Number(item[column.property]))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}
searchSupplier() {
this.supplier = []
searchSupplier().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.supplier.push({
label: response.data[i].供应商名称,
value: response.data[i].供应商流水号
})
}
})
return sums
},
searchContactDetail(row) {
var check
row.采购合同流水号 ? check = 1 : check = 2
searchContactDetail(check, row.采购合同流水号, row.离线合同流水号).then(response => {
this.contractDetail2 = response.data
})
},
searchOfflineContactDetail(row) { // 查询离线合同明细
searchMateriel(row.离线合同流水号).then(response => {
this.contractDetail2 = response.data
})
},
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '总价'
} else if (index === 3) {
const values = data.map(item => Number(parseFloat(item['数量'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index] + ' 件'
} else {
sums[index] = '0'
}
} else if (index === 4) {
for (let i = 0; i < data.length; i++) {
if (!data[i].到货数量) {
data[i].到货数量 = 0
}
if (!data[i].已到货数量) {
data[i].已到货数量 = 0
}
}
const values = data.map(item => Number(parseInt(item['到货数量'])) + Number(parseInt(item['已到货数量'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index] + ' 件'
} else {
sums[index] = '0'
}
} else if (index === 5) {
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr)
if (!isNaN(value)) {
return prev + curr
} else {
return prev
}
}, 0)
sums[index] = sums[index].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
fetchData() {
this.searchTable1()
this.searchTable2()
this.person = []
initBuyer().then(response => {
for (let i = 0; i < response.data.length; i++) {
this.person.push({
label: response.data[i].姓名,
value: response.data[i].人员编号
})
}
})
},
searchTable1() {
initApproval(this.pageCurrent1, this.pageSize1, 2).then(response => {
this.loading1 = true
var check1, check2, check3
this.supplierValue ? check1 = 1 : check1 = 0
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
this.personValue ? check3 = 1 : check3 = 0
searchTable1(this.radio, check1, this.supplierValue, check2, this.dateRange[0], this.dateRange[1], check3, this.personValue, this.pageCurrent1, this.pageSize1).then(response => {
console.log(response.data)
this.loading1 = false
this.tableData1 = response.data.rows
this.total1 = response.data.total
})
},
exportTable() {
var check1, check2, check3
this.supplierValue ? check1 = 1 : check1 = 0
this.dateRange ? check2 = 1 : (check2 = 0, this.dateRange = '')
this.personValue ? check3 = 1 : check3 = 0
var param = []
param[0] = ['查询全部', this.radio]
param[1] = ['供应商流水号_check', check1]
param[2] = ['供应商流水号', this.supplierValue]
param[3] = ['时间段_check', check2]
if (check2 === 0) {
param[4] = ['开始时间', '']
param[5] = ['结束时间', '']
} else {
param[4] = ['开始时间', this.dateRange[0]]
param[5] = ['结束时间', this.dateRange[1]]
}
param[6] = ['人员编号_check', check3]
param[7] = ['人员编号', this.personValue]
var Data = this.CreateData('2001', '报表_采购管理_情况审核查询_查询数据', param)
this.exportExcel_NPOI(Data)
},
searchTable2(row) {
this.gridData1 = []
searchTable2(row.采购合同请款流水号).then(response => {
this.gridData1 = response.data
this.dialogFormVisible = true
})
},
handleSizeChange1(val) {
this.pageSize1 = val
this.pageCurrent1 = 1
this.pageSize1 = val
this.searchTable1()
},
handleCurrentChange1(val) {
this.pageCurrent1 = val
this.searchTable1()
},
searchTable2() {
initApprovalOffline(this.pageCurrent2, this.pageSize2, 2).then(response => {
console.log(response.data.rows)
this.tableData2 = response.data.rows
this.total2 = response.data.total
})
},
handleSizeChange2(val) {
this.pageSize2 = val
this.pageCurrent2 = 1
this.searchTable2()
},
handleCurrentChange2(val) {
this.pageCurrent2 = val
this.searchTable2()
},
searchTable01(row) { // 查看详情(请款信息包含的合同)
this.gridData1 = []
this.contractDetail2 = []
searchRequsetFundDetail1(row.采购合同请款流水号).then(response => {
this.gridData1 = response.data
})
},
searchTable02(row) { // 查看详情(请款信息包含的合同)
searchRequsetFundDetail2(row.离线合同请款流水号).then(response => {
this.gridData2 = response.data
})
},
yesApproval(row) { // 通过付款
this.$confirm('确定付款通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApproval(row.采购合同请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
// 记录付款金额及时间
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApproval(row) { // 不通过付款
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApproval(row.采购合同请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable1()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
yesApprovalOffline(row) { // 通过审核
this.$confirm('确定审核通过?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
execApprovalOffline(row.离线合同请款流水号, 1, '通过', this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
},
noApprovalOffline(row) { // 不通过审核
this.$prompt('请输入不通过原因', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({ value }) => {
execApprovalOffline(row.离线合同请款流水号, 2, value, this.id, 2).then(response => {
if (response.data[0].result === '1') {
this.$message.success('执行成功')
this.searchTable2()
} else { this.$message.error('执行失败') }
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消操作'
})
})
}
}
}

View File

@@ -111,11 +111,11 @@
{{ scope.row.不合格处理文本 }}
</template>
</el-table-column>
<el-table-column label="责任人" align="center">
<template slot-scope="scope">
{{ scope.row.不合格处理文本 }}
</template>
</el-table-column>
<!--<el-table-column label="责任人" align="center">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.不合格处理文本 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="报废工时(分)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.报废工时 }}