|
|
|
|
@ -6,12 +6,10 @@ |
|
|
|
|
@refresh-change="refreshChange" @on-load="onLoad"> |
|
|
|
|
<template #menu-left> |
|
|
|
|
<el-form ref="form" :model="form" label-width="100px" :inline="true"> |
|
|
|
|
<el-form-item label="现执行价格:"> |
|
|
|
|
<el-input v-model="form.name"></el-input> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button type="primary" @click="settlementFn">预结算</el-button> |
|
|
|
|
<el-button type="primary" @click="settlementFn">结算</el-button> |
|
|
|
|
<el-button type="primary" @click="settlementFn('pre')">预结算</el-button> |
|
|
|
|
<el-button type="primary" @click="settlementFn('settle')">结算</el-button> |
|
|
|
|
<el-button type="danger" @click="onSubmit">无需结算</el-button> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
@ -19,17 +17,17 @@ |
|
|
|
|
<template #menu-right> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
<template #menu="scope"> |
|
|
|
|
<template #menu> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
</avue-crud> |
|
|
|
|
<settlementDailog v-if="isOpen" :showDialog="isOpen" @closeDialog="closeDialog"></settlementDailog> |
|
|
|
|
<settlementDailog v-if="isOpen" :showDialog="isOpen" :type="settlementType" :statementList="selectionList" @closeDialog="closeDialog" @refresh="refreshTable"></settlementDailog> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import settlementDailog from './SettlementDailog.vue' |
|
|
|
|
import {getStatement} from "@/api/outsourcingManagement/oemOrderSettlement" |
|
|
|
|
import {getStatement,noSettlementItem} from "@/api/outsourcingManagement/oemOrderSettlement" |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
settlementDailog |
|
|
|
|
@ -44,7 +42,6 @@ export default { |
|
|
|
|
height: 'auto', |
|
|
|
|
calcHeight: 32, |
|
|
|
|
tip: false, |
|
|
|
|
// size: 'medium', |
|
|
|
|
simplePage: true, |
|
|
|
|
searchShow: true, |
|
|
|
|
searchMenuSpan: 6, |
|
|
|
|
@ -52,8 +49,9 @@ export default { |
|
|
|
|
searchIndex: 3, |
|
|
|
|
tree: false, |
|
|
|
|
border: true, |
|
|
|
|
index: true, |
|
|
|
|
index: false, |
|
|
|
|
selection: true, |
|
|
|
|
rowKey: 'wpId', |
|
|
|
|
editBtn: false, |
|
|
|
|
viewBtn: false, |
|
|
|
|
delBtn: false, |
|
|
|
|
@ -68,17 +66,13 @@ export default { |
|
|
|
|
dialogWidth: 640, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
searchEnter: true, |
|
|
|
|
excelBtn: false, |
|
|
|
|
excelBtn: true, |
|
|
|
|
filterBtn: true, |
|
|
|
|
searchShowBtn: false, |
|
|
|
|
columnSort: true, |
|
|
|
|
excelBtn: true, |
|
|
|
|
columnSort: true, |
|
|
|
|
index: false, |
|
|
|
|
showOverflowTooltip: true, |
|
|
|
|
menu: false, |
|
|
|
|
searchLabelPosition: 'left', |
|
|
|
|
searchLabelPosition: 'left', |
|
|
|
|
searchGutter: 24, |
|
|
|
|
searchSpan: 6, |
|
|
|
|
menuAlign: 'left', |
|
|
|
|
@ -211,13 +205,7 @@ export default { |
|
|
|
|
startPlaceholder: '开始时间', |
|
|
|
|
endPlaceholder: '结束时间', |
|
|
|
|
searchOrder:20, |
|
|
|
|
searchRules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入姓名", |
|
|
|
|
trigger: "blur" |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
@ -338,14 +326,43 @@ export default { |
|
|
|
|
total: 0, |
|
|
|
|
}, |
|
|
|
|
isOpen: false, |
|
|
|
|
settlementType: 'settle', |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
settlementFn() { |
|
|
|
|
this.isOpen = true |
|
|
|
|
settlementFn(type) { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.settlementType = type; |
|
|
|
|
this.isOpen = true; |
|
|
|
|
}, |
|
|
|
|
closeDialog() { |
|
|
|
|
this.isOpen = false |
|
|
|
|
this.isOpen = false; |
|
|
|
|
}, |
|
|
|
|
refreshTable() { |
|
|
|
|
this.onLoad(); |
|
|
|
|
}, |
|
|
|
|
onSubmit() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
this.$message.warning('请选择至少一条数据'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm('确定无需结算选中的数据吗?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
noSettlementItem(this.selectionList).then(() => { |
|
|
|
|
this.$message.success('无需结算成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
}).catch(() => { |
|
|
|
|
this.$message.error('无需结算失败'); |
|
|
|
|
}); |
|
|
|
|
}).catch(() => { |
|
|
|
|
// 用户点击取消 |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
@ -361,10 +378,17 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 多选 |
|
|
|
|
selectionChange(list) { |
|
|
|
|
console.log('selectionChange 被调用,选中的数据:', list); |
|
|
|
|
console.log('当前表格数据:', this.data); |
|
|
|
|
this.selectionList = list; |
|
|
|
|
}, |
|
|
|
|
onLoad() { |
|
|
|
|
this.loading = true |
|
|
|
|
// 清空选择状态 |
|
|
|
|
this.selectionList = [] |
|
|
|
|
if (this.$refs.crud) { |
|
|
|
|
this.$refs.crud.clearSelection() |
|
|
|
|
} |
|
|
|
|
getStatement({ |
|
|
|
|
current:this.page.currentPage, |
|
|
|
|
size:this.page.pageSize, |
|
|
|
|
@ -373,6 +397,10 @@ export default { |
|
|
|
|
}).then(res =>{ |
|
|
|
|
this.data = res.data.data.records |
|
|
|
|
this.page.total = res.data.data.total |
|
|
|
|
console.log('返回的数据:', this.data) |
|
|
|
|
if (this.data && this.data.length > 0) { |
|
|
|
|
console.log('第一条数据:', JSON.stringify(this.data[0], null, 2)) |
|
|
|
|
} |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
// this.data = [ |
|
|
|
|
|