往来单位 自动费用模板 调整

szh-new
张同海 3 months ago
parent ee88976519
commit a7d65f8b4a

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

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

@ -9,7 +9,7 @@ import {
getCountryList,
} from '/@/api/common'
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 { useOptionsStore } from '/@/store/modules/options'
import { checkPermissions } from '/@/hooks/Permissions/index'
@ -878,3 +878,34 @@ export const infoformSchema: FormSchema[] = [
},
},
]
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>
<script lang="ts" setup>
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 { GetDataRuleListByPermission } from './api'
const props = defineProps({
@ -43,7 +43,7 @@
resolve({ data: [...res.data] })
})
},
columns,
columns: indexcolumns,
isTreeTable: false,
pagination: false,
striped: true,

Loading…
Cancel
Save