This commit is contained in:
liushuai
2020-04-07 19:13:40 +08:00
parent a0474aaf33
commit 193dd7ece6
22 changed files with 865 additions and 330 deletions

View File

@@ -279,7 +279,7 @@ export default {
} else {
sums[index] = 'N/A'
}
} else if (index === 12) {
} else if (index === 13) {
const values = data.map(item => Number(parseFloat(item['未税总额'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {

View File

@@ -87,7 +87,7 @@
{{ 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结果 }}
</template>
@@ -97,12 +97,12 @@
{{ scope.row.审批1未过原因 ? scope.row.审批1未过原因 : '—' }}
</template>
</el-table-column>
<el-table-column label="审时间" align="center" min-width="90" show-overflow-tooltip>
<el-table-column label="审时间" align="center" min-width="90" show-overflow-tooltip>
<template slot-scope="scope">
{{ 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结果 }}
</template>
@@ -117,7 +117,7 @@
{{ scope.row.审批4时间 ? scope.row.审批4时间.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.审批3结果 }}
</template>

View File

@@ -75,7 +75,7 @@
</el-table-column>
<el-table-column label="采购审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人1姓名 ? scope.row.审批人1姓名 : '未审批' }}
{{ scope.row.审批人1结果 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" width="100">
@@ -85,7 +85,7 @@
</el-table-column>
<el-table-column label="总经理审批" align="center" min-width="90">
<template slot-scope="scope">
{{ scope.row.审批人4姓名 ? scope.row.审批人4姓名 : '未审批' }}
{{ scope.row.审批人4结果 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" width="100">
@@ -95,7 +95,7 @@
</el-table-column>
<el-table-column label="财务审批" align="center" min-width="70">
<template slot-scope="scope">
{{ scope.row.审批人3姓名 ? scope.row.审批人3姓名 : '未审批' }}
{{ scope.row.审批人3结果 }}
</template>
</el-table-column>
<el-table-column label="审批时间" align="center" width="100">

View File

@@ -812,12 +812,13 @@ export default {
totalPrice: 0, // 合同总额
tableData4: [], // 合同模板
stipulateArrivalTime: '', // 规定到货时间
离线合同状态: '',
离线合同状态: true,
numbers: [],
numbers1: [],
paramRow: '', // 参数row
disable: true, // 其他的禁用
tabName: '标准件',
tongguo: '',
total22: 0,
pageCurrent22: 1,
pageSize22: 20
@@ -1067,7 +1068,8 @@ export default {
this.supplierName0 ? this.check4 = 1 : this.check4 = 0
this.loading3 = true
this.tableData3 = []
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.offlineContract, this.check4, this.supplierName0).then(response => {
console.log(this.id, 'id')
searchOfflineContract(this.pageCurrent2, this.pageSize2, this.check3, this.offlineContract, this.check4, this.supplierName0, this.id).then(response => {
console.log(response.data.rows, 99)
this.tableData2 = response.data.rows
this.total2 = response.data.total
@@ -1283,6 +1285,7 @@ export default {
!v.单价 ? v.单价 = v.参考价格 : v.单价
this.$set(v, '未税单价', v.单价 / (1 + this.taxRate))
})
console.log(this.tableData3, 'tableData31')
this.loading4 = false
console.log(response.data.length, 1231231233)
})
@@ -1439,8 +1442,17 @@ export default {
// })
},
doneOfflineContact() { // 生成离线合同
this.tongguo = true
console.log(this.tableData3, 'tableData3')
for (let i = 0; i < this.tableData3.length; i++) {
if (this.tableData3[i].数量 === '0' || this.tableData3[i].数量 === null || this.tableData3[i].数量 === '' || this.tableData3[i].单价 === '0' || this.tableData3[i].单价 === null || this.tableData3[i].单价 === '') {
this.tongguo = false
}
}
if (this.tableData3.length === 0) {
this.$message.error('无法生成空合同,请先选入物料!')
} else if (this.tongguo === false) {
this.$message.error('请完善单价或数量信息!')
} else {
let judge = true
this.tableData3.map(v => {

View File

@@ -68,12 +68,17 @@
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" prop="创建日期" min-width="110" sortable="custom">
<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="110">
<el-table-column label="合同金额(元)" align="center" min-width="110">
<template slot-scope="scope">
{{ Number(scope.row.合同总额).toFixed(2) }}
</template>
@@ -98,9 +103,9 @@
{{ scope.row.采购员 }}
</template>
</el-table-column>
<el-table-column label="创建日期" align="center" prop="创建日期" min-width="110" sortable="custom">
<el-table-column label="提交日期" align="center" prop="提交日期" min-width="110" sortable="custom">
<template slot-scope="scope">
{{ scope.row.创建日期.split(' ')[0] }}
{{ scope.row.提交日期 ? scope.row.提交日期.split(' ')[0] : '-' }}
</template>
</el-table-column>
</el-table>
@@ -168,6 +173,7 @@ export default {
name: 'OfflineContractSearch',
data() {
return {
row1: '',
dateRange: '',
contractNumber: '',
supplierName: '',
@@ -272,26 +278,31 @@ export default {
this.searchTable1()
},
back() {
this.$confirm('确定打回合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.number) {
back(this.number).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('打回成功')
this.searchTable1()
} else {
this.$message.success('打回失败')
}
})
} else {
this.$message.warning('请选择要打回的合同')
}
})
if (this.row1.到货金额 !== '0') {
this.$message.error('已有到货信息,无法打回!!!')
} else {
this.$confirm('确定打回合同?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
if (this.number) {
back(this.number).then(response => {
if (response.data[0].result !== '0') {
this.$message.success('打回成功')
this.searchTable1()
} else {
this.$message.success('打回失败')
}
})
} else {
this.$message.warning('请选择要打回的合同')
}
})
}
},
searchTable2(row) {
this.row1 = row
this.number = row.离线合同流水号
searchOfflineContractContent(row.离线合同流水号).then(response => {
this.contractDetail = response.data

View File

@@ -42,12 +42,22 @@
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到货时间" align="center" width="90">
<template slot-scope="scope">
{{ scope.row.到货时间 ? scope.row.到货时间.split(' ')[0] : '' }}
</template>
</el-table-column>
<el-table-column label="到货金额(元)" align="center" width="110">
<template slot-scope="scope">
{{ scope.row.到货金额 }}
</template>
</el-table-column>
<el-table-column label="合同编号" align="center" width="160px">
<template slot-scope="scope">
{{ scope.row.离线合同编号 }}
</template>
</el-table-column>
<el-table-column label="供应商" align="center" width="220">
<el-table-column label="供应商" align="center" width="220" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>

View File

@@ -470,7 +470,7 @@ export default {
this.dateRange ? check1 = 1 : (check1 = 0, this.dateRange = '')
this.supplierValue ? check2 = 1 : check2 = 0
this.searchAll === false ? check3 = 1 : check3 = 0
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue, check3).then(response => {
searchRequestFund(this.pageCurrent1, this.pageSize1, check1, this.dateRange[0], this.dateRange[1], check2, this.supplierValue, check3, this.id).then(response => {
this.tableData1 = response.data.rows
this.total1 = response.data.total
})