9.11、海运出口禅道迭代

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

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

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

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

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

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

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

@ -102,7 +102,7 @@
:ctnInfo="ctnInfo" :ctnInfo="ctnInfo"
></container> ></container>
<!-- ETD表单 --> <!-- ETD表单 -->
<BasicForm style="margin-top: 8px;" @register="ETDForm" /> <BasicForm style="margin-top: 8px;" @register="ETDForm" @linkageForm="linkageETDForm" />
</div> </div>
</div> </div>
<Divider type="horizontal" /> <Divider type="horizontal" />
@ -149,7 +149,7 @@
</a-col> </a-col>
</a-row> </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> </div>
</a-spin> </a-spin>
</a-tab-pane> </a-tab-pane>
@ -209,7 +209,7 @@
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
// //
const [ETDForm, { setFieldsValue: setFieldsValue2, validate: validate2, resetFields: resetFields2 }] = const [ETDForm, { setFieldsValue: setFieldsValue2, validate: validate2, resetFields: resetFields2, getFieldsValue: getFieldsValue2 }] =
useForm({ useForm({
labelWidth: 150, labelWidth: 150,
schemas: formSchema2, schemas: formSchema2,
@ -264,6 +264,41 @@
loading.value = false 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 dloading = ref(false)
// //
const setFormValue = (row) => { const setFormValue = (row) => {
@ -637,6 +672,26 @@
setFieldsValue4({ setFieldsValue4({
...props.details ...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({ setFieldsValue5({
...props.details, ...props.details,
hblno: null hblno: null

@ -80,7 +80,7 @@
<ContactList v-if="id" :id="id" :data="bookingDetails.orderContactList" @getBaseInfo="getBaseInfo"></ContactList> <ContactList v-if="id" :id="id" :data="bookingDetails.orderContactList" @getBaseInfo="getBaseInfo"></ContactList>
<Divider type="horizontal" /> <Divider type="horizontal" />
<!-- 备注信息 --> <!-- 备注信息 -->
<noteInfo ref="RefNoteInfo" :details="bookingDetails"></noteInfo> <noteInfo ref="RefNoteInfo" :details="bookingDetails" @transfData="transfData"></noteInfo>
<Divider type="horizontal" /> <Divider type="horizontal" />
<ediMore ref="RefediMore" :details="bookingDetails"></ediMore> <ediMore ref="RefediMore" :details="bookingDetails"></ediMore>
</a-tab-pane> </a-tab-pane>
@ -264,12 +264,29 @@
return '完成任务' return '完成任务'
} }
}) })
// 使
const transfData = (v) => {
const data = RefmailingInfo.value.getFieldsValueR()
RefNoteInfo.value.setAddress(data, v)
}
// //
const getFormSet = () => { const getFormSet = () => {
GetFormSetListByModule({ permissionId: permissionsInfo().permissionId }).then(res => { GetFormSetListByModule({ permissionId: permissionsInfo('/BookingDetail').permissionId }).then(res => {
const { data } = res const { data } = res
if (data && data.length) { if (data && data.length) {
const content = JSON.parse(data[0].content).columns 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) OtherInfo.value.updateSchema(content)
RefbasicInfo.value.updateSchema(content) RefbasicInfo.value.updateSchema(content)

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

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

@ -15,7 +15,7 @@
import { BasicForm, useForm } from '/@/components/Form/index' import { BasicForm, useForm } from '/@/components/Form/index'
import { noteFormSchema } from './baseInfo.tsx' import { noteFormSchema } from './baseInfo.tsx'
import emitter from '/@/utils/Bus' 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' import { useRoute } from 'vue-router'
const route = useRoute() const route = useRoute()
// //
@ -26,6 +26,7 @@
default: {}, default: {},
} }
}) })
const emit = defineEmits(['transfData'])
const [ const [
registerForm, registerForm,
{ getFieldsValue, updateSchema, resetFields, setFieldsValue, validate }, { getFieldsValue, updateSchema, resetFields, setFieldsValue, validate },
@ -34,9 +35,33 @@
schemas: noteFormSchema, schemas: noteFormSchema,
showActionButtonGroup: false, showActionButtonGroup: false,
}) })
const linkageForm = (item) => {
// //
const linkageForm = (v) => { if (item.key == 'issueDate') {
emitter.emit('setEtd', v) 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( watch(
() => props.details, () => props.details,
@ -68,6 +93,7 @@
// RefediFrom, // RefediFrom,
getFieldsValue, getFieldsValue,
updateSchema, updateSchema,
setAddress,
validate validate
}) })
</script> </script>

Loading…
Cancel
Save