This repository has been archived on 2026-06-20. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
EDT/ipad/my_client.htm
wsh5485 7e47ce238b chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
2025-06-15 13:04:37 +08:00

384 lines
11 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>我的客户-e订通</title>
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
<link rel="stylesheet" href="index.css">
<style>
.search_con_more td{padding:0px;margin:0px;color:#000;}
table tr{text-align:left;}
#form1_submit{display:none;}
#form1_search_left{float:left;}
</style>
<script src="layuiadmin/layui/layui.js"></script>
<script src="js/function.js"></script>
</head>
<body>
<!--搜索-->
<div class="search">
<form class="layui-form" id="form1_search" action="my_client.htm">
<div id="form1_search_left">
<span id="form1_search_left_pad">
<div class="layui-input-inline" style="width:10px;"></div>
<div class="layui-input-inline" style="">
<div id="search_xx"></div>
</div>
<div class="layui-input-inline" style="">
<div class="khdm"></div>
</div>
<div class="layui-input-inline" style="width:100px;">
<div class="jiaodan"></div>
</div>
<div class="layui-input-inline" style="width:100px;">
<div class="queren"></div>
</div>
<div class="layui-input-inline" style="width:10px;"></div>
<div class="layui-input-inline" style="width:150px;">
<div class="onoff" style="width:150px;"></div>
</div>
<div class="layui-input-inline" style="" id="glkh">
</div>
</span>
</div>
<button id="form1_submit" class="layui-btn layui-btn-normal" lay-submit lay-filter="form1_submit"> 搜 索 </button>
</form>
</div>
<!--表格-->
<div id="show-table"></div>
<script>
var dzqm="";
//ajax
function ajaxinit()
{
var xmlhttp;
try {
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
xmlhttp=false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp=false;
}
}
if (!xmlhttp && window.createRequest) {
try {
xmlhttp = window.createRequest();
} catch (e) {
xmlhttp=false;
}
}
return xmlhttp;
}
//区经动作
function ajax_qj_action(msg,a,id,s_brand,_m){
var url="./?_m="+_m+"&_a="+a+"&id="+id+"&s_brand="+s_brand;
var obj2=document.getElementById("b_"+a+"_"+id);
var obj_button=document.getElementById("button_cj_"+id);
var obj_button2=document.getElementById("button_jd_"+id);
obj2.disabled=true;
var xmlhttp=ajaxinit();
xmlhttp.open("POST",url,true);
xmlhttp.setRequestHeader("Cache-Control","no-cache");
xmlhttp.onreadystatechange=function(){
if(xmlhttp.readyState==4 && xmlhttp.status==200){
//alert(xmlhttp.responseText);
var arr1=xmlhttp.responseText.split("|");
if(arr1[0]=="y"){
obj_button.innerHTML=arr1[2];
if(a=="jd" || a=="thjd"){
obj_button2.innerHTML="";
}
if(dzqm=="y"){
var index = layui.layer.open({
title : "电子签名",
type : 2,
content : "dzqm.htm?_a=jlqz&id="+id+"&s_brand="+s_brand,
success : function(layero, index){
}
})
layui.layer.full(index);
}
}else{
alert(arr1[1]);
obj2.disabled=false;
}
}
}
xmlhttp.send(null);
//}
}
function show_tree(path){
var obj1={};
for(var i=0;i<arr_dl.length;i++){
if(arr_dl[i][0]==path){
for(var j=1;j<arr_dl[i].length;j++){
obj1=document.getElementById(arr_dl[i][j]);
if(obj1){
if(obj1.style.display=="none")
obj1.style.display="";
else
obj1.style.display="none";
}
}
if(j==1)
alert("无相关店铺!");
}
}
}
//取得url传递参数
var query_str=location.search.substring(1);
if(query_str)
query_str="&"+query_str;
var is_mobile="n";
layui.config({
base: './layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'user','rate'], function(){
var $ = layui.$
,setter = layui.setter
,admin = layui.admin
,form = layui.form;
var rate = layui.rate;
var url="./?_m=my_client"+query_str;
$.ajax(
{
url:url,
contentType: "application/json",
method: 'POST',
async:false,
success: function (res) {
var json_data=$.parseJSON(res);
var res=$.parseJSON(res);
//alert(json_data.ver);
if(json_data.code==0){
//------------------本页返回的错误信息
layer.msg(json_data.msg);
}else if(json_data.code==1){
//------------------系统错误
var msg=json_data.msg;
var url1="error.htm?msg="+json_data.msg+"&btn_title="+json_data.btn_title+"&btn_url="+json_data.btn_url;
window.parent.location.href=url1;
}else if(json_data.code==2){
//------------------重新登录
url1="login.htm?error_msg="+json_data.msg;
window.parent.location.href=url1;
}else{
arr_dl=json_data.arr_dl;
//选项
//是否启用
var arr_key=["y","n"];
var arr_val=["是","否"];
var htm1="";
htm1+=' <select id="s_is_jd" name="s_is_jd" lay-filter="s_is_jd"><option value="">是否交单</option>';
for(var j=0;j<arr_key.length;j++){
htm1+='<option value="'+arr_key[j]+'"';
if(arr_key[j]==json_data.s_is_jd)
htm1+=' selected';
htm1+='>'+arr_val[j]+'</option>';
}
htm1+='</select>';
$(".jiaodan").html(htm1);
//
var htm2="";
htm2+=' <select id="s_is_checked" name="s_is_checked" lay-filter="s_is_jd"><option value="">是否确认</option>';
for(var j=0;j<arr_key.length;j++){
htm2+='<option value="'+arr_key[j]+'"';
if(arr_key[j]==json_data.s_is_checked)
htm2+=' selected';
htm2+='>'+arr_val[j]+'</option>';
}
htm2+='</select>';
$(".queren").html(htm2);
//
var htm3="";
htm3+='客户代码<div class="layui-input-inline" style="width:10px;"></div><div class="layui-input-inline" style="width:100px;"><input type="text" name="s_username" class="layui-input" value="'+json_data.s_username+'" onblur="javascript:form1_search.submit();"></div>';
$(".khdm").html(htm3);
htm3="";
htm3+='分开成衣/饰品<div class="layui-input-inline" style="line-height:30px;margin-top:-10px;">';
if(json_data.s_split_spfs=="y"){
htm3+='<input type="checkbox" id="offon" name="s_split_spfs" lay-skin="switch" lay-text="ON|OFF" value="'+json_data.s_split_spfs+'" lay-filter="s_is_jd"';
htm3+='checked>';
}else{
htm3+='<input type="checkbox" id="offon" name="s_split_spfs" lay-skin="switch" lay-text="ON|OFF" value="y" lay-filter="s_is_jd">';
}
htm3+='</div>';
$(".onoff").html(htm3);
//
var html2="";
if(json_data.is_brand=='y'){
//自定义选项
for(var i=0;i<res.select_dz.length;i++){
html2+='<div class="layui-input-inline" style="width:80px;"><select name="s_'+res.select_dz[i].no+'" lay-filter="s_is_jd"><option value="">-'+res.select_dz[i].title+'-</option>';
var op=res.select_dz[i].op;
for(var j=0;j<op.length;j++){
html2+='<option value="'+op[j].no+'"';
if(op[j].no==res.select_dz[i].value)
html2+='selected';
html2+='>'+op[j].title+'</option>';
}
html2+='</select></div>';
}
}
//
if(res.show_key=="y"){
html2+='<div class="layui-input-inline" style="width:100px;"><select name="s_key" lay-filter="s_is_jd">';
var op=res.select_order_flag.op;
for(var i=0;i<op.length;i++){
html2+='<option value="'+op[i].no+'"';
if(op[i].no==res.select_order_flag.value)
html2+='selected';
html2+='>'+op[i].title+'</option>';
}
html2+='</select></div>';
}
$("#search_xx").html(html2);
//点击是否启用,自动提交表单
form.on('select(s_is_jd)', function(data){
$("#form1_submit").click();
})
form.on('switch(s_is_jd)', function(data){
$("#form1_submit").click();
});
var ht=res.glkh;
if(ht=="y"){
$("#glkh").html('<a href="mod_client.htm" class="layui-btn layui-btn-danger">管理客户</a>');
}
//1
var html1="";
var huanse;
html1 += '<table class="layui-table">'
html1 += '<thead>'
html1+='<tr>';
var huanhang=[];
for(var i=0;i<json_data.table_top.length;i++){
huanhang=json_data.table_top[i].split("|");
if(huanhang.length>1){
html1+='<th>'+huanhang[0]+'<br>'+huanhang[1]+'</th>';
}else{
html1+='<th>'+json_data.table_top[i]+'</th>';
}
}
html1+='</tr>';
html1 += '</thead>'
//2
html1 += '<tbody>'
dzqm=json_data.dzqm;
for(var i=0;i<json_data.tab_mid.length;i++){
if((i%2)==0) huanse="white";else huanse="#F5F5F5";
html1+='<tr id="'+json_data.tab_mid[i].tb_id+'" style="background:'+huanse+';">';
for(var j=0;j<json_data.tab_mid[i].tbdata.length;j++){
if(j==0){
var strs= new Array();
var strs1= new Array();
var strs2= new Array();
var strs3= new Array();
strs1=json_data.tab_mid[i].tbdata[j].split("||");
strs=strs1[0].split("&&");
strs2=strs1[1].split("&&");
strs3=strs1[2].split("&&");
//
if(strs3[0]=="y"){
html1+="<td><span onclick='show_tree(\""+strs3[1]+"\")'>"+strs[0]+"</span>";
}else{
html1+='<td>'+strs[0];
}
if(strs[1]==1){
html1+="<span id=\"button_cj_"+strs[5]+"\"><input type=\"button\" id=\"b_"+strs[4]+"_"+strs[5]+"\" value=\""+strs[2]+"\" onclick=\"ajax_qj_action('"+strs[3]+"','"+strs[4]+"','"+strs[5]+"','"+strs[6]+"','"+strs[7]+"')\" style=\"background:red;color:white;\"></span>";
}
if(strs2[1]==2){
html1+="&nbsp;<span id=\"button_jd_"+strs2[5]+"\"><input type=\"button\" id=\"b_"+strs2[4]+"_"+strs2[5]+"\" value=\""+strs2[2]+"\" onclick=\"ajax_qj_action('"+strs2[3]+"','"+strs2[4]+"','"+strs2[5]+"','"+strs2[6]+"','"+strs2[7]+"')\" style=\"background:#cccccc;color:white;\"></span>";
}
html1+='</td>';
}else{
html1+='<td>'+json_data.tab_mid[i].tbdata[j]+'</td>';
}
}
html1+='</tr>';
}
html1 += '</tbody>'
//3
html1 += '<tfoot>'
html1+='<tr>';
for(var i=0;i<json_data.dp_hj.length;i++){
html1+='<td>'+json_data.dp_hj[i]+'</td>';
}
html1+='</tr>';
html1+='<tr>';
for(var i=0;i<json_data.dl_hj.length;i++){
html1+='<td>'+json_data.dl_hj[i]+'</td>';
}
html1+='</tr>';
html1 += '</tfoot>'
html1 += '</table>'
$("#show-table").html(html1);
//重新渲染
form.render();
}
},
error: function () {
layui.layer.msg("与服务器通信失败!");
}
}
);
if(admin.screen()<2)
is_mobile="y";
$(window).on('resize', function(){
//自动
if(admin.screen()<2)
is_mobile="y";
});
});
</script>
</body>
<style>
.search {
width: calc(100% - 20px);
text-align: left;
background-color: #ffffff;
height: 60px;
line-height: 60px;
margin: 10px;
}
#show-table {
margin: 10px;
width: calc(100% - 20px);
height: calc(100vh - 60px - 30px);
overflow: auto;
position: relative;
}
#show-table table thead th {
position: sticky;
top: -1px;
z-index: 1;
background:#F5F5F5;
}
#show-table table tfoot td {
/* position: sticky;
bottom: -1px;
z-index: 1; */
background:#F5F5F5;
}
.layui-table {
margin: 0;
}
</style>
</html>