Commit a4abcadc by 杨树贤

优化查看按钮

parent 8d67920c
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
align: 'center', align: 'center',
width: 200, width: 200,
templet: function (data) { templet: function (data) {
return '<span>' + data.supplier_email + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_email" contact_id="' + data.contact_id + '">查看</span>' return data.supplier_email ? '<span>' + data.supplier_email + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_email" contact_id="' + data.contact_id + '">查看</span>' : '';
} }
}, },
{ {
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
align: 'center', align: 'center',
width: 180, width: 180,
templet: function (data) { templet: function (data) {
return '<span>' + data.supplier_mobile + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_mobile" contact_id="' + data.contact_id + '">查看</span>' return data.supplier_mobile ? '<span>' + data.supplier_mobile + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_mobile" contact_id="' + data.contact_id + '">查看</span>' : '';
} }
}, },
{ {
...@@ -53,12 +53,12 @@ ...@@ -53,12 +53,12 @@
align: 'center', align: 'center',
width: 180, width: 180,
templet: function (data) { templet: function (data) {
return '<span>' + data.supplier_telephone + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_telephone" contact_id="' + data.contact_id + '">查看</span></span>' return data.supplier_telephone ? '<span>' + data.supplier_telephone + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_telephone" contact_id="' + data.contact_id + '">查看</span></span>' : '';
} }
}, },
{ {
field: 'supplier_qq', title: 'QQ', align: 'center', width: 180, templet: function (data) { field: 'supplier_qq', title: 'QQ', align: 'center', width: 180, templet: function (data) {
return '<span>' + data.supplier_qq + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_qq" contact_id="' + data.contact_id + '">查看</span>' return data.supplier_qq ? '<span>' + data.supplier_qq + '</span><span style="color: dodgerblue" class="viewContact" type="supplier_qq" contact_id="' + data.contact_id + '">查看</span>' : '';
} }
}, },
{field: 'supplier_fax', title: '传真', align: 'center', width: 140}, {field: 'supplier_fax', title: '传真', align: 'center', width: 140},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment