|
|
|
@ -13,7 +13,20 @@
|
|
|
|
|
></div>
|
|
|
|
|
</template>
|
|
|
|
|
<div class="container cargo-info">
|
|
|
|
|
<BasicForm @register="registerForm" />
|
|
|
|
|
<a-row :gutter="16">
|
|
|
|
|
<a-col :span="5">
|
|
|
|
|
<BasicForm @register="registerForm1" />
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="10">
|
|
|
|
|
<BasicForm @register="registerForm2" />
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="9">
|
|
|
|
|
<BasicForm @register="registerForm3" @asd="asd" />
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :span="24">
|
|
|
|
|
<BasicForm @register="registerForm4" />
|
|
|
|
|
</a-col>
|
|
|
|
|
</a-row>
|
|
|
|
|
<!-- <a-form :selfUpdate="true" ref="RefcargoFrom" :model="props.details" :rules="rules">
|
|
|
|
|
<a-row :gutter="10">
|
|
|
|
|
<a-col :span="5">
|
|
|
|
@ -577,7 +590,12 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
|
import { cargoInfoFormSchema } from '/@/views/operation/seaexport/columns'
|
|
|
|
|
import {
|
|
|
|
|
cargoInfoFormSchema1,
|
|
|
|
|
cargoInfoFormSchema2,
|
|
|
|
|
cargoInfoFormSchema3,
|
|
|
|
|
cargoInfoFormSchema4,
|
|
|
|
|
} from '/@/views/operation/seaexport/columns'
|
|
|
|
|
import { ref, getCurrentInstance, watch, onMounted } from 'vue'
|
|
|
|
|
import inputView from '../components/inputView.vue'
|
|
|
|
|
import textareaView from '../components/textareaView.vue'
|
|
|
|
@ -614,12 +632,62 @@
|
|
|
|
|
inSave: { type: Boolean, default: false },
|
|
|
|
|
moreStr: { type: String, default: '' },
|
|
|
|
|
})
|
|
|
|
|
const [registerForm, { getFieldsValue, validateFields, resetFields, setFieldsValue, validate }] =
|
|
|
|
|
useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: cargoInfoFormSchema,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const [
|
|
|
|
|
registerForm1,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValue1,
|
|
|
|
|
validateFields: validateFields1,
|
|
|
|
|
setFieldsValue: setFieldsValue1,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: cargoInfoFormSchema1,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const [
|
|
|
|
|
registerForm2,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValue2,
|
|
|
|
|
validateFields: validateFields2,
|
|
|
|
|
setFieldsValue: setFieldsValue2,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: cargoInfoFormSchema2,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const [
|
|
|
|
|
registerForm3,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValue3,
|
|
|
|
|
validateFields: validateFields3,
|
|
|
|
|
setFieldsValue: setFieldsValue3,
|
|
|
|
|
validate: validate3,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: cargoInfoFormSchema3,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
submitFunc: asd,
|
|
|
|
|
})
|
|
|
|
|
async function asd() {
|
|
|
|
|
// let data = await validate3()
|
|
|
|
|
// console.log('奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪', data)
|
|
|
|
|
let data = ''
|
|
|
|
|
console.log('奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪-奇奇怪怪', data)
|
|
|
|
|
}
|
|
|
|
|
const [
|
|
|
|
|
registerForm4,
|
|
|
|
|
{
|
|
|
|
|
getFieldsValue: getFieldsValue4,
|
|
|
|
|
validateFields: validateFields4,
|
|
|
|
|
setFieldsValue: setFieldsValue4,
|
|
|
|
|
},
|
|
|
|
|
] = useForm({
|
|
|
|
|
labelWidth: 80,
|
|
|
|
|
schemas: cargoInfoFormSchema4,
|
|
|
|
|
showActionButtonGroup: false,
|
|
|
|
|
})
|
|
|
|
|
const emit = defineEmits(['pkgsEnCapital', 'changeDetail'])
|
|
|
|
|
let { ctx: that, proxy }: any = getCurrentInstance()
|
|
|
|
|
const showKey = ref(['1'])
|
|
|
|
@ -658,7 +726,10 @@
|
|
|
|
|
watch(
|
|
|
|
|
() => props.details,
|
|
|
|
|
(nval) => {
|
|
|
|
|
setFieldsValue(nval)
|
|
|
|
|
setFieldsValue1(nval)
|
|
|
|
|
setFieldsValue2(nval)
|
|
|
|
|
setFieldsValue3(nval)
|
|
|
|
|
setFieldsValue4(nval)
|
|
|
|
|
// if (!props.inSave) {
|
|
|
|
|
// emit('changeDetail', {
|
|
|
|
|
// detail: nval,
|
|
|
|
@ -986,10 +1057,24 @@
|
|
|
|
|
textEntryModalTitle.value = ''
|
|
|
|
|
textEntryType.value = false
|
|
|
|
|
}
|
|
|
|
|
function getFieldsValue() {
|
|
|
|
|
return {
|
|
|
|
|
...getFieldsValue1(),
|
|
|
|
|
...getFieldsValue2(),
|
|
|
|
|
...getFieldsValue3(),
|
|
|
|
|
...getFieldsValue4(),
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function validateFields() {
|
|
|
|
|
validateFields1()
|
|
|
|
|
validateFields2()
|
|
|
|
|
validateFields3()
|
|
|
|
|
validateFields4()
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
// RefcargoFrom,
|
|
|
|
|
getFieldsValue,
|
|
|
|
|
validateFields,
|
|
|
|
|
getFieldsValue,
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="less" scoped>
|
|
|
|
|