DESKTOP-0K9VGFE\hp
2022-03-11 6d766b0c8e9b31e7e03ffd344a94c2851aa9beb9
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
200
201
202
203
204
205
206
207
208
209
210
211
<apex:page controller="MoreMaintenanceContractController"  action="{!init}"  showHeader="false"   sidebar="true" id="allPage"  title="经销商对医院修理价格录入">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<style type="text/css">
    .bPageBlock .pbTitle{
        width: 50%;
    }
    /* 0. 显示滚动条2注释掉这个打开 */
    /*.table-head{padding-right:17px;color:#000;}*/
    /* 1. 给tbody的表格固定高度(也可以flex:1), 并添加overflow-y:scroll */
    .table-body {max-height: 350px;overflow-y: scroll;}
    .table-body table tr:nth-child(2n){background-color:#f2f2f2;}
    /* 2. 隐藏滚动条 */
    .table-body::-webkit-scrollbar {display: none}
    /* 3. 使上下表格对齐(宽度一致) */
    .table-head tr th:nth-of-type(1),
    .table-body tr td:nth-of-type(1) {
        width: 20%;
    }
 
    .table-head tr th:nth-of-type(2),
    .table-body tr td:nth-of-type(2) {
        width: 10%;
    }
 
    .table-head tr th:nth-of-type(3),
    .table-body tr td:nth-of-type(3) {
        width: 20%;
    }
 
    .table-head tr th:nth-of-type(4),
    .table-body tr td:nth-of-type(4) {
        width: 10%;
    }
 
    .table-head tr th:nth-of-type(5),
    .table-body tr td:nth-of-type(5) {
        width: 10%;
    }
    .table-head tr th:nth-of-type(6),
    .table-body tr td:nth-of-type(6) {
        width: 10%;
    }
    .table-head tr th:nth-of-type(7),
    .table-body tr td:nth-of-type(7) {
        width: 20%;
    }
</style>
<script type="text/javascript">
    function BackMc(){
        blockme();
        var id ="{!id}";
        window.location.href="/"+id;
    }
    function RefreshPriceJs(){
        blockme();
        RefreshPrice();
    }
    function JsHQSum(){
        blockme();
        HQSum();
    }
    function SaveJs(go){
        //经销商对医院修理价格不为空才可以保存
        //allPage:allForm:MoreMaintenanceContract:theRepeat:1:hospitalQuotationText
        var repairLCount = j$(escapeVfId('repairLCount')).value();
        var IsEmpty = false;
        for (var i = 0; i < repairLCount; i++) {
            var tempValue = j$(escapeVfId('allPage:allForm:MoreMaintenanceContract:theRepeat:'+i+':hospitalQuotationText')).value();
            var tempValued = j$(escapeVfId('allPage:allForm:MoreMaintenanceContract:theRepeat:'+i+':hospitalQuotationTextd')).value();
            var hospitalQuotationTextValue = tempValue;
            if(tempValue==null||tempValue==""||tempValue.replace(/(^\s*)|(\s*$)/g, "")==""){
                hospitalQuotationTextValue = tempValued;
            }
            //console.log(tempValue);
            if(hospitalQuotationTextValue==null||hospitalQuotationTextValue==""||hospitalQuotationTextValue.replace(/(^\s*)|(\s*$)/g, "")==""){
                IsEmpty = true;
            }
        }
        if(IsEmpty){
            //alert('经销商对医院修理价格不能为空,可以为0');
            if(confirm('修理价格存在空项,请确认是否保存')){
                if (confirm("请确认所输信息正确,保存后将无法自行更改。【确定】进行保存,【取消】可进行确认信息")) {
                    blockme();
                    Save(go);
                }
            }
        }else{
            if (confirm("请确认所输信息正确,保存后将无法自行更改。【确定】进行保存,【取消】可进行确认信息")) {
                blockme();
                Save(go);
            }
        }  
    }
</script>
 
<apex:form id="allForm">
 
<apex:actionFunction name="RefreshPrice" action="{!RefreshPrice}" rerender="message,MoreMaintenanceContract"  onComplete="unblockUI();">
</apex:actionFunction>
<apex:actionFunction name="HQSum" action="{!HQSum}" rerender="message,MoreMaintenanceContract"  onComplete="unblockUI();">
</apex:actionFunction>
<apex:actionFunction name="Save" action="{!Save}" rerender="message" onComplete="unblockUI();" >
    <apex:param name="firstParam" assignTo="{!GoFlag}" value="" />
</apex:actionFunction>
<apex:outputPanel id="message">
    <apex:pageMessages />
</apex:outputPanel>
 
<table style="width:100%;">
    <colgroup>
        <col width="5%"/>
        <col width="9%"/>
        <col width="1%"/>
        <col width="10%"/>
        <col width="20%"/>
        <col width="10%"/>
        <col width="10%"/>
        <col width="10%"/>
        <col width="5%"/>
        <col width="10%"/>
        <col width="5%"/>
        <col width="5%"/>
    </colgroup>
    <tr>
        <td></td>
        <td align="left" style="font-weight: 800;"><h2>维修合同信息</h2></td><td></td>
        <td align="right" >维修合同名称:</td>
        <td align="left" ><apex:outputField id="name"  value="{!mc.Name}"/></td>
        <td align="right" >合同询价编码:</td>
        <td align="left" ><apex:outputField id="Management_Code" value="{!mc.Management_Code__c}"/></td>
        <td align="right" >记录类型:</td>
        <td align="left" ><apex:outputField id="RecordType" value="{!mc.RecordType.Name}"/>
        </td>
        <td align="right" >状 态:</td>
        <td align="left" ><apex:outputField id="Status" value="{!mc.Status__c}"/>
        </td>
        <td></td>
    </tr>
</table>
<apex:pageBlock title="经销商对医院修理价格录入(以下信息将作为报告书上传金额信息显示)" id="MoreMaintenanceContract" rendered="true">
    <div>
        <ul>
            <li> 
                <apex:outputText rendered="{!!isVM}"> 经销商对医院签约价格:</apex:outputText>
                <apex:outputText rendered="{!isVM}"> 对医院合同金额(手填):</apex:outputText>
                <apex:outputPanel layout="none" rendered="{!IF(HATextEdit,true , false)}"><apex:InputField value="{!mc.HospitalAmountText__c}"  id="HospitalAmountText"  style="max-width: 120px;"/></apex:outputPanel><apex:outputPanel layout="none" rendered="{!IF(HATextEdit,false , true)}"><apex:outputField value="{!mc.HospitalAmountText__c}"  id="HospitalAmountText1"  style="max-width: 120px;"/></apex:outputPanel> </li>
            <li>
                <apex:outputText rendered="{!!isVM}">经销商对医院修理价格调整比例:</apex:outputText>
                <apex:outputText rendered="{!isVM}">对医院修理价格调整比例:</apex:outputText>
                <apex:Inputtext value="{!proportion}"  id="proportion"  style="max-width: 60px;"/>% <apex:commandButton onclick="RefreshPriceJs();return false;" id="RefreshPrice"  value="刷新价格" style="margin-left:10px;width:100px" /></li>
        </ul>
    </div>
    <input type="hidden" id="repairLCount" value="{!repairLCount}" />
    <div class="table-head">
        <table  class="list" >
            <thead>
                <tr class="headerRow" border="0" cellpadding="0" cellspacing="0" >
                    <th>修理受付番号</th>
                    <th>状态1</th>
                    <th>设备型号</th>
                    <th>机身号码</th>
                    <th>修理原价</th>
                    <th>报价等级</th>
                    <th><apex:outputText rendered="{!!isVM}">经销商对医院修理价格</apex:outputText>
                        <apex:outputText rendered="{!isVM}">对医院维修价格</apex:outputText></th>
                </tr>
            </thead>
        </table>
    </div>
    <div class="table-body" id="tableBody">
        <table class="list" border="0" cellpadding="0" cellspacing="0" >
            <tbody>
                <apex:repeat value="{!repairL}" var="rl" id="theRepeat" >
                    <tr>
                        <td><apex:outputText value="{!rl.rr.Name}"/></td>
                        <td><apex:outputText value="{!rl.rr.Status1__c}"/></td>
                        <td><apex:outputText value="{!rl.rr.Delivered_Product__r.Name}"/></td>
                        <td><apex:outputText value="{!rl.rr.SerialNumber__c}"/></td>
                        <td><apex:outputText value="{!rl.rr.Repair_List_Price_formula__c}"/></td>
                        <td><apex:outputText value="{!rl.rr.Repair_Rank__c}"/></td>
                        <td>
                            <!-- <apex:InputField value="{!rl.rr.hospitalQuotationText__c}"  id="hospitalQuotationText"  /> -->
                            <apex:outputPanel layout="none" rendered="{!IF(rl.edit=false&&rl.rr.hospitalQuotationText__c !=null,true , false)}">
                                <apex:outputField value="{!rl.rr.hospitalQuotationText__c}"  id="hospitalQuotationTextd"/>
                            </apex:outputPanel>
                            <apex:outputPanel layout="none" rendered="{!IF(rl.edit=false&&rl.rr.hospitalQuotationText__c !=null,false , true)}">
                                <apex:InputField value="{!rl.rr.hospitalQuotationText__c}"  id="hospitalQuotationText" onblur="JsHQSum()"/>
                            </apex:outputPanel>
                        </td>
                    </tr>
                </apex:repeat>
            </tbody>
        </table>
    </div>
    <div id="hospitalQuotationTextSum">
        <ul>
            <li>合同期间修理金额(上传): <apex:outputText value="{!mc.hospitalQuotationTextSum__c}"  id="hospitalQuotationTextSum"/> </li> 
        </ul>
    </div>
</apex:pageBlock>
<apex:commandButton onclick="BackMc();return false;" value="返  回
" style="margin-left:30px;width:180px"  rendered="true" onComplete="unblockUI();" />
<apex:commandButton onclick="SaveJs(0);return false;" value="保  存
" style="margin-left:30px;width:180px"  rendered="true" />
<apex:commandButton onclick="SaveJs(1);return false;" value="保存并登录PBI报告书页面
" style="margin-left:30px;width:180px"  rendered="true" />
</apex:form>
</apex:page>