揽货人联动 网络配置打印问题修复

szh-new
张同海 6 months ago
parent 16cf7cd3bc
commit c5fa4e64b8

@ -66,7 +66,7 @@ service.interceptors.request.use(
service.interceptors.response.use( service.interceptors.response.use(
(response) => { (response) => {
const res = response.data const res = response.data
if (!res.succeeded) { if (res.succeeded===false ) {
$message.error(res.message || UNKNOWN_ERROR) $message.error(res.message || UNKNOWN_ERROR)
} }
return response return response

@ -148,7 +148,7 @@ const FnsaleId: any = await GetSaleList()
if (FnsaleId.succeeded) { if (FnsaleId.succeeded) {
ListData.saleId = [] ListData.saleId = []
FnsaleId.data.forEach((e) => { FnsaleId.data.forEach((e) => {
ListData.saleId.push({ ...e, label: `${e.userName}/${e.userCode}`, value: e.id }) ListData.saleId.push({ ...e, label: e.userName, value: e.id })
}) })
} }
@ -1128,7 +1128,7 @@ export const columns: BasicColumn[] = [
width: 150, width: 150,
}, },
{ {
title: '尺', title: '尺',
dataIndex: 'cbm', dataIndex: 'cbm',
width: 150, width: 150,
}, },
@ -1744,26 +1744,6 @@ export const basicInfoFormSchema: FormSchema[] = [
}, },
}, },
}, },
{
label: '所属分部',
field: 'saleOrgId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: ListData.saleDeptId,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
console.log(e, obj)
},
},
},
{ {
label: '委托单位Nmae', label: '委托单位Nmae',
field: 'customerName', field: 'customerName',
@ -2142,17 +2122,30 @@ export const basicInfoFormSchema: FormSchema[] = [
} }
return RData return RData
}, },
onChange: (e, obj) => { onChange: async (e, obj) => {
if (e && obj) { if (e && obj) {
console.log(e, obj, '揽货人!!!!!!!!!!')
let saleDeptIdArr: any = []
formModel.sale = obj.label formModel.sale = obj.label
formModel.saleOrgId = obj.defaultOrgId formModel.saleOrgId = obj.defaultOrgId
formModel.saleDeptId = obj.deptId
if (formActionType) { if (formActionType) {
ListData.saleDeptId = [] ListData.saleDeptId = []
obj.saleOrgList.forEach((item) => { obj.saleOrgList.forEach((item) => {
ListData.saleDeptId.push({ label: item.orgName, value: item.orgId }) ListData.saleDeptId.push({ label: item.orgName, value: item.orgId })
}) })
if (obj.defaultOrgId) {
await GetDeptList({ orgId: obj.defaultOrgId }).then((res) => {
console.log(res, '所属分部 查询 所属部门')
res.data.forEach((item) => {
saleDeptIdArr.push({ label: item.orgName, value: item.id })
})
})
}
const { updateSchema } = formActionType const { updateSchema } = formActionType
updateSchema({ updateSchema([
{
label: '所属分部', label: '所属分部',
field: 'saleOrgId', field: 'saleOrgId',
component: 'Select', component: 'Select',
@ -2168,10 +2161,52 @@ export const basicInfoFormSchema: FormSchema[] = [
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
onChange: (e, obj) => { onChange: (e, obj) => {
console.log(e, obj) formModel.saleDeptId = ''
GetDeptList({ orgId: e }).then((res) => {
console.log(res, '所属分部 查询 所属部门')
let Arr: any = []
res.data.forEach((item) => {
Arr.push({ label: item.orgName, value: item.id })
})
updateSchema({
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: Arr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}, },
}, },
}) })
})
},
},
},
{
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: saleDeptIdArr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
])
} }
} else { } else {
formModel.sale = '' formModel.sale = ''
@ -2180,6 +2215,26 @@ export const basicInfoFormSchema: FormSchema[] = [
} }
}, },
}, },
{
label: '所属分部',
field: 'saleOrgId',
component: 'Select',
required: false,
colProps: { span: 4 },
dynamicDisabled: ({ values }) => {
return !values.saleId
},
},
{
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
colProps: { span: 4 },
dynamicDisabled: ({ values }) => {
return !values.saleOrgId
},
},
{ {
label: '客服员', label: '客服员',
field: 'customerService', field: 'customerService',
@ -2289,23 +2344,7 @@ export const basicInfoFormSchema: FormSchema[] = [
}, },
}, },
}, },
{
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: ListData.saleDeptId,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
// { // {
// field: 'czRemark', // field: 'czRemark',
// label: '操作备注', // label: '操作备注',
@ -3339,7 +3378,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [
}, },
}, },
{ {
label: '尺', label: '尺',
field: 'cbm', field: 'cbm',
component: 'InputNumber', component: 'InputNumber',
required: false, required: false,
@ -3512,7 +3551,7 @@ export const cargoInfoFormSchema2: FormSchema[] = [
// colProps: { span: 12 }, // colProps: { span: 12 },
// }, // },
// { // {
// label: '尺', // label: '尺',
// field: 'cbm', // field: 'cbm',
// component: 'InputNumber', // component: 'InputNumber',
// required: false, // required: false,
@ -4338,7 +4377,7 @@ export const goodsTablecolumns: BasicColumn[] = [
width: 80, width: 80,
}, },
{ {
title: '尺', title: '尺',
dataIndex: 'size', dataIndex: 'size',
align: 'left', align: 'left',
editRow: true, editRow: true,

@ -222,6 +222,8 @@
CheckCtnCover, CheckCtnCover,
GetCtnListRefsh, GetCtnListRefsh,
GetClientSourceDetailSelectList, GetClientSourceDetailSelectList,
GetSaleList,
GetDeptList,
} from '../api/BookingLedger' } from '../api/BookingLedger'
import { getDictDropDown } from '/@/api/common' import { getDictDropDown } from '/@/api/common'
const appStore = useAppStore() const appStore = useAppStore()
@ -638,6 +640,89 @@
}, },
}) })
} }
if (res.data.saleId) {
const FnsaleId: any = await GetSaleList()
FnsaleId.data.forEach(async (item) => {
if (item.id == res.data.saleId) {
let saleDeptIdArr: any = []
let saleOrgIdArr: any = []
item.saleOrgList.forEach((item) => {
saleOrgIdArr.push({ label: item.orgName, value: item.orgId })
})
if (item.defaultOrgId) {
await GetDeptList({ orgId: item.defaultOrgId }).then((res) => {
console.log(res, '所属分部 查询 所属部门')
res.data.forEach((item) => {
saleDeptIdArr.push({ label: item.orgName, value: item.id })
})
})
}
RefbasicInfo.value.updateSchema([
{
label: '所属分部',
field: 'saleOrgId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: saleOrgIdArr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
onChange: (e, obj) => {
// formModel.saleDeptId = ''
GetDeptList({ orgId: e }).then((res) => {
console.log(res, '所属分部 查询 所属部门')
let Arr: any = []
res.data.forEach((item) => {
Arr.push({ label: item.orgName, value: item.id })
})
updateSchema({
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: Arr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
})
})
},
},
},
{
label: '所属部门',
field: 'saleDeptId',
component: 'Select',
required: false,
dynamicDisabled: false,
// defaultValue: '',
colProps: { span: 4 },
componentProps: {
allowClear: true,
options: saleDeptIdArr,
showSearch: true,
filterOption: (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
},
},
},
])
}
})
}
}) })
.catch(() => { .catch(() => {
appStore.settopDown(false) appStore.settopDown(false)

@ -3,6 +3,7 @@ import { BasicColumn, FormSchema } from '/@/components/Table'
import { getRoleList, getOrgList, getDeptList } from '/@/api/common' import { getRoleList, getOrgList, getDeptList } from '/@/api/common'
import { Tag } from 'ant-design-vue' import { Tag } from 'ant-design-vue'
import { style } from '@logicflow/extension/es/bpmn-elements/presets/icons' import { style } from '@logicflow/extension/es/bpmn-elements/presets/icons'
import { t } from '/@/hooks/web/useI18n'
const selectOrgList = ref<any>([]) const selectOrgList = ref<any>([])
const selectDeptList = ref([]) const selectDeptList = ref([])
let ListData: any = await {} let ListData: any = await {}
@ -212,6 +213,7 @@ export const formSchema: FormSchema[] = [
field: 'email', field: 'email',
label: '邮箱', label: '邮箱',
component: 'Input', component: 'Input',
rules: [{ type: 'email', message: t('请填写正确的邮箱地址') }],
colProps: { span: 12 }, colProps: { span: 12 },
}, },
{ {
@ -313,10 +315,12 @@ export const formSchema: FormSchema[] = [
} }
}) })
}) })
if (formActionType) {
formActionType.setFieldsValue({ formActionType.setFieldsValue({
defaultOrgId: '', defaultOrgId: '',
deptId: '', deptId: '',
}) })
}
}, },
} }
}, },
@ -342,9 +346,11 @@ export const formSchema: FormSchema[] = [
selectDeptList.value.push({ label: e.orgName, value: e.id }) selectDeptList.value.push({ label: e.orgName, value: e.id })
}) })
} }
if (formActionType) {
formActionType.setFieldsValue({ formActionType.setFieldsValue({
deptId: '', deptId: '',
}) })
}
}, },
} }
}, },

Loading…
Cancel
Save