Merge branch 'master' of http://git.excellentkk.cn/mkm/TaskSystem-admin
This commit is contained in:
commit
afe8fd1d72
@ -990,21 +990,42 @@ const getAreaList = async () => {
|
||||
const getStreetList = async () => {
|
||||
const data = await apiStreetList({ street: formData.area })
|
||||
if (formData.company_type == 16) {
|
||||
ResponsibleArea('area', formData.area)
|
||||
const f = await companyResponsibleArea({
|
||||
key: 'area',
|
||||
value: formData.area
|
||||
})
|
||||
data.forEach((item: any) => {
|
||||
if (f.find((t: any) => item.street_code == t + '')) item.disabled = true
|
||||
else item.disabled = false
|
||||
})
|
||||
}
|
||||
datas['streetOptions'] = data
|
||||
}
|
||||
const getVillageList = async () => {
|
||||
const data = await apiVillageList({ village: formData.street })
|
||||
if (formData.company_type == 17) {
|
||||
ResponsibleArea('street', formData.street)
|
||||
const f = await companyResponsibleArea({
|
||||
key: 'street',
|
||||
value: formData.street
|
||||
})
|
||||
data.forEach((item: any) => {
|
||||
if (f.find((t: any) => item.village_code == t + '')) item.disabled = true
|
||||
else item.disabled = false
|
||||
})
|
||||
}
|
||||
datas['villageOptions'] = data
|
||||
}
|
||||
const getBrigadeList = async () => {
|
||||
const data = await apiBrigadeList()
|
||||
if (formData.company_type == 18) {
|
||||
ResponsibleArea('village', formData.village)
|
||||
const f = await companyResponsibleArea({
|
||||
key: 'village',
|
||||
value: formData.village
|
||||
})
|
||||
data.forEach((item: any) => {
|
||||
if (f.find((t: any) => item.id == t + '')) item.disabled = true
|
||||
else item.disabled = false
|
||||
})
|
||||
}
|
||||
|
||||
// // 获取已选择的小队
|
||||
@ -1012,17 +1033,6 @@ const getBrigadeList = async () => {
|
||||
datas['brigadeOptions'] = data
|
||||
}
|
||||
getProvinceList()
|
||||
|
||||
const ResponsibleArea = async (key: any, value: any) => {
|
||||
const f = await companyResponsibleArea({
|
||||
key: key,
|
||||
value: value
|
||||
})
|
||||
f.forEach((item: any) => {
|
||||
if (f.find((t: any) => item.id == t + '')) item.disabled = true
|
||||
else item.disabled = false
|
||||
})
|
||||
}
|
||||
const getcontract_type = async () => {
|
||||
const data = await dictDataLists({ type_id: 7 })
|
||||
datas['contract_type'] = data['lists']
|
||||
|
Loading…
x
Reference in New Issue
Block a user