diff --git a/src/components/ApproveBtns/index.vue b/src/components/ApproveBtns/index.vue
index 45558a21..1783c605 100644
--- a/src/components/ApproveBtns/index.vue
+++ b/src/components/ApproveBtns/index.vue
@@ -107,7 +107,6 @@
}
const handleOk = async () => {
const res = await validate()
- console.log(res)
props.approve(res.remark)
visible.value = false
}
diff --git a/src/hooks/web/usePermission.ts b/src/hooks/web/usePermission.ts
index 6db5b94e..4698bdc4 100644
--- a/src/hooks/web/usePermission.ts
+++ b/src/hooks/web/usePermission.ts
@@ -21,13 +21,13 @@ import { useMultipleTabStore } from '/@/store/modules/multipleTab'
/**
* @description: 根据路由path获取当前表格的id
*/
-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
}
diff --git a/src/store/modules/configOptions.ts b/src/store/modules/configOptions.ts
index 4c16e495..63b8cfd1 100644
--- a/src/store/modules/configOptions.ts
+++ b/src/store/modules/configOptions.ts
@@ -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})`
diff --git a/src/store/modules/options.ts b/src/store/modules/options.ts
index 6473a62e..8149930c 100644
--- a/src/store/modules/options.ts
+++ b/src/store/modules/options.ts
@@ -78,7 +78,6 @@ export const useOptionsStore = defineStore({
} else {
// 没有值调用接口存数据
store.setOptionsByCode(code).then((res) => {
- console.log(res)
return res
})
}
diff --git a/src/store/modules/permission.ts b/src/store/modules/permission.ts
index 20dfefa2..0f4e9145 100644
--- a/src/store/modules/permission.ts
+++ b/src/store/modules/permission.ts
@@ -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) {
diff --git a/src/views/operation/seaexport/detail/components/ladingInfo.tsx b/src/views/operation/seaexport/detail/components/ladingInfo.tsx
index 45ee2a5c..b2db0436 100644
--- a/src/views/operation/seaexport/detail/components/ladingInfo.tsx
+++ b/src/views/operation/seaexport/detail/components/ladingInfo.tsx
@@ -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',
diff --git a/src/views/operation/seaexport/detail/components/ladingInfo.vue b/src/views/operation/seaexport/detail/components/ladingInfo.vue
index 925c892d..6aff0fdd 100644
--- a/src/views/operation/seaexport/detail/components/ladingInfo.vue
+++ b/src/views/operation/seaexport/detail/components/ladingInfo.vue
@@ -102,7 +102,7 @@
:ctnInfo="ctnInfo"
>
-
+
@@ -149,7 +149,7 @@
-
+
@@ -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
diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue
index bbae89af..b7a93ce8 100644
--- a/src/views/operation/seaexport/detail/index.vue
+++ b/src/views/operation/seaexport/detail/index.vue
@@ -80,7 +80,7 @@
-
+
@@ -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)
diff --git a/src/views/operation/seaexport/detail/modules/baseInfo.tsx b/src/views/operation/seaexport/detail/modules/baseInfo.tsx
index 896537ee..7227a850 100644
--- a/src/views/operation/seaexport/detail/modules/baseInfo.tsx
+++ b/src/views/operation/seaexport/detail/modules/baseInfo.tsx
@@ -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) {
diff --git a/src/views/operation/seaexport/detail/modules/basicInfo.vue b/src/views/operation/seaexport/detail/modules/basicInfo.vue
index 58a6cd63..00500155 100644
--- a/src/views/operation/seaexport/detail/modules/basicInfo.vue
+++ b/src/views/operation/seaexport/detail/modules/basicInfo.vue
@@ -24,7 +24,7 @@
diff --git a/src/views/operation/seaexport/detail/modules/noteInfo.vue b/src/views/operation/seaexport/detail/modules/noteInfo.vue
index 1d6351d5..f46ebf1c 100644
--- a/src/views/operation/seaexport/detail/modules/noteInfo.vue
+++ b/src/views/operation/seaexport/detail/modules/noteInfo.vue
@@ -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 = (v) => {
- emitter.emit('setEtd', v)
+ const linkageForm = (item) => {
+ // 选择签单日期联动改变开船日期
+ 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
})