szh-new
lijingjia 3 months ago
parent 0d02865c6d
commit 6d6685ecfc

@ -86,6 +86,11 @@
paramJsonStr: {
type: String,
default: null
},
// code
temCode: {
type: String,
default: null
}
})
//
@ -113,7 +118,8 @@
sortConditions: [],
},
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 => {

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

@ -75,6 +75,15 @@ export function GetOpBusinessYardInfo(parameter) {
params: parameter,
})
}
// 放舱历史信息
export function GetYardHistoryList(parameter) {
return request({
url: '/opApi/OpBusinessYard/GetYardHistoryList',
method: 'post',
data: parameter,
})
}
// 批量删除 (Auth)
export function BatchDelOpBusinessYard(parameter) {
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[] = [
// 主键
{
@ -331,6 +384,8 @@ export const formSchema: FormSchema[] = [
field: 'urlTxxp',
component: 'Input',
defaultValue: null,
dynamicDisabled: true,
placeholder: '自动生成',
colProps: {
class: 'mt10',
span: 24
@ -341,6 +396,8 @@ export const formSchema: FormSchema[] = [
field: 'urlVgm',
component: 'Input',
defaultValue: null,
dynamicDisabled: true,
placeholder: '自动生成',
colProps: {
span: 24
}
@ -350,6 +407,8 @@ export const formSchema: FormSchema[] = [
field: 'urlVgmSi',
component: 'Input',
defaultValue: null,
dynamicDisabled: true,
placeholder: '自动生成',
colProps: {
span: 24
}

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

@ -13,40 +13,136 @@
<a-tooltip placement="top" title="删除">
<SvgIcon class="ml15" size="18" name="delete" @click="deleteData" />
</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>
<BasicForm @register="registerForm" />
</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>
</template>
<script lang="ts" setup>
import { ref, watch, defineExpose, defineEmits } from 'vue'
import { SvgIcon } from '/@/components/Icon'
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 { useUserStore } from '/@/store/modules/user'
import { propTypes } from '/@/utils/propTypes'
import { BasicTable, useTable } from '/@/components/Table'
const props = defineProps({
businessId: {
type: Object
},
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(
() => props.businessId,
async (nVal) => {
if (nVal) {
id.value = nVal.id
details = nVal
const res: API.DataResult = await GetOpBusinessYardInfo({ id: nVal.id })
if (res.data == null) {
setFieldsValue({
...nVal,
businessId: nVal.id,
id: 0
})
} else {
contaList.value = res?.data?.contacts
if (res.data.id) {
setFieldsValue({
...res.data
})
} else {
init(nVal)
}
}
},
@ -55,7 +151,7 @@
// Emits
const emit = defineEmits(['success', 'register'])
const { createMessage } = useMessage()
const [registerForm, { getFieldsValue, setFieldsValue, validate, updateSchema }] = useForm({
const [registerForm, { getFieldsValue, setFieldsValue, validate, updateSchema, resetFields }] = useForm({
labelWidth: 100,
schemas: formSchema,
showActionButtonGroup: false,
@ -83,10 +179,17 @@
BatchDelOpBusinessYard({ ids: [data.id] }).then(res => {
console.log(res)
createMessage.success('删除成功!')
resetFields()
init(details)
emit('success')
loading.value = false
})
}
//
const sendEmail = () => {
//
emailModal.value.init([], props.businessId)
}
defineExpose({
setFieldsValue
})

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

Loading…
Cancel
Save