9.11、海运出口禅道迭代

szh-new
lijingjia 2 months ago
parent 73a091ba8d
commit c0a39ec70a

@ -107,7 +107,6 @@
}
const handleOk = async () => {
const res = await validate()
console.log(res)
props.approve(res.remark)
visible.value = false
}

@ -21,13 +21,13 @@ import { useMultipleTabStore } from '/@/store/modules/multipleTab'
/**
* @description: pathid
*/
export function permissionsInfo() {
export function permissionsInfo(path) {
let permissionId: string = ''
let permissionName: string = ''
const fullPath = ref(router.currentRoute.value.path)
const fullPath = path || router.currentRoute.value.path
const routerList = treeOptionData(usePermissionStore().getWrouteList)
routerList.forEach(item => {
if (item.path === fullPath.value) {
if (item.path === fullPath) {
permissionId = item.id
permissionName = item.name
}

@ -200,7 +200,6 @@ export default {
// 商品
GetClientGoodsList: () => {
return GetClientGoodsList().then((res) => {
console.log(res.data)
if (res?.data.length) {
res.data.forEach((item) => {
item['pinYinCode'] = `${item.goodName}(${item.goodsCode})`

@ -78,7 +78,6 @@ export const useOptionsStore = defineStore({
} else {
// 没有值调用接口存数据
store.setOptionsByCode(code).then((res) => {
console.log(res)
return res
})
}

@ -231,7 +231,6 @@ export const usePermissionStore = defineStore({
await this.changePermissionCode()
// routeList = (await getMenuList()) as AppRouteRecordRaw[]
const res = await getMenuList()
console.log(res)
routeList = res.data as AppRouteRecordRaw[]
this.setWrouteList(routeList)
} catch (error) {

@ -347,6 +347,7 @@ export const formSchema2: FormSchema[] = [
immediate: false,
onChange: (e, obj) => {
if (e && obj) {
formActionType ? formActionType.linkageForm(obj) : null
formModel.loadPortId = obj.id
formModel.loadPort = obj.portName
}
@ -767,9 +768,14 @@ export const formSchema4: FormSchema[] = [
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 6 },
componentProps: {
format: 'YYYY-MM-DD',
allowClear: true
componentProps: ({ formModel, formActionType }) => {
return {
allowClear: true,
valueFormat: 'YYYY-MM-DD',
onChange: (e) => {
formActionType ? formActionType.linkageForm(e) : null
}
}
}
},
{
@ -804,21 +810,38 @@ export const formSchema4: FormSchema[] = [
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 6 },
componentProps: () => {
componentProps: ({ formActionType }) => {
return {
option: optionsStore.getOptionsByCode('GetClientFrtSelectList'),
allowClear: true,
showSearch: true,
labelField: 'cnName',
valueField: 'id',
labelField: 'frtName',
valueField: 'frtName',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
if (e && obj) {
formActionType ? formActionType.linkageForm(e) : null
}
}
}
}
},
{
label: '',
field: 'prepareAtId',
component: 'Input',
show: false,
},
{
label: '',
field: 'prepareAtCode',
component: 'Input',
show: false,
},
{
field: 'prepareAt',
label: '预付地点',
component: 'ApiSelect',
required: false,
@ -827,41 +850,39 @@ export const formSchema4: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
api: GetClientPortSelectList,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
labelField: 'pinYinCode',
valueField: 'portName',
showName: 'portName',
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.prepareAt = obj.portName
} else {
formModel.prepareAt = ''
if (e && obj) {
formModel.prepareAtId = obj.id
formModel.prepareAtCode = obj.ediCode
}
if (!e && !obj) {
formModel.prepareAtId = null
formModel.prepareAtCode = null
}
}
}
},
},
{
label: '',
field: 'prepareAt',
field: 'payableAtId',
component: 'Input',
show: false,
colProps: { span: 6 },
show: false
},
{
label: '',
field: 'payableAt',
field: 'payableAtCode',
component: 'Input',
show: false,
colProps: { span: 6 },
show: false
},
{
field: 'payableAtId',
field: 'payableAt',
label: '到付地点',
component: 'ApiSelect',
required: false,
@ -870,24 +891,24 @@ export const formSchema4: FormSchema[] = [
colProps: { span: 6 },
componentProps: ({ formModel }) => {
return {
allowClear: true,
showSearch: true,
option: optionsStore.getOptionsByCode('GetClientPortSelectList'),
labelField: 'portName',
valueField: 'id',
api: GetClientPortSelectList,
resultField: 'data',
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
labelField: 'pinYinCode',
valueField: 'portName',
showName: 'portName',
immediate: false,
onChange: (e, obj) => {
if (obj) {
formModel.payableAt = obj.portName
} else {
formModel.payableAt = ''
if (e && obj) {
formModel.payableAtId = obj.id
formModel.payableAtCode = obj.ediCode
}
if (!e && !obj) {
formModel.payableAtId = null
formModel.payableAtCode = null
}
}
}
},
}
},
},
{
field: 'service',

@ -102,7 +102,7 @@
:ctnInfo="ctnInfo"
></container>
<!-- ETD表单 -->
<BasicForm style="margin-top: 8px;" @register="ETDForm" />
<BasicForm style="margin-top: 8px;" @register="ETDForm" @linkageForm="linkageETDForm" />
</div>
</div>
<Divider type="horizontal" />
@ -149,7 +149,7 @@
</a-col>
</a-row>
<!-- 签单方式表单 -->
<BasicForm style="margin-top: 0px;" class="issue-form" @register="issueForm" />
<BasicForm style="margin-top: 0px;" class="issue-form" @register="issueForm" @linkageForm="linkageIssueForm" />
</div>
</a-spin>
</a-tab-pane>
@ -209,7 +209,7 @@
showActionButtonGroup: false,
})
//
const [ETDForm, { setFieldsValue: setFieldsValue2, validate: validate2, resetFields: resetFields2 }] =
const [ETDForm, { setFieldsValue: setFieldsValue2, validate: validate2, resetFields: resetFields2, getFieldsValue: getFieldsValue2 }] =
useForm({
labelWidth: 150,
schemas: formSchema2,
@ -264,6 +264,41 @@
loading.value = false
})
}
//
const linkageIssueForm = (v) => {
const data = getFieldsValue2()
if (v == 'FREIGHT COLLECT') {
//
setFieldsValue4({
payableAt: data.dischargePort,
payableAtId: data.dischargePortId,
payableAtCode: data.dischargePortCode,
prepareAt: null,
prepareAtId: null,
prepareAtCode: null
})
} else if (v == 'FREIGHT PREPAID') {
//
setFieldsValue4({
prepareAt: data.loadPort,
prepareAtId: data.loadPortId,
prepareAtCode: data.loadPortCode,
payableAt: null,
payableAtId: null,
payableAtCode: null
})
} else {
setFieldsValue2({
etd: v
})
}
}
//
const linkageETDForm = (v) => {
setFieldsValue4({
issuePlace: v.portName
})
}
const dloading = ref(false)
//
const setFormValue = (row) => {
@ -637,6 +672,26 @@
setFieldsValue4({
...props.details
})
console.log(props.details)
//
if (props.details && props.details.mblFrt == 'FREIGHT COLLECT') {
setFieldsValue4({
prepareAt: null,
prepareAtId: null,
prepareAtCode: null,
payableAt: props.details.prepareAt,
payableAtId: props.details.prepareAtId,
payableAtCode: props.details.prepareAtCode
})
}
//
if (props.details && props.details.mblFrt == 'FREIGHT PREPAID') {
setFieldsValue4({
payableAt: null,
payableAtId: null,
payableAtCode: null
})
}
setFieldsValue5({
...props.details,
hblno: null

@ -80,7 +80,7 @@
<ContactList v-if="id" :id="id" :data="bookingDetails.orderContactList" @getBaseInfo="getBaseInfo"></ContactList>
<Divider type="horizontal" />
<!-- 备注信息 -->
<noteInfo ref="RefNoteInfo" :details="bookingDetails"></noteInfo>
<noteInfo ref="RefNoteInfo" :details="bookingDetails" @transfData="transfData"></noteInfo>
<Divider type="horizontal" />
<ediMore ref="RefediMore" :details="bookingDetails"></ediMore>
</a-tab-pane>
@ -264,12 +264,29 @@
return '完成任务'
}
})
// 使
const transfData = (v) => {
const data = RefmailingInfo.value.getFieldsValueR()
RefNoteInfo.value.setAddress(data, v)
}
//
const getFormSet = () => {
GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }).then(res => {
GetFormSetListByModule({ permissionId: permissionsInfo('/BookingDetail').permissionId }).then(res => {
const { data } = res
if (data && data.length) {
const content = JSON.parse(data[0].content).columns
//
const status = route.query.status
if (status == 'WAIT_BILL_CONFIRM') {
console.log(content)
if (content && content.length) {
content.forEach(item => {
if (item.field == 'vessel' || item.field == 'innerVoyno' || item.field == 'mblno' || item.field == 'hblno' || item.field == 'shipperContent' || item.field == 'consigneeContent' || item.field == 'notifyPartyContent' || item.field == 'kgs' || item.field == 'cbm' || item.field == 'pkgs' || item.field == 'goodsName' || item.field == 'description' || item.field == 'mblFrt' || item.field == 'issueDate' || item.field == 'issueType' || item.field == 'service') {
item.required = true
}
})
}
}
//
OtherInfo.value.updateSchema(content)
RefbasicInfo.value.updateSchema(content)

@ -211,9 +211,10 @@ export const basicInfoFormSchema: FormSchema[] = [
label: '约号',
component: 'ApiSelect',
colProps: { span: 5 },
componentProps: ({ formActionType }) => {
componentProps: ({ formModel, formActionType }) => {
return {
api: GetBookingContractNoList,
params: { carrierId: formModel.carrierId },
labelField: 'contractName',
valueField: 'contractNo',
showName: 'contractNo',
@ -1246,7 +1247,7 @@ export const noteFormSchema: FormSchema[] = [
allowClear: true,
valueFormat: 'YYYY-MM-DD',
onChange: (e) => {
formActionType ? formActionType.linkageForm(e) : null
formActionType ? formActionType.linkageForm({ key: 'issueDate', value: e}) : null
}
}
}
@ -1344,7 +1345,7 @@ export const noteFormSchema: FormSchema[] = [
dynamicDisabled: false,
defaultValue: null,
colProps: { span: 5 },
componentProps: ({ formModel }) => {
componentProps: ({ formModel, formActionType }) => {
return {
api: GetClientFrtSelectList,
allowClear: true,
@ -1358,6 +1359,7 @@ export const noteFormSchema: FormSchema[] = [
},
onChange: (e, obj) => {
if (e && obj) {
formActionType ? formActionType.linkageForm({ key: 'mblFrt', value: e }) : null
formModel.mblFrtCode = obj.ediCode
}
if (!e && !obj) {

@ -24,7 +24,7 @@
<span>
<input
ref="customerNoRef"
:style="{ width: `${formData.customerNo?.length * 7}px` }"
:style="{ width: `${formData.customerNo?.length * 8}px` }"
class="customerNo"
v-model="formData.customerNo"
/>

@ -15,7 +15,7 @@
import { BasicForm, useForm } from '/@/components/Form/index'
import { noteFormSchema } from './baseInfo.tsx'
import emitter from '/@/utils/Bus'
import { ref, watch, defineProps, defineExpose, onMounted, onUnmounted } from 'vue'
import { ref, watch, defineProps, defineExpose, onMounted, onUnmounted, defineEmits } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
//
@ -26,6 +26,7 @@
default: {},
}
})
const emit = defineEmits(['transfData'])
const [
registerForm,
{ getFieldsValue, updateSchema, resetFields, setFieldsValue, validate },
@ -34,9 +35,33 @@
schemas: noteFormSchema,
showActionButtonGroup: false,
})
const linkageForm = (item) => {
//
const linkageForm = (v) => {
emitter.emit('setEtd', v)
if (item.key == 'issueDate') {
emitter.emit('setEtd', item.value)
}
//
if (item.key == 'mblFrt') {
emit('transfData', item.value)
}
}
//
const setAddress = (data, v) => {
if (v == 'FREIGHT COLLECT') {
//
setFieldsValue({
prepareAt: data.dischargePort,
prepareAtId: data.deliveryPlaceId,
prepareAtCode: data.dischargePortCode
})
} else {
//
setFieldsValue({
prepareAt: data.loadPort,
prepareAtId: data.loadPortId,
prepareAtCode: data.loadPortCode
})
}
}
watch(
() => props.details,
@ -68,6 +93,7 @@
// RefediFrom,
getFieldsValue,
updateSchema,
setAddress,
validate
})
</script>

Loading…
Cancel
Save