Browse Source

设备只能绑定门店

tags/小炒逻辑变更前
gwbvipvip 2 years ago
parent
commit
6e57d307e6
1 changed files with 16 additions and 1 deletions
  1. +16
    -1
      src/pages/device/deviceInfo/index.jsx

+ 16
- 1
src/pages/device/deviceInfo/index.jsx View File

@@ -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) => {


Loading…
Cancel
Save