张同海 3 months ago
commit 11f5b6f324

@ -86,6 +86,11 @@
paramJsonStr: { paramJsonStr: {
type: String, type: String,
default: null default: null
},
// code
temCode: {
type: String,
default: null
} }
}) })
// //
@ -113,7 +118,8 @@
sortConditions: [], sortConditions: [],
}, },
queryCondition: JSON.stringify([ queryCondition: JSON.stringify([
{ FieldName: 'moduleCode', FieldValue: props.code, ConditionalType: 1 } { FieldName: 'moduleCode', FieldValue: props.code, ConditionalType: 1 },
{ FieldName: 'templateCode', FieldValue: props.temCode, ConditionalType: 1 }
]) ])
} }
GetOpenPrintTemplateList(postData).then(r => { GetOpenPrintTemplateList(postData).then(r => {

@ -59,7 +59,7 @@
<Divider type="horizontal" /> <Divider type="horizontal" />
<!-- 货物信息 --> <!-- 货物信息 -->
<div> <div>
<cargoInfo ref="RefcargoInfo" :details="bookingDetails"></cargoInfo> <cargoInfo ref="RefcargoInfo"></cargoInfo>
<div class="line"></div> <div class="line"></div>
<goodsTable <goodsTable
ref="RefgoodsTable" ref="RefgoodsTable"

@ -75,6 +75,15 @@ export function GetOpBusinessYardInfo(parameter) {
params: parameter, params: parameter,
}) })
} }
// 放舱历史信息
export function GetYardHistoryList(parameter) {
return request({
url: '/opApi/OpBusinessYard/GetYardHistoryList',
method: 'post',
data: parameter,
})
}
// 批量删除 (Auth) // 批量删除 (Auth)
export function BatchDelOpBusinessYard(parameter) { export function BatchDelOpBusinessYard(parameter) {
return request({ return request({

@ -208,6 +208,59 @@ export const columns: BasicColumn[] = [
}, },
] ]
export const historyColumns: BasicColumn[] = [
{
title: 'ATTN',
dataIndex: 'toAttn',
width: 110,
},
{
title: 'ATTN电话',
dataIndex: 'toAttnTel',
width: 110,
},
{
title: 'ATTN邮箱',
dataIndex: 'toAttnEmail',
width: 110,
},
{
title: 'FROM',
dataIndex: 'fromName',
width: 110,
},
{
title: 'FROM电话',
dataIndex: 'fromTel',
width: 110,
},
{
title: 'FROM邮箱',
dataIndex: 'fromEmail',
width: 110,
},
{
title: '截港时间',
dataIndex: 'closingDate',
width: 110,
},
{
title: '截单时间',
dataIndex: 'closeDocDate',
width: 110,
},
{
title: '截VGM时间',
dataIndex: 'closeVGMDate',
width: 110,
},
{
title: '场站',
dataIndex: 'yard',
width: 110
},
]
export const formSchema: FormSchema[] = [ export const formSchema: FormSchema[] = [
// 主键 // 主键
{ {
@ -331,6 +384,8 @@ export const formSchema: FormSchema[] = [
field: 'urlTxxp', field: 'urlTxxp',
component: 'Input', component: 'Input',
defaultValue: null, defaultValue: null,
dynamicDisabled: true,
placeholder: '自动生成',
colProps: { colProps: {
class: 'mt10', class: 'mt10',
span: 24 span: 24
@ -341,6 +396,8 @@ export const formSchema: FormSchema[] = [
field: 'urlVgm', field: 'urlVgm',
component: 'Input', component: 'Input',
defaultValue: null, defaultValue: null,
dynamicDisabled: true,
placeholder: '自动生成',
colProps: { colProps: {
span: 24 span: 24
} }
@ -350,6 +407,8 @@ export const formSchema: FormSchema[] = [
field: 'urlVgmSi', field: 'urlVgmSi',
component: 'Input', component: 'Input',
defaultValue: null, defaultValue: null,
dynamicDisabled: true,
placeholder: '自动生成',
colProps: { colProps: {
span: 24 span: 24
} }

@ -17,13 +17,11 @@
@success="handleSuccess" @success="handleSuccess"
/> />
<template #footer> <template #footer>
<el-button @click="closeModal"></el-button>
<el-button type="primary" @click="save"></el-button>
</template> </template>
</BasicModal> </BasicModal>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue' import { ref, defineProps } from 'vue'
import { BasicModal, useModalInner } from '/@/components/Modal' import { BasicModal, useModalInner } from '/@/components/Modal'
import OpBusinessYardEdit from './OpBusinessYardEdit.vue' import OpBusinessYardEdit from './OpBusinessYardEdit.vue'
// Emits // Emits

@ -13,40 +13,136 @@
<a-tooltip placement="top" title="删除"> <a-tooltip placement="top" title="删除">
<SvgIcon class="ml15" size="18" name="delete" @click="deleteData" /> <SvgIcon class="ml15" size="18" name="delete" @click="deleteData" />
</a-tooltip> </a-tooltip>
<a-tooltip placement="top" title="打印">
<SvgIcon class="ml15" size="18" name="print" @click="print" />
</a-tooltip>
<a-tooltip placement="top" title="发送">
<SvgIcon class="ml15" size="18" name="submit" @click="sendEmail" />
</a-tooltip>
<a-tooltip placement="top" title="历史">
<SvgIcon class="ml15" size="18" name="submit" @click="historyList" />
</a-tooltip>
</div> </div>
<BasicForm @register="registerForm" /> <BasicForm @register="registerForm" />
</a-spin> </a-spin>
<DsPrint ref="dsPrint" temCode="release_the_cabin" :paramJsonStr="'{id:' + id + '}'"/>
<!-- 邮件发送弹窗 -->
<EmailModal ref="emailModal" temCode="release_the_cabin"></EmailModal>
<!-- 历史弹窗 -->
<a-modal
v-model:visible="visible"
title="历史信息"
width="80%"
>
<BasicTable @register="registerTable"></BasicTable>
<template #footer></template>
</a-modal>
</div> </div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, watch, defineExpose, defineEmits } from 'vue' import { ref, watch, defineExpose, defineEmits } from 'vue'
import { SvgIcon } from '/@/components/Icon' import { SvgIcon } from '/@/components/Icon'
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { formSchema } from './OpBusinessYardColumns' //
import { EditOpBusinessYard, GetOpBusinessYardInfo, BatchDelOpBusinessYard } from './LetterApi' import DsPrint from '/@/components/Print/index.vue'
import { formatParams } from '/@/hooks/web/common'
//
import EmailModal from '/@/components/EmailModal/index.vue'
import { formSchema, historyColumns } from './OpBusinessYardColumns'
import { EditOpBusinessYard, GetOpBusinessYardInfo, BatchDelOpBusinessYard, GetYardHistoryList } from './LetterApi'
import { useMessage } from '/@/hooks/web/useMessage' import { useMessage } from '/@/hooks/web/useMessage'
import { useUserStore } from '/@/store/modules/user'
import { propTypes } from '/@/utils/propTypes' import { propTypes } from '/@/utils/propTypes'
import { BasicTable, useTable } from '/@/components/Table'
const props = defineProps({ const props = defineProps({
businessId: { businessId: {
type: Object type: Object
}, },
selectId: propTypes.string, selectId: propTypes.string,
}) })
//
const visible = ref(false)
//
const init = (nVal) => {
//
const yard = {}
if (nVal.orderContactList && nVal.orderContactList.length) {
const yardList = nVal.orderContactList.filter(item => {
return nVal.yardId == item.customerId
})
if (yardList && yardList.length) {
yard['yardAttn'] = yardList[0].name
yard['yardTel'] = yardList[0].tel
}
}
// from
const userStore = useUserStore()
yard['fromName'] = userStore.getUserInfo.userName
yard['fromTel'] = userStore.getUserInfo.tel
yard['fromEmail'] = userStore.getUserInfo.email
yard['fromMobile'] = userStore.getUserInfo.phone
if (contaList.value && contaList.value.length) {
yard['toName'] = contaList.value[0].customerName
yard['toAttn'] = contaList.value[0].name
yard['toAttnTel'] = contaList.value[0].tel
yard['toAttnEmail'] = contaList.value[0].email
yard['toAttnMobile'] = ''
}
setFieldsValue({
...nVal,
businessId: nVal.id,
id: 0,
...yard
})
}
const [registerTable, { reload }] = useTable({
title: '',
api: async (p) => {
const res: API.DataResult = await GetYardHistoryList(p)
return new Promise((resolve) => {
resolve({ data: [...res.data], total: res.count })
})
},
beforeFetch: (p) => {
return formatParams(p)
},
columns: historyColumns,
isTreeTable: false,
pagination: true,
striped: false,
bordered: true,
showIndexColumn: true,
canResize: false
})
//
const historyList = () => {
visible.value = true
}
//
const emailModal = ref(null)
//
const dsPrint = ref(null)
const print = () => {
dsPrint.value.init()
}
let details = {}
const contaList = ref([])
const id = ref(null)
watch( watch(
() => props.businessId, () => props.businessId,
async (nVal) => { async (nVal) => {
if (nVal) { if (nVal) {
id.value = nVal.id
details = nVal
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal.id }) const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal.id })
if (res.data == null) { contaList.value = res?.data?.contacts
setFieldsValue({ if (res.data.id) {
...nVal,
businessId: nVal.id,
id: 0
})
} else {
setFieldsValue({ setFieldsValue({
...res.data ...res.data
}) })
} else {
init(nVal)
} }
} }
}, },
@ -55,7 +151,7 @@
// Emits // Emits
const emit = defineEmits(['success', 'register']) const emit = defineEmits(['success', 'register'])
const { createMessage } = useMessage() const { createMessage } = useMessage()
const [registerForm, { getFieldsValue, setFieldsValue, validate, updateSchema }] = useForm({ const [registerForm, { getFieldsValue, setFieldsValue, validate, updateSchema, resetFields }] = useForm({
labelWidth: 100, labelWidth: 100,
schemas: formSchema, schemas: formSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
@ -83,10 +179,17 @@
BatchDelOpBusinessYard({ ids: [data.id] }).then(res => { BatchDelOpBusinessYard({ ids: [data.id] }).then(res => {
console.log(res) console.log(res)
createMessage.success('删除成功!') createMessage.success('删除成功!')
resetFields()
init(details)
emit('success') emit('success')
loading.value = false loading.value = false
}) })
} }
//
const sendEmail = () => {
//
emailModal.value.init([], props.businessId)
}
defineExpose({ defineExpose({
setFieldsValue setFieldsValue
}) })

@ -67,7 +67,7 @@
</a-button> </a-button>
</div> </div>
<!-- 放舱(场站入货) --> <!-- 放舱(场站入货) -->
<OpBusinessYardDetails :businessId="details" @register="OYregisterModal" /> <OpBusinessYardDetails :details="details" @register="OYregisterModal" />
<!-- 派车信息 --> <!-- 派车信息 -->
<OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" /> <OpBusinessTruckDetails :businessId="details.id" @register="OTregisterModal" />
<!-- 弹窗部分 start --> <!-- 弹窗部分 start -->

Loading…
Cancel
Save