下拉框回显

This commit is contained in:
‘huanghaiixia’
2026-03-02 14:41:03 +08:00
parent 594d9ebd11
commit d4d18129d2
19 changed files with 93 additions and 67 deletions

View File

@ -363,6 +363,7 @@
formState.empName = userInfo.name
formState.empId = userInfo.id
formState.tel = userInfo.mobile
getOptionParams()
}
let a = await getParameter({code: 'RATE_TON_GJ'})||[]
rateCode.value = a[0]?.valueNum1
@ -413,6 +414,7 @@
formState.dateSign = formState.dateSign ? dayjs(formState.dateSign) : null
formState.dateFrom = formState.dateFrom ? dayjs(formState.dateFrom) : null
formState.dateTo = formState.dateTo ? dayjs(formState.dateTo) : null
getOptionParams()
dataListPrice.value.forEach(v =>{
v.lngPriceTransPngList.forEach(k => {
k.dateFromNew = k.dateFrom ? dayjs(k.dateFrom) : null
@ -439,15 +441,17 @@
optionSelect.kPeriodList = await getDictionary('LNG_K_PER')
optionSelect.approCodeList = await getDictionary('LNG_APPRO')
optionSelect.dateToCodeList = await getDictionary('LNG_D_TO')
optionSelect.curCodeList = await getAllCurrency()
if (!pageId.value) {
getCompDeptInfo(userInfo.id)
}
}
const getCompDeptInfo = async (id)=> {
const res = await getCompDept(id)
async function getOptionParams() {
optionSelect.curCodeList = await getAllCurrency({eid: formState.curCode})
}
const getCompDeptInfo = async (id, deptId)=> {
const res = await getCompDept(id, deptId)
formState.bDeptName = res?.dept?.name
formState.bDeptId = res?.dept?.id
@ -543,11 +547,11 @@
}
const handleSuccess = (val) => {
const handleSuccess = (val, deptId) => {
formState.empName = val[0].name
formState.empId = val[0].id
formState.tel = val[0].mobile
getCompDeptInfo(formState.empId)
getCompDeptInfo(formState.empId, deptId)
}
const handleSuccessSupplier = (val) => {
formState.cpCode = val[0].suCode