调拨单相对麻烦些,要改调拨单主表TRANSVOUCH和子表TRANSVOCUCHS里的相关数量以及RDRECORD表和RDRECORDS表里的相关行数据.
在网上下份用友U8数据库表结构多研究下你就明白了.
输出格式选择rep格式,用UFO报表打开,在另存为XECEL或者直接复制到excel中,若想不这样麻烦需要调的东西要请求用友技术人员修改表结构 很麻烦就不说了 你试试吧
对应关系只能你自己的慢慢的找,如果太多的话就用笔记下来,只能说找最便捷的途径进行导入。你说123和50什么意思,字段值不一样?还是怎么回事?
那你就自己写个程序导吧,我也干过类似事,当时是从公司的用友数据库往网站库里导,当时更乱。我的空间有当时的代码,提供给你了
http://hi.baidu.com/sungoogle/blog/item/9f653cf32d49c850342acc57.html
以下是源:
<%
dim db,conn
set conn=server.CreateObject("adodb.connection")
db="provider=microsoft.jet.oledb.4.0data source="&server.MapPath("xs.mdb")
conn.open db '打开网站产品数据库
dim db1,conn1
set conn1=server.CreateObject("adodb.connection")
db1="provider=microsoft.jet.oledb.4.0data source="&server.MapPath("fadongji.mdb")
conn1.open db1 '打开用友导出的一个分类数据库
dim sql,sql1,rs,rs1
set rs=server.CreateObject ("adodb.recordset")
sql = "select * from cpinfo"
rs.open sql,conn,1,3
set rs1=server.CreateObject ("adodb.recordset")
sql1 = "select * from 11 where 最新成本<>0"
rs1.open sql1,conn1,1,3
do while not rs1.eof
rs.addnew
rs("cpname")=rs1("存货名称")
if rs1("规格型号")="" then
rs("tuhao")="无"
else
rs("tuhao")=rs1("规格型号")
end if
dim chandi
chandi=rs1("产地")
if chandi="" then
rs("changshang")="无"
else
rs("changshang")=chandi
end if
rs("danwei")=rs1("主计量单位名称")
rs("zc")="发动机"
rs("beizhu")="无"
rs("date")=now()
dim chengben,shoujia '按价格段加价
chengben=rs1("最新成本")
if chengben<=20 then
shoujia=chengben+chengben*0.15
rs("danjia")=shoujia
elseif chengben>20 and chengben<=50 then
shoujia=chengben+chengben*0.12
rs("danjia")=shoujia
elseif chengben>50 and chengben<=100 then
shoujia=chengben+chengben*0.1
rs("danjia")=shoujia
elseif chengben>100 and chengben<=300 then
shoujia=chengben+chengben*0.08
rs("danjia")=shoujia
elseif chengben>300 then
shoujia=chengben+chengben*0.06
rs("danjia")=shoujia
end if
dim fenlei '按分类编号存储子分类名称
dim duchu
duchu=rs1("存货编码")
fenlei=left(duchu,4)
if fenlei="1001" then
rs("zcmc")="发动机"
elseif fenlei="1002" then
rs("zcmc")="曲轴飞轮组"
elseif fenlei="1003" then
rs("zcmc")="活塞连杆组"
elseif fenlei="1004" then
rs("zcmc")="配气机构"
elseif fenlei="1005" then
rs("zcmc")="齿轮传动系统"
elseif fenlei="1006" then
rs("zcmc")="皮带传动"
elseif fenlei="1007" then
rs("zcmc")="高压油泵"
elseif fenlei="1105" then
rs("zcmc")="其它"
end if
dim chexing
chexing=rs1("车型")
if chexing="STR" or chexing="STRW" or chexing="HOWO" or chexing="欧曼" or chexing="黄河王子" then
rs("cx")=chexing
else
rs("cx")="例" '标识cx字段为空的数据
end if
rs.update
rs("productid")=rs("id")
rs.update
rs1.movenext
loop
rs.close
rs1.close
set rs=server.CreateObject ("adodb.recordset") '删除cx字段为空的数据
sql = "select * from cpinfo where cx='例'"
rs.open sql,conn,3,2
do while not rs.eof
rs.delete
rs.update
rs.movenext
loop
rs.close
%>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)