Merge branch 'dev' of http://60.209.125.238:20010/lijingjia/ds-wms-client-web into szh
commit
50507c54f1
Binary file not shown.
After Width: | Height: | Size: 510 KiB |
@ -0,0 +1,82 @@
|
||||
<!--
|
||||
* @Description: 审批按钮组件
|
||||
* @Author: lijj
|
||||
* @Date: 2024-04-29 11:54:04
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<a-button @click="approveHandle('2')" danger class="mr10">
|
||||
{{ rejectText }}
|
||||
</a-button>
|
||||
<a-button @click="approveHandle('1')" type="primary">
|
||||
{{ agreeText }}
|
||||
</a-button>
|
||||
<a-modal
|
||||
v-model:visible="visible"
|
||||
title="驳回"
|
||||
width="40%"
|
||||
@ok="handleOk"
|
||||
>
|
||||
<BasicForm @register="registerForm" />
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, computed, defineProps, onMounted } from 'vue'
|
||||
import { BasicForm, useForm } from '/@/components/Form/index'
|
||||
const props = defineProps({
|
||||
// 同意按钮文字
|
||||
agreeText: {
|
||||
type: String,
|
||||
default: "同意"
|
||||
},
|
||||
rejectText: {
|
||||
type: String,
|
||||
default: "驳回"
|
||||
},
|
||||
// 审批接口
|
||||
approve: {
|
||||
type: Function
|
||||
}
|
||||
})
|
||||
const visible = ref(false)
|
||||
const formSchema = [
|
||||
{
|
||||
field: 'remark',
|
||||
label: '驳回原因',
|
||||
defaultValue: '',
|
||||
component: 'InputTextArea',
|
||||
required: true,
|
||||
colProps: { span: 24 },
|
||||
componentProps: {
|
||||
autoSize: {
|
||||
minRows: 4,
|
||||
maxRows: 4
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
const [registerForm, { resetFields, setFieldsValue, validate, updateSchema }] =
|
||||
useForm({
|
||||
labelWidth: 150,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false
|
||||
})
|
||||
const approveHandle = (v) => {
|
||||
resetFields()
|
||||
if (v == 2) {
|
||||
// 驳回
|
||||
visible.value = true
|
||||
return
|
||||
}
|
||||
props.approve()
|
||||
visible.value = false
|
||||
}
|
||||
const handleOk = async () => {
|
||||
const res = await validate()
|
||||
console.log(res)
|
||||
props.approve(res.remark)
|
||||
visible.value = false
|
||||
}
|
||||
</script>
|
@ -0,0 +1,103 @@
|
||||
<!--
|
||||
* @Description: 引入仓位数据列表弹窗组件
|
||||
* @Author: lijj
|
||||
* @Date: 2024-04-29 11:54:04
|
||||
-->
|
||||
<template>
|
||||
<a-modal
|
||||
title="引入舱位"
|
||||
@cancel="visible = false"
|
||||
@ok="handleOk"
|
||||
v-if="visible"
|
||||
:visible="visible"
|
||||
width="80%"
|
||||
:loading="loading"
|
||||
>
|
||||
<BasicTable
|
||||
@register="registerTable"
|
||||
/>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { defineExpose, ref, defineProps } from 'vue'
|
||||
import { BasicTable, useTable } from '/@/components/Table'
|
||||
import { GetBillManageHistoryList, ImportBillManageHistory } from '../../api/BookingLedger.js'
|
||||
import { storageColumns, storageSearchFormSchema } from './ladingInfo'
|
||||
// 引入提示信息
|
||||
import { useMessage } from '/@/hooks/web/useMessage'
|
||||
const { createMessage } = useMessage()
|
||||
import { useI18n } from '/@/hooks/web/useI18n'
|
||||
const { t } = useI18n()
|
||||
const props = defineProps({
|
||||
// 业务id
|
||||
id: {
|
||||
type: String
|
||||
},
|
||||
// 提单信息表
|
||||
reload: {
|
||||
type: Function
|
||||
}
|
||||
})
|
||||
// 引入处理入参方法
|
||||
import { formatParams } from '/@/hooks/web/common'
|
||||
const [registerTable, { reload, getSelectRows }] = useTable({
|
||||
title: '',
|
||||
api: async (p) => {
|
||||
const res: API.DataResult = await GetBillManageHistoryList(p)
|
||||
return new Promise((resolve) => {
|
||||
resolve({ data: [...res.data], total: res.count })
|
||||
})
|
||||
},
|
||||
// 请求前的参数格式化
|
||||
beforeFetch: (p) => {
|
||||
return formatParams(p)
|
||||
},
|
||||
columns: storageColumns,
|
||||
formConfig: {
|
||||
labelWidth: 120,
|
||||
// 表格表单需要的过滤字段集合
|
||||
schemas: storageSearchFormSchema,
|
||||
},
|
||||
maxHeight: 600,
|
||||
isTreeTable: false,
|
||||
pagination: true,
|
||||
useSearchForm: true,
|
||||
showTableSetting: false,
|
||||
bordered: true,
|
||||
showIndexColumn: true,
|
||||
indexColumnProps: {
|
||||
width: 60,
|
||||
},
|
||||
rowSelection: {
|
||||
type: 'checkbox'
|
||||
},
|
||||
canResize: true,
|
||||
resizeHeightOffset: 80
|
||||
})
|
||||
const visible = ref(false)
|
||||
// 初始化组件
|
||||
const init = () => {
|
||||
visible.value = true
|
||||
}
|
||||
const loading = true
|
||||
const handleOk = () => {
|
||||
const rows = getSelectRows()
|
||||
const ids = rows.map(item => {
|
||||
return item.id
|
||||
})
|
||||
ImportBillManageHistory({ ids, businessType: 1, id: props.id }).then(res => {
|
||||
visible.value = false
|
||||
if (res.succeeded) {
|
||||
createMessage.success('导入成功!')
|
||||
props.reload()
|
||||
}
|
||||
})
|
||||
}
|
||||
defineExpose({
|
||||
init
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
</style>
|
||||
|
@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div>
|
||||
<BasicTable
|
||||
@register="registerTable"
|
||||
>
|
||||
<template #tableTitle>
|
||||
<h4 style="margin: 0 20px 0 0; ">联系人信息</h4>
|
||||
<a-button type="link" @click="create">
|
||||
<span class="iconfont icon-new_document"></span>
|
||||
新增
|
||||
</a-button>
|
||||
<a-button type="link" @click="del">
|
||||
<span class="iconfont icon-shanchu2"></span>
|
||||
删除
|
||||
</a-button>
|
||||
</template>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'action'">
|
||||
<TableAction
|
||||
:actions="[
|
||||
{
|
||||
icon: 'clarity:note-edit-line',
|
||||
tooltip: '编辑',
|
||||
onClick: handleEdit.bind(null, record)
|
||||
},
|
||||
]"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<PersonModal @register="registerModal" @success="handleSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { BasicForm, useForm } from '/@/components/Form/index'
|
||||
import { personColumns } from './baseInfo.tsx'
|
||||
import { BasicTable, useTable } from '/@/components/Table'
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import { GetBusinessOrderContactList } from '/@/views/operation/seaexport/api/BookingLedger'
|
||||
import { useMessage } from '/@/hooks/web/useMessage'
|
||||
import { useModal } from '/@/components/Modal'
|
||||
import { formatParams } from '/@/hooks/web/common'
|
||||
import PersonModal from './PersonModal.vue'
|
||||
const [registerModal, { openModal }] = useModal()
|
||||
const { createMessage } = useMessage()
|
||||
const props = defineProps({
|
||||
id: { type: String },
|
||||
})
|
||||
// 关系人表格
|
||||
const [registerTable, { reload, getForm, getPaginationRef }] = useTable({
|
||||
api: async (p) => {
|
||||
const res: API.DataResult = await GetBusinessOrderContactList(p)
|
||||
return new Promise((resolve) => {
|
||||
resolve({ data: [...res.data], total: res.count })
|
||||
})
|
||||
},
|
||||
beforeFetch: (p) => {
|
||||
p['businessId'] = props.id
|
||||
return formatParams(p)
|
||||
},
|
||||
columns: personColumns,
|
||||
isTreeTable: false,
|
||||
pagination: true,
|
||||
striped: true,
|
||||
useSearchForm: false,
|
||||
showTableSetting: false,
|
||||
bordered: true,
|
||||
showIndexColumn: true,
|
||||
rowSelection: {
|
||||
type: 'checkbox'
|
||||
},
|
||||
canResize: false,
|
||||
actionColumn: {
|
||||
width: 60,
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
fixed: 'right',
|
||||
}
|
||||
})
|
||||
function handleSuccess() {
|
||||
reload()
|
||||
}
|
||||
// 新增联系人
|
||||
const create = () => {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
id: props.id
|
||||
})
|
||||
}
|
||||
// 编辑
|
||||
function handleEdit(record) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
id: props.id
|
||||
})
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue