仪器收费项目对照
This commit is contained in:
parent
8a286cb65f
commit
918487e265
39
src/api/liswork/xtwh/xmFeeinstrApi.ts
Normal file
39
src/api/liswork/xtwh/xmFeeinstrApi.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
//仪器收费项目对照
|
||||||
|
// @ts-ignore
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//查询已分配数据
|
||||||
|
export function queryService(params:any){
|
||||||
|
return request({
|
||||||
|
url: '/feeinstr/query',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询未分配的项目数据
|
||||||
|
export function queryXmService(params:any){
|
||||||
|
return request({
|
||||||
|
url: '/feeinstr/queryXm',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增数据
|
||||||
|
export function addService(params:any){
|
||||||
|
return request({
|
||||||
|
url: '/feeinstr/add',
|
||||||
|
method: 'post',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除数据
|
||||||
|
export function delService(params:any){
|
||||||
|
return request({
|
||||||
|
url: '/feeinstr/del',
|
||||||
|
method: 'delete',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -41,4 +41,13 @@ export function paramTree(query?: Object) {
|
|||||||
method: 'get',
|
method: 'get',
|
||||||
params: query,
|
params: query,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询某个参数
|
||||||
|
export function queryOneService(yq: string,xxdh: string) {
|
||||||
|
return request({
|
||||||
|
url: '/param/queryOne',
|
||||||
|
method: 'get',
|
||||||
|
params: {yq,xxdh}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
120
src/views/liswork/xtwh/xmFeeInstr/index.vue
Normal file
120
src/views/liswork/xtwh/xmFeeInstr/index.vue
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<!--仪器收费项目对照-->
|
||||||
|
<el-row>
|
||||||
|
<el-form ref="form" :model="formData" label-width="80px" inline>
|
||||||
|
<el-form-item label="仪器" prop="yq">
|
||||||
|
<YQSelectTable v-model:data="formData.yq" width="200px" @getDataValue="getList"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目检索" prop="item">
|
||||||
|
<el-input placeholder="名称,简拼" v-model="formData.item" @change="getList"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" @click="onQueryClick">查询</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<span>说明:双击左侧列表,能删除对照数据,双击右边列表能新增数据到对照当中</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="5">
|
||||||
|
<CustomTable ref="tableRefLeft" :data="dataListLeft" :columns="columnsLeft" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||||
|
:config="tableConfig" @row-dblclick="onDBClickLeft"/>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="19">
|
||||||
|
<CustomTable ref="tableRefRight" :data="dataListRight" :columns="columnsRight" :enable-column-drag="true" @column-drag-end="handleColumnDragEnd"
|
||||||
|
:config="tableConfig" @row-dblclick="onDBClickRight"/>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import CustomTable from '@/components/elTable/index.vue'
|
||||||
|
import YQSelectTable from '@/components/SelectTable/YQSelectTable/index.vue';
|
||||||
|
import { queryService,queryXmService,addService,delService } from '@/api/liswork/xtwh/xmFeeinstrApi';
|
||||||
|
import { queryOneService } from '@/api/system/parameter'
|
||||||
|
import { ElMessage } from 'element-plus';
|
||||||
|
|
||||||
|
const tableConfig = ref({
|
||||||
|
border: true, // 边框
|
||||||
|
height: '76vh', // 高度
|
||||||
|
highlightCurrentRow: true, // 高亮当前行
|
||||||
|
// cellStyle: cellStyleHd
|
||||||
|
})
|
||||||
|
|
||||||
|
//退拽属性
|
||||||
|
const handleColumnDragEnd = (data: any) => {
|
||||||
|
// 更新列配置
|
||||||
|
columnsLeft.value = data.columns;
|
||||||
|
columnsRight.value = data.columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
const columnsLeft = ref([
|
||||||
|
{ prop: 'sfxmmc', label: '当前仪器对应的收费项目', visible: true, align: 'center', width: 300 },
|
||||||
|
{ prop: 'yq', label: '仪器', visible: false, align: 'center', width: 100 },
|
||||||
|
]);
|
||||||
|
const columnsRight = ref([
|
||||||
|
{ prop: 'xmlb', label: '类别', visible: true, align: 'center', width: 100 },
|
||||||
|
{ prop: 'sfxmdh', label: '收费项目代号', visible: true, align: 'center', width: 200 },
|
||||||
|
{ prop: 'sfxmmc', label: '收费项目名称', visible: true, align: 'center', width: 300 },
|
||||||
|
{ prop: 'dj', label: '单价', visible: true, align: 'center', width: 100 },
|
||||||
|
{ prop: 'cp_yq', label: '分配了仪器', visible: true, align: 'center', width: 400 }
|
||||||
|
]);
|
||||||
|
|
||||||
|
const dataListLeft = ref([
|
||||||
|
{'sfxmdh':'','yq':''}
|
||||||
|
])
|
||||||
|
const dataListRight = ref([])
|
||||||
|
const formData = ref({
|
||||||
|
yq: '',
|
||||||
|
item: ''
|
||||||
|
})
|
||||||
|
|
||||||
|
//刷新数据
|
||||||
|
const getList = async () => {
|
||||||
|
if(!formData.value.yq) formData.value.yq = ''
|
||||||
|
let res = await queryService({yq: formData.value.yq});
|
||||||
|
dataListLeft.value = res.data;
|
||||||
|
res = await queryOneService('HISOPT','sp_gyxmyljg')
|
||||||
|
let param = res.data.value
|
||||||
|
//先写固定值,后面再改
|
||||||
|
if(param && param !== ''){
|
||||||
|
param = '1'
|
||||||
|
}else{
|
||||||
|
param = '1'
|
||||||
|
}
|
||||||
|
res = await queryXmService({yljg: param,yq: formData.value.yq,queryValue: formData.value.item});
|
||||||
|
dataListRight.value = res.data;
|
||||||
|
};
|
||||||
|
|
||||||
|
const onDBClickRight = async (row:any)=> {
|
||||||
|
//新增数据
|
||||||
|
await addService({sfxmdh:row.sfxmdh,yq: formData.value.yq})
|
||||||
|
ElMessage.success('新增成功!')
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const onDBClickLeft = async (row:any) => {
|
||||||
|
//删除数据
|
||||||
|
await delService({yq: formData.value.yq,sfxmdh: row.sfxmdh})
|
||||||
|
ElMessage.success('删除成功!')
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
const onQueryClick = () => {
|
||||||
|
if(!formData.value.yq) {
|
||||||
|
ElMessage.error('请先选择仪器!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user