海运出口详情bug

szh-new
lijingjia 3 months ago
parent 0e7ebee951
commit 6c535a349a

@ -56,27 +56,16 @@
name: {
type: String,
default: '',
},
isTransfer: {
type: Boolean,
default: false,
},
}
},
emits: ['TransferData'],
setup(props, context) {
const { t } = useI18n()
//
const addFormToSet = () => {
if (props.isTransfer) {
context.emit('TransferData')
} else {
FnaddFormToSet(null)
}
FnaddFormToSet()
}
const FnaddFormToSet = (e) => {
let data: any = e ? e : props.formSchema
console.log(data)
const FnaddFormToSet = () => {
const data = props.formSchema
const columns = data.map((item: FormSchema) => {
const res = {
defaultValue: item.defaultValue || '',

@ -30,6 +30,7 @@
<operationArea
:id="id"
:details="bookingDetails"
:inChildLoading="inChildLoading"
:source="source"
@refresh="refreshPage"
@SetOCR="SetOCR"
@ -215,7 +216,6 @@
import { Divider } from 'ant-design-vue'
const go = useGo()
const initDetail = {}
// loading
const loading = ref(false)
const id = ref(route.query.id)
@ -223,9 +223,10 @@
const source = ref(route.query.source || 'edit')
// const isCopy = ref(route.query.isCopy || false)
const Showtabs = ref(false)
const bookingDetails = ref({ ...initDetail })
const bookingDetails = ref({})
// // const bookingDetails = ref()
const tabActiveKey = ref('1')
const inChildLoading = ref(false)
const RefrightContent = ref()
const excuteRules = ref([])
const excuteRulesType = ref('')
@ -237,6 +238,7 @@
const RefediMore = ref(null)
const RefNoteInfo = ref(null)
const mainOrderActiveKey = ref('1-1')
const inPageLoading = ref(false)
const detailsLoadOver = ref(false)
// const cargoRules = ref(rules.cargoRules)
const isLockBooking = ref(false)
@ -290,7 +292,7 @@
if (route.query.id && !id.value) {
id.value = route.query.id
}
bookingDetails.value = { ...initDetail }
bookingDetails.value = {}
excuteRules.value = []
excuteRulesType.value = ''
Showtabs.value = false
@ -303,6 +305,11 @@
}
//
function getDetail() {
if (inPageLoading.value) {
return false
}
inPageLoading.value = true
inChildLoading.value = true
detailsLoadOver.value = false
loading.value = true
BookingOrderGet({
@ -322,9 +329,8 @@
if (!res.data.ctnPriceInfo.length) {
res.data.ctnPriceInfo = [{}]
}
console.log(res)
bookingDetails.value = res.data
appStore.settopDown(false)
inPageLoading.value = false
//
// if (res.data.sourceId) {
// let sourceDetailIdArr: any = []
@ -587,6 +593,7 @@
// }
// OCR
function SetOCR(data) {
console.log(data)
bookingDetails.value = { ...bookingDetails.value, ...data }
}
//

@ -7,12 +7,10 @@
<div class="ds-sea-basic-info">
<ConfigForm
v-if="source == 'edit'"
@TransferData="TransferData"
:form-schema="basicInfoFormSchema"
:isTransfer="true"
name="基础表单"
formNo="10"
ref="RefChilrenRef"
>
<a-button type="link">
<span class="iconfont icon-icon_tianjia"></span>
@ -124,17 +122,6 @@
updateFormItem(updateSchema, 10)
// //
const RefChilrenRef = ref('')
function TransferData() {
let Arr: any = []
basicInfoFormSchema.forEach((item) => {
Object.keys(getFieldsValue()).forEach((item2) => {
if (item2 == item.field && item2 !== 'id') {
Arr.push({ ...item, defaultValue: getFieldsValue()[item2] })
}
})
})
RefChilrenRef.value.FnaddFormToSet(Arr)
}
//
const toggleShpping = (v) => {
if (v == 'fxc') {

@ -19,12 +19,9 @@
<ConfigForm
v-if="source == 'edit'"
style="position: absolute; right: 0; top: -5px;"
@TransferData="TransferData"
:form-schema="cargoInfoFormSchema2"
:isTransfer="true"
name="货物表单"
name="货物信息"
formNo="12"
ref="RefChilrenRef"
>
<a-button type="link">
<span class="iconfont icon-icon_tianjia"></span>
@ -54,12 +51,17 @@
<div v-for="(item, index) in model.ctnPriceInfo" :key="index + 'ctn'" class="ctn-price-item">
<a-select
v-bind="$attrs"
v-model:value="item.ctn"
v-model:value="item.ctnId"
show-search
placeholder="请选择"
style="width: 72px"
:options="options"
:fieldNames="{
label: 'ctnName',
value: 'id'
}"
:options="optionsStore.getOptionsByCode('GetCtnSelectList')"
:filter-option="filterOption"
@change="ctnChange($event, item)"
>
</a-select>
<div style="width: 30px"></div>
@ -85,6 +87,7 @@
cargoInfoFormSchema3,
cargoInfoFormSchema4,
} from './baseInfo'
console.log(cargoInfoFormSchema2)
import { ref, watch, onMounted, computed } from 'vue'
import { useRoute } from 'vue-router'
import { getDictOption } from '/@/utils/dictUtil'
@ -348,10 +351,6 @@
}
}, 0)
}
//
const options = ref([])
const ctnDict = optionsStore.getOptionsByCode('GetCtnSelectList')
console.log(ctnDict)
const filterOption = (input, option) => {
return option.value.toLowerCase().indexOf(input.toLowerCase()) >= 0;
}
@ -414,19 +413,6 @@
})
}
})
//
const RefChilrenRef = ref('')
function TransferData() {
let Arr: any = []
cargoInfoFormSchema2.forEach((item) => {
Object.keys(getFieldsValue2()).forEach((item2) => {
if (item2 == item.field && item2 !== 'id') {
Arr.push({ ...item, defaultValue: getFieldsValue2()[item2] })
}
})
})
RefChilrenRef.value.FnaddFormToSet(Arr)
}
function SetTOTALNO(SS) {
let DSS = SS.toString()
const i = DSS.indexOf('\n')
@ -461,6 +447,14 @@
}
return enCapital
}
//
const ctnChange = (v, item) => {
optionsStore.getOptionsByCode('GetCtnSelectList').forEach(row => {
if (item.id == v) {
item.ctn = row.ctnName
}
})
}
function ToEn(a) {
// eslint-disable-next-line no-array-constructor
const arr1 = new Array('', ' thousand', ' million', ' billion')

@ -74,12 +74,10 @@
<ConfigForm
v-if="source == 'edit'"
style="position: absolute; right: 0; top: -5px;"
@TransferData="TransferData"
:form-schema="mailingInfoFormSchemaR"
:isTransfer="true"
name="运输信息表单"
formNo="11"
ref="RefChilrenRef"
>
<a-button type="link">
<span class="iconfont icon-icon_tianjia"></span>
@ -182,19 +180,6 @@
})
//
updateFormItem(updateSchemaR, 11)
//
const RefChilrenRef = ref('')
function TransferData() {
let Arr: any = []
mailingInfoFormSchemaR.forEach((item) => {
Object.keys(getFieldsValueR()).forEach((item2) => {
if (item2 == item.field && item2 !== 'id') {
Arr.push({ ...item, defaultValue: getFieldsValueR()[item2] })
}
})
})
RefChilrenRef.value.FnaddFormToSet(Arr)
}
//
const save = (model, key) => {
saveKey = key

Loading…
Cancel
Save