Merge branch 'dev' of http://60.209.125.238:20010/lijingjia/ds-wms-client-web into dev
commit
35f62fc3cb
@ -1,118 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable @register="registerTable">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
icon: 'ant-design:profile-outlined',
|
||||
tooltip: '详情',
|
||||
onClick: handleAudit.bind(null, record),
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { defineExpose, defineComponent, onMounted, ref } from 'vue'
|
||||
import { BasicTable, useTable, TableAction, SorterResult } from '/@/components/Table'
|
||||
import { ApiBasicsList, ApiExistList } from './api'
|
||||
import { useModal } from '/@/components/Modal'
|
||||
import TenantAuditStepModal from './TenantAuditStepModal.vue'
|
||||
import { columns, searchFormSchema } from './columns'
|
||||
const [registerModal, { openModal }] = useModal()
|
||||
const [registerTable, { reload, getForm, getPaginationRef, getSelectRows }] = useTable({
|
||||
// title: '流程设计模板',
|
||||
maxHeight: 300,
|
||||
rowSelection: { type: 'checkbox' },
|
||||
// rowSelection: { type: 'radio' },
|
||||
api: async (p) => {
|
||||
const res: API.DataResult = await ApiBasicsList(p)
|
||||
const res2: API.DataResult = await ApiExistList()
|
||||
let data = []
|
||||
res.data.forEach((item) => {
|
||||
let type = true
|
||||
res2.data.forEach((item2) => {
|
||||
if (item.id == item2) {
|
||||
type = false
|
||||
}
|
||||
})
|
||||
if (type) {
|
||||
data.push(item)
|
||||
}
|
||||
})
|
||||
console.log(data)
|
||||
|
||||
return new Promise((resolve) => {
|
||||
resolve({ data: [...data] })
|
||||
})
|
||||
},
|
||||
beforeFetch: () => {
|
||||
var currentPageInfo: any = getPaginationRef()
|
||||
var data = getForm().getFieldsValue()
|
||||
const postParam: API.PageRequest = {
|
||||
queryCondition: '',
|
||||
pageCondition: {
|
||||
pageIndex: currentPageInfo.current,
|
||||
pageSize: currentPageInfo.pageSize,
|
||||
sortConditions: [],
|
||||
},
|
||||
}
|
||||
let condition: API.ConditionItem[] = []
|
||||
if (!!data.CtnName) {
|
||||
condition.push({
|
||||
FieldName: 'CtnName',
|
||||
FieldValue: data.CtnName,
|
||||
ConditionalType: 1,
|
||||
})
|
||||
}
|
||||
postParam.queryCondition = JSON.stringify(condition)
|
||||
return postParam
|
||||
},
|
||||
columns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
},
|
||||
pagination: true,
|
||||
bordered: true,
|
||||
useSearchForm: true,
|
||||
showTableSetting: true,
|
||||
tableSetting: {
|
||||
redo: false,
|
||||
size: false,
|
||||
setting: false,
|
||||
fullScreen: false,
|
||||
},
|
||||
// actionColumn: {
|
||||
// width: 80,
|
||||
// title: '操作',
|
||||
// dataIndex: 'action',
|
||||
// fixed: undefined,
|
||||
// },
|
||||
})
|
||||
|
||||
function handleCreate() {
|
||||
openModal(true, {
|
||||
record: {},
|
||||
})
|
||||
}
|
||||
function handleAudit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
})
|
||||
}
|
||||
function handleSuccess() {
|
||||
reload()
|
||||
}
|
||||
function getSelectData() {
|
||||
return getSelectRows()
|
||||
}
|
||||
defineExpose({ getSelectData })
|
||||
</script>
|
Loading…
Reference in New Issue