debug
This commit is contained in:
parent
d082c08888
commit
f1aa60fbf6
10
jsconfig.json
Normal file
10
jsconfig.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
|
@ -72,12 +72,12 @@ export function cancelPrice(priceId) {
|
|||
}
|
||||
|
||||
// 审核单价
|
||||
export function verifyPrice(priceId, pass) {
|
||||
export function verifyPrice(priceIds, pass) {
|
||||
return request({
|
||||
url: `/yh/price/verify`,
|
||||
method: 'put',
|
||||
data: {
|
||||
priceId,
|
||||
priceIds,
|
||||
pass
|
||||
}
|
||||
})
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
ref="check"
|
||||
:multiple="multiple"
|
||||
:init-select="initSelect"
|
||||
:query="query"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
<template #footer>
|
||||
|
|
|
@ -82,7 +82,7 @@ export default {
|
|||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.submitLoading = true;
|
||||
verifyPrice(this.priceId, pass).then(res => {
|
||||
verifyPrice([this.priceId], pass).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success(pass ? '通过成功' : '驳回成功');
|
||||
this.show = false;
|
||||
|
|
|
@ -154,6 +154,16 @@
|
|||
v-has-permi="['yh:price:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-s-check"
|
||||
size="mini"
|
||||
@click="handleBatchVerify(true)"
|
||||
v-has-permi="['yh:price:verify']"
|
||||
>批量通过</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -165,6 +175,8 @@
|
|||
@sort-change="onSortChange"
|
||||
v-on="$listeners"
|
||||
ref="table"
|
||||
@row-click="handleRowClick"
|
||||
:row-class-name="tableRowClassName"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<template v-for="column of showColumns">
|
||||
|
@ -352,7 +364,8 @@ import {
|
|||
getPrice,
|
||||
listPrice,
|
||||
submitPrice,
|
||||
updatePrice
|
||||
updatePrice,
|
||||
verifyPrice
|
||||
} from "@/api/yh/price";
|
||||
import {$showColumns} from '@/utils/mixins';
|
||||
import DeptTreeSelect from "@/components/Business/Dept/DeptTreeSelect.vue";
|
||||
|
@ -480,7 +493,8 @@ export default {
|
|||
name: [
|
||||
{ required: true, message: "工序不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
},
|
||||
currentRow: null, // 新增:当前选中行
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -493,6 +507,19 @@ export default {
|
|||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
handleBatchVerify(pass) {
|
||||
this.$confirm(`确定要${pass ? '通过' : '驳回'} ID 为 ${this.ids.join(',')} 的单价吗?`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
verifyPrice(this.ids, pass).then(res => {
|
||||
this.$message.success(pass ? '通过成功' : '驳回成功');
|
||||
}).finally(() => {
|
||||
this.getList();
|
||||
})
|
||||
})
|
||||
},
|
||||
formatFraction,
|
||||
/** 当排序按钮被点击时触发 **/
|
||||
onSortChange(column) {
|
||||
|
@ -566,6 +593,8 @@ export default {
|
|||
this.ids = selection.map(item => item.priceId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
// 更新当前选中行
|
||||
this.currentRow = selection.length === 1 ? selection[0] : null;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
|
@ -682,7 +711,35 @@ export default {
|
|||
this.download('yh/price/export', {
|
||||
...this.queryParams
|
||||
}, `单价列表_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
// 新增:处理行点击
|
||||
handleRowClick(row) {
|
||||
// 切换当前行的选中状态
|
||||
this.$refs.table.toggleRowSelection(row);
|
||||
this.currentRow = row;
|
||||
},
|
||||
// 新增:设置行样式
|
||||
tableRowClassName({row}) {
|
||||
if (this.currentRow === row) {
|
||||
return 'selected-row';
|
||||
}
|
||||
return '';
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// 原有样式保持不变
|
||||
|
||||
// 新增:选中行样式
|
||||
:deep(.selected-row) {
|
||||
background-color: #f5f7fa !important;
|
||||
}
|
||||
|
||||
// 新增:鼠标悬停样式
|
||||
:deep(.el-table__body tr:hover > td) {
|
||||
background-color: #f5f7fa !important;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user