|
|
@ -24,10 +24,21 @@
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<BasicTable class="ds-table" @register="registerTableBotton"> </BasicTable>
|
|
|
|
<BasicTable class="ds-table" @register="registerTableBotton"> </BasicTable>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a-modal
|
|
|
|
|
|
|
|
v-model:visible="visible"
|
|
|
|
|
|
|
|
title="驳回"
|
|
|
|
|
|
|
|
width="40%"
|
|
|
|
|
|
|
|
@cancel="handleCancel"
|
|
|
|
|
|
|
|
@ok="handleOk"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<BasicForm @register="modalRegisterForml" />
|
|
|
|
|
|
|
|
</a-modal>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
|
|
|
import { ref } from 'vue'
|
|
|
|
import { BasicTable, useTable } from '/@/components/Table'
|
|
|
|
import { BasicTable, useTable } from '/@/components/Table'
|
|
|
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
import { ApiList, ApiDetailList, ApiConfirm, ApiCancel } from './api'
|
|
|
|
import { ApiList, ApiDetailList, ApiConfirm, ApiCancel } from './api'
|
|
|
|
import { columns, searchFormSchema, detailColumns } from './columns'
|
|
|
|
import { columns, searchFormSchema, detailColumns } from './columns'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
|
import { useMessage } from '/@/hooks/web/useMessage'
|
|
|
@ -109,40 +120,93 @@
|
|
|
|
resizeHeightOffset: 35,
|
|
|
|
resizeHeightOffset: 35,
|
|
|
|
immediate: false,
|
|
|
|
immediate: false,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
const Ctype = ref(true)
|
|
|
|
async function FnAudit(type, state) {
|
|
|
|
const CApiData = ref('')
|
|
|
|
|
|
|
|
function FnAudit(type, state) {
|
|
|
|
let ApiData: any = {
|
|
|
|
let ApiData: any = {
|
|
|
|
id: '',
|
|
|
|
id: '',
|
|
|
|
ids: [],
|
|
|
|
ids: [],
|
|
|
|
|
|
|
|
businessType: '',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (type) {
|
|
|
|
try {
|
|
|
|
if (getSelectRows()[0].id) {
|
|
|
|
if (type) {
|
|
|
|
ApiData.id = getSelectRows()[0].id
|
|
|
|
if (getSelectRows()[0]?.id) {
|
|
|
|
|
|
|
|
ApiData.id = getSelectRows()[0].id
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notification.warning({ message: '请选择一条数据', duration: 3 })
|
|
|
|
|
|
|
|
throw new Error('请选择一条数据')
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
notification.warning({ message: '请选择一条数据', duration: 3 })
|
|
|
|
if (getSelectRowsBotton().length) {
|
|
|
|
|
|
|
|
getSelectRowsBotton().forEach((item) => {
|
|
|
|
|
|
|
|
ApiData.ids.push(item.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
ApiData.id = getSelectRows()[0].id
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
notification.warning({ message: '请至少选择一条数据', duration: 3 })
|
|
|
|
|
|
|
|
throw new Error('请至少选择一条数据')
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
ApiData.businessType = getSelectRows()[0]?.ctnBizStateId
|
|
|
|
if (getSelectRowsBotton().length) {
|
|
|
|
if (state == 'cancel') {
|
|
|
|
getSelectRowsBotton().forEach((item) => {
|
|
|
|
Ctype.value = type
|
|
|
|
ApiData.ids.push(item.id)
|
|
|
|
CApiData.value = JSON.stringify(ApiData)
|
|
|
|
})
|
|
|
|
visible.value = true
|
|
|
|
ApiData.id = getSelectRows()[0].id
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
notification.warning({ message: '请至少选择一条数据', duration: 3 })
|
|
|
|
FnExamine(type, state, ApiData)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
// console.log(error)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
async function FnExamine(type, state, ApiData) {
|
|
|
|
let res: any = state == 'confirm' ? await ApiConfirm(ApiData) : await ApiCancel(ApiData)
|
|
|
|
let res: any = state == 'confirm' ? await ApiConfirm(ApiData) : await ApiCancel(ApiData)
|
|
|
|
if (res.succeeded) {
|
|
|
|
if (res.succeeded) {
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
notification.success({ message: res.message, duration: 3 })
|
|
|
|
console.log(type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type) {
|
|
|
|
if (type) {
|
|
|
|
reload()
|
|
|
|
reload()
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
Ctype.value = true
|
|
|
|
|
|
|
|
CApiData.value = ''
|
|
|
|
|
|
|
|
modalResetFields()
|
|
|
|
|
|
|
|
visible.value = false
|
|
|
|
reloadBotton()
|
|
|
|
reloadBotton()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const visible = ref(false)
|
|
|
|
|
|
|
|
const modalFormSchema = [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
field: 'remark',
|
|
|
|
|
|
|
|
label: '驳回原因',
|
|
|
|
|
|
|
|
defaultValue: '',
|
|
|
|
|
|
|
|
component: 'InputTextArea',
|
|
|
|
|
|
|
|
required: true,
|
|
|
|
|
|
|
|
colProps: { span: 24 },
|
|
|
|
|
|
|
|
componentProps: {
|
|
|
|
|
|
|
|
autoSize: {
|
|
|
|
|
|
|
|
minRows: 4,
|
|
|
|
|
|
|
|
maxRows: 4,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
disTrans: true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
const [modalRegisterForml, { resetFields: modalResetFields, validate: modalValidate }] = useForm({
|
|
|
|
|
|
|
|
labelWidth: 150,
|
|
|
|
|
|
|
|
schemas: modalFormSchema,
|
|
|
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
const handleOk = async () => {
|
|
|
|
|
|
|
|
const res = await modalValidate()
|
|
|
|
|
|
|
|
FnExamine(Ctype.value, 'cancel', { ...JSON.parse(CApiData.value), remark: res.remark })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
|
|
|
|
|
Ctype.value = true
|
|
|
|
|
|
|
|
CApiData.value = ''
|
|
|
|
|
|
|
|
modalResetFields()
|
|
|
|
|
|
|
|
visible.value = false
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
<style lang="less" scoped>
|
|
|
|
.OfflineAudit {
|
|
|
|
.OfflineAudit {
|
|
|
|