|
|
@@ -107,11 +107,26 @@ const GoodsTypeManage = () => { |
|
|
|
}; |
|
|
|
function initOrgList() { |
|
|
|
gettree().then((r) => { |
|
|
|
inittree(r.data); |
|
|
|
function inittree(datas) { |
|
|
|
for (var i in datas) { |
|
|
|
if( datas[i]['type']==2|| datas[i]['type']==3){ |
|
|
|
datas[i]['disabled']=false; |
|
|
|
}else{ |
|
|
|
datas[i]['disabled']=true; |
|
|
|
} |
|
|
|
|
|
|
|
if (datas[i].children) { |
|
|
|
inittree(datas[i].children); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
setOrgList(r.data); |
|
|
|
let list = {}; |
|
|
|
formateData(r.data); |
|
|
|
function formateData(datas) { |
|
|
|
for (var i in datas) { |
|
|
|
list[datas[i]['disabled']]=true; |
|
|
|
list[datas[i]['value']] = { text: datas[i]['title'] }; |
|
|
|
if (datas[i].children) { |
|
|
|
formateData(datas[i].children); |
|
|
@@ -241,7 +256,7 @@ const GoodsTypeManage = () => { |
|
|
|
更新 |
|
|
|
</a>, |
|
|
|
<a |
|
|
|
key="primary" |
|
|
|
key="primary2" |
|
|
|
onClick={() => { |
|
|
|
record.status = record.status == 0 ? 1 : 0; |
|
|
|
UpdateDeviceInfo(record).then((r) => { |
|
|
|