【调度系统】广东民航医疗快线调度系统源代码
wzp
2024-12-06 0df39a8c5a45c6ff25411eace15d40a606f9769c
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%Session.CodePage=65001%>
<%
'Response.Cookies("OA")("adminID")=""
'Response.end
InvoiceID=request("InvoiceID")
ServiceOrdID=request("ServiceOrdID")
DispatchOrdID=request("DispatchOrdID")
state=request("state")
If state<>"" Then
    stateSP=split(state,"|")
    for i = 0 to UBOUND(stateSP)
        If InStr(stateSP(i),"InvoiceID=")=1 Then
            InvoiceID=Replace(stateSP(i),"InvoiceID=","")
        ElseIf InStr(stateSP(i),"ServiceOrdID=")=1 Then
            ServiceOrdID=Replace(stateSP(i),"ServiceOrdID=","")
        ElseIf InStr(stateSP(i),"DispatchOrdID=")=1 Then
            DispatchOrdID=Replace(stateSP(i),"DispatchOrdID=","")
        End If
    Next
End If
if (InvoiceID="" And ServiceOrdID="") Or DispatchOrdID="" then Response.Redirect "/"
If InvoiceID<>"" And InvoiceID<>"0" then
    InvoiceSql=" and InvoiceID="&InvoiceID
    state=InvoiceID
Else
    InvoiceSql=" and ServiceOrdID="&ServiceOrdID
    state=ServiceOrdID
End If
%>
<!--#include virtual="/weixin/OAuth2.gds"-->
<!--#include virtual="/inc/function.gds"-->
<!--#include virtual="/weixin/sha1.gds"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, user-scalable=no">  
<title>发票申请</title>
<link href="css/main.css" type="text/css" rel="stylesheet">
</head>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select InvoiceID,InvoiceType,InvoiceName,InvoiceMakeout,InvoiceCompanyPhone,InvoiceCompanyID,InvoiceCompanyAdd,InvoiceCompanyBank,InvoiceCompanyBankNo,InvoiceZipCode,Invoice_strAdd,Invoice_strName,Invoice_strPhone,ApplicationTime=CONVERT(nvarchar(20),ApplicationTime,111),AuditTime=CONVERT(nvarchar(20),AuditTime,111),AuditStatus,AuditOAID,AuditMakeout,InvoiceMoney,InvoiceNo,InvoiceURL,Invoice_strEmail,ServiceOrdID,ServiceOrdType,ServiceOrdNo=ServiceOrdClass+convert(nvarchar(10),year(ServiceOrd_CC_Time))+right('0'+convert(nvarchar(10),month(ServiceOrd_CC_Time)),2)+right('0'+convert(nvarchar(10),day(ServiceOrd_CC_Time)),2)+'-'+right('00'+convert(nvarchar(10),ServiceOrdNo),3),OrdTraPrice=ServiceOrdTraTxnPrice from InvoiceData,ServiceOrder where ServiceOrderIDPK=ServiceOrdID"&InvoiceSql&" order by InvoiceID desc"
rs.open sql,objConn,1,1
If not rs.Eof Then
    ServiceOrdID        = rs("ServiceOrdID")    '服务单ID
    ServiceOrdNo        = rs("ServiceOrdNo")        '服务单号
 
    InvoiceID            = rs("InvoiceID")            '开票信息ID
    InvoiceType        = rs("InvoiceType")        '开票类型
    InvoiceName        = rs("InvoiceName")        '发票抬头
    InvoiceMakeout        = rs("InvoiceMakeout")    '发票备注
    InvoiceCompanyPhone= rs("InvoiceCompanyPhone")'企业电话
    InvoiceCompanyID    = rs("InvoiceCompanyID")    '纳税识别号
    InvoiceCompanyAdd    = rs("InvoiceCompanyAdd")    '企业注册地址
    InvoiceCompanyBank    = rs("InvoiceCompanyBank")'企业开户银行
    InvoiceCompanyBankNo=rs("InvoiceCompanyBankNo")'企业银行账号
    InvoiceZipCode        = rs("InvoiceZipCode")    '邮编
    Invoice_strAdd        = rs("Invoice_strAdd")    '邮寄地址
    Invoice_strName    = rs("Invoice_strName")    '联系人
    Invoice_strPhone    = rs("Invoice_strPhone")    '联系电话
    ApplicationTime    = rs("ApplicationTime")    '申请时间
    AuditTime            = rs("AuditTime")            '处理时间
    AuditStatus        = rs("AuditStatus")        '处理状态
    AuditOAID            = rs("AuditOAID")            '处理人
    AuditMakeout        = rs("AuditMakeout")        '处理备注
    InvoiceMoney        = rs("InvoiceMoney")        '发票金额
    InvoiceNo            = rs("InvoiceNo")            '发票编号
    InvoiceURL            = rs("InvoiceURL")        '发票链接
    Invoice_strEmail    = rs("Invoice_strEmail")        '
    If InvoiceMoney=0 Then InvoiceMoney=rs("OrdTraPrice")
 
    If InvoiceType="1" Then
        InvoiceTypeTXT="不开发票"
    ElseIf InvoiceType="2" Then
        InvoiceTypeTXT="电子发票"
    ElseIf InvoiceType="3" Then
        InvoiceTypeTXT="增值税普票"
    ElseIf InvoiceType="4" Then
        InvoiceTypeTXT="增值税专票"
    Else
        InvoiceTypeTXT="其它类型"
    End If
    If AuditStatus=3 Then Response.Redirect "/m_Invoice.gds?ServiceOrdID="&ServiceOrdID&"&InvoiceID="&InvoiceID
ElseIf ServiceOrdID<>"" Then
    rs.close()
    sql="select ServiceOrdID,ServiceOrdType,ServiceOrdPtName,ServiceOrdCoName,ServiceOrdCoPhone,ServiceOrdNo=ServiceOrdClass+convert(nvarchar(10),year(ServiceOrd_CC_Time))+right('0'+convert(nvarchar(10),month(ServiceOrd_CC_Time)),2)+right('0'+convert(nvarchar(10),day(ServiceOrd_CC_Time)),2)+'-'+right('00'+convert(nvarchar(10),ServiceOrdNo),3),OrdTraPrice=ServiceOrdTraTxnPrice from ServiceOrder where ServiceOrdID="&ServiceOrdID
    rs.open sql,objConn,1,1
    If not rs.Eof Then
        ServiceOrdID        = rs("ServiceOrdID")    '服务单ID
        ServiceOrdNo        = rs("ServiceOrdNo")        '服务单号
        InvoiceMoney        = rs("OrdTraPrice")
        InvoiceName        = rs("ServiceOrdPtName")
        Invoice_strName    = rs("ServiceOrdCoName")
        Invoice_strPhone= rs("ServiceOrdCoPhone")
    Else
        Response.Redirect "/"
    End If
Else
    InvoiceID=0
End If
rs.close()
%>
<body>
<div id="m_Orer">
    <!--#include virtual="/m_DispatchOrder_header.gds"-->
    <!--<div class="order_head"><a href="order_List.asp"><font></font></a>调度详情</div>-->
    <!--<div class="os_status"><span class="os_statusfirst">订单状态:等待卖家发货</span><span class="os_refresh">刷新</span></div>-->
    
    <!--<div class="os_line"></div>-->
 
    <form id="form1" name="form1" action="admin_save.gds" method="post" onsubmit="return check()">
    <input name="admin_save" type="hidden" value="">
    <input name="ServiceOrdID" type="hidden" value="<%=ServiceOrdID%>">
    <input name="DispatchOrdID" type="hidden" value="<%=DispatchOrdID%>">
    <input name="InvoiceID" type="hidden" value="<%=InvoiceID%>">
    <input name="ReturnID" type="hidden" value="M">
    
 
        <div class="os_shopname"></div>
        <div class="os_shopname">服务单号:<%=ServiceOrdNo%></div>
        <%If InvoiceID<>"0" Then%>
            <%If ApplicationTime<>"" Then%><div class="os_shopname">申请日期:<%=ApplicationTime%></div><%End If%>
            <%If AuditStatus<>"" Then%><div class="os_shopname">处理状态:<%=AuditStatus_A(AuditStatus)%></div><%End If%>
            <%If AuditTime<>"" Then%><div class="os_shopname">处理日期:<%=AuditTime%></div><%End If%>
            <%If AuditOAID<>"" Then%><div class="os_shopname">处理人员:<%=OAUser(AuditOAID,"UserName")%></div><%End If%>
        <%End If%>
        <%If InvoiceNo<>"" Then%><div class="os_shopname">发票号码:<%=InvoiceNo%></div><%End If%>
        <div class="os_shopname" style="color:red">发票类型:
        <select id="InvoiceType" name="InvoiceType" onchange="JS_InvoiceType();" style="padding: 5px 0 5px 8px;">
            <option value="2">电子发票</option>
            <option value="3">增值税普票</option>
            <!--<option value="4">增值税专票</option>-->
        </select>
        </div>
        <div class="os_shopname" style="color:red">开票金额:<input type="text" id="InvoiceMoney" name="InvoiceMoney" style="width:162px;border: none;font-size: 15px;" value="<%=InvoiceMoney%>" placeholder="____________________________________"><label style="color: #ff0000;">*</label></div>
        <div class="os_shopname" style="color:red">发票抬头:<input type="text" id="InvoiceName" name="InvoiceName" style="width:162px;border: none;font-size: 15px;" value="<%=InvoiceName%>" placeholder="____________________________________"><label style="color: #ff0000;">*</label></div>
        <div class="os_shopname">发票备注:<input type="text" id="InvoiceMakeout" name="InvoiceMakeout" style="width:176px;border: none;font-size: 15px;" value="<%=InvoiceMakeout%>" placeholder="____________________________________"></div>
        <div class="os_shopname">纳税识别号:<input type="text" id="InvoiceCompanyID" name="InvoiceCompanyID" style="width:162px;border: none;font-size: 15px;" value="<%=InvoiceCompanyID%>" placeholder="____________________________________"></div>
 
        <div class="os_shopname"><span id="Invoice_strNameTXT">接收人:</span><input type="text" id="Invoice_strName" name="Invoice_strName" style="width:162px;border: none;font-size: 15px;" value="<%=Invoice_strName%>" placeholder="____________________________________"></div>
        <div class="os_shopname" style="color:red"><span id="Invoice_strPhoneTXT">接收电话:</span><input type="text" id="Invoice_strPhone" name="Invoice_strPhone" style="width:162px;border: none;font-size: 15px;" value="<%=Invoice_strPhone%>" placeholder="____________________________________"><label style="color: #ff0000;">*</label></div>
        <div id="InvoiceCompanyAddDiv" style="display:none;">
            <div class="os_shopname">企业注册地址:<input type="text" id="InvoiceCompanyAdd" name="InvoiceCompanyAdd" style="width:162px;border: none;font-size: 15px;" value="<%=InvoiceCompanyAdd%>" placeholder="____________________________________"></div>
            <div class="os_shopname">企业电话:<input type="text" id="InvoiceCompanyPhone" name="InvoiceCompanyPhone" style="width:176px;border: none;font-size: 15px;" value="<%=InvoiceCompanyPhone%>" placeholder="____________________________________"></div>
        </div>
        <div id="InvoiceCompanyBankDiv" style="display:none;">
            <div class="os_shopname">企业开户银行:<input type="text" id="InvoiceCompanyBank" name="InvoiceCompanyBank" style="width:162px;border: none;font-size: 15px;" value="<%=InvoiceCompanyBank%>" placeholder="____________________________________"></div>
            <div class="os_shopname">企业银行账号:<input type="text" id="InvoiceCompanyBankNo" name="InvoiceCompanyBankNo" style="width:162px;border: none;font-size: 15px;" value="<%=InvoiceCompanyBankNo%>" placeholder="____________________________________"></div>
        </div>
        <div id="Invoice_strAddDiv" style="display:none;color:red;" class="os_shopname">邮寄地址:<input type="text" id="Invoice_strAdd" name="Invoice_strAdd" style="width:176px;border: none;font-size: 15px;" value="<%=Invoice_strAdd%>" placeholder="____________________________________"><label style="color: #ff0000;">*</label></div>
        <div id="Invoice_strEmailDiv" class="os_shopname" style="color:red">接收电子邮箱:<input type="text" id="Invoice_strEmail" name="Invoice_strEmail" style="width:176px;border: none;font-size: 15px;" value="<%=Invoice_strEmail%>" placeholder="____________________________________"><label style="color: #ff0000;">*</label>
        <br>若无邮箱,请填写“无”</div>
    </form>
        <%If session("admin_execLevel")>=1 Then%>
        <div class="os_img">
            <div class="posi" id="posi" >
            <%'新申请
            If InvoiceID="0" Or InvoiceID="" Then%>
                <div class="ljgm"><a href="javascript:form1_submit127_1()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;">申请发票</a></div>
            <%'修改申请
            ElseIf InvoiceID<>"0" And AuditStatus<>"3" Then%>
                <div class="ljgm"><a href="javascript:form1_submit127_2()" class="bttt" style="color: #fff;background: #9a6d92;font-weight: 700;">修改申请</a></div>
            <%End If%>
            </div>
        </div>
        <script LANGUAGE="javascript">
        String.prototype.Trim = function() {
        var m = this.match(/^\s*(\S+(\s+\S+)*)\s*$/);
            return (m == null) ? "" : m[1];
        }
        String.prototype.isMobile = function() {
            return (/^(?:1\d|15[89])-?\d{6}(\d{3}|\*{3})$/.test(this.Trim()));
        }
        String.prototype.isTel = function()
        {
            //"兼容格式: 国家代码(2到3位)-区号(2到3位)-电话号码(7到8位)-分机号(3位)" 
            //return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)?(\d{7,8})(-(\d{3,}))?$/.test(this.Trim())); 
            return (/^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/.test(this.Trim()));
        }
        //发票申请(新增)
        function form1_submit127_1(){
            if(document.form1.InvoiceMoney.value=='') {
                alert('请输入开票金额!!');
                return false;
            }
            if(document.form1.InvoiceMoney.value=='') {
                alert('请输入发票抬头!!');
                return false;
            }
            if(document.form1.Invoice_strPhone.value=='' || document.form1.Invoice_strPhone.value=='0') {
                alert('请输入联系人电话!!');
                return false;
            }
            if (document.form1.Invoice_strPhone.value.isMobile()){
                //return true;
            }else{
                alert("请输入正确的电话号码");
                return false;
            }
 
            document.form1.action = "admin_save.gds";
            document.form1.admin_save.value = "127";
            form1.submit();
        }
        //修改发票申请
        function form1_submit127_2(){
            if(document.form1.InvoiceMoney.value=='') {
                alert('请输入开票金额!!');
                return false;
            }
            if(document.form1.InvoiceMoney.value=='') {
                alert('请输入发票抬头!!');
                return false;
            }
            if(document.form1.Invoice_strPhone.value=='' || document.form1.Invoice_strPhone.value=='0') {
                alert('请输入联系人电话!!');
                return false;
            }
            if (document.form1.Invoice_strPhone.value.isMobile()){
                //return true;
            }else{
                alert("请输入正确的电话号码");
                return false;
            }
 
            document.form1.action = "admin_save.gds";
            document.form1.admin_save.value = "127";
            form1.submit();
        }
        function JS_InvoiceType(){
                InvoiceType = document.form1.InvoiceType.value;
                if(InvoiceType=='2') {
                    InvoiceCompanyAddDiv.style.display="none";
                    InvoiceCompanyBankDiv.style.display="none";
                    Invoice_strAddDiv.style.display="none";
                    Invoice_strEmailDiv.style.display="block";
                    Invoice_strNameTXT.innerHTML="接收人:";
                    Invoice_strPhoneTXT.innerHTML="接收电话:";
                }else if (InvoiceType=='3') {
                    InvoiceCompanyAddDiv.style.display="none";
                    InvoiceCompanyBankDiv.style.display="none";
                    Invoice_strAddDiv.style.display="block";
                    Invoice_strEmailDiv.style.display="none";
                    Invoice_strNameTXT.innerHTML="收件人:";
                    Invoice_strPhoneTXT.innerHTML="收件人电话:";
                }else if (InvoiceType=='4') {
                    InvoiceCompanyAddDiv.style.display="block";
                    InvoiceCompanyBankDiv.style.display="block";
                    Invoice_strAddDiv.style.display="block";
                    Invoice_strEmailDiv.style.display="none";
                    Invoice_strNameTXT.innerHTML="收件人:";
                    Invoice_strPhoneTXT.innerHTML="收件人电话:";
                }
            }
        </script>
        <%End If%>
        
</div>
 
<IFRAME id="HiddenFrame" name="HiddenFrame" WIDTH=0 HEIGHT=0 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR=#ffffff></IFRAME>
</body>
</html>