This commit is contained in:
liushuai
2020-03-11 18:09:35 +08:00
parent b6c062607f
commit c099ccf0be
14 changed files with 312 additions and 140 deletions

View File

@@ -2,7 +2,7 @@
<div>
<div style="width: 100%;overflow:auto">
<div style="white-space: nowrap">
<el-card style="margin-left: 0px;width:820px; display: inline-block;">
<el-card style="margin-left: 0px;width:740px; display: inline-block;">
<el-col>
<el-input v-model="partDrawingNumber" placeholder="零件图号" size="small" clearable style="margin: 3px 0;width: 180px" @keyup.enter.native="searchTable1"/>
<el-tooltip :open-delay="1200" effect="dark" content="查询备料零件" placement="top">
@@ -18,7 +18,7 @@
border
stripe
highlight-current-row
style="width:795px ;margin-top:3px;"
style="width:720px ;margin-top:3px;"
height="690"
size="mini"
@sort-change="sortChange"
@@ -34,12 +34,12 @@
{{ scope.row.组号 }}
</template>
</el-table-column>
<el-table-column label="零件图号" prop="零件图号" min-width="120" width="180" align="center" show-overflow-tooltip>
<el-table-column label="零件图号" prop="零件图号" min-width="120" width="160" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件图号 }}
</template>
</el-table-column>
<el-table-column label="零件名称" prop="零件名称" width="140" sortable="custom" align="center" show-overflow-tooltip>
<el-table-column label="零件名称" prop="零件名称" width="120" sortable="custom" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.零件名称 }}
</template>
@@ -49,7 +49,7 @@
{{ scope.row.批次数量 }}
</template>
</el-table-column>
<el-table-column label="材料" prop="材料" width="150" sortable="custom" align="center" show-overflow-tooltip>
<el-table-column label="材料" prop="材料" width="120" sortable="custom" align="center" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.材料 }}
</template>
@@ -126,7 +126,7 @@
{{ scope.row.采购单号 }}
</template>
</el-table-column>
<el-table-column label="外购计划单名称" prop="采购单名称" align="center" width="160">
<el-table-column label="外购备料单名称" prop="采购单名称" align="center" width="160">
<template slot-scope="scope">
{{ scope.row.采购单名称 }}
</template>
@@ -342,13 +342,13 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建外购计划单'"
v-show="title2==='创建外购备料单'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitAddPurchaseOrder">确定</el-button>
<el-button
v-show="title2==='编辑采购计划单'"
v-show="title2==='编辑外购备料单'"
type="primary"
size="small"
icon="el-icon-check"
@@ -682,7 +682,7 @@ export default {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '创建外购计划单'
this.title2 = '创建外购备料单'
this.form2.supplierNameValue = ''
this.form2.供应商名称 = ''
this.form2.计划完成日期 = ''
@@ -715,7 +715,7 @@ export default {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑采购计划单'
this.title2 = '编辑外购备料单'
this.form2.采购计划流水号 = row.采购计划流水号
this.form2.采购单名称 = row.采购单名称
this.form2.supplierNameValue = row.供应商
@@ -772,6 +772,7 @@ export default {
var param = []
param[0] = ['采购计划流水号', row.采购计划流水号]
param[1] = ['供应商', row.供应商名称]
param[2] = ['采购单号', row.采购单号]
var Data = this.CreateData('2001', '报表_备料管理_采购计划明细_查询数据', param)
this.exportExcel_NPOI(Data)
} else {

View File

@@ -24,7 +24,7 @@
start-placeholder="开始日期"
end-placeholder="结束日期"/>
<el-button type="primary" plain size="small" icon="el-icon-search" style="margin-left: 10px" @click="searchTable4()">查询</el-button>
<el-button class="button111" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">新增到货单</el-button>
<el-button class="button111" size="small" icon="el-icon-plus" style="margin-left: 10px" @click="addArrivalOrder">到货单</el-button>
<el-button type="success" plain size="small" icon="el-icon-download" style="margin-left:10px" @click="downloadExcel()">导出</el-button>
</div>
</el-card>
@@ -119,9 +119,9 @@
<el-button :disabled="disable === '1'" type="text" size="mini" icon="el-icon-circle-plus-outline" @click="addArrivalCL(scope.row)">备料材料</el-button>
</div>
</el-tooltip>
<el-tooltip :open-delay="1200" effect="dark" content="删除" placement="top">
<el-tooltip :open-delay="1200" effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-delete" @click="deleteArrivalMX(scope.row)"/>
<el-button :disabled="disable === '1'" type="text" size="mini" style="margin-left: 20px" icon="el-icon-circle-close" @click="deleteArrivalMX(scope.row)"/>
</div>
</el-tooltip>
</template>
@@ -188,7 +188,7 @@
<template slot-scope="scope">
<el-tooltip effect="dark" content="取消关联" placement="top">
<div style="display: inline-block">
<el-button :disabled="disable === '1'" type="text" icon="el-icon-delete" size="mini" @click="deleteMateriel(scope.row)"/>
<el-button :disabled="disable === '1'" type="text" icon="el-icon-circle-close" size="mini" @click="deleteMateriel(scope.row)"/>
</div>
</el-tooltip>
</template>
@@ -229,7 +229,7 @@
@click="submitEditArrivalOrder">确定</el-button>
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible10" title="添加到货明细" center style="min-height: 400px" width="1600px">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible10" title="添加到货明细" center style="min-height: 200px" width="1600px">
<el-form ref="form10" :model="form10" :rules="rules10" label-position="right" label-width="60px">
<el-row style="background-color: white">
<el-col :span="5" style="margin-left: 2%">
@@ -282,7 +282,7 @@
</el-form-item>
</el-row>
<el-row style="height: 50px">
<el-form-item label="金额" prop="金额">
<el-form-item label="金额(元)" prop="金额">
<el-input-number v-model="form10.金额" :precision="2" :step="1" size="medium"/>
</el-form-item>
</el-row>
@@ -292,7 +292,7 @@
</div>
</div>
<div style="width: 79%;float: left;margin-left: 10px">
<el-table :row-key="getRowKeys" :data="tableData20" border show-summary highlight-current-row stripe style="margin: 3px 0" height="550px" size="mini" @selection-change="handleSelectionChange">
<el-table :row-key="getRowKeys" :data="tableData20" border show-summary highlight-current-row stripe style="margin: 3px 0" height="350px" size="mini" @selection-change="handleSelectionChange">
<el-table-column :reserve-selection="true" type="selection" width="50" align="center"/>
<el-table-column label="采购单号" align="center" width="120">
<template slot-scope="scope">
@@ -324,12 +324,12 @@
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到货数" align="center" width="120px">
<el-table-column label="到货数" align="center" width="120px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="到货重量" align="center" width="120px" prop="到货重量">
<el-table-column label="到货重量(KG)" align="center" width="120px" prop="到货重量">
<template slot-scope="scope">
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template>
@@ -339,11 +339,11 @@
{{ scope.row.成品尺寸 }}
</template>
</el-table-column>
<el-table-column label="单位" align="center" width="60px">
<template slot-scope="scope">
{{ scope.row.单位 ? scope.row.单位 : '-' }}
</template>
</el-table-column>
<!--<el-table-column label="单位" align="center" width="60px">-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.单位 ? scope.row.单位 : '-' }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="备注" align="center">
<template slot-scope="scope">
{{ scope.row.备注1 }}
@@ -451,12 +451,12 @@
{{ scope.row.到货数量 }}
</template>
</el-table-column>
<el-table-column label="到货数" align="center" width="120px">
<el-table-column label="到货数" align="center" width="120px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.未到货数量" :disabled="disable === '1'" :max="scope.row.采购数量-parseInt(scope.row.到货数量)" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template>
</el-table-column>
<el-table-column label="到货重量" align="center" width="120px">
<el-table-column label="到货重量(KG)" align="center" width="120px">
<template slot-scope="scope">
<el-input-number v-model="scope.row.到货重量" :disabled="disable === '1'" :step="1" :min="0" size="mini" style="width:95px" @change="saveData(scope.row)"/>
</template>
@@ -1073,7 +1073,7 @@ export default {
})
},
deleteArrivalMX(row) {
this.$confirm('确定删除该到货单明细?', '提示', {
this.$confirm('确定取消该物料的到货信息?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'

View File

@@ -70,7 +70,7 @@
:value="item.value"/>
</el-select>
<el-button type="primary" size="small" plain icon="el-icon-search" style="margin-left: 10px" @click="searchTable()">查询</el-button>
<el-button type="distribution" size="small" plain icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">采购计划单</el-button>
<el-button type="distribution" size="small" plain icon="el-icon-circle-plus-outline" style="margin-left: 10px" @click="addPurchaseOrder">计划单</el-button>
<!--<el-tooltip :open-delay="1200" effect="dark" content="保存选中的采购计划单" placement="top">-->
<!--<el-button type="baocun" size="small" icon="el-icon-download" style="margin-left: 10px" @click="saveMateriel">保存采购计划单</el-button>-->
<!--</el-tooltip>-->
@@ -187,26 +187,26 @@
</div>
</div>
<div>
<el-card style="width: 1100px;margin: 10px auto">
<div id="WGBLD" style="width: 1000px;margin: 0 auto">
<el-card style="width: 1137px">
<div id="WGBLD" style="width: 1037px;margin: 0 auto">
<table cellspacing="0px" align="center" border="1 solid black" width="100%">
<tr style="height: 60px">
<th colspan="14"><h3>江苏高精机电装备有限公司</h3></th>
<th colspan="12"><h3>江苏高精机电装备有限公司</h3></th>
</tr>
<tr style="height: 40px">
<th colspan="14"><h4>{{ 采购单名称 }}</h4></th>
<th colspan="12"><h4>{{ 采购单名称 }}</h4></th>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单单位</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 下单单位 }}</td>
<td colspan="2" style="text-align: center;width: 15%">单号</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 单号 }}</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 单号 }}</td>
</tr>
<tr style="height: 40px">
<td colspan="2" style="text-align: center;width: 15%">下单日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 下单日期 }}</td>
<td colspan="2" style="text-align: center;width: 15%">计划完成日期</td>
<td colspan="5" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
<td colspan="4" style="text-align: center;width: 35%">{{ 计划完成日期 }}</td>
</tr>
</table>
<table cellspacing="0px" align="center" border="1 solid black" width="100%" style="margin-top: 0px">
@@ -215,17 +215,15 @@
<td colspan="2" style="text-align: center;width: 20%">物料编码</td>
<td colspan="2" style="text-align: center;width: 10%">名称</td>
<td colspan="2" style="text-align: center;width: 10%">材料</td>
<td colspan="2" style="text-align: center;width: 8%">单位</td>
<td colspan="2" style="text-align: center;width: 8%">数量</td>
<td colspan="2" style="text-align: center;width: 20%">成品尺寸</td>
<td style="text-align: center;width: 17%">备注</td>
</tr>
<tr v-for="(list, index) in tableData4" :key="index" style="height: 35px">
<tr v-for="(list, index) in tableData3" :key="index" style="height: 35px">
<td style="text-align: center;width: 7%">{{ index + 1 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.物料零件编码 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.零件名称 }}</td>
<td colspan="2" style="text-align: center;width: 10%">{{ list.材料 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.单位 }}</td>
<td colspan="2" style="text-align: center;width: 8%">{{ list.数量 }}</td>
<td colspan="2" style="text-align: center;width: 20%">{{ list.成品尺寸 }}</td>
<td style="text-align: center;width: 17%">{{ list.备注 }}</td>
@@ -234,6 +232,36 @@
<div style="margin-top: 20px">联系人:___________ 联系电话:___________ </div>
</div>
</el-card>
<el-dialog v-el-drag-dialog :title="title2" :visible.sync="dialogVisible2" center style="min-height: 300px" width="350px">
<el-form ref="form2" :model="form2" :rules="rules2" label-position="right" label-width="80px">
<el-form-item label="计划名称" prop="计划名称">
<el-input v-model="form2.离线采购计划名称" size="small"/>
</el-form-item>
<el-form-item label="供应商" prop="supplierNameValue">
<el-select v-model="form2.supplierNameValue" placeholder="供应商" size="small" filterable>
<el-option
v-for="item in supplierNames"
:key="item.value"
:label="item.label"
:value="item.value"/>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button
v-show="title2==='创建外购备料计划'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitAddPurchaseOrder">确定</el-button>
<el-button
v-show="title2==='编辑外购备料计划'"
type="primary"
size="small"
icon="el-icon-check"
@click="submitEditPurchaseOrder">确定</el-button>
</div>
</el-dialog>
</div>
</div>
</template>
@@ -279,7 +307,7 @@ export default {
离线采购计划流水号: ''
},
rules2: {
离线采购计划名称: [{ required: true, message: '请填写离线采购计划名称' }],
计划名称: [{ required: true, message: '请填写离线采购计划名称' }],
supplierNameValue: [{ required: true, message: '请选择供应商' }]
},
form3: {
@@ -483,7 +511,7 @@ export default {
}
this.form2.离线采购计划名称 = ''
this.form2.supplierNameValue = ''
this.title2 = '创建离线采购计划'
this.title2 = '创建外购备料计划'
this.dialogVisible2 = true
},
submitAddPurchaseOrder() { // 新建采购单
@@ -491,10 +519,10 @@ export default {
if (valid) {
addPurchaseOrder(this.form2.离线采购计划名称, this.form2.supplierNameValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('新建离线采购计划成功')
this.$message.success('新建离线外购备料成功')
this.searchTable()
this.dialogVisible2 = false
} else { this.$message.error('新建离线采购计划失败') }
} else { this.$message.error('新建离线外购备料失败') }
})
} else {
return false
@@ -505,7 +533,7 @@ export default {
if (this.$refs['form2'] !== undefined) {
this.$refs['form2'].resetFields()
}
this.title2 = '编辑离线采购计划'
this.title2 = '编辑外购备料计划'
this.form2.离线采购计划流水号 = row.离线采购计划流水号
this.form2.离线采购计划名称 = row.离线采购计划名称
this.form2.supplierNameValue = row.供应商流水号
@@ -516,10 +544,10 @@ export default {
if (valid) {
editPurchaseOrder(this.form2.离线采购计划流水号, this.form2.离线采购计划名称, this.form2.supplierNameValue).then(response => {
if (response.data[0].result === '1') {
this.$message.success('修改离线采购计划成功')
this.$message.success('修改离线外购备料成功')
this.searchTable()
this.dialogVisible2 = false
} else { this.$message.error('修改离线采购计划失败') }
} else { this.$message.error('修改离线外购备料失败') }
})
} else {
return false
@@ -547,7 +575,7 @@ export default {
},
submitAddMaterial() {
if (!this.离线采购计划流水号) {
this.$message.warning('请选择离线采购计划')
this.$message.warning('请选择外购备料计划')
} else if (this.materielGroup.length === 0) {
this.$message.warning('请勾选物料')
} else {
@@ -642,6 +670,25 @@ export default {
.el-tag{
margin: 0
}
.el-form--label-left >>> .el-form-item__label {
text-align: right;
}
>>>.el-dialog--center .el-dialog__body {
text-align: initial;
padding: 20px 30px 20px
}
>>>.el-dialog__header {
padding: 20px 20px 0px;
}
>>>.el-dialog__footer {
padding: 0px 20px 20px;
/*text-align: right;*/
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
>>>.el-form-item {
margin-bottom: 13px;
}
</style>
<style lang="scss">
.button111{

View File

@@ -193,7 +193,7 @@
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="开票金额"/>
<el-input v-positive="'float'" v-model="form1.money" type="number" class="editWorkTime" size="small" placeholder="开票金额" @change="Keeptwodecimalplaces"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
@@ -245,7 +245,7 @@
<el-date-picker v-model="form1.invoiceTime" size="small" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="到票金额(元)" prop="money">
<el-input v-positive="'float'" v-model="form1.money" type="float" size="small" placeholder="开票金额"/>
<el-input v-positive="'float'" v-model="form1.money" type="number" class="editWorkTime" size="small" placeholder="开票金额" @change="Keeptwodecimalplaces"/>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form1.remark" size="small"/>
@@ -257,7 +257,7 @@
</div>
</el-dialog>
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" title="关联到货单" center style="min-height: 200px" width="35%">
<el-dialog v-el-drag-dialog :visible.sync="dialogVisible" title="关联到货单" center style="min-height: 200px" width="25%">
<el-table v-loading="" :data="tableData4" border stripe style="max-height: 460px;" height="230px" size="mini" highlight-current-row @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="到货单编号" align="center">
@@ -276,8 +276,8 @@
</template>
</el-table-column>
</el-table>
<span>合计<el-input v-model="SUM" size="mini" style="width: 80px; margin: 10px 10px 0 10px"/></span>
<el-button type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">关联到货单</el-button>
<span>合计<el-input v-positive="'float'" v-model="SUM" size="mini" type="number" style="width: 80px; margin: 10px 10px 0 10px" @change="Keeptwodecimalplaces"/></span>
<el-button type="primary" size="small" icon="el-icon-download" style="float:right;margin: 10px 10px 0 10px" @click="addMateriel">货票关联</el-button>
</el-dialog>
</div>
</template>
@@ -377,6 +377,10 @@ export default {
this.searchTable1()
},
methods: {
Keeptwodecimalplaces() {
this.form1.money = Number(this.form1.money).toFixed(2)
this.SUM = this.SUM * 1.00
},
getSummaries(param) { // 合计
const { columns, data } = param
const sums = []
@@ -513,7 +517,7 @@ export default {
this.dialogVisible2 = true
this.form1.invoiceNumValue = row.发票流水号
this.form1.invoiceTime = row.开票时间
this.form1.money = row.开票金额
this.form1.money = row.开票金额.toFixed(2)
this.form1.Number = row.发票号
this.form1.remark = row.备注
this.form1.supplierNameValue = parseInt(row.供应商)
@@ -567,8 +571,9 @@ export default {
handleSelectionChange(val) {
this.SUM = 0
for (let i = 0; i < val.length; i++) {
this.SUM += parseFloat(val[i].到货金额).toFixed(2)
this.SUM += parseFloat(val[i].到货金额)
}
console.log(this.SUM, 11)
this.arrest = val
},
// 选入
@@ -708,6 +713,14 @@ function saveAs(blob, filename = '下载文件.xls') {
margin-top: 1px;
margin-bottom: 1px;
}
.editWorkTime input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
text-align: center;
}
.editWorkTime input[type="number"]{
-moz-appearance: textfield;
text-align: center;
}
</style>
<style lang="scss">
.subTableHeader {
@@ -725,6 +738,13 @@ function saveAs(blob, filename = '下载文件.xls') {
background-color: #e9f0f9;
}
}
.editWorkTime input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
-webkit-appearance: none;
text-align: center;
}
.editWorkTime input[type="number"]{
-moz-appearance: textfield;
}
</style>
<style lang="scss">
.button111{

View File

@@ -2,7 +2,7 @@
<div class="app-container">
<div style="width: 100%;overflow:auto">
<div style="white-space: nowrap">
<el-card style="width: 1663px">
<el-card style="width: 1545px">
<el-col>
<el-input v-model="supplierName0" placeholder="供应商" style="width: 220px" size="small" clearable/>
<el-date-picker
@@ -40,13 +40,14 @@
:data="tableData1"
:row-key="getRowKeys"
:expand-row-keys="expands"
:summary-method="getSummaries1"
:header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}"
show-summary
border
stripe
style="margin-top: 3px;"
height="600px"
size="mini"
show-summary
highlight-current-row
@row-click="searchTable02">
<el-table-column label="供应商" prop="供应商名称" align="center" min-width="180" width="350" show-overflow-tooltip>
@@ -115,7 +116,7 @@
@current-change="handleCurrentChange1"/>
</div>
</el-card>
<el-card style="margin-left: 0px;width:524px; margin-left: 1px; display: inline-block;vertical-align: top">
<el-card style="margin-left: 0px;width:405px; margin-left: 1px; display: inline-block;vertical-align: top">
<el-table :data="gridData" :header-cell-style="{fontFamily:'YouYuan',fontSize:'13px',fontWeight:200}" :summary-method="getSummaries" border class="subTableHeader" size="mini" show-summary style="">
<el-table-column width="50" align="center" type="index" label="序号"/>
<el-table-column width="120" align="center" label="发票号">
@@ -123,12 +124,12 @@
{{ scope.row.发票号 }}
</template>
</el-table-column>
<el-table-column width="170" align="center" label="供应商" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row.供应商名称 }}
</template>
</el-table-column>
<el-table-column align="center" label="到票金额(元)" width="90px" prop="到票金额">
<!--<el-table-column width="170" align="center" label="供应商" show-overflow-tooltip>-->
<!--<template slot-scope="scope">-->
<!--{{ scope.row.供应商名称 }}-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column align="center" label="到票金额(元)" width="120px" prop="到票金额">
<template slot-scope="scope">
{{ scope.row.开票金额.toFixed(2) }}
</template>
@@ -255,7 +256,7 @@ export default {
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计'
} else if (index === 3) {
} else if (index === 2) {
const values = data.map(item => Number(parseFloat(item['开票金额'])))
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
@@ -274,6 +275,31 @@ export default {
})
return sums
},
getSummaries1(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].toFixed(2) + ' 元'
} else {
sums[index] = 'N/A'
}
}
})
return sums
},
exportExcel() {
this.dateRange ? this.check1 = 1 : (this.check1 = 0, this.dateRange = '')
this.supplierName0 ? this.check2 = 1 : (this.check2 = 0, this.supplierName0 = '')