<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>{$page_title} 触屏版</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
/* 关于input按钮的css下载位置 下面有 下载 地址 */
<link href="{$ectouch_themes}/images/touch-icon.png" rel="apple-touch-icon-precomposed" />
<link href="{$ectouch_themes}/images/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link href="{$ectouch_themes}/ectouch.css" rel="stylesheet" type="text/css" />
<script src="{$ectouch_themes}/js/jquery-1.11.3.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<style type="text/css" media="screen">
.checkbox{margin-top: 2.5%;}
.box{width:100%;line-height:60px;text-align:left;background-color:#fff;border-bottom:1px solid #c8c8c8;}
.box_list{background-color:#fff;color:#646464;font-size:20px;width:95%;height:50px;margin-left:5%;}
.btn_tj{position: fixed; bottom: 0px;width: 100%;height: 60px;background-color: #ec5151;border:none; font-size: 1.2rem;color:#fff;}
/* input 开关按钮开始 */
.testswitch {position: relative;float:left;width:45px;margin:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;}
.testswitch-checkbox {display: none;}
.testswitch-label{display: block;overflow:hidden;cursor:pointer;border:0px solid #999999;border-radius: 20px; margin-top: 11px;}
.testswitch-inner{display: block; width: 200%; margin-left: -100%; transition: margin 0.1s ease-in 0s;}
.testswitch-inner::before, .testswitch-inner::after{display:block; float:right; width:50%; height:22px; padding:0; line-height: 30px; font-size: 0px; color: white; font-family: Trebuchet, Arial, sans-serif; font-weight: bold; box-sizing: border-box;}
.testswitch-inner::after{content: attr(data-on); padding-left: 10px; background-color: #00a600; color: #FFFFFF;}
.testswitch-inner::before{content: attr(data-off); padding-right: 10px; background-color: #939292; color: #999999; text-align: right;}
.testswitch-switch{position: absolute; display: block; width: 16px; height: 16px; margin: 3px; background: #FFFFFF; /* top: 0; */ bottom: 0; right: 23px; border: 0px solid #999999; border-radius: 20px; transition: all 0.1s ease-in 0s;}
.testswitch-checkbox:checked + .testswitch-label .testswitch-inner{margin-left: 0;}
.testswitch-checkbox:checked + .testswitch-label .testswitch-switch{right: 0px;}
/* input 开关按钮结束 就这么点css */
</style>
<body>
<header id="header">
<div class="header_l header_return"> <a class="ico_10" href="user.php?u={$u}"> 返回 </a> </div>
<h1> 权限管理 </h1>
</header>
<form action="phone_system.php?act=a" method="post" enctype="multipart/form-data">
<section class="container-full set-list mb10">
<!-- 查看权开始 -->
<div class="box">
<span class="box_list">
工厂客户查看权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.0.gc_show eq gc_show} checked {else} {/if} id="gcShow" />
<label class="testswitch-label" id="gcCha" for="gcShow">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
供应商客户查看权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.1.gys_show eq gys_show} checked {else} {/if} id="gysShow" />
<label class="testswitch-label" id="gysCha" for="gysShow">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
终端客户查看权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.2.zd_show eq zd_show} checked {else} {/if} id="zdShow" />
<label class="testswitch-label" id="zdCha" for="zdShow">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<!-- 修改权开始 -->
<div class="box">
<span class="box_list">
工厂客户资料修改权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.3.gc_update eq gc_update} checked {else} {/if} id="gcUpdate" />
<label class="testswitch-label" id="gcXiu" for="gcUpdate">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
供应商客户资料修改权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.4.gys_update eq gys_update} checked {else} {/if} id="gysUpdate" />
<label class="testswitch-label" id="gysXiu" for="gysUpdate">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
终端客户资料修改权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.5.zd_update eq zd_update} checked {else} {/if} id="zdUpdate" />
<label class="testswitch-label" id="zdXiu" for="zdUpdate">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<!-- 认证权开始 -->
<div class="box">
<span class="box_list">
工厂客户认证权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.6.gc_auth eq gc_auth} checked {else} {/if} id="gcAuth" />
<label class="testswitch-label" id="gcRen" for="gcAuth">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
供应商客户认证权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.7.gys_auth eq gys_auth} checked {else} {/if} id="gysAuth" />
<label class="testswitch-label" id="gysRen" for="gysAuth">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
终端客户认证权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.8.zd_auth eq zd_auth} checked {else} {/if} id="zdAuth" />
<label class="testswitch-label" id="zdRen" for="zdAuth">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<!-- 删除权开始 -->
<div class="box">
<span class="box_list">
工厂客户删除权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.9.gc_del eq gc_del} checked {else} {/if} id="gcDel" />
<label class="testswitch-label" id="gcShan" for="gcDel">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
供应商客户删除权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.10.gys_del eq gys_del} checked {else} {/if} id="gysDel" />
<label class="testswitch-label" id="gysShan" for="gysDel">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
终端客户删除权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.11.zd_del eq zd_del} checked {else} {/if} id="zdDel" />
<label class="testswitch-label" id="zdShan" for="zdDel">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<div class="box">
<span class="box_list">
客户录入权
</span>
<div class="checkbox" style="display: inline-block;margin-right: 5%;float: right;">
<!-- input 按钮开始 -->
<div class="testswitch">
<input class="testswitch-checkbox" type="checkbox" {if $res.12.kh_record eq kh_record} checked {else} {/if} id="khRecord" />
<label class="testswitch-label" id="khLu" for="khRecord">
<span class="testswitch-inner" id="test" data-on="ON" data-off="OFF"></span>
<span class="testswitch-switch"></span>
</label>
</div>
<!-- input 按钮结束 -->
</div>
</div>
<!-- 当前被设置的管理员id -->
<input type="hidden" id="ac_id" ac_id="{$id}">
<!-- 当前被设置的管理员gs编号 -->
<input type="hidden" id="ac_num" ac_num="{$num}">
</section>
<!-- <input type="hidden" name="act" value="addClientInfo"> -->
</form>
</body>
<script>
$(function(){
// 查看权开始
// 工厂--------------------------
$('#gcCha').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gcShow").prop("checked");
// console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('工厂查看已选中');
// 执行ajax 请求
gcShow(ac_id,ac_num);
}else{
console.log('工厂查看已取消');
// 删除该权限节点
gcShowDel(ac_id,ac_num);
}
})
// 新增工厂查看权
function gcShow(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcShow',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
// error: function (XMLResponse) {
// alert("错误信息:" + XMLResponse.responseText);
// }
})
}
// 删除工厂查看权
function gcShowDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcShowDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 供应商-------------------------
$('#gysCha').click(function(){
var cst = $("#gysShow").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('供应商查看已选中');
gysShow(ac_id,ac_num);
}else{
console.log('供应商查看已取消');
gysShowDel(ac_id,ac_num);
}
})
// 新增 供应商 查看权
function gysShow(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysShow',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
// error: function (XMLResponse) {
// alert("错误信息:" + XMLResponse.responseText);
// }
})
}
// 删除 供应商 查看权
function gysShowDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysShowDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 终端 -----------------------------------
$('#zdCha').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#zdShow").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('终端查看已选中');
zdShow(ac_id,ac_num);
}else{
console.log('终端查看已取消');
zdShowDel(ac_id,ac_num);
}
})
// 新增
function zdShow(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdShow',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function zdShowDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdShowDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 修改权开始
// 工厂-------------------------------------
$('#gcXiu').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gcUpdate").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('工厂修改已选中');
gcUpdate(ac_id,ac_num);
}else{
console.log('工厂修改已取消');
gcUpdateDel(ac_id,ac_num);
}
})
// 新增
function gcUpdate(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcUpdate',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function gcUpdateDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcUpdateDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 供应商----------------------------------
$('#gysXiu').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gysUpdate").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('供应商修改已选中');
gysUpdate(ac_id,ac_num);
}else{
console.log('供应商修改已取消');
gysUpdateDel(ac_id,ac_num);
}
})
// 新增
function gysUpdate(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysUpdate',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function gysUpdateDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysUpdateDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 终端-------------------------------------
$('#zdXiu').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#zdUpdate").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('终端修改已选中');
zdUpdate(ac_id,ac_num);
}else{
console.log('终端修改已取消');
zdUpdateDel(ac_id,ac_num);
}
})
// 新增
function zdUpdate(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdUpdate',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function zdUpdateDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdUpdateDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 认证权开始
// 工厂------------------------------
$('#gcRen').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gcAuth").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('工厂认证已选中');
gcAuth(ac_id,ac_num);
}else{
console.log('工厂认证已取消');
gcAuthDel(ac_id,ac_num);
}
})
// 新增
function gcAuth(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcAuth',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function gcAuthDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcAuthDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 供应商------------------------------
$('#gysRen').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gysAuth").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('供应商认证已选中');
gysAuth(ac_id,ac_num);
}else{
console.log('供应商认证已取消');
gysAuthDel(ac_id,ac_num);
}
})
// 新增
function gysAuth(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysAuth',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function gysAuthDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysAuthDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 终端-----------------------------------
$('#zdRen').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#zdAuth").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('终端认证已选中');
zdAuth(ac_id,ac_num);
}else{
console.log('终端认证已取消');
zdAuthDel(ac_id,ac_num);
}
})
// 新增
function zdAuth(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdAuth',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function zdAuthDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdAuthDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除权开始
// 工厂-----------------------------------
$('#gcShan').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gcDel").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('工厂删除已选中');
gcDel(ac_id,ac_num);
}else{
console.log('工厂删除已取消');
gcDelDel(ac_id,ac_num);
}
})
// 新增
function gcDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function gcDelDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gcDelDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 供应商--------------------------------------
$('#gysShan').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#gysDel").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('供应商删除已选中');
gysDel(ac_id,ac_num);
}else{
console.log('供应商删除已取消');
gysDelDel(ac_id,ac_num);
}
})
// 新增
function gysDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function gysDelDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'gysDelDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 终端----------------------------------------
$('#zdShan').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#zdDel").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('终端删除已选中');
zdDel(ac_id,ac_num);
}else{
console.log('终端删除已取消');
zdDelDel(ac_id,ac_num);
}
})
// 新增
function zdDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function zdDelDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'zdDelDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 录入权
$('#khLu').click(function(){
// $("name='sex']:eq(0)").prop("checked");
var cst = $("#khRecord").prop("checked");
console.log(cst);
var ac_id = $('#ac_id').attr('ac_id');
var ac_num = $('#ac_num').attr('ac_num');
if (cst == false) {
console.log('录入权已选中');
khRecord(ac_id,ac_num);
}else{
console.log('录入权已取消');
khRecordDel(ac_id,ac_num);
}
})
// 新增
function khRecord(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'khRecord',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
// 删除
function khRecordDel(ac_id,ac_num){
$.ajax({
type: 'post',
url: 'phone_system.php',
dataType: 'text',
//scriptCharset: "utf-8",
data:{act:'khRecordDel',id: ac_id,num: ac_num},
success: function (data) {
if (data != '1') {
alert("编辑失败!");
}else{
}
},
})
}
})
</script>
</html>
css 文件包在 http://www.htmleaf.com/css3/css3donghua/201506222086.html