1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| /**
| * 业务类型的属性参照
| * @author weidy
| * @date 2022-04-05
| */
| layui.define(['layer','vciWebReferGrid'],function(exports){
| var ReferGrid = function(){
| this.backPath = (configData.compatibility?path:configData.objectServicePath);
| };
| ReferGrid.prototype.vciFieldTypeMap = {
| VTBoolean:"布尔型",
| VTClob: "长文本",
| VTDate:"日期",
| VTDateTime:"日期时间",
| VTTime:"时间",
| VTLong:"长整型",
| VTDouble:"金额/双精度",
| VTInteger:"整形",
| VTFilePath:"文件",
| VTString:"字符串"
| };
| ReferGrid.prototype.showReferDialog = function (referConfig){
| //只需要设置默认的值,调用VciWebReferGrid即可
| var that = this;
| referConfig.options.url = referConfig.options.url?referConfig.options.url:'btmTypeController/gridAttributesByBtmId';
| referConfig.options.backPath = referConfig.options.backPath?referConfig.options.backPath:that.backPath;
| if(!("method" in referConfig.options)){
| referConfig.options.method = 'get';
| }
| if(!('valueField' in referConfig.options)){
| referConfig.options.valueField = 'id';
| }
| if(!('where' in referConfig.options)){
| referConfig.options.where = {
| btmTypeId:referConfig.options.btmTypeId
| };
| }
| if(!("tableConfig" in referConfig.options)){
| referConfig.options.tableConfig = {
| limit:-1,
| cols: [layui.table.getIndexColumn(), layui.table.getCheckColumn(), {
| field: 'id',
| title: '属性英文编号',
| sort:true,
| width: 150
| }, {
| field: 'name',
| title: '属性中文名称',
| sort:true,
| width: 160
| },{
| field: 'attributeLength',
| title: '属性长度',
| sort: true,
| width: 90
| },{
| field:'attrDataType',
| title:'属性类型',
| sort:true,
| width:150,
| templet:function (d){
| return that.vciFieldTypeMap[d.attrDataType];
| }
| }],
| queryColumns: [
| {
| field: 'name',
| title: '属性英文编号'
| }, {
| field: 'label',
| title: '属性中文名称'
| }
| ]
| };
| }
| layui.vciWebReferGrid.showReferDialog(referConfig);
| };
| var rg = new ReferGrid();
| exports('platform/objectService/OsAttributeForBtmRefer',rg);
| });
|
|