提交 a9a12697 编写于 作者: Skyeye云's avatar Skyeye云

feat: 表单布局修改

上级 bfd5b92c
......@@ -98,12 +98,12 @@ layui.config({
dsFormUtil.initCreatePage('content', pageMation);
} else if (pageMation.type == 'edit') {
// 编辑布局
dsFormUtil.getBusinessData(businessId, serviceClassName, function (data) {
dsFormUtil.getBusinessData(businessId, serviceClassName, pageMation, function (data) {
dsFormUtil.initEditPage('content', pageMation, data);
});
} else if (pageMation.type == 'details') {
// 详情布局
dsFormUtil.getBusinessData(businessId, serviceClassName, function (data) {
dsFormUtil.getBusinessData(businessId, serviceClassName, pageMation, function (data) {
dsFormUtil.initDetailsPage('content', pageMation, data);
});
} else if (pageMation.type == 'simpleTable') {
......
......@@ -23,26 +23,34 @@ layui.config({
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'oddNumber', title: '单号', width: 200, align: 'center', templet: function (d) {
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers', rowspan: '2' },
{ field: 'oddNumber', title: '单号', rowspan: '2', width: 200, align: 'center', templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.oddNumber + '</a>';
}},
{ field: 'holderMation', title: '供应商', align: 'left', width: 150, templet: function (d) {
{ field: 'holderMation', title: '供应商', rowspan: '2', align: 'left', width: 150, templet: function (d) {
return getNotUndefinedVal(d.holderMation?.name);
}},
{ field: 'totalPrice', title: '合计金额', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', align: 'center', width: 140 },
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function (d) {
{ field: 'totalPrice', title: '合计金额', rowspan: '2', align: 'left', width: 120 },
{ field: 'operTime', title: '单据日期', rowspan: '2', align: 'center', width: 140 },
{ colspan: '2', title: '来源单据信息', align: 'center' },
{ field: 'processInstanceId', title: '流程ID', rowspan: '2', width: 100, templet: function (d) {
return '<a lay-event="processDetails" class="notice-title-click">' + getNotUndefinedVal(d.processInstanceId) + '</a>';
}},
{ field: 'state', title: '状态', width: 90, templet: function (d) {
{ field: 'state', title: '状态', rowspan: '2', width: 90, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("erpOrderStateEnum", 'id', d.state, 'name');
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], rowspan: '2', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], rowspan: '2', align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], rowspan: '2', align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], rowspan: '2', align: 'center', width: 150 },
{ title: systemLanguage["com.skyeye.operation"][languageType], rowspan: '2', fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
], [
{ field: 'fromTypeId', title: '来源类型', width: 150, templet: function (d) {
return skyeyeClassEnumUtil.getEnumDataNameByCodeAndKey("purchaseOrderFromType", 'id', d.fromTypeId, 'name');
}},
{ field: 'fromId', title: '单据编号', width: 200, templet: function (d) {
return getNotUndefinedVal(d.fromMation?.oddNumber);
}}
]],
done: function(json) {
matchingLanguage();
......
......@@ -70,7 +70,7 @@ var activitiUtil = {
} else {
// 这里为什么要给objectId和objectKey赋值,因为表单组件中有用到该值
if (showType == 'details') {
dsFormUtil.getBusinessData(businessId, serviceClassName, function (data) {
dsFormUtil.getBusinessData(businessId, serviceClassName, pageMation, function (data) {
if (pageMation.serviceBeanCustom.serviceBean.teamAuth) {
objectId = data.objectId;
objectKey = data.objectKey;
......@@ -78,7 +78,7 @@ var activitiUtil = {
dsFormUtil.initDetailsPage('showForm', pageMation, data);
});
} else if (showType == 'edit') {
dsFormUtil.getBusinessData(businessId, serviceClassName, function (data) {
dsFormUtil.getBusinessData(businessId, serviceClassName, pageMation, function (data) {
if (pageMation.serviceBeanCustom.serviceBean.teamAuth) {
objectId = data.objectId;
objectKey = data.objectKey;
......
......@@ -76,17 +76,20 @@ var dsFormUtil = {
pageMation: {},
getBusinessData: function (businessId, serviceClassName, callback) {
getBusinessData: function (businessId, serviceClassName, pageMation, callback) {
if (isNull(businessId)) {
winui.window.msg("业务数据id为空", {icon: 2, time: 2000});
return false;
}
var params = {
objectId: businessId,
objectKey: serviceClassName
serviceClassName: serviceClassName
};
AjaxPostUtil.request({url: reqBasePath + "queryBusinessDataByObject", params: params, type: 'json', method: 'POST', callback: function (json) {
if(typeof(callback) == "function") {
const businessApi = pageMation.businessApi
var url = "";
eval('url = ' + businessApi.serviceStr);
AjaxPostUtil.request({url: url + "getDataByObjectId", params: params, type: 'json', method: 'GET', callback: function (json) {
if (typeof(callback) == "function") {
callback(json.bean);
}
}});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册