Merge branch 'material-ui' of http://192.168.0.75:3000/bonus/bonus-ui into material-ui

This commit is contained in:
zzyuan 2025-01-20 18:16:56 +08:00
commit 5633a14764
9 changed files with 477 additions and 472 deletions

View File

@ -64,8 +64,24 @@ export function submitCosts(params){
})
}
// 查询结算审批列表
export function getSltList(query) {
return request({
url: '/material/slt_agreement_info/getSltList',
method: 'get',
params: query
})
}
// 结算审批提交
export function costExamine(params){
return request({
url: '/material/slt_agreement_info/costExamine',
method: 'post',
data: params
})
}

View File

@ -4,12 +4,12 @@
<el-col :span="18">
<el-button type="primary" size="mini" @click="handleExport1"
>租赁明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport2"
>丢失明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport3"
>维修明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport4"
>报废明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport2"
>丢失明细导出</el-button>
<el-button type="warning" size="mini" @click="handleExportAll"
>全部明细导出</el-button>
<el-button type="success" size="mini" @click="handleAdd"
@ -21,13 +21,13 @@
</el-col> -->
</el-row>
<div style="color: rgb(217, 0, 27); font-weight: 700; padding: 20px 0">
<!-- <div style="color: rgb(217, 0, 27); font-weight: 700; padding: 20px 0">
结算费用合计¥{{ costAll }}租赁费用¥{{ leaseCost }}维修费用¥{{
repairCost
}}报废费用¥{{ scrapCost }}丢失费用{{ loseCost }}
</div>
</div> -->
<div>
<div style="margin-top:20px">
<div class="tabelAllTop">
<div class="costTop">结算费用</div>
</div>
@ -169,87 +169,11 @@
<div class="tabelAllBottom">
<div class="columnAllNum">合计</div>
<div class="columnAll">
{{ costAll }}
{{ costAll.toFixed(2) }}
</div>
</div>
</div>
<!-- 审批弹窗 -->
<el-dialog title="费用结算提交" align="center" :visible.sync="applyVisible" width="80%">
<div>
<el-table :data="applyList" show-summary sum-text="合计" :summary-method="getSummaries" border>
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" width="60"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="租赁费用" align="center" prop="leaseCost"/>
<el-table-column label="维修费用" align="center" prop="repairCost" :show-overflow-tooltip="true"/>
<el-table-column label="报废费用" align="center" prop="scrapCost" :show-overflow-tooltip="true"/>
<el-table-column label="丢失费用" align="center" prop="loseCost" :show-overflow-tooltip="true"/>
<el-table-column label="增项费用" align="center" prop="addCost" width="180">
<template slot-scope="scope">
<!-- <el-input-number
v-model="scope.row.addCost"
controls-position="right"
style="width: 100%"
:min="0"
:max="100000000"
@input="countNum(scope.row)"
></el-input-number> -->
<!-- <el-input-number
controls-position="right"
style="width: 150px"
v-model="scope.row.addCost"
:min="0"
:max="99999999"
@change="onAddChange(scope.row)"
></el-input-number> -->
<el-input
v-model="scope.row.addCost"
clearable
@change="onAddChange(scope.row)"
/>
</template>
</el-table-column>
<el-table-column label="减免费用" align="center" prop="subCost" width="180">
<template slot-scope="scope">
<!-- <el-input-number
v-model="scope.row.subCost"
controls-position="right"
style="width: 100%"
:min="0"
:max="scope.row.cost"
@input="countNum(scope.row)"
></el-input-number> -->
<!-- <el-input-number
controls-position="right"
style="width: 150px"
v-model="scope.row.subCost"
:min="0"
:max="subCostFlag"
@change="onSubChange(scope.row)"
></el-input-number> -->
<el-input
v-model="scope.row.subCost"
clearable
@change="onSubChange(scope.row)"
/>
</template>
</el-table-column>
<el-table-column label="增减原因" align="center" prop="remark" :show-overflow-tooltip="true" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.remark" :rows="6"
style="width: 100%" maxlength="50" type="textarea"></el-input>
</template>
</el-table-column>
<el-table-column label="费用小计" align="center" prop="cost" :show-overflow-tooltip="true" width="120"/>
</el-table>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="applyVisible = false"> </el-button>
<el-button type="primary" @click="submitApply"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -281,7 +205,6 @@ export default {
loseCost: 0,
costAll: 0,
deptName: undefined,
applyVisible: false,
applyList: [],
projectName: undefined, //
unitName: undefined, //
@ -369,7 +292,7 @@ export default {
.confirm('是否确认提交?')
.then(() => {
let params = {
'agreementId': this.rowData[0].agreementId, 'agreementCode': this.rowData[0].agreementCode,'totalCostAll': this.costAll,
'agreementId': this.rowData.agreementId, 'agreementCode': this.rowData.agreementCode,'totalCostAll': this.costAll,
'leaseList': this.leaseList, 'repairList': this.repairList, 'scrapList': this.scrapList,'loseList': this.loseList,
}
console.log('2222222222222',params)
@ -378,7 +301,7 @@ export default {
type: 'success',
message: '提交成功',
})
this.$emit('handleBack')
this.$emit('goBackPage')
})
})
.catch(() => {})
@ -421,104 +344,7 @@ export default {
Number(row.addCost || 0) -
Number(row.subCost || 0)
},
/** 费用增项时触发的事件 */
onAddChange(row) {
this.$message.closeAll()
const isRegex = this.isNumRegex(row.addCost)
if (!isRegex && row.addCost != '') {
this.$message.error('请输入大于等于0或包含两位小数点的数字')
row.addCost = 0
}
if (row.addCost * 1 >= 100000000) {
this.$message.error('增项费用不能超过1亿')
row.addCost = 99999999
}
// 0
if (
row.leaseCost +
row.repairCost +
row.scrapCost +
row.loseCost +
row.addCost * 1 <
row.subCost * 1
) {
row.subCost = 0
}
row.addCost = row.addCost * 1
this.$nextTick(() => {
row.cost = (
row.leaseCost +
row.repairCost +
row.scrapCost +
row.loseCost +
row.addCost * 1 -
row.subCost * 1
).toFixed(2)
})
},
/** 费用减项时触发事件 */
onSubChange(row) {
this.$message.closeAll()
const isRegex = this.isNumRegex(row.subCost)
if (!isRegex && row.subCost != '') {
this.$message.error('请输入大于等于0或包含两位小数点的数字')
row.subCost = 0
}
row.subCost = row.subCost * 1
if (row.subCost > row.cost && this.costAll <= row.cost) {
this.$message.error('减免费用不能超过小计费用')
row.subCost = row.cost
}
if (row.subCost > row.cost && this.costAll > row.cost) {
this.$message.error('减免费用不能超过小计费用')
row.subCost = this.costAll
}
if (row.cost == 0 && row.subCost != '') {
this.$message.error('小计费用已为0无法再减免')
row.subCost = 0
}
this.$nextTick(() => {
row.cost = (
row.leaseCost +
row.repairCost +
row.scrapCost +
row.loseCost +
row.addCost * 1 -
row.subCost * 1
).toFixed(2)
})
},
isNumRegex(val) {
const regex = /^(0|[1-9]\d*)(\.\d{2})?$/
const isNum = regex.test(val)
return isNum
},
//
submitApply() {
let costAll = 0
this.applyList.forEach((item) => {
costAll = costAll + item.cost * 1
})
console.log(costAll)
let param = {
relations: this.applyList,
cost: costAll,
}
console.log(param)
submitFee(param).then((res) => {
console.log(res)
if (res.code == 200) {
this.$tab.closeOpenPage({
path: '/cost/cost/costApplyList',
})
}
})
},
//
handleBack() {
this.$emit('goBackPage')
@ -532,7 +358,7 @@ export default {
/** 导出按钮操作 */
//
handleExport1() {
const params = this.rowData[0]
const params = this.rowData
this.download(
'material/slt_agreement_info/exportLease',
{...params,},
@ -541,7 +367,7 @@ export default {
},
//
handleExport2() {
const params = this.rowData[0]
const params = this.rowData
this.download(
'material/slt_agreement_info/exportLose',
{...params,},
@ -550,7 +376,7 @@ export default {
},
//
handleExport3() {
const params = this.rowData[0]
const params = this.rowData
this.download(
'material/slt_agreement_info/exportRepair',
{...params,},
@ -559,7 +385,7 @@ export default {
},
//
handleExport4() {
const params = this.rowData[0]
const params = this.rowData
this.download(
'material/slt_agreement_info/exportScrap',
{...params,},
@ -573,7 +399,7 @@ export default {
},
handleExportAll() {
const params = this.rowData[0]
const params = this.rowData
this.download(
'material/slt_agreement_info/exportAll',
{...params,},

View File

@ -49,10 +49,10 @@
filterable
>
<el-option
v-for="item in statusList"
:key="item.id"
:label="item.name"
:value="item.id"
v-for="dict in dict.type.cost_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
@ -88,7 +88,7 @@
</el-form>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :selectable="(row) => row.sltStatus == 1"/>
<el-table-column type="selection" width="55" align="center" :selectable="(row) => row.sltStatus == 0 || row.sltStatus == 3"/>
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{
@ -99,14 +99,21 @@
<el-table-column label="协议编号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="合计费用" align="center" prop="cost" :show-overflow-tooltip="true"/>
<el-table-column label="合计费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
<template slot-scope="scope" v-if="scope.row.costs != null && scope.row.costs!=''">
{{ scope.row.costs.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="结算状态" align="center" prop="sltStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.sltStatus == '1'">未结算</span>
<span v-if="scope.row.sltStatus == '2'">已结算</span>
<span v-if="scope.row.sltStatus == '3'">已审核</span>
<span v-if="scope.row.sltStatus == '4'">已驳回</span>
<dict-tag :options="dict.type.cost_status" :value="scope.row.sltStatus"/>
</template>
<!-- <template slot-scope="scope">
<span v-if="scope.row.sltStatus == '0'">未结算</span>
<span v-if="scope.row.sltStatus == '1'">已结算</span>
<span v-if="scope.row.sltStatus == '2'">已审核</span>
<span v-if="scope.row.sltStatus == '3'">已驳回</span>
</template> -->
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="租赁期限(天)" align="center" prop="leaseDay" :show-overflow-tooltip="true" />
@ -116,7 +123,7 @@
<template slot-scope="scope">
<el-button size="mini" type="primary" icon="el-icon-edit"
@click="handleApply(scope.row)"
v-if="scope.row.sltStatus == '1' || (scope.row.sltStatus == '4' && scope.row.isCommit == 0 )"
v-if="scope.row.sltStatus == '0' || (scope.row.sltStatus == '3')"
>结算申请</el-button>
<!-- <el-button size="mini" type="danger" icon="el-icon-delete"
@click="handleDelete(scope.row)"
@ -234,7 +241,7 @@ import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: 'CostApplyList',
dicts: [],
dicts: ['cost_status'],
components: { Treeselect },
data() {
return {
@ -260,12 +267,12 @@ export default {
value: 'id',
// multiple: true,//false
},
statusList: [
{ id: '1', name: '未结算' },
{ id: '2', name: '已结算' },
{ id: '3', name: '已审核' },
{ id: '4', name: '已驳回' },
],
// statusList: [
// { id: '1', name: '' },
// { id: '2', name: '' },
// { id: '3', name: '' },
// { id: '4', name: '' },
// ],
//
tableList: [],
//
@ -285,6 +292,7 @@ export default {
created() {
this.GetUnitData()
this.GetProData()
this.getList()
},
methods: {
/** 转换菜单数据结构 */
@ -397,7 +405,7 @@ export default {
},
//
handleApply(row) {
let arr = [row]
let arr = row
// console.log(arr)
// console.log(this.ids)
// console.log(JSON.stringify(arr))

View File

@ -1,19 +1,17 @@
<template>
<div class="app-container" id="agreement">
<div class="app-container">
<el-row style="width: 100%">
<el-col :span="18">
<el-button type="primary" size="mini" @click="handleExport1"
>租赁明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport2"
>丢失明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport3"
>维修明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport4"
>报废明细导出</el-button>
<el-button type="primary" size="mini" @click="handleExport2"
>丢失明细导出</el-button>
<el-button type="warning" size="mini" @click="handleExportAll"
>全部明细导出</el-button>
<el-button type="success" size="mini" @click="handleExame"
>审批</el-button>
</el-col>
<!-- <el-col :span="4">
<el-button type="danger" size="mini" style="float: right" @click="handleBack"
@ -21,162 +19,180 @@
</el-col> -->
</el-row>
<div style="color: rgb(217, 0, 27); font-weight: 700; padding: 20px 0">
结算费用合计¥{{ costAll }}:
<div v-for="(item, index) in applyList" :key="index">
租赁费用¥{{ item.leaseCost }}维修费用¥{{
item.repairCost
}}报废费用¥{{ item.scrapCost }}丢失费用{{
item.loseCost
}},增加项费用¥{{ item.addCost }}减免费用¥{{
item.subCost
}}增减原因{{ item.remark }}
</div>
</div>
<!-- <div style="color: rgb(217, 0, 27); font-weight: 700; padding: 20px 0">
结算费用合计¥{{ costAll }}租赁费用¥{{ leaseCost }}维修费用¥{{
repairCost
}}报废费用¥{{ scrapCost }}丢失费用{{ loseCost }}
</div> -->
<div>
<div style="margin-top:20px">
<div class="tabelAllTop">
<div class="costTop">结算费用</div>
</div>
<div class="tabelAllTopUnit">
<div class="costTopUnit">结算单位</div>
<div class="costRightUnit">
{{ unitName }}
</div>
</div>
<div class="tabelAllTopUnit">
<div class="costTopUnit">结算工程</div>
<div class="costRightUnit">
{{ projectName }}
</div>
</div>
<el-table :data="leaseList">
<el-table-column label="租赁费用明细" align="center">
<el-table-column label="序号" align="center" type="index" width="60"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/> -->
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true"/>
<el-table-column label="租赁单价" align="center" prop="leasePrice" :show-overflow-tooltip="true"/>
<el-table-column label="租赁数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="租赁单价" align="center" prop="leasePrice" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.leasePrice.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="租赁数量" align="center" prop="num" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.num.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="租赁日期" align="center" prop="startTime" :show-overflow-tooltip="true"/>
<!-- <el-table-column label="归还数量" align="center" prop="" :show-overflow-tooltip="true" /> -->
<el-table-column label="归还日期 " align="center" prop="endTime" :show-overflow-tooltip="true"/>
<el-table-column label="租赁天数" align="center" prop="leaseDays" :show-overflow-tooltip="true"/>
<el-table-column label="租赁费用" align="center" prop="costs" :show-overflow-tooltip="true"/>
<el-table-column label="租赁天数" align="center" prop="leaseDays" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ Number(scope.row.leaseDays).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="租赁费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.costs.toFixed(2) }}
</template>
</el-table-column>
</el-table-column>
</el-table>
<div style="width: 100%; text-align: right; padding: 20px 20px">租赁费用小计{{ leaseCost }}</div>
<div class="tabelAll">
<div class="columnAllNum">费用小计</div>
<div class="columnAll">
{{ leaseCost }}
</div>
</div>
</div>
<div>
<el-table :data="repairList">
<el-table-column label="维修费用明细" align="center">
<el-table-column label="序号" align="center" type="index" width="60"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true"/>
<el-table-column label="维修状态" align="center" prop="repairStatus" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.repairStatus == 0"
>未审核</span
>
<span v-if="scope.row.repairStatus == 1"
>已审核</span
>
</template> -->
</el-table-column>
<el-table-column label="维修数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true"/>
<el-table-column label="类型" align="center" prop="partType" :show-overflow-tooltip="true">
<!-- <template slot-scope="scope">
<span v-if="scope.row.partType == 0">不收费</span>
<span v-if="scope.row.partType == 1">收费</span>
</template> -->
</el-table-column>
</el-table-column>
</el-table>
<div style="width: 100%; text-align: right; padding: 20px 20px">维修费用小计{{ repairCost }}</div>
</div>
<div>
<el-table :data="scrapList">
<el-table-column label="报废费用明细" align="center">
<el-table-column label="序号" align="center" type="index" width="60"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true"/>
<el-table-column label="报废数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="报废原因" align="center" prop="scrapType" :show-overflow-tooltip="true">
<el-table-column label="维修数量" align="center" prop="num" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.scrapType == 0">自然</span>
<span v-if="scope.row.scrapType == 1">人为</span>
{{ scope.row.num.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="是否收费" align="center" prop="partType" :show-overflow-tooltip="true"/>
<el-table-column label="维修费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.costs.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="维修费用" align="center" prop="costs" :show-overflow-tooltip="true"/>
</el-table-column>
</el-table>
<div style="width: 100%; text-align: right; padding: 20px 20px">报废费用小计{{ scrapCost }}</div>
<div class="tabelAll">
<div class="columnAllNum">费用小计</div>
<div class="columnAll">
{{ repairCost }}
</div>
</div>
</div>
<div>
<el-table :data="loseList">
<el-table-column label="丢失费用明细" align="center">
<el-table :data="scrapList">
<el-table-column label="报废费用明细" align="center">
<el-table-column label="序号" align="center" type="index" width="60"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true"/>
<el-table-column label="丢失数量" align="center" prop="num" :show-overflow-tooltip="true"/>
<el-table-column label="丢失费用" align="center" prop="costs" :show-overflow-tooltip="true"/>
<el-table-column label="报废数量" align="center" prop="num" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.num.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="是否收费" align="center" prop="partType" :show-overflow-tooltip="true"/>
<el-table-column label="报废费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.costs.toFixed(2) }}
</template>
</el-table-column>
</el-table-column>
</el-table>
<div style="width: 100%; text-align: right; padding: 20px 20px">丢失费用小计{{ loseCost }}</div>
</div>
<!-- 审批弹窗 -->
<el-dialog title="费用结算审核" :visible.sync="applyVisible" width="650px" append-to-body>
<el-form ref="aform" :model="aform" label-width="120px">
<el-form-item label="结算审核" prop="status">
<el-radio v-model="aform.status" label="1">通过</el-radio>
<el-radio v-model="aform.status" label="2">不通过</el-radio>
</el-form-item>
<el-form-item label="原因" prop="remark">
<el-input v-model="aform.remark" maxlength="100" placeholder="请输入"
show-word-limit size="small" style="width: 350px" type="textarea"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="submitListForm"> </el-button>
<el-button @click="applyVisible = false"> </el-button>
<div class="tabelAll">
<div class="columnAllNum">费用小计</div>
<div class="columnAll">
{{ scrapCost }}
</div>
</div>
</el-dialog>
</div>
<div>
<el-table :data="loseList">
<el-table-column label="丢失费用明细" align="center">
<el-table-column label="序号" align="center" type="index" width="60"/>
<el-table-column label="设备名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="mtUnitName" :show-overflow-tooltip="true"/>
<el-table-column label="丢失数量" align="center" prop="num" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.num.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="丢失费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.costs.toFixed(2) }}
</template>
</el-table-column>
</el-table-column>
</el-table>
<div class="tabelAllBottom">
<div class="columnAllNum">费用小计</div>
<div class="columnAll">
{{ loseCost }}
</div>
</div>
<div class="tabelAllBottom">
<div class="columnAllNum">合计</div>
<div class="columnAll">
{{ costAll.toFixed(2) }}
</div>
</div>
</div>
</div>
</template>
<script>
// import {
// getAgreementList,
// getUnitList,
// getProjectList,
// } from '@/api/claimAndRefund/receive'
import { getSltExamInfo, settlementReview } from '@/api/cost/cost'
<script>
import { getSltInfo, submitFee,submitCosts } from '@/api/cost/cost'
export default {
name: 'Agreement',
name: '',
dicts: [],
props: {
row: {
type: [String, Number],
default: () => {
return "";
},
},
rowId: {
type: [String, Number],
default: () => {
return "";
},
row: {
type: [String],
}
},
data() {
return {
return {
//
unitList: [],
//
projectList: [],
aform: { status: '1' },
Id: '',
projectList: [],
leaseList: [], //
leaseCost: 0,
repairList: [], //
@ -187,16 +203,18 @@ export default {
loseCost: 0,
costAll: 0,
deptName: undefined,
applyVisible: false,
applyList: [],
rowData: [],
projectName: undefined, //
unitName: undefined, //
}
},
created() {
mounted() {
console.log('33333333333',this.row)
let arr = JSON.parse(this.row)
this.rowData = arr;
this.Id = this.rowId;
this.getDataAll();
this.rowData = arr
this.getDataAll()
// this.getUnitList();
// this.getProjectList();
},
methods: {
// ,getUnitList, getProjectList
@ -212,118 +230,160 @@ export default {
},
/** 查询列表 */
getDataAll() {
let param = {
id: this.Id,
}
getSltExamInfo(param).then((response) => {
getSltInfo(this.rowData).then((response) => {
this.leaseList = response.data.leaseList //
this.projectName = response.data.projectName
this.unitName = response.data.unitName
this.leaseCost = this.countCost(this.leaseList)
this.repairList = response.data.repairList //
this.repairCost = this.countCost(this.repairList)
this.repairCost = response.data.repairCost.toFixed(2)
// this.repairCost = this.countCost(this.repairList)
this.scrapList = response.data.scrapList //
this.scrapCost = this.countCost(this.scrapList)
this.scrapCost = response.data.scrapCost.toFixed(2)
// this.scrapCost = this.countCost(this.scrapList)
this.loseList = response.data.loseList //
this.loseCost = this.countCost(this.loseList)
this.applyList = response.data.relations
this.applyList.forEach((item) => {
item.leaseCost = Number(item.leaseCost)
item.repairCost = Number(item.repairCost)
item.scrapCost = Number(item.scrapCost)
item.loseCost = Number(item.loseCost)
item.cost =
Number(item.leaseCost) +
Number(item.repairCost) +
Number(item.scrapCost) +
Number(item.loseCost) +
Number(item.addCost) -
Number(item.subCost)
})
// this.applyList.forEach(item=>{
// item.cost = Number(item.leaseCost)+Number(item.repairCost)+Number(item.scrapCost)+Number(item.loseCost)+Number(item.addCost)-Number(item.subCost);
// })
// let costSum = Number(this.leaseCost)+Number(this.repairCost)+Number(this.scrapCost)+Number(this.loseCost);
this.costAll = response.data.cost
let costSum =
Number(this.leaseCost) +
Number(this.repairCost) +
Number(this.scrapCost) +
Number(this.loseCost)
this.costAll = costSum
this.subCostFlag = costSum
})
},
//1
countCost(list) {
let arrCost = 0
list.forEach((item) => {
arrCost = arrCost + Number(item.costs)
// console.log(arrCost)
})
// console.log(arrCost)
return arrCost.toFixed(2)
},
//
handleExame() {
this.applyVisible = true
},
// countNum(row){
// row.cost = Number(row.leaseCost)+Number(row.repairCost)+Number(row.scrapCost)+Number(row.loseCost)+Number(row.addCost)-Number(row.subCost)
// },
//
submitListForm() {
// let costAll = 0
// this.applyList.forEach(item=>{
// costAll=costAll+item.cost
// })
// console.log(costAll)
let param = {
id: this.Id,
status: this.aform.status,
remark: this.aform.remark,
}
console.log(param)
settlementReview(param).then((res) => {
console.log(res)
if (res.code == 200) {
this.$tab.closeOpenPage({
path: '/cost/cost/costList',
})
// arrCost += parseInt(item.costs)
console.log(item)
if (item.partType != 0 && item.scrapType != 0) {
arrCost = arrCost + Number(item.costs)
}
})
return arrCost.toFixed(2)
},
//el-table-
getSummaries(param) {
const { columns, data } = param
const sums = []
columns.forEach((column, index) => {
if (index === 9) {
sums[index] = '最终费用'
return
}
const values = data.map((item) => Number(item[column.property]))
// amount
if (column.property === 'cost') {
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] += ' ';
} else {
sums[index] = '---'
}
}
})
return sums
},
countNum(row) {
row.cost =
Number(row.leaseCost) +
Number(row.repairCost) +
Number(row.scrapCost) +
Number(row.loseCost) +
Number(row.addCost || 0) -
Number(row.subCost || 0)
},
//
handleBack() {
this.$emit('goBackPage')
// this.$tab.closeOpenPage({
// path: '/cost/cost/costList',
// path: '/cost/costApplyList',
// query: {
// isEdit: true,
// },
// })
},
},
/** 导出按钮操作 */
//
handleExport1() {
this.downloadJson(
'material/sltAgreementInfo/exportLease',
JSON.stringify(this.rowData),
const params = this.rowData
this.download(
'material/slt_agreement_info/exportLease',
{...params,},
`租赁费用明细_${new Date().getTime()}.xlsx`,
)
},
//
handleExport2() {
this.downloadJson(
'material/sltAgreementInfo/exportLose',
JSON.stringify(this.rowData),
const params = this.rowData
this.download(
'material/slt_agreement_info/exportLose',
{...params,},
`丢失费用明细_${new Date().getTime()}.xlsx`,
)
},
//
handleExport3() {
this.downloadJson(
'material/sltAgreementInfo/exportRepair',
JSON.stringify(this.rowData),
const params = this.rowData
this.download(
'material/slt_agreement_info/exportRepair',
{...params,},
`维修费用明细_${new Date().getTime()}.xlsx`,
)
},
//
handleExport4() {
this.downloadJson(
'material/sltAgreementInfo/exportScrap',
JSON.stringify(this.rowData),
const params = this.rowData
this.download(
'material/slt_agreement_info/exportScrap',
{...params,},
`报废费用明细_${new Date().getTime()}.xlsx`,
)
// this.downloadJson(
// 'material/slt_agreement_info/exportScrap',
// JSON.stringify(this.rowData),
// `_${new Date().getTime()}.xlsx`,
// )
},
handleExportAll() {
this.handleExport1()
this.handleExport2()
this.handleExport3()
this.handleExport4()
const params = this.rowData
this.download(
'material/slt_agreement_info/exportAll',
{...params,},
`全部费用明细_${new Date().getTime()}.xlsx`,
)
},
},
}
@ -333,4 +393,84 @@ export default {
width: 80px !important;
margin-bottom: 10px;
}
.tabelAllTop {
display: flex;
border: 1px solid #dfe6ec;
width:100%;
height:50px;
background-color: #f8f8f9;
border-left: none;
border-bottom: none;
.costTop {
display: flex;
padding: 5px;
border-left: 1px solid #dfe6ec;
align-items: center;
text-align: center;
justify-content: center; /* 将内容对齐到中间 */
width:100%;
font-weight: bold; /* 添加字体加粗样式 */
}
}
.tabelAllTopUnit {
display: flex;
border: 1px solid #dfe6ec;
width:100%;
height:50px;
background-color: #f8f8f9;
border-bottom: none;
.costTopUnit {
display: flex;
padding: 5px;
width:21.4%;
border-left: none;
align-items: center;
text-align: center;
justify-content: center; /* 将内容对齐到中间 */
}
.costRightUnit {
display: flex;
padding: 5px;
border-left: 1px solid #dfe6ec;
text-align: center;
align-items: center;
width:100%;
justify-content: center; /* 将内容对齐到中间 */
// padding-left: 20px; /* */
}
}
.tabelAll {
display: flex;
border: 1px solid #dfe6ec;
width:100%;
border-bottom: 1px solid #dfe6ec;
border-top: none;
margin-bottom: 15px;
}
.tabelAllBottom {
display: flex;
border: 1px solid #dfe6ec;
width:100%;
border-bottom: 1px solid #dfe6ec;
border-top: none;
}
.columnAll {
flex: 1;
padding: 5px;
border-left: 1px solid #dfe6ec;
text-align: right;
width:100%;
justify-content: flex-end; /* 将内容对齐到右侧 */
margin-right: 60px; /* 添加右边距 */
}
.columnAllNum {
padding: 5px;
text-align: center;
width:21.4%;
border-left: none;
}
/* 最后一列无右边框 */
.tabelAll .column:last-child {
border-right: none;
}
</style>

View File

@ -44,10 +44,11 @@
<el-form-item label="结算状态" prop="sltStatus">
<el-select v-model="queryParams.sltStatus" placeholder="请选择结算状态" clearable filterable>
<el-option
v-for="item in statusList"
:key="item.id"
:label="item.name"
:value="item.id"
v-for="dict in dict.type.cost_status"
:key="dict.value"
:label="dict.label"
v-if="dict.value !== '0'"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
@ -65,8 +66,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table v-loading="loading" :data="tableList" >
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{
@ -74,21 +74,31 @@
}}</span>
</template>
</el-table-column>
<el-table-column label="结算单编号" align="center" prop="code" :show-overflow-tooltip="true"/>
<el-table-column label="结算单编号" align="center" prop="agreementCode" :show-overflow-tooltip="true"/>
<el-table-column label="结算单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="结算工程" align="center" prop="projectName" :show-overflow-tooltip="true"/>
<el-table-column label="合计费用" align="center" prop="cost" :show-overflow-tooltip="true"/>
<el-table-column label="结算状态" align="center" prop="status" :show-overflow-tooltip="true">
<el-table-column label="合计费用(元)" align="center" prop="costs" :show-overflow-tooltip="true">
<template slot-scope="scope" v-if="scope.row.costs != null && scope.row.costs!=''">
{{ scope.row.costs.toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="审批人" align="center" prop="auditor" :show-overflow-tooltip="true"/>
<el-table-column label="审批时间" align="center" prop="auditTime" :show-overflow-tooltip="true"/>
<el-table-column label="结算状态" align="center" prop="sltStatus" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.cost_status" :value="scope.row.sltStatus"/>
</template>
<!-- <template slot-scope="scope">
<span v-if="scope.row.status == '0'">待审核</span>
<span v-if="scope.row.status == '1'">审核通过</span>
<span v-if="scope.row.status == '2'">审核驳回</span>
</template>
</template> -->
</el-table-column>
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="normal" icon="el-icon-search" @click="handleView(scope.row)">查看</el-button>
<el-button size="mini" type="primary" icon="el-icon-edit"
@click="handleExame(scope.row)" v-if="scope.row.status == '0'" >审批</el-button>
@click="handleExame(scope.row)" v-if="scope.row.sltStatus == '1'" >审批</el-button>
<!-- <el-button size="mini" type="danger" icon="el-icon-delete"
@click="handleDelete(scope.row)"
>撤销申请</el-button> -->
@ -104,6 +114,24 @@
@pagination="getList"
/>
<!-- 审批弹窗 -->
<el-dialog title="结算审批" :visible.sync="applyVisible" width="650px" append-to-body>
<el-form ref="aform" :model="aform" label-width="120px">
<el-form-item label="结算审批" prop="status">
<el-radio v-model="aform.status" label="2">通过</el-radio>
<el-radio v-model="aform.status" label="3">不通过</el-radio>
</el-form-item>
<el-form-item label="原因" prop="remark">
<el-input v-model="aform.remark" maxlength="100" placeholder="请输入"
show-word-limit size="small" style="width: 350px" type="textarea" rows="4"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="submitListForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 协议单弹窗 -->
<el-dialog :visible.sync="openPrint" width="1100px" append-to-body>
<div style="height: 600px; overflow-y: scroll">
@ -198,13 +226,13 @@ import {
getUnitList,
getAgreementInfoById,
} from '@/api/back/index.js'
import { getSltExam } from '@/api/cost/cost'
import { getSltList,costExamine } from '@/api/cost/cost'
import vueEasyPrint from "vue-easy-print";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: 'CostApplyList',
dicts: [],
dicts: ['cost_status'],
components: { Treeselect },
data() {
return {
@ -232,11 +260,11 @@ export default {
value: 'id',
// multiple: true,//false
},
statusList: [
{ id: '0', name: '待审核' },
{ id: '1', name: '审核通过' },
{ id: '2', name: '审核驳回' },
], //
// statusList: [
// { id: '0', name: '' },
// { id: '1', name: '' },
// { id: '2', name: '' },
// ], //
//
tableList: [],
//
@ -251,13 +279,19 @@ export default {
agreementId: null,
agreementCode: null,
},
openPrint:false
openPrint: false,
//
aform: { status: '2' },
//
applyVisible: false,
id: '',
agreementIdTemp: '',
}
},
created() {
// this.getList()
this.GetUnitData()
this.GetProData()
this.getList()
},
methods: {
/** 转换菜单数据结构 */
@ -341,7 +375,7 @@ export default {
/** 查询列表 */
getList() {
this.loading = true
getSltExam(this.queryParams).then((response) => {
getSltList(this.queryParams).then((response) => {
this.tableList = response.rows
this.total = response.total
this.loading = false
@ -368,17 +402,43 @@ export default {
this.resetForm('queryForm')
this.handleQuery()
},
//
handleExame(row) {
let arr = [row]
this.$emit("goDetail",JSON.stringify(arr),row.id);
//
handleView(row) {
let arr = row
console.log('2222222222222',row)
this.$emit("goDetail",JSON.stringify(arr));
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item)
this.single = selection.length != 1
this.multiple = !selection.length
//
handleExame(row) {
this.id = row.id
this.agreementIdTemp = row.agreementId
this.applyVisible = true
},
//
submitListForm() {
let param = {
id: this.id,
status: this.aform.status,
remark: this.aform.remark,
agreementId: this.agreementIdTemp,
}
costExamine(param).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("审批成功");
this.getList();
this.applyVisible = false;
} else {
this.$modal.msgError(res.msg);
}
}).catch(() => {});
},
//
cancel() {
this.applyVisible = false;
this.aform = { status: '2' };
},
openPrintDialog(){
this.openPrint = true
},
@ -387,25 +447,6 @@ export default {
this.$refs.remarksPrintRef.print();
},
/** 删除按钮操作 */
handleDelete(row) {
// const agreementId = row.agreementId;
// let param = {
// agreementId:row.agreementId+''
// }
// this.$modal.confirm('').then(function() {
// return removeAgreement(param);
// }).then(() => {
// this.getList();
// this.$modal.msgSuccess("");
// }).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
// this.download('material/agreementInfo/export', {
// ...this.queryParams
// }, `_${new Date().getTime()}.xlsx`)
},
},
}
</script>

View File

@ -8,8 +8,7 @@
/>
<component
:is="isShowComponent"
:rowData="rowData"
:rowId="rowId"
:row="rowData"
@goDetail="goDetail"
@goBackPage="goBack"
/>
@ -30,16 +29,14 @@ export default {
return {
isShowComponent: 'ExamHome',
pageContent: '',
rowId:"",
rowData: null,
isView: false,
}
},
methods: {
// 退
goDetail(rowData,id) {
goDetail(rowData) {
this.rowData = rowData;
this.rowId = id;
this.pageContent = '结算详情';
this.isShowComponent = 'ExamDetail';
},

View File

@ -191,7 +191,7 @@
type="primary"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['ma:partType:edit']"
v-hasPermi="['ma:type:edit']"
>
修改
</el-button>
@ -200,7 +200,7 @@
type="warning"
icon="el-icon-delete-solid"
@click="handleDelete(scope.row)"
v-hasPermi="['ma:partType:remove']"
v-hasPermi="['ma:type:remove']"
>
删除
</el-button>

View File

@ -149,7 +149,7 @@
font-size: 16px;
"
>
机具设备到货验收单
机具配件到货验收单
</div>
<div
class="info"
@ -222,7 +222,7 @@
align="center"
prop="unitName"
/>
<el-table-column label="配送信息" align="center">
<el-table-column label="验收情况" align="center">
<el-table-column
label="采购数量"
align="center"
@ -233,17 +233,6 @@
align="center"
prop="checkResult"
/>
<el-table-column label="质保质量" align="center">
<el-table-column
label="实收份数"
align="center"
prop="checkNum"
/>
<el-table-column
label="符合要求"
align="center"
/>
</el-table-column>
</el-table-column>
<el-table-column
label="备注"

View File

@ -236,7 +236,7 @@
class="title"
style="text-align: center; font-weight: 600; font-size: 16px"
>
机具设备到货验收单
机具配件到货验收单
</div>
<div
class="info"
@ -296,7 +296,7 @@
prop="specificationType"
/>
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="配送信息" align="center">
<el-table-column label="验收情况" align="center">
<el-table-column
label="到货数量"
align="center"
@ -307,18 +307,6 @@
align="center"
prop="purchaseNum"
/>
<el-table-column label="质保质量" align="center">
<el-table-column
label="实收份数"
align="center"
prop="purchaseNum"
/>
<el-table-column
label="符合要求"
align="center"
prop="purchaseNum"
/>
</el-table-column>
</el-table-column>
<el-table-column label="备注" align="center" prop="unitName" />