Commit 1c7e5845 by linjinhong

Merge remote-tracking branch 'origin/dev'

parents 9ae51498 e963395d
......@@ -32,6 +32,7 @@ declare module 'vue' {
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
......
......@@ -42,6 +42,7 @@
v-model="editForm"
:config="formConfig"
form-item-width="100%"
labelWidth="125"
>
</CustomizeForm>
......@@ -205,6 +206,7 @@ const formConfig = computed<IFormConfig[]>(() => [
},
],
},
{
prop: 'companyId',
type: 'select',
......@@ -223,6 +225,9 @@ const formConfig = computed<IFormConfig[]>(() => [
if (value.code === 'UINUIN') {
editFormRef.value?.refashConfig(['uinuinWarehouseId'])
editFormRef.value?.clearValidate()
} else if (value.code === 'YW') {
editFormRef.value?.refashConfig(['companyWarehouseCode'])
editFormRef.value?.clearValidate()
} else {
editFormRef.value?.refashConfig([])
editFormRef.value?.clearValidate()
......@@ -233,7 +238,7 @@ const formConfig = computed<IFormConfig[]>(() => [
rules: [
{
required: true,
message: '请选择仓库名称',
message: '请选择物流公司',
},
],
},
......@@ -255,28 +260,29 @@ const formConfig = computed<IFormConfig[]>(() => [
},
],
},
// {
// prop: 'ruleId',
// type: 'select',
// label: '申报规则',
// fixed: 'last',
// attrs: {
// placeholder: '请选择申报规则',
// label: 'name',
// value: 'id',
// options: [...(ruleNameList.value || [])],
// onChange: (value: { name: string; id: string | number }) => {
// editForm.value.ruleRef.ruleId = value.id
// editForm.value.ruleRef.ruleName = value.name
// },
// },
// rules: [
// {
// required: true,
// message: '请选择申报规则',
// },
// ],
// },
{
prop: 'companyWarehouseCode',
type: 'select',
label: '物流仓库编码',
isIncludeProp: true,
attrs: {
placeholder: '请选择物流仓库编码',
options: [
{ label: 'LAX01', value: 'LAX01' },
{ label: 'NJC01', value: 'NJC01' },
{ label: 'ORD01', value: 'ORD01' },
{ label: 'MIA01', value: 'MIA01' },
{ label: 'DFW01', value: 'DFW01' },
],
},
rules: [
{
required: true,
message: '请选择物流仓库编码',
},
],
},
{
prop: 'serviceCode',
type: 'input',
......@@ -599,11 +605,13 @@ async function editWay(item: LogisticsMethod) {
console.log(493, editForm.value)
dialogVisible.value = true
if (item.uinuinWarehouseId) {
nextTick(() => {
nextTick(() => {
if (item.uinuinWarehouseId) {
editFormRef.value?.refashConfig(['uinuinWarehouseId'])
})
}
} else if (item.companyWarehouseCode) {
editFormRef.value?.refashConfig(['companyWarehouseCode'])
}
})
} catch (e) {
console.log(e)
}
......
......@@ -13,6 +13,7 @@ export interface LogisticsMethod {
ruleId?: string | number
ruleList?: ruleRefObj[]
uinuinWarehouseId?: number | string | null
companyWarehouseCode?: number | string | null
}
export interface LogisticsMethodList {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment