liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<!-- <apex:page Controller="TransferApplyResponseController" showHeader="false" sidebar="false" id="allPage"  action="{!init}"> -->
<apex:page Controller="TransferApplyResponseController" showHeader="false" sidebar="false" id="allPage"  action="{!init}" lightningStylesheets="true">
<!-- 20230425 ljh lightning 升级 -->
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilColorCss)}"/><!-- 20230624 ljh lightning  -->
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
 
<script>
function savejs() {
    blockme();
    savebtn();
}
 
function canceljs() {
    top.window.close();
}
 
function refreshparent() {
    // var hasError = j$(escapeVfId('allPage:allForm:allBlock:hasError')).text();
    // if (hasError == 'false') {
    //     top.window.opener.reloadjs();
    //     top.window.close();
    // }
    // 20211123 ljh 应答沟通 update start 
    var hasError = j$(escapeVfId('allPage:allForm:hasError')).text();
    console.log(hasError);
    if (hasError == 'false') {
        window.open("/{!raid}");
        top.window.close();
    }
    // 20211123 ljh 应答沟通 update end
}
 
</script>
<!-- 20230718 ljh add -->
<style type="text/css">
    table.mytable tr{
        height:35px;
    }
</style>
    <apex:form id="allForm">
        <!-- 20211105 ljh 应答沟通 update start -->
        <!-- <apex:actionFunction name="savebtn" action="{!saveBtn}" rerender="allPanel,message" onComplete="unblockUI();refreshparent();"> -->
        <apex:actionFunction name="savebtn" action="{!saveBtn}" rerender="message" onComplete="unblockUI();refreshparent();">
        </apex:actionFunction>
        <apex:outputPanel id="message">
            <apex:pageMessages />
            <apex:outputText id="hasError" value="{!hasError}" style="display:none"/>
        </apex:outputPanel>
        <!-- 20211105 ljh 应答沟通 update end -->
        <apex:outputPanel id="allPanel">
            <apex:pageBlock title="{!$ObjectType.TransferApply__c.fields.Response__c.label}" id="allBlock">
                <apex:pageBlockButtons location="top">
                    <!-- 20230718 ljh add style="margin-right:10px" -->
                    <apex:commandButton onclick="j$(this).prop('disabled', true).addClass('btnDisabled'); savejs(); return false;" value="发送" rerender="dummy" style="margin-right:10px"/>
                    <apex:commandButton onclick="canceljs(); return false;" value="取消" rerender="dummy"/>
                </apex:pageBlockButtons>
                <!-- 20211105 ljh 应答沟通 update start -->
                <!-- <apex:outputPanel id="message">
                    <apex:pageMessages />
                </apex:outputPanel> -->
 
                <apex:outputText id="raid" value="{!raid}" style="display:none"/>
                <!-- <apex:outputText id="hasError" value="{!hasError}" style="display:none"/> -->
                <!-- 20211105 ljh 应答沟通 update end -->
                <table class="mytable">
                    <tr>
                        <td>To:</td>
                        <td>
                            <apex:outputText value="{!toString}"/>
                        </td>
                    </tr>
                    <tr>
                        <td>Cc:</td>
                        <td>
                            <!-- <apex:inputField id="JingliApprovalManager" value="{!cc.JingliApprovalManager__c}"/> -->
                            <apex:inputField styleClass="hideDropdown" style="width:180px;" id="JingliApprovalManager"  value="{!cc.JingliApprovalManager__c}"   onChange="" />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <!-- <apex:inputField id="SalesManager" value="{!cc.SalesManager__c}"/> -->
                            <apex:inputField styleClass="hideDropdown" style="width:180px;" id="SalesManager"  value="{!cc.SalesManager__c}"   onChange="" />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <!-- <apex:inputField id="BuchangApprovalManager" value="{!cc.BuchangApprovalManager__c}"/> -->
                            <apex:inputField styleClass="hideDropdown" style="width:180px;" id="BuchangApprovalManager"  value="{!cc.BuchangApprovalManager__c}"  onChange="" />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <!-- <apex:inputField id="BuchangApprovalManagerSales" value="{!cc.BuchangApprovalManagerSales__c}"/> -->
                            <apex:inputField styleClass="hideDropdown" style="width:180px;" id="BuchangApprovalManagerSales"  value="{!cc.BuchangApprovalManagerSales__c}"   onChange="" />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <!-- <apex:inputField id="ZongJian" value="{!cc.ZongJian__c}"/> -->
                            <apex:inputField styleClass="hideDropdown" style="width:180px;" id="ZongJian"  value="{!cc.ZongJian__c}"   onChange="" />
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <apex:inputField value="{!cc.ResponseNew__c}" style="resize:none; width:500px; height:150px;"/>
                        </td>
                    </tr>
                </table>
 
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
    <script type="text/javascript">
    //标准控件弹出页面修改 start
        //查询参数列表
        let SelectFieldParamList=[
            {
                //原apex:inputField的id值,需要在页面上获取
                inputFieldId : 'allPage:allForm:allBlock:JingliApprovalManager',
                //查找字段所在对象
                ObjectType : 'TransferApply__c',
                //查找字段的api名称
                QueryFieldApiName : 'JingliApprovalManager__c',
                //查找字段的查找对象
                SelectObj : 'User',
                //搜索时使用的字段
                SelectFld : 'Name',
 
            },
            {
                //原apex:inputField的id值,需要在页面上获取
                inputFieldId : 'allPage:allForm:allBlock:SalesManager',
                //查找字段所在对象
                ObjectType : 'TransferApply__c',
                //查找字段的api名称
                QueryFieldApiName : 'SalesManager__c',
                //查找字段的查找对象
                SelectObj : 'User',
                //搜索时使用的字段
                SelectFld : 'Name',
 
            },
            {
                //原apex:inputField的id值,需要在页面上获取
                inputFieldId : 'allPage:allForm:allBlock:BuchangApprovalManager',
                //查找字段所在对象
                ObjectType : 'TransferApply__c',
                //查找字段的api名称
                QueryFieldApiName : 'BuchangApprovalManager__c',
                //查找字段的查找对象
                SelectObj : 'User',
                //搜索时使用的字段
                SelectFld : 'Name',
 
            },
            {
                //原apex:inputField的id值,需要在页面上获取
                inputFieldId : 'allPage:allForm:allBlock:BuchangApprovalManagerSales',
                //查找字段所在对象
                ObjectType : 'TransferApply__c',
                //查找字段的api名称
                QueryFieldApiName : 'BuchangApprovalManagerSales__c',
                //查找字段的查找对象
                SelectObj : 'User',
                //搜索时使用的字段
                SelectFld : 'Name',
 
            },
            {
                //原apex:inputField的id值,需要在页面上获取
                inputFieldId : 'allPage:allForm:allBlock:ZongJian',
                //查找字段所在对象
                ObjectType : 'TransferApply__c',
                //查找字段的api名称
                QueryFieldApiName : 'ZongJian__c',
                //查找字段的查找对象
                SelectObj : 'User',
                //搜索时使用的字段
                SelectFld : 'Name',
 
            },
        ]
        //初始化
        resetOpenPage(SelectFieldParamList);
    </script>
    <style type="text/css">
        .hideDropdown select{
            display: none
        }
    </style>
</apex:page>