a
This commit is contained in:
@@ -168,18 +168,33 @@ export default {
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 6) {
|
||||
const values = data.map(item => Number(parseFloat(item['单价']) * parseInt(item['数量'])))
|
||||
} else if (index === 3) {
|
||||
const values = data.map(item => Number(item['数量']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return prev
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index] = sums[index].toFixed(2) + ' 元'
|
||||
sums[index]
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 4) {
|
||||
const values = data.map(item => Number(item['到货数量']))
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number(prev) + Number(curr)
|
||||
} else {
|
||||
return Number(prev)
|
||||
}
|
||||
}, 0)
|
||||
sums[index]
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-card>
|
||||
<div slot="header">
|
||||
<span>供应商:</span>
|
||||
<!--<span>供应商:</span>-->
|
||||
<el-select v-model="supplierValue" placeholder="供应商" filterable size="small" clearable @change="totalSum=0;totalPay=0;totalDebt=0;">
|
||||
<el-option
|
||||
v-for="item in supplier"
|
||||
@@ -11,11 +10,22 @@
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<span>请款时间:</span>
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
size="small"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
range-separator="~"
|
||||
style="width:240px;margin-left: 10px"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"/>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px" @click="pageCurrent1=1;pageSize1=10;total1=0;searchTable1()">查询</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-goods" plain style="" @click="requestFund">请款</el-button>
|
||||
</div>
|
||||
<h3>请款表</h3>
|
||||
<el-table v-loading="" :data="tableData1" border size="mini" stripe highlight-current-row @row-click="searchTable02">
|
||||
<!--<h3>请款表</h3>-->
|
||||
<el-table v-loading="" :data="tableData1" border size="mini" height="300" stripe highlight-current-row @row-click="searchTable02">
|
||||
<el-table-column label="供应商" prop="供应商名称" align="center" width="220" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.供应商名称 }}
|
||||
@@ -43,12 +53,12 @@
|
||||
<el-tag v-if="Number(scope.row.审核情况流水号)===2" type="danger" size="small">不通过</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审核未过原因" width="100" align="center">
|
||||
<el-table-column label="审核未过原因" width="110" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.未通过审核原因 === '通过' ? '—' : scope.row.未通过审核原因 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批结果" width="70" align="center">
|
||||
<el-table-column label="审批结果" width="80" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===3" type="primary" size="small">未审批</el-tag>
|
||||
<el-tag v-if="Number(scope.row.审批情况流水号)===1" type="success" size="small">已通过</el-tag>
|
||||
@@ -91,33 +101,33 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<h3 style="margin-top: 0">合同明细</h3>
|
||||
<!--<h3 style="margin-top: 0">合同明细</h3>-->
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-col :span="10">
|
||||
<el-table :data="gridData" :summary-method="getSummaries2" border highlight-current-row size="mini" show-summary @row-click="searchContract">
|
||||
<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="合同总额">
|
||||
<el-table-column width="120" align="center" label="合同总额(元)" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.合同总额).toFixed(2) }}
|
||||
{{ scope.row.合同总额 ? parseFloat(scope.row.合同总额).toFixed(2) : 0 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="120" align="center" label="已付金额" prop="已付金额">
|
||||
<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="请款金额">
|
||||
<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-col>
|
||||
<el-col :span="16">
|
||||
<el-col :span="14">
|
||||
<el-table :data="tableData2" :summary-method="getSummaries" border height="500px" size="mini" stripe show-summary>
|
||||
<el-table-column label="物料名称" align="center" min-width="150">
|
||||
<template slot-scope="scope">
|
||||
@@ -180,12 +190,12 @@
|
||||
<!--<el-button type="success" size="small" icon="el-icon-search" style="margin: 0 10px 10px 10px" @click="searchTable01()">查询</el-button>-->
|
||||
<el-table v-loading="" :data="tableData01" border style="max-height: 300px;" height="300px" size="mini" @selection-change="handleSelectionChange">
|
||||
<el-table-column :selectable="selectable" type="selection" align="center" width="45"/>
|
||||
<el-table-column label="采购合同编号" align="center" min-width="140" show-overflow-tooltip>
|
||||
<el-table-column label="采购合同编号" align="center" width="130" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同编号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="采购合同名称" align="center" min-width="100" show-overflow-tooltip>
|
||||
<el-table-column label="采购合同名称" align="center" min-width="110" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.采购合同名称 }}
|
||||
</template>
|
||||
@@ -195,27 +205,27 @@
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同类型" align="center" width="70">
|
||||
<el-table-column label="合同类型" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同类型 === 1 ? '采购' : '离线' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合同总额" align="center" width="80" prop="合同总额">
|
||||
<el-table-column label="合同总额(元)" align="center" width="110" prop="合同总额">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.合同总额 ? (parseInt(scope.row.合同总额 * 100)/100).toFixed(2) : '-' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付金额" align="center" width="80" prop="已付金额">
|
||||
<el-table-column label="已付金额(元)" align="center" width="110" prop="已付金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.已付金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="申请中金额" align="center" min-width="100" prop="申请中金额">
|
||||
<el-table-column label="申请中金额(元)" align="center" min-width="120" prop="申请中金额">
|
||||
<template slot-scope="scope">
|
||||
{{ parseFloat(scope.row.申请中金额).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="请款金额" align="center" min-width="180" prop="请款金额">
|
||||
<el-table-column label="请款金额(元)" align="center" min-width="170" prop="请款金额">
|
||||
<template slot-scope="scope">
|
||||
<el-input-number :max="scope.row.合同总额 - scope.row.已付金额 - scope.row.申请中金额" :disabled="(scope.row.合同总额 - scope.row.已付金额 - scope.row.申请中金额) === 0" :min="0" v-model="scope.row.请款金额" :precision="2" size="mini" controls-position="right" style="width: 100%;"/>
|
||||
</template>
|
||||
@@ -310,8 +320,8 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.fetchData()
|
||||
this.searchTable0()
|
||||
this.searchTable1()
|
||||
// this.searchTable0()
|
||||
// this.searchTable1()
|
||||
},
|
||||
methods: {
|
||||
timeToStamp(param) { // 转时间戳
|
||||
|
||||
Reference in New Issue
Block a user