sunzehua 3 months ago
commit 9b9c92e6d8

@ -6,8 +6,8 @@ enum Api {
edit = '/feeApi/FeeCustTemplate/Edit', edit = '/feeApi/FeeCustTemplate/Edit',
info = '/feeApi/FeeCustTemplate/Edit', info = '/feeApi/FeeCustTemplate/Edit',
delete = '/feeApi/FeeCustTemplate/Delete', delete = '/feeApi/FeeCustTemplate/Delete',
GenerateFees = '/feeApi/FeeCustTemplate/GenerateFees',
GetColumns = '/mainApi/Common/GetColumnsByClient', GetColumns = '/mainApi/Common/GetColumnsByClient',
DeleteDetails = '/feeApi/FeeCustTemplate/DeleteDetails',
} }
// 根据表明 查询数据 // 根据表明 查询数据
export function getColumns(query: { id: string }) { export function getColumns(query: { id: string }) {
@ -50,10 +50,10 @@ export function ApiDel(data: PageRequest) {
}) })
} }
// 生成订单费用 (Auth) // 根据ID删除明细 (Auth)
export function ApiGenerateFees(data: PageRequest) { export function DeleteDetails(data: PageRequest) {
return request<DataResult>({ return request<DataResult>({
url: Api.GenerateFees, url: Api.DeleteDetails,
method: 'post', method: 'post',
data data
}) })

@ -11,7 +11,7 @@
<span class="iconfont icon-new_document"></span> <span class="iconfont icon-new_document"></span>
添加 添加
</a-button> </a-button>
<!-- <a-popconfirm <a-popconfirm
title="确定删除当前选中数据?" title="确定删除当前选中数据?"
ok-text="是" ok-text="是"
cancel-text="否" cancel-text="否"
@ -21,7 +21,7 @@
<span class="iconfont icon-shanchu21"></span> <span class="iconfont icon-shanchu21"></span>
删除 删除
</a-button> </a-button>
</a-popconfirm> --> </a-popconfirm>
</div> </div>
</div> </div>
<a-spin :spinning="loading"> <a-spin :spinning="loading">
@ -56,7 +56,7 @@
} from 'vue' } from 'vue'
// //
import { GetFeeCodeSelectList, GetFeeCurrencySelectList } from '/@/api/common' import { GetFeeCodeSelectList, GetFeeCurrencySelectList } from '/@/api/common'
import { getColumns } from './api' import { getColumns, DeleteDetails } from './api'
// import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api' // import { GetFeeTemplateDetailList, BatchDelFeeTemplateDetail } from '../api'
// //
import { feeUnitDict } from '/@/hooks/dict/index' import { feeUnitDict } from '/@/hooks/dict/index'
@ -796,23 +796,28 @@
) )
// //
const deleteRow = async () => { const deleteRow = async () => {
// const ids = [] // list.value.forEach((item: any, index) => {
// if (item.selected) {
// list.value.splice(index, 1)
// }
// })
const ids = []
list.value.forEach((item: any, index) => { list.value.forEach((item: any, index) => {
if (item.selected) { if (item.selected) {
list.value.splice(index, 1) ids.push(item.id)
} }
}) })
// if (ids.length) { if (ids.length) {
// loading.value = true loading.value = true
// const data = await BatchDelFeeTemplateDetail({ ids }) const data = await DeleteDetails({ ids })
// loading.value = false loading.value = false
// createMessage.success(data.message) createMessage.success(data.message)
// } }
// const res = list.value.filter((item) => { const res = list.value.filter((item) => {
// return !item.selected return !item.selected
// }) })
// list.value = res list.value = res
// hotTb.value.hotInstance.loadData(res) hotTb.value.hotInstance.loadData(res)
} }
// idid // idid
// watch( // watch(

@ -96,12 +96,17 @@
}) })
if (type) { if (type) {
permissionId.value = checkedKeys[0] permissionId.value = checkedKeys[0]
InfoId.value = ''
RefdataruleInfo.value.resetFields()
RefdataruleInfo.value.setFieldsValue({ permissionId: permissionId.value })
} }
} }
const RefdataruleIndex = ref() const RefdataruleIndex = ref()
const RefdataruleInfo = ref() const RefdataruleInfo = ref()
// //
function Create() { function Create() {
console.log(permissionId.value)
RefdataruleIndex.value.clearSelectedRowKeys() RefdataruleIndex.value.clearSelectedRowKeys()
RefdataruleInfo.value.resetFields() RefdataruleInfo.value.resetFields()
RefdataruleInfo.value.setFieldsValue({ permissionId: permissionId.value }) RefdataruleInfo.value.setFieldsValue({ permissionId: permissionId.value })
@ -113,7 +118,6 @@
const InfoId = ref('') const InfoId = ref('')
// //
function ChangeSelect(data) { function ChangeSelect(data) {
console.log(data[0])
InfoId.value = data[0] InfoId.value = data[0]
} }
/** /**
@ -121,12 +125,18 @@
*/ */
function reset() { function reset() {
treeData.value = [] treeData.value = []
permissionId.value = ''
selectedKeys.value = []
expandedKeys.value = []
} }
/** /**
* 提交 * 提交
*/ */
async function handleSubmit(exit) { async function handleSubmit(exit) {
RefdataruleInfo.value.handleSave() RefdataruleInfo.value.handleSave()
if (exit) {
closeModal()
}
} }
</script> </script>

@ -9,7 +9,7 @@ import {
getCountryList, getCountryList,
} from '/@/api/common' } from '/@/api/common'
import { GetTablesByClient } from '/@/views/baseinfo/clientflowtemplate/api' import { GetTablesByClient } from '/@/views/baseinfo/clientflowtemplate/api'
import { getTables, getColumns, getClientPermissionList } from '/@/api/system/role' import { getColumns, getClientPermissionList } from '/@/api/system/role'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { useOptionsStore } from '/@/store/modules/options' import { useOptionsStore } from '/@/store/modules/options'
import { checkPermissions } from '/@/hooks/Permissions/index' import { checkPermissions } from '/@/hooks/Permissions/index'
@ -35,7 +35,6 @@ const ClientPermissionData = []
let ClientPermissionList = [] let ClientPermissionList = []
const res2: API.DataResult = await getClientPermissionList() const res2: API.DataResult = await getClientPermissionList()
if (res2.succeeded) { if (res2.succeeded) {
console.log(res2)
ClientPermissionList = res2.data ClientPermissionList = res2.data
res2.data.forEach((item) => { res2.data.forEach((item) => {
ClientPermissionData.push({ ClientPermissionData.push({
@ -164,9 +163,9 @@ export const searchFormSchema: FormSchema[] = [
showSearch: true, showSearch: true,
filterOption: (input: string, option: any) => { filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
} },
} }
} },
}, },
{ {
field: 'deptId', field: 'deptId',
@ -180,7 +179,7 @@ export const searchFormSchema: FormSchema[] = [
labelField: 'orgName', labelField: 'orgName',
valueField: 'id', valueField: 'id',
resultField: 'data', resultField: 'data',
immediate: false immediate: false,
} }
}, },
}, },
@ -720,12 +719,9 @@ export const infoformSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: async (e: ChangeEvent, a) => { onChange: async (e: ChangeEvent, a) => {
console.log(e, a)
const res: API.DataResult = await getColumns({ tableViewName: e }) const res: API.DataResult = await getColumns({ tableViewName: e })
fields.value = [] fields.value = []
if (res.succeeded) { if (res.succeeded) {
console.log(res)
const Arr = [ const Arr = [
{ {
dbColumnName: '{loginRole}', dbColumnName: '{loginRole}',
@ -766,8 +762,6 @@ export const infoformSchema: FormSchema[] = [
conditions: [], conditions: [],
} }
} }
console.log(fields.value, 'fields.value')
} }
}, },
} }
@ -805,10 +799,8 @@ export const infoformSchema: FormSchema[] = [
}, },
// xxxx props // xxxx props
onChange: (e) => { onChange: (e) => {
console.log(e)
ClientPermissionList.forEach((item) => { ClientPermissionList.forEach((item) => {
if (item.id == e) { if (item.id == e) {
console.log(item)
formModel.permissionEntity = item.permissionEntity formModel.permissionEntity = item.permissionEntity
} }
}) })
@ -882,16 +874,38 @@ export const infoformSchema: FormSchema[] = [
return h(ConditionFilter, { return h(ConditionFilter, {
modelValue: model[field], modelValue: model[field],
filterFields: fields.value, filterFields: fields.value,
// onChange: (e: ChangeEvent) => {
// console.log(e);
// model[field] = e.target.value;
// },
}) })
}, },
// componentProps: { },
// onChange: (e: ChangeEvent) => { ]
// console.log('change', e);
// }, export const indexcolumns: BasicColumn[] = [
// }, {
title: '权限描述',
dataIndex: 'description',
width: 200,
},
{
title: '排序号',
dataIndex: 'orderNo',
width: 150,
},
{
title: '状态',
dataIndex: 'status',
width: 100,
customRender: ({ text }) => {
if (text === 0) {
return <Tag color="success"></Tag>
} else if (text === 1) {
return <Tag color="red"></Tag>
}
return text
},
},
{
title: '备注',
dataIndex: 'note',
width: 150,
}, },
] ]

@ -18,7 +18,7 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { BasicTable, useTable, TableAction } from '/@/components/Table' import { BasicTable, useTable, TableAction } from '/@/components/Table'
import { columns } from '/@/views/system/datarule/columns.tsx' import { indexcolumns } from './columns.tsx'
import { watch } from 'vue' import { watch } from 'vue'
import { GetDataRuleListByPermission } from './api' import { GetDataRuleListByPermission } from './api'
const props = defineProps({ const props = defineProps({
@ -43,7 +43,7 @@
resolve({ data: [...res.data] }) resolve({ data: [...res.data] })
}) })
}, },
columns, columns: indexcolumns,
isTreeTable: false, isTreeTable: false,
pagination: false, pagination: false,
striped: true, striped: true,
@ -62,7 +62,6 @@
}, },
}) })
function handleCreate() { function handleCreate() {
console.log('新增')
emit('Create') emit('Create')
} }
defineExpose({ defineExpose({

@ -22,8 +22,15 @@
watch( watch(
() => props.InfoId, () => props.InfoId,
(Nval) => { (Nval) => {
rowId.value = Nval if (Nval) {
GetData() rowId.value = Nval
GetData()
} else {
resetFields()
setFieldsValue({
permissionId: props.permissionId,
})
}
}, },
) )
// Emits // Emits

@ -65,7 +65,6 @@
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({ const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
api: async (p) => { api: async (p) => {
const res: API.DataResult = await getUserList(p) const res: API.DataResult = await getUserList(p)
// console.log(items);
return new Promise((resolve) => { return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count }) resolve({ data: [...res.data], total: res.count })
}) })

Loading…
Cancel
Save