Dim e As object = args(0)
Dim wb As New weui
If e.GetValues.ContainsKey("name") Then
Dim name1 As String=e.GetValues("name")
wb.AddForm("","form1","Renamecx_name.htm?name1=" & name1)
Dim dr As DataRow = DataTables("客户资料").SQLFind("登录用户 = '赵总' And _Identify = '" & e.getvalues("name") & "'")
With wb.AddInputGroup("form1","ipg1","客户信息")
.AddInput("客户名称","客户名称","Text").Value = dr("客户名称")
.AddInput("手机号","手机号","text").Value = dr("手机号")
.AddInput("地域","地域","Text").Value = dr("地域")
End With
With wb.AddInputGroup("form1","商谈信息","商谈信息")
.AddTextArea("商谈记录",10).value = dr("商谈记录")
End With
With wb.AddInputGroup("form1","图片记录","图片记录")
With .AddUploader("up1","",True)
.AllowAdd = True
.Accept = "image/*"
.Incremental=True
For Each s As String In dr.Lines("图片")
.AddImage("./images/zhaozong/" & s)
Next
End With
End With
wb.InsertHTML("<div style='height:50px'></div>")
wb.AddPage("","page1").Attribute = "style='position: fixed;bottom: 0;right: 0;left: 0'" '增加1个page
With wb.AddButtonGroup("page1","btg2", False)
.Add("btn1", "返回首页", "", "default.htm")
.Add("btn2", "重新查询", "", "ReNamecx.htm")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "保存", "submit")
End With
Else
Dim dr As DataRow = DataTables("客户资料").SQLFind("[_Identify]=" & e.GetValues("name1"))
If dr IsNot Nothing Then
'MessageBox.Show(dr("手机号"))
'
Dim nms() As String = {"客户名称","手机号","地域","分类","商谈记录"}
For Each nm As String In nms
dr(nm) = e.PostValues(nm)
Next
For Each key As String In e.Files.Keys
If key = "up1" Then
For Each fln As String In e.Files(key)
e.SaveFile(key, fln, "d:\web\images\zhaozong\" & fln)
Next
dr.Lines("图片") = e.Files(key)
End If
Next
dr.Save()
'显示完成提示,2妙手自动返回原来的页面
wb.AppendHtml("<meta http-equiv='refresh' c>",True)
wb.AddToast("","t1", "编辑完成",0).Visible = True
Else
With wb.AddMsgPage("","msgpage","保存失败", "此信息可能已经被删除!") '提示用户此订单不存在.
.icon= "Warn"
.AddButton("btn1","返回","Renamecx_name.htm?name=" & e.GetValues("name1")) '生成返回原来页面的按钮
End With
End If
End If
e.WriteString(wb.Build) '生成网页
现在增加图片后,点击保存无法保存新的图片。
[此贴子已经被作者于2022/4/23 19:01:42编辑过]