|
|
|
@ -1,5 +1,12 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<BasicModal
|
|
|
|
|
v-bind="$attrs"
|
|
|
|
|
:use-wrapper="true"
|
|
|
|
|
title="箱状态批量维护"
|
|
|
|
|
width="55%"
|
|
|
|
|
@register="registerModal"
|
|
|
|
|
@ok="handleSave"
|
|
|
|
|
>
|
|
|
|
|
<BasicTable @register="registerTable">
|
|
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
|
|
<template v-if="column.key === 'action'">
|
|
|
|
@ -15,41 +22,32 @@
|
|
|
|
|
</template>
|
|
|
|
|
</template>
|
|
|
|
|
</BasicTable>
|
|
|
|
|
<TenantAuditStepModal @register="registerModal" @success="handleSuccess" />
|
|
|
|
|
</div>
|
|
|
|
|
</BasicModal>
|
|
|
|
|
</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()
|
|
|
|
|
import { ApiExistList } from './api'
|
|
|
|
|
import { ApiChangeList } from '../StateChange/api'
|
|
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal'
|
|
|
|
|
import { columns } from './columns'
|
|
|
|
|
const cntrno = ref('')
|
|
|
|
|
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
|
|
|
|
|
setModalProps({ confirmLoading: false, loading: true })
|
|
|
|
|
reload()
|
|
|
|
|
cntrno.value = data.cntrno
|
|
|
|
|
setModalProps({ loading: false })
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
|
|
const res: API.DataResult = await ApiChangeList(p)
|
|
|
|
|
return new Promise((resolve) => {
|
|
|
|
|
resolve({ data: [...data] })
|
|
|
|
|
resolve({ data: [...res.data], total: res.count })
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
beforeFetch: () => {
|
|
|
|
@ -66,8 +64,8 @@
|
|
|
|
|
let condition: API.ConditionItem[] = []
|
|
|
|
|
if (!!data.CtnName) {
|
|
|
|
|
condition.push({
|
|
|
|
|
FieldName: 'CtnName',
|
|
|
|
|
FieldValue: data.CtnName,
|
|
|
|
|
FieldName: 'Cntrno',
|
|
|
|
|
FieldValue: cntrno.value,
|
|
|
|
|
ConditionalType: 1,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -75,10 +73,6 @@
|
|
|
|
|
return postParam
|
|
|
|
|
},
|
|
|
|
|
columns,
|
|
|
|
|
formConfig: {
|
|
|
|
|
labelWidth: 120,
|
|
|
|
|
schemas: searchFormSchema,
|
|
|
|
|
},
|
|
|
|
|
pagination: true,
|
|
|
|
|
bordered: true,
|
|
|
|
|
useSearchForm: true,
|
|
|
|
@ -108,9 +102,7 @@
|
|
|
|
|
isUpdate: true,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
function handleSuccess() {
|
|
|
|
|
reload()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function getSelectData() {
|
|
|
|
|
return getSelectRows()
|
|
|
|
|
}
|
|
|
|
|