szh-new
张同海 1 month ago
parent 955713458a
commit 8f96b7083d

@ -73,8 +73,6 @@
}) })
const DiyFieldIdS = ref<any>([]) const DiyFieldIdS = ref<any>([])
function linkageForm(data) { function linkageForm(data) {
console.log(data, 11111111)
// Schema // Schema
if (DiyFieldIdS.value.length) { if (DiyFieldIdS.value.length) {
DiyFieldIdS.value.forEach((item) => { DiyFieldIdS.value.forEach((item) => {
@ -84,6 +82,7 @@
} }
DiyFieldIdS.value.splice(0) DiyFieldIdS.value.splice(0)
console.log(data, 11111111)
data.forEach((item) => { data.forEach((item) => {
appendSchemaByField( appendSchemaByField(
[ [
@ -325,6 +324,7 @@
label: element.templateName, label: element.templateName,
}) })
DiyFieldIdSObj[e.templateId] = e.fileName DiyFieldIdSObj[e.templateId] = e.fileName
DiyFieldIdSObj[`${e.templateId}-fileType`] = e.fileType
} }
}) })
}) })

@ -208,8 +208,8 @@ export const formSchema: FormSchema[] = [
mode: 'multiple', mode: 'multiple',
class: 'NoLimitHeight', class: 'NoLimitHeight',
onChange: (e, obj) => { onChange: (e, obj) => {
if (formModel && formModel.id) { if (formModel && formModel.id && obj) {
console.log(formModel.id) console.log(formModel.id, e, obj)
let DelData: any = [] let DelData: any = []
if (formModel.attachments.length) { if (formModel.attachments.length) {
@ -355,6 +355,19 @@ export const ReceiverformSchema: FormSchema[] = [
unCheckedValue: false, unCheckedValue: false,
}, },
}, },
{
field: 'isShipperCn',
label: '是否国内发货人',
component: 'Switch',
colProps: { span: 6 },
defaultValue: false,
componentProps: {
checkedChildren: '是',
checkedValue: true,
unCheckedChildren: '否',
unCheckedValue: false,
},
},
] ]
export const SenderformSchema: FormSchema[] = [ export const SenderformSchema: FormSchema[] = [
{ {

@ -31,7 +31,7 @@ export const columns: BasicColumn[] = [
width: 120, width: 120,
}, },
{ {
title: '费用对象', title: '客户名称',
dataIndex: 'customerName', dataIndex: 'customerName',
width: 200, width: 200,
}, },
@ -223,7 +223,7 @@ export const formSchema: FormSchema[] = [
// }, // },
{ {
field: 'customerId', field: 'customerId',
label: '费用对象', label: '客户名称',
defaultValue: '', defaultValue: '',
component: 'Input', component: 'Input',
show: false, show: false,
@ -231,44 +231,44 @@ export const formSchema: FormSchema[] = [
}, },
{ {
field: 'customerName', field: 'customerName',
label: '费用对象', label: '客户名称',
component: 'Input', component: 'Input',
defaultValue: '', defaultValue: '',
dynamicDisabled: true, dynamicDisabled: true,
colProps: { span: 6 }, colProps: { span: 6 },
}, },
{ // {
field: 'customerType', // field: 'customerType',
label: '费用对象类别', // label: '客户名称类别',
defaultValue: '', // defaultValue: '',
component: 'ApiSelect', // component: 'ApiSelect',
colProps: { span: 6 }, // colProps: { span: 6 },
componentProps: ({ formModel }) => { // componentProps: ({ formModel }) => {
return { // return {
api: () => { // api: () => {
return new Promise((resolve) => { // return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => { // getDictOption('djy_cust_prop').then((res) => {
resolve(res) // resolve(res)
}) // })
}) // })
}, // },
labelField: 'label', // labelField: 'label',
valueField: 'value', // valueField: 'value',
resultField: 'data', // resultField: 'data',
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
}, // },
} // }
}, // },
dynamicRules: ({ values }) => { // dynamicRules: ({ values }) => {
return [ // return [
{ // {
required: values.customerId ? false : true, // required: values.customerId ? false : true,
message: '未选择费用对象时,此项必填!', // message: '未选择客户名称时,此项必填!',
}, // },
] // ]
}, // },
}, // },
// { // {
// label: '', // label: '',
// field: 'customerId', // field: 'customerId',

@ -36,7 +36,7 @@ export const columns: BasicColumn[] = [
width: 120, width: 120,
}, },
{ {
title: '费用对象', title: '客户名称',
dataIndex: 'customerName', dataIndex: 'customerName',
width: 200, width: 200,
}, },
@ -243,7 +243,7 @@ export const formSchema: FormSchema[] = [
// }, // },
{ {
field: 'customerName', field: 'customerName',
label: '费用对象', label: '客户名称',
defaultValue: '', defaultValue: '',
component: 'Input', component: 'Input',
show: false, show: false,
@ -251,7 +251,7 @@ export const formSchema: FormSchema[] = [
}, },
{ {
field: 'customerId', field: 'customerId',
label: '费用对象', label: '客户名称',
component: 'ApiSelect', component: 'ApiSelect',
required: false, required: false,
dynamicDisabled: false, dynamicDisabled: false,
@ -277,38 +277,38 @@ export const formSchema: FormSchema[] = [
} }
}, },
}, },
{ // {
field: 'customerType', // field: 'customerType',
label: '费用对象类别', // label: '客户名称类别',
defaultValue: '', // defaultValue: '',
component: 'ApiSelect', // component: 'ApiSelect',
colProps: { span: 6 }, // colProps: { span: 6 },
componentProps: ({ formModel }) => { // componentProps: ({ formModel }) => {
return { // return {
api: () => { // api: () => {
return new Promise((resolve) => { // return new Promise((resolve) => {
getDictOption('djy_cust_prop').then((res) => { // getDictOption('djy_cust_prop').then((res) => {
resolve(res) // resolve(res)
}) // })
}) // })
}, // },
labelField: 'label', // labelField: 'label',
valueField: 'value', // valueField: 'value',
resultField: 'data', // resultField: 'data',
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
}, // },
} // }
}, // },
dynamicRules: ({ values }) => { // dynamicRules: ({ values }) => {
return [ // return [
{ // {
required: values.customerId ? false : true, // required: values.customerId ? false : true,
message: '未选择费用对象时,此项必填!', // message: '未选择客户名称时,此项必填!',
}, // },
] // ]
}, // },
}, // },
// { // {
// label: '', // label: '',
// field: 'customerId', // field: 'customerId',

Loading…
Cancel
Save