Commit 2eae6a7f by 胡悦

设置默认值

1 parent 81e54083
...@@ -849,8 +849,8 @@ ...@@ -849,8 +849,8 @@
}) })
// merchantForm.businessScopeCustomize = tempList.join(',') // merchantForm.businessScopeCustomize = tempList.join(',')
// params.businessScopeCustomize = tempList.join(',') // params.businessScopeCustomize = tempList.join(',')
if (treeObj) merchantForm.merchantBrand = treeObj.getCheckedNodes(true) if (treeObj) merchantForm.merchantBrandMain = treeObj.getCheckedNodes(true)
params.merchantBrand = findId(merchantForm.merchantBrand).join(',') params.merchantBrandMain = findId(merchantForm.merchantBrandMain).join(',')
if (merchantForm.merchantFiles.length) { if (merchantForm.merchantFiles.length) {
params.merchantFiles = JSON.stringify(merchantForm.merchantFiles) params.merchantFiles = JSON.stringify(merchantForm.merchantFiles)
} }
...@@ -1284,8 +1284,8 @@ ...@@ -1284,8 +1284,8 @@
if (res.data && res.data.length) { if (res.data && res.data.length) {
$('#carBrandTree').removeClass('hide') $('#carBrandTree').removeClass('hide')
var checkedList = [] var checkedList = []
if (editLevel == 3 && merchantForm.merchantBrand) { if (editLevel == 3 && merchantForm.merchantBrandMain) {
checkedList = merchantForm.merchantBrand.split(',') checkedList = merchantForm.merchantBrandMain.split(',')
$.each(checkedList, function (index, item) { $.each(checkedList, function (index, item) {
checkedList[index] = parseInt(item) checkedList[index] = parseInt(item)
}) })
...@@ -1369,14 +1369,9 @@ ...@@ -1369,14 +1369,9 @@
var optionEl = $( var optionEl = $(
'<input type="checkbox" class="businessType" name="businessType[' + item.dictValue + ']" title=' + item.dictLabel + ' value="' + item.dictValue + '" lay-skin="primary">' '<input type="checkbox" class="businessType" name="businessType[' + item.dictValue + ']" title=' + item.dictLabel + ' value="' + item.dictValue + '" lay-skin="primary">'
) )
// 修改-回显 if (item.dictValue <= 6) {
if (editLevel == 3) {
for (var i = 0; i <= checkedList.length; i++) {
if (checkedList[i] == item.dictValue) {
optionEl.attr('checked', true) optionEl.attr('checked', true)
break optionEl.attr('disabled', true)
}
}
} }
el.append(optionEl) el.append(optionEl)
form.render('checkbox') form.render('checkbox')
......
...@@ -855,8 +855,8 @@ ...@@ -855,8 +855,8 @@
}) })
// merchantForm.businessScopeCustomize = tempList.join(',') // merchantForm.businessScopeCustomize = tempList.join(',')
// params.businessScopeCustomize = tempList.join(',') // params.businessScopeCustomize = tempList.join(',')
if (treeObj) merchantForm.merchantBrand = treeObj.getCheckedNodes(true) if (treeObj) merchantForm.merchantBrandMain = treeObj.getCheckedNodes(true)
params.merchantBrand = findId(merchantForm.merchantBrand).join(',') params.merchantBrandMain = findId(merchantForm.merchantBrandMain).join(',')
if (merchantForm.merchantFiles.length) { if (merchantForm.merchantFiles.length) {
params.merchantFiles = JSON.stringify(merchantForm.merchantFiles) params.merchantFiles = JSON.stringify(merchantForm.merchantFiles)
} }
...@@ -1293,8 +1293,8 @@ ...@@ -1293,8 +1293,8 @@
if (res.data && res.data.length) { if (res.data && res.data.length) {
$('#carBrandTree').removeClass('hide') $('#carBrandTree').removeClass('hide')
var checkedList = [] var checkedList = []
if (editLevel == 3 && merchantForm.merchantBrand) { if (editLevel == 3 && merchantForm.merchantBrandMain) {
checkedList = merchantForm.merchantBrand.split(',') checkedList = merchantForm.merchantBrandMain.split(',')
$.each(checkedList, function (index, item) { $.each(checkedList, function (index, item) {
checkedList[index] = parseInt(item) checkedList[index] = parseInt(item)
}) })
...@@ -1378,14 +1378,9 @@ ...@@ -1378,14 +1378,9 @@
var optionEl = $( var optionEl = $(
'<input type="checkbox" class="businessType" name="businessType[' + item.dictValue + ']" title=' + item.dictLabel + ' value="' + item.dictValue + '" lay-skin="primary">' '<input type="checkbox" class="businessType" name="businessType[' + item.dictValue + ']" title=' + item.dictLabel + ' value="' + item.dictValue + '" lay-skin="primary">'
) )
// 修改-回显 if (item.dictValue <= 6) {
if (editLevel == 3) {
for (var i = 0; i <= checkedList.length; i++) {
if (checkedList[i] == item.dictValue) {
optionEl.attr('checked', true) optionEl.attr('checked', true)
break optionEl.attr('disabled', true)
}
}
} }
el.append(optionEl) el.append(optionEl)
form.render('checkbox') form.render('checkbox')
......
...@@ -840,8 +840,8 @@ ...@@ -840,8 +840,8 @@
}) })
// merchantForm.businessScopeCustomize = tempList.join(',') // merchantForm.businessScopeCustomize = tempList.join(',')
// params.businessScopeCustomize = tempList.join(',') // params.businessScopeCustomize = tempList.join(',')
if (treeObj) merchantForm.merchantBrand = treeObj.getCheckedNodes(true) if (treeObj) merchantForm.merchantBrandMain = treeObj.getCheckedNodes(true)
params.merchantBrand = findId(merchantForm.merchantBrand).join(',') params.merchantBrandMain = findId(merchantForm.merchantBrandMain).join(',')
if (merchantForm.merchantFiles.length) { if (merchantForm.merchantFiles.length) {
params.merchantFiles = JSON.stringify(merchantForm.merchantFiles) params.merchantFiles = JSON.stringify(merchantForm.merchantFiles)
} }
...@@ -1294,8 +1294,8 @@ ...@@ -1294,8 +1294,8 @@
if (res.data && res.data.length) { if (res.data && res.data.length) {
$('#carBrandTree').removeClass('hide') $('#carBrandTree').removeClass('hide')
var checkedList = [] var checkedList = []
if (editLevel == 3 && merchantForm.merchantBrand) { if (editLevel == 3 && merchantForm.merchantBrandMain) {
checkedList = merchantForm.merchantBrand.split(',') checkedList = merchantForm.merchantBrandMain.split(',')
$.each(checkedList, function (index, item) { $.each(checkedList, function (index, item) {
checkedList[index] = parseInt(item) checkedList[index] = parseInt(item)
}) })
...@@ -1388,6 +1388,9 @@ ...@@ -1388,6 +1388,9 @@
} }
} }
} }
if (item.dictValue <= 6) {
optionEl.attr('disabled', true)
}
el.append(optionEl) el.append(optionEl)
form.render('checkbox') form.render('checkbox')
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!