% '****************************************************************************************** ' Software name: xRedrobe(小红袍) Content Management System ' Version:1.0 ' Web: ' Author: 六点半 ' Copyright (C) 2005-2009 小红袍官方 版权所有 '****************************************************************************************** viewHead dim typeArray,topicArray,topicDic,keyword,m_state,m_commend,repeat,playfrom,contentUrl,pTopic,m_department dim action,back:action=getForm("action", "get"):back="/zhcrm/information.asp" dim page,vtype,order Select case action case "add":addNews case "del":delNews getForm("id","get"):echo("") case "edit":editNews case "save":saveNews case else:main End Select viewFoot Sub saveNews dim actType,ary:actType = getForm("acttype","get") dim updateSql,insertSql,m_back dim m_id:m_id=getForm("m_id","post"):if not isNum(m_id) then m_id=0 dim m_CompanyName,qury_CompanyName:m_CompanyName = getForm("CompanyName","post"):qury_CompanyName = getForm("CompanyName","post") dim m_Keys:m_Keys=getForm("m_Keys","post") dim m_CLevel:m_CLevel=getForm("CLevel","post") dim m_Charge:m_Charge= getForm("Charge","post") dim m_Charge_kj:m_Charge_kj= getForm("Charge_kj","post") dim m_Address : m_Address = getForm("Address","post") dim m_ContactPhone:m_ContactPhone=getForm("ContactPhone","post") dim m_CType:m_CType = getForm("CType","post") dim m_CAttribute : m_CAttribute = getForm("CAttribute","post") dim m_Fax:m_Fax=getForm("Fax","post") dim m_ContactAName:m_ContactAName=getForm("ContactAName","post") dim m_ContactACredentials:m_ContactACredentials=getForm("ContactACredentials","post") dim m_ContactAMobile:m_ContactAMobile=getForm("ContactAMobile","post") dim m_ContactAQQ:m_ContactAQQ=getForm("ContactAQQ","post") dim m_ContactAEmail:m_ContactAEmail=getForm("ContactAEmail","post") dim m_ContactBName:m_ContactBName=getForm("ContactBName","post") dim m_ContactBCredentials:m_ContactBCredentials=getForm("ContactBCredentials","post") dim m_ContactBMobile:m_ContactBMobile=getForm("ContactBMobile","post") dim m_ContactBQQ:m_ContactBQQ=getForm("ContactBQQ","post") dim m_ContactBEmail:m_ContactBEmail=getForm("ContactBEmail","post") dim m_ContractDate:m_ContractDate=getForm("ContractDate","post") : if isNul(m_ContractDate) then m_ContractDate="01-01-1970" dim m_PerformanceMonth:m_PerformanceMonth=getForm("PerformanceMonth","post") dim m_Remark:m_Remark=getForm("Remark","post") dim m_BoolAudit:m_BoolAudit=getForm("m_BoolAudit","post") dim m_Branch:m_Branch=getForm("m_Branch","post") dim m_AddUser:m_AddUser=rCookie("m_username") dim m_AccountName:m_AccountName=getForm("m_AccountName","post") select case actType case "edit" updateSql = "m_Keys = '"&m_Keys&"',m_CompanyName = '"&m_CompanyName&"',m_CLevel='"&m_CLevel&"',m_Charge='"&m_Charge&"',m_Charge_kj='"&m_Charge_kj&"', m_Address='"&m_Address updateSql = updateSql&"',m_ContactPhone='"&m_ContactPhone&"',m_CType='"&m_CType&"',m_CAttribute='"&m_CAttribute&"',m_Fax='" updateSql = updateSql&m_Fax&"',m_ContactAName='"&m_ContactAName&"',m_ContactACredentials='"&m_ContactACredentials updateSql = updateSql&"',m_ContactAMobile='"&m_ContactAMobile&"',m_ContactAQQ='"&m_ContactAQQ&"',m_ContactAEmail='"&m_ContactAEmail&"',m_ContactBName='" updateSql = updateSql&m_ContactBName&"',m_ContactBCredentials='"&m_ContactBCredentials&"',m_ContactBMobile='" updateSql = updateSql&m_ContactBMobile&"',m_ContactBQQ='"&m_ContactBQQ&"',m_ContactBEmail='"&m_ContactBEmail&"',m_ContractDate='"&m_ContractDate updateSql = updateSql&"',m_PerformanceMonth='"&m_PerformanceMonth&"',m_Remark='"&m_Remark&"',m_addtime='"&now()&"',m_AddUser='"&m_AddUser&"',m_BoolAudit="&m_BoolAudit&",m_Branch="&m_Branch updateSql = updateSql&",m_AccountName='"&m_AccountName&"'" updateSql = "update {pre}Customer set "&updateSql&" where m_id="&m_id ' Response.Write(updateSql) conn.db updateSql,"execute" if ""&m_back="" then m_back="information.asp?m_success=Success&m_companyName="&qury_CompanyName m_back="information.asp?action=edit&id="&m_id echo("") case "add" if checkAppellation(m_CompanyName) then : alertMsg m_CompanyName&"已经存在亚洲色婷婷久久精品AV蜜桃免费啪视频在线看视频,不能重复添加!","":last: Exit Sub: end if '判断是否存在重复记录 insertSql = "insert into {pre}Customer(m_Keys,m_CType,m_CAttribute,m_CLevel,m_Charge,m_Charge_kj,m_CompanyName,m_Address,m_ContactPhone,m_Fax,m_ContactAName,m_ContactACredentials," insertSql = insertSql&"m_ContactAMobile,m_ContactAQQ,m_ContactBName,m_ContactBCredentials,m_ContactBMobile,m_ContactBQQ,m_ContractDate,m_PerformanceMonth," insertSql = insertSql&"m_addtime,m_Remark,m_BoolAudit,m_AccountApprovedNum,m_DepositerInquirePassword,m_BackInfoRemark,m_Branch," insertSql = insertSql&"m_ContactAEmail,m_ContactBEmail,m_AddUser,m_AccountName" insertSql = insertSql&") values ('"&m_Keys&"','" insertSql = insertSql&m_CType&"','"&m_CAttribute&"','"&m_CLevel&"','"&m_Charge&"','"&m_Charge_kj&"','"&m_CompanyName&"','"&m_Address&"','" insertSql = insertSql&m_ContactPhone&"','"&m_Fax&"','"&m_ContactAName&"','"&m_ContactACredentials&"','" insertSql = insertSql&m_ContactAMobile&"','"&m_ContactAQQ&"','"&m_ContactBName&"','"&m_ContactBCredentials&"','" insertSql = insertSql&m_ContactBMobile&"','"&m_ContactBQQ&"','"&m_ContractDate&"','"&m_PerformanceMonth&"','"&now()&"','" insertSql = insertSql&m_Remark&"',"&m_BoolAudit&",'','','',"&m_Branch&",'" insertSql = insertSql&m_ContactAEmail&"','"&m_ContactBEmail&"','"&m_AddUser&"','"&m_AccountName&"')" ' Response.Write(insertSql) conn.db insertSql,"execute" if ""&m_back="" then m_back="information.asp?action=add&m_companyName="&qury_CompanyName echo("") end select End Sub function checkAppellation(ByVal appellation) '管理员操作:判断是否存在重复记录 appellation=Cstr(appellation) if isNul(appellation) then checkAppellation=true end if dim rsAppellation:rsAppellation = 0 rsAppellation = conn.db("select count(*) from {pre}Customer where m_CompanyName='"&appellation&"'","execute")(0) if rsAppellation >= 1 then checkAppellation = true else checkAppellation = false end if end function Sub delNews(ByVal id) id=Clng(id) on error resume next conn.db "DELETE FROM {pre}Customer where m_id="&id,"execute" End Sub Sub viewList dim i,orderStr,whereStr,sqlStr,rsObj,allPage,allRecordset,numPerPage,searchStr,CType,CAttribute,CLevel,Charge,Charge_kj dim hiCType,hiCAttribute,hiCLevel,hiCharge,hiCharge_kj hiCType = getForm("hiCType", "both") hiCAttribute = getForm("hiCAttribute", "both") hiCLevel = getForm("hiCLevel", "both") hiCharge = getForm("hiCharge", "both") hiCharge_kj = getForm("hiCharge_kj", "both") numPerPage= 10 '每頁显示记录数 keyword = getForm("keyword", "both") order = getForm("order", "get") CType = getForm("CType", "both") CAttribute = getForm("CAttribute", "both") CLevel = getForm("CLevel", "both") Charge = getForm("Charge", "both") Charge_kj = getForm("Charge_kj", "both") if isNul(order) then order = "m_addtime" orderStr= " order by "&order&" desc" m_department= rCookie("m_department") page = getForm("page", "get") if isNul(page) then page=1 else page=clng(page) if page=0 then page=1 if m_department >0 then whereStr = " where (m_Branch="&m_department&" OR m_Branch=0) " end if if not isNul(keyword) then dim keys,countkey,ki keys=Split(keyword) countkey = ubound(keys) for ki=0 to countkey if isNul(whereStr) then '模糊搜索條件:關鍵字免费啪视频在线看视频,公司名稱国产又爽又猛又粗的A片,客戶類別少妇偷拍精品高潮少妇,客戶屬性国产AV一区二区三区最新精品中文字幕色综合久久国产又爽又猛又粗的A片,稅務專員美女视频高清,會計專員国产AV一区二区三区最新精品中文字幕色综合久久,执行部门国产一性一交一伦一A片视频中文字幕色综合久久国产妇女乱一性一交,主联系人国产一性一交一伦一A片视频国产精品高潮呻吟久久影视A片中文字幕色综合久久,主联系人手机少妇偷拍精品高潮少妇美女视频高清国产AV一区二区三区最新精品,转账户名 whereStr = " where m_Keys like '%"&keys(ki)&"%' OR m_CompanyName like '%"&keys(ki)&"%' OR m_CType like '%"&keys(ki)&"%' OR m_CAttribute like '%"&keys(ki)&"%' OR m_Charge like '%"&keys(ki)&"%' OR m_Charge_kj like '%"&keys(ki)&"%' OR m_ContactAName like '%"&keys(ki)&"%' OR m_ContactAMobile like '%"&keys(ki)&"%' OR m_AccountName like '%"&keys(ki)&"%' OR m_Remark like '%"&keys(ki)&"%'" else whereStr = whereStr&" AND (m_Keys like '%"&keys(ki)&"%' OR m_CompanyName like '%"&keys(ki)&"%' OR m_CType like '%"&keys(ki)&"%' OR m_CAttribute like '%"&keys(ki)&"%' OR m_Charge like '%"&keys(ki)&"%' OR m_Charge_kj like '%"&keys(ki)&"%' OR m_ContactAName like '%"&keys(ki)&"%' OR m_ContactAMobile like '%"&keys(ki)&"%' OR m_AccountName like '%"&keys(ki)&"%' OR m_Remark like '%"&keys(ki)&"%')" end if next end if if not isNul(CType) then '判断客戶類別为非空值 whereStr = "where m_CType = '"&CType&"'" '客戶類別搜索條件 if not isNul(CAttribute) then whereStr = whereStr&" AND m_CAttribute = '"&CAttribute&"'" '客戶屬性搜索條件 end if if not isNul(CLevel) then whereStr = whereStr&" AND m_CLevel = '"&CLevel&"'" '客户级别搜索條件 end if if not isNul(Charge) then whereStr = whereStr&" AND m_Charge = '"&Charge&"'" '稅務專員搜索條件 end if if not isNul(Charge_kj) then whereStr = whereStr&" AND m_Charge_kj = '"&Charge_kj&"'" '會計專員搜索條件 end if end if if not isNul(CAttribute) then '判断客戶屬性为非空值 whereStr = "where m_CAttribute = '"&CAttribute&"'" '客戶屬性搜索條件 if not isNul(CType) then whereStr = whereStr&" AND m_CType = '"&CType&"'" '客戶類別搜索條件 end if if not isNul(CLevel) then whereStr = whereStr&" AND m_CLevel = '"&CLevel&"'" '客户级别搜索條件 end if if not isNul(Charge) then whereStr = whereStr&" AND m_Charge = '"&Charge&"'" '稅務專員搜索條件 end if if not isNul(Charge_kj) then whereStr = whereStr&" AND m_Charge_kj = '"&Charge_kj&"'" '會計專員搜索條件 end if end if if not isNul(CLevel) then '判断客户级别为非空值 whereStr = "where m_CLevel = '"&CLevel&"'" '客户级别搜索條件 if not isNul(CType) then whereStr = whereStr&" AND m_CType = '"&CType&"'" '客戶類別搜索條件 end if if not isNul(CAttribute) then whereStr = whereStr&" AND m_CAttribute = '"&CAttribute&"'" '客戶屬性搜索條件 end if if not isNul(Charge) then whereStr = whereStr&" AND m_Charge = '"&Charge&"'" '稅務專員搜索條件 end if if not isNul(Charge_kj) then whereStr = whereStr&" AND m_Charge_kj = '"&Charge_kj&"'" '會計專員搜索條件 end if end if if not isNul(Charge) then '判断稅務專員为非空值 whereStr = "where m_Charge = '"&Charge&"'" '稅務專員搜索條件 if not isNul(CType) then whereStr = whereStr&" AND m_CType = '"&CType&"'" '客戶類別搜索條件 end if if not isNul(CAttribute) then whereStr = whereStr&" AND m_CAttribute = '"&CAttribute&"'" '客戶屬性搜索條件 end if if not isNul(CLevel) then whereStr = whereStr&" AND m_CLevel = '"&CLevel&"'" '客户级别搜索條件 end if if not isNul(Charge_kj) then whereStr = whereStr&" AND m_Charge_kj = '"&Charge_kj&"'" '會計專員搜索條件 end if end if if not isNul(Charge_kj) then '判断會計專員为非空值 whereStr = "where m_Charge_kj = '"&Charge_kj&"'" '會計專員搜索條件 if not isNul(CType) then whereStr = whereStr&" AND m_CType = '"&CType&"'" '客戶類別搜索條件 end if if not isNul(CAttribute) then whereStr = whereStr&" AND m_CAttribute = '"&CAttribute&"'" '客戶屬性搜索條件 end if if not isNul(CLevel) then whereStr = whereStr&" AND m_CLevel = '"&CLevel&"'" '客户级别搜索條件 end if if not isNul(Charge) then whereStr = whereStr&" AND m_Charge = '"&Charge&"'" '稅務專員搜索條件 end if end if sqlStr = replace(replace("select m_id,m_CType,m_CAttribute,m_CLevel,m_Charge,m_Charge_kj,m_CompanyName,m_ContactPhone,m_ContractDate,m_addtime,m_AddUser from {pre}Customer "&whereStr&orderStr,"where and","where"),"where order","order") 'echo (sqlStr) if topLevel() then '管理员操作 if action="check" then '列出重复名称的记录 sqlStr = ("select * from {pre}Customer where m_CompanyName in (select m_CompanyName from {pre}Customer group by m_CompanyName having count (m_CompanyName) > 1)") end if if action="ToExcle" then '导出EXCLE if hiCType="" AND hiCAttribute="" AND hiCLevel="" AND hiCharge="" then echo("") else ToExcle hiCType,hiCAttribute,hiCLevel,hiCharge,hiCharge_kj '调用导出EXCLE子程序 end if end if end if set rsObj = conn.db(sqlStr,"records1") rsObj.pagesize = numPerPage allRecordset = rsObj.recordcount : allPage= rsObj.pagecount if page>allPage then page=allPage %>
Success!修改客戶("&m_companyName&")成功
公司名稱 | 客戶類別 | 客戶屬性 | 稅務專員 | 會計專員 | 操作 | 功能模塊 | 更新時間 | 最後更新 |
---|---|---|---|---|---|---|---|---|
"><%= rsObj("m_CompanyName")%> | <%if rsObj("m_CType")="" then echo(" ") else %> <%=left(rsObj("m_CType"),6)%> <%end if%> | <%if rsObj("m_CAttribute")="" then echo(" ") else %> <%=left(rsObj("m_CAttribute"),6)%> <%end if%> | <%if rsObj("m_Charge")="" then echo(" ") else %> <%=rsObj("m_Charge")%> <%end if%> | <%if rsObj("m_Charge_kj")="" then echo(" ") else %> <%=rsObj("m_Charge_kj")%> <%end if%> | <% if editorLevel then %> ">編輯 <% if topLevel then %> | <% end if %> <% else %> ">查看 <% end if %> | <% echo "工商 | " echo "代碼 | " echo "國稅 | " echo "地稅 | " echo "銀行 | " echo "批文 | " echo "審計 | " echo "收費 " %> | <% if rsObj("m_addtime")<>"" then echo(rsObj("m_addtime")) else echo(" ") end if %> | <% if rsObj("m_AddUser")<>"" then echo(rsObj("m_AddUser")) else echo(" ") end if %> |
"><%= rsObj("m_CompanyName")%> | <%if rsObj("m_CType")="" then echo(" ") else %> <%=left(rsObj("m_CType"),6)%> <%end if%> | <%if rsObj("m_CAttribute")="" then echo(" ") else %> <%=left(rsObj("m_CAttribute"),6)%> <%end if%> | <%if rsObj("m_Charge")="" then echo(" ") else %> <%=rsObj("m_Charge")%> <%end if%> | <%if rsObj("m_Charge_kj")="" then echo(" ") else %> <%=rsObj("m_Charge_kj")%> <%end if%> | <% if editorLevel then %> ">編輯 <% if topLevel then %> | " onClick="return confirm('确定要刪除吗')">刪除 <% end if %> <% else %> ">查看 <% end if %> | <% echo "工商 | " echo "代碼 | " echo "國稅 | " echo "地稅 | " echo "銀行 | " echo "批文 | " echo "審計 | " echo "收費 " %> | <% if rsObj("m_addtime")<>"" then echo(rsObj("m_addtime")) else echo(" ") end if %> | <% if rsObj("m_AddUser")<>"" then echo(rsObj("m_AddUser")) else echo(" ") end if %> |
Success!新添加客戶("&m_companyName&")成功
導出EXCEL文件成功!點擊下載!