7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
279 lines
11 KiB
HTML
279 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>
|
||
/* 监听body点击冒泡,iOS没有该属性无法监听 */
|
||
body { cursor:pointer }
|
||
.pcki-page {overflow-x: hidden; overflow-y: auto; -webkit-overflow-scrolling: touch;}
|
||
#content #info .title{color: #9b9b9b; text-align: right;}
|
||
#content #info .text{font-weight: bold; text-align: left;}
|
||
#dds td { padding: 1px; }
|
||
#dds .dd-row input { max-width: 80px; margin: auto; }
|
||
.div_input_remark {margin-bottom: 10px;}
|
||
.div_save_remark {width:80px; padding:4px; display: inline-block;}
|
||
.div_button_del_pj {padding: 4px; display: inline-block;}
|
||
#layui-layer-dpm-show .layui-form-radio {margin: 0;}
|
||
#layui-layer-dpm-show .layui-layer-btn {display: none;}
|
||
</style>
|
||
<!-- 引入 -->
|
||
|
||
<!-- jquery -->
|
||
<script src="js/jquery.min.js"></script>
|
||
|
||
<script src="layuiadmin/layui/layui.js"></script>
|
||
<script src="js/function.js"></script>
|
||
<!-- universal -->
|
||
<script src="js/universal/universal.js"></script>
|
||
<link rel="stylesheet" href="js/universal/universal.css">
|
||
<!-- p_custom_keyboard js -->
|
||
<script src="js/p_custom_keyboard/p_custom_keyboard.js"></script>
|
||
<link rel="stylesheet" href="js/p_custom_keyboard/p_custom_keyboard.css">
|
||
</head>
|
||
|
||
<body style="background-color: #f0f0f0;">
|
||
<div class="pcki-page">
|
||
<div style="background-color: white; border-radius: 8px; height: 48px; line-height: 48px; text-align: left; margin: 8px;">
|
||
<div style="display: inline-block; margin-left: 16px; text-align: center; font-size: 18px; color: red;">沙盘订货</div>
|
||
<div style="float: right; text-align: center;margin-right: 16px; font-size: 18px;" onclick="bz();">帮助</div>
|
||
<div style="float: right; text-align: center;margin: 0 16px; font-size: 18px;" onclick="wdjh();">我的计划</div>
|
||
</div>
|
||
<div id="content"></div>
|
||
</div>
|
||
|
||
|
||
<script>
|
||
|
||
var global_watermark = {
|
||
is_sy: "n"
|
||
,username: ""
|
||
}
|
||
|
||
layui.config({
|
||
base: './layuiadmin/'
|
||
}).extend({
|
||
index: 'lib/index'
|
||
}).use(['index', 'user','element', 'table', 'slider'], function(){
|
||
var $ = layui.$
|
||
,setter = layui.setter
|
||
,admin = layui.admin
|
||
,form = layui.form
|
||
,slider = layui.slider
|
||
|
||
$.ajax(
|
||
{
|
||
url:"./?_m=spdh",
|
||
contentType: "application/json",
|
||
method: 'POST',
|
||
success: function (res) {
|
||
var json_data=$.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;
|
||
var obj1=window.parent.parent?window.parent.parent:window.parent;
|
||
obj1.location.href=url1;
|
||
}else if(json_data.code==2){
|
||
//------------------重新登录
|
||
url1="login.htm?error_msg="+json_data.msg;
|
||
var obj1=window.parent.parent?window.parent.parent:window.parent;
|
||
obj1.location.href=url1;
|
||
}else{
|
||
//------------------填充内容
|
||
console.log("Spdh_初始:", json_data)
|
||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||
|
||
global_watermark.is_sy = json_data.is_sy
|
||
global_watermark.username = json_data.username
|
||
|
||
update(json_data.cplbs, json_data.face)
|
||
}
|
||
}
|
||
,beforeSend: function() { u_start_loading() }
|
||
,complete: function() { u_stop_loading() }
|
||
,error: function () { layui.layer.msg("与服务器通信失败!") }
|
||
}
|
||
)
|
||
|
||
$("#plan-number").change(function() {
|
||
var plan_number = parseInt($(this).val() ? $(this).val() : "0")
|
||
if (plan_number < plans.length) {
|
||
layui.layer.msg("不能少于现有计划数")
|
||
$("#plan-number").val(plans.length)
|
||
return false
|
||
}
|
||
plans.push({
|
||
no: "", date: "", color_number: 1
|
||
})
|
||
setPlans(plans)
|
||
})
|
||
|
||
form.on('submit(plan-submit)', function(data) {
|
||
console.log(data.field)
|
||
return false
|
||
})
|
||
|
||
// 屏幕旋转时重置部分元素的方位与尺寸
|
||
$(window).resize(function() {
|
||
$("#layui-layer-dpm-show").css({
|
||
top: ((window.innerHeight - 250) / 2)+'px',
|
||
left: (window.innerWidth*0.05)+'px',
|
||
width: (window.innerWidth*0.9)+'px'
|
||
})
|
||
})
|
||
$(window).on("orientationchange",function(){
|
||
// layui生成iframe时,主页面直接生成的iframe在#LAY_app_body下,由iframe生成的布置在主页面下的iframe在.layui-layer-iframe下
|
||
$("#LAY_app_body", top.document).css({
|
||
"width": "100%",
|
||
"height": "100%",
|
||
"top": "0",
|
||
"left": "0"
|
||
})
|
||
})
|
||
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
|
||
// safari中iframe内的页面宽度会莫名其妙多一点出来,此处强制将本页宽度修正
|
||
$(".pcki-page").width($(self.frameElement).parents(".layui-layer-iframe").width())
|
||
// 修复iphone端,点击按钮时自动滚到页面顶部以及附带的其他一些问题
|
||
$(".pcki-page").height($(self.frameElement).parents(".layui-layer-iframe").height())
|
||
// 将iframe的高度同步为其父元素.layui-layer-iframe的高度
|
||
$(this).find("[name="+window_name+"]").height($(this).height())
|
||
})
|
||
|
||
if(admin.screen()<2)
|
||
is_mobile="y";
|
||
$(window).on('resize', function(){
|
||
//自动
|
||
if(admin.screen()<2)
|
||
is_mobile="y"
|
||
})
|
||
|
||
}) // end layui
|
||
function wdjh(){
|
||
layui.use('layer', function(){
|
||
var url1="spdh_wdjh.htm";
|
||
var layer = parent.layer;
|
||
index_dk_single = layer.open({
|
||
type: 2,
|
||
title: '',
|
||
content: url1,
|
||
offset: 'b',
|
||
closeBtn:0,
|
||
anim: 2,
|
||
});
|
||
layer.full(index_dk_single);
|
||
});
|
||
}
|
||
function bz(){
|
||
layui.use('layer', function(){
|
||
var url1="spdh_bz.htm";
|
||
var layer = parent.layer;
|
||
index_dk_single = layer.open({
|
||
type: 2,
|
||
title: '',
|
||
content: url1,
|
||
offset: 'b',
|
||
closeBtn:0,
|
||
anim: 2,
|
||
});
|
||
layer.full(index_dk_single);
|
||
});
|
||
}
|
||
function update(cplbs, face) {
|
||
layui.use(['jquery'], function() {
|
||
var $ = layui.jquery
|
||
|
||
/*var cplbs = [
|
||
{no: "1", date: "7月10日", jh_color: 30, sj_color: 20, sjjs: 45, list: [
|
||
{no: 1, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
,{no: 2, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
,{no: 3, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
,{no: 4, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
]}
|
||
,{no: "1", date: "8月10日", jh_color: 30, sj_color: 20, sjjs: 45, list: [
|
||
{no: 1, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
,{no: 2, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
,{no: 3, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
,{no: 4, pic: "http://47.99.153.58/edt/hcb/attachments/design/mini/12W1102.jpg", js: 10, kh: "12W2243", color: "黑色"}
|
||
]}
|
||
]*/
|
||
|
||
$("#content").html('')
|
||
for (var i = 0; i < cplbs.length; i++) {
|
||
var cplb_elem = ''
|
||
,cplb = cplbs[i]
|
||
|
||
cplb_elem += '<div style="margin: 8px; background-color: white; border-radius: 8px; padding: 0 16px;">'
|
||
// title
|
||
cplb_elem += '<div style="text-align: left; height: 32px; line-height: 32px; padding-top: 10px; font-size: 18px;">'
|
||
cplb_elem += '<span style="">'+cplb.date+'在售产品列表</span>'
|
||
cplb_elem += '<span style="float: right;">计划:'+cplb.kss+'款色</span>'
|
||
cplb_elem += '<span style="float: right;color: #ccc;margin: 0 4px;">|</span>'
|
||
cplb_elem += '<span style="float: right;">实际:'+cplb.ydkss+'款色,'+cplb.ydjs+'件</span>'
|
||
cplb_elem += '</div>'
|
||
|
||
cplb_elem += '<hr class="layui-bg-gray">'
|
||
|
||
// list
|
||
cplb_elem += '<div style="overflow-x: auto; white-space: nowrap; width: 100%; text-align: left;">'
|
||
for (var j = 0; j < cplb.list.length; j++) {
|
||
var item = cplb.list[j]
|
||
|
||
cplb_elem += '<a href="javascript: openDkSingle('+item.khid+', '+face+')" style="position: relative; border: 1px solid; display: inline-block; text-align: center; margin-bottom: 10px;'+(j == 0 ? '' : ' margin-left: 16px;')+'">'
|
||
cplb_elem += '<div style="width: 200px; height: 180px; line-height: 180px;"><img src='+item.pic+' style="max-width: 200px; max-height: 180px;" watermark></div>'
|
||
cplb_elem += '<div>'+item.kh+','+item.color+'</div>'
|
||
cplb_elem += '<div style="width: 36px; position: absolute; top: 0; right: 0; border-left: 1px solid; border-bottom: 1px solid;">'+item.js+'件</div>'
|
||
cplb_elem += '</a>'
|
||
}
|
||
cplb_elem += '</div>'
|
||
|
||
cplb_elem += '</div>'
|
||
|
||
$("#content").append(cplb_elem)
|
||
|
||
USetWatermark({
|
||
is_sy: global_watermark.is_sy
|
||
,text: global_watermark.username
|
||
})
|
||
}
|
||
})
|
||
}
|
||
|
||
function openDkSingle(khid, face) {
|
||
layui.use('layer', function(){
|
||
if(face=='2')
|
||
var url1="dk_single_qj.htm";
|
||
else
|
||
var url1="dk_single.htm";
|
||
var layer = parent.layer;
|
||
index_dk_single = layer.open({
|
||
type: 2,
|
||
title: '',
|
||
content: url1+'?khid='+khid,
|
||
offset: 'b',
|
||
closeBtn:0,
|
||
anim: 2,
|
||
});
|
||
layer.full(index_dk_single);
|
||
})
|
||
}
|
||
// 在【我的计划】与【单款详情】保存沙盘订货相关操作时,会调用此处刷新本页
|
||
function update_reload() {
|
||
location.reload()
|
||
}
|
||
|
||
</script>
|
||
</body>
|
||
</html> |