60 lines
1.8 KiB
JavaScript
60 lines
1.8 KiB
JavaScript
let objParam, objParam2 = null;
|
|
let form, table, tableIns, layer;
|
|
let pageNum = 1;
|
|
|
|
function setParams(params) {
|
|
objParam = JSON.parse(params);
|
|
console.log(objParam);
|
|
$('#dataSource').html(objParam.dataSource);
|
|
$('#titleName').html(objParam.bdname);
|
|
layui.use(["form", "table", 'layer'], function () {
|
|
form = layui.form;
|
|
table = layui.table;
|
|
layer = layui.layer;
|
|
getDetails();
|
|
});
|
|
}
|
|
|
|
// 获取详情
|
|
function getDetails() {
|
|
let params = {
|
|
encryptedData: JSON.stringify({
|
|
id: objParam.id
|
|
})
|
|
};
|
|
let url = dataUrl + 'backstage/pro/getProDetail';
|
|
ajaxRequest(url, "POST", params, true, function () {
|
|
}, function (result) {
|
|
console.error(result);
|
|
if (result.code === 200) {
|
|
setTableData(result.data);
|
|
}
|
|
}, function (xhr, status, error) {
|
|
errorFn(xhr, status, error)
|
|
}, null);
|
|
// 基本数据表格赋值
|
|
function setTableData(obj) {
|
|
// 施工管理平台字段信息
|
|
$('#bdname').html(obj.bdname);
|
|
$('#bmname').html(obj.bmname);
|
|
$('#projectcategory').html(obj.projectcategory);
|
|
$('#voltagelevel').html(obj.voltagelevel);
|
|
$('#constructionsite').html(obj.constructionsite);
|
|
$('#starttime').html(obj.starttime);
|
|
$('#completiontime').html(obj.completiontime);
|
|
$('#xmZt').html(obj.xmZt);
|
|
|
|
// 扩充字段信息
|
|
$('#proCode').html(obj.proCode);
|
|
$('#xmjl').html(obj.xmjl);
|
|
$('#xmxz').html(obj.xmxz);
|
|
$('#lxdh').html(obj.lxdh);
|
|
$('#telPhone').html(obj.telPhone);
|
|
$('#cz').html(obj.cz);
|
|
$('#gcsd').html(obj.gcsd);
|
|
$('#cly').html(obj.cly);
|
|
$('#gls').html(obj.gls);
|
|
$('#clyPhone').html(obj.clyPhone);
|
|
$('#remark').html(obj.remark);
|
|
}
|
|
} |