Commit 369039b9 by 胡悦

修复bug

1 parent 9fc2ce3c
...@@ -261,10 +261,13 @@ ...@@ -261,10 +261,13 @@
getList(qs('merchantId')) getList(qs('merchantId'))
$('#addUpdateTitle').text('修改员工') $('#addUpdateTitle').text('修改员工')
} }
findAllMerchant() findAllMerchant(function (result) {
if (result) {
$('#merchantSelect').removeClass('hide') $('#merchantSelect').removeClass('hide')
$('#merchantSelect').addClass('show') $('#merchantSelect').addClass('show')
} }
})
}
/** 手动触发事件 */ /** 手动触发事件 */
// 上传图片 // 上传图片
...@@ -393,9 +396,13 @@ ...@@ -393,9 +396,13 @@
request(visibleMerchantParams, function (res) { request(visibleMerchantParams, function (res) {
if (res.code == '0') { if (res.code == '0') {
if (id) { if (id) {
findAllMerchant(function(result) {
if (result) {
getById(function (checkedList) { getById(function (checkedList) {
createMerchant(checkedList, res.data) createMerchant(checkedList, res.data)
}) })
}
})
} else { } else {
const arr = [] const arr = []
arr.push(+merchantId) arr.push(+merchantId)
...@@ -421,7 +428,7 @@ ...@@ -421,7 +428,7 @@
} }
// 查询所有商户 // 查询所有商户
function findAllMerchant() { function findAllMerchant(callback) {
var params = { method: 'cn.com.glsx.merchants.menu.findAllMerchant' } var params = { method: 'cn.com.glsx.merchants.menu.findAllMerchant' }
request(params, function (result) { request(params, function (result) {
if (result.code == '0') { if (result.code == '0') {
...@@ -432,6 +439,7 @@ ...@@ -432,6 +439,7 @@
merchantName.append(new Option(item.merchantName, item.id)) merchantName.append(new Option(item.merchantName, item.id))
}) })
form.render('select') form.render('select')
callback(true)
} }
}) })
} }
......
...@@ -293,7 +293,7 @@ ...@@ -293,7 +293,7 @@
if (res.code == '0') { if (res.code == '0') {
employeeData = helper.clone(true, res.data) employeeData = helper.clone(true, res.data)
for (var i in basicArr) { for (var i in basicArr) {
$('#' + [basicArr[i]]).text(employeeData[basicArr[i]]) $('#' + [basicArr[i]]).text(employeeData[basicArr[i]] ? employeeData[basicArr[i]] : '无')
} }
if (employeeData.visibleInferiorMerName) { if (employeeData.visibleInferiorMerName) {
var visibleName = employeeData.visibleInferiorMerName.split(',') var visibleName = employeeData.visibleInferiorMerName.split(',')
......
...@@ -139,7 +139,7 @@ ...@@ -139,7 +139,7 @@
console.log(roleData) console.log(roleData)
roleData = helper.clone(true, res.data) roleData = helper.clone(true, res.data)
for (var i in basicArr) { for (var i in basicArr) {
$('#' + [basicArr[i]]).text(roleData[basicArr[i]] || '') $('#' + [basicArr[i]]).text(roleData[basicArr[i]] || '无')
} }
// callback(roleData.responseList) // callback(roleData.responseList)
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!