添加网站文件
This commit is contained in:
1032
application/admin/view/material/add.html
Normal file
1032
application/admin/view/material/add.html
Normal file
File diff suppressed because it is too large
Load Diff
1016
application/admin/view/material/edit.html
Normal file
1016
application/admin/view/material/edit.html
Normal file
File diff suppressed because it is too large
Load Diff
372
application/admin/view/material/lists.html
Normal file
372
application/admin/view/material/lists.html
Normal file
@@ -0,0 +1,372 @@
|
||||
{layout name="layout1" /}
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*哆啦猫原料库存列表,对材料进行编辑,原料调整,库存查看等操作。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-form-item">
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">入库时间:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" id="start_time" name="start_time" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-input-inline" style="margin-right: 5px;width: 10px;">
|
||||
<label class="layui-form-mid">-</label>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" id="end_time" name="end_time" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-user {$view_theme_color}" lay-submit lay-filter="user-search">查询</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-user layui-btn-primary " lay-submit lay-filter="user-clear-search">清空查询</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-user layui-btn-primary " lay-submit lay-filter="export-file">导出</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-card-body">
|
||||
<div style="padding-bottom: 10px;">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-user {$view_theme_color}" data-type="send_coupon">入库原料</button>
|
||||
|
||||
</div>
|
||||
<table id="user-lists" lay-filter="user-lists"></table>
|
||||
<script type="text/html" id="user-info">
|
||||
<img src="{{d.abs_avatar}}" style="height:80px;width: 80px;margin-right: 10px;" class="image-show">
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="user-operation">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm" id="adjust_level" lay-event="adjust_level">删除</a>
|
||||
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index','table','like','laydate'], function(){
|
||||
var $ = layui.$
|
||||
,form = layui.form
|
||||
,table = layui.table
|
||||
,like = layui.like
|
||||
, laydate = layui.laydate;
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(user-search)', function(data){
|
||||
var field = data.field;
|
||||
//执行重载
|
||||
table.reload('user-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
});
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
//清空查询
|
||||
form.on('submit(user-clear-search)', function(){
|
||||
$('#keyword_type').val('sn');
|
||||
$('#keyword').val(''); //清空输入框
|
||||
$('#level').val(''); //清空输入框
|
||||
$('#group_id').val(''); //清空输入框
|
||||
$('#start_time').val(''); //清空输入框
|
||||
$('#end_time').val(''); //清空输入框
|
||||
form.render('select');
|
||||
//刷新列表
|
||||
table.reload('user-lists', {
|
||||
where: [],
|
||||
page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
});
|
||||
// 导出
|
||||
form.on('submit(export-file)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url: '{:url("user/exportFile")}',
|
||||
type: 'get',
|
||||
data: field,
|
||||
dataType: 'json',
|
||||
error: function() {
|
||||
layer.msg('导出超时,请稍后再试!');
|
||||
},
|
||||
success: function(res) {
|
||||
table.exportFile(res.data.exportTitle,res.data.exportData, res.data.exportExt, res.data.exportName);
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
layer.msg('导出中请耐心等待~');
|
||||
});
|
||||
|
||||
|
||||
//事件
|
||||
var active = {
|
||||
send_coupon:function() { //发放优惠券
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '入库原料库存'
|
||||
,content: '{:url("Material/add")}'
|
||||
,area: ['55%', '80%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'user_group-submit'
|
||||
,submit = layero.find('iframe').contents().find("#add-user_group-submit");
|
||||
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(add-user_group-submit)', function(data){
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url:'{:url("Material/add")}',
|
||||
data:field,
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
,set_group:function() { //设置分组
|
||||
var check_status = table.checkStatus('user-lists')
|
||||
,user_list = check_status.data; //得到选中的数据
|
||||
|
||||
|
||||
//是否已选数据
|
||||
if( user_list.length === 0){
|
||||
return layer.msg('请选择员工列表');
|
||||
}
|
||||
//获取所选id
|
||||
ids = [];
|
||||
for (var i in user_list){
|
||||
ids.push(user_list[i]['id']);
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '设置分组'
|
||||
,content: '{:url("user/setGroup")}'
|
||||
,area: ['60%', '60%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'user-submit-edit'
|
||||
,submit = layero.find('iframe').contents().find("#set_group-submit");
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(set_group-submit)', function(data){
|
||||
var group_id = data.field.group_id;
|
||||
$.ajax({
|
||||
url:'{:url("user/setGroup")}',
|
||||
data:{group_id:group_id,user_ids:ids},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
$('.layui-btn.layuiadmin-btn-user').on('click', function(){
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
});
|
||||
|
||||
layui.define(['table', 'form'], function(exports){
|
||||
var $ = layui.$
|
||||
,table = layui.table
|
||||
,form = layui.form;
|
||||
|
||||
//管理员管理
|
||||
table.render({
|
||||
id:'user-lists'
|
||||
,elem: '#user-lists'
|
||||
,url: '{:url("Material/lists")}' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox'}
|
||||
,{field: 'id', width: 60, title: 'ID', sort: true,}
|
||||
,{field: 'namebm', title: '原料编码',}
|
||||
,{field: 'name', title: '原料名称',}
|
||||
,{field: 'goodsxh', title: '原料型号',}
|
||||
,{field: 'goodsdw', title: '原料单位',}
|
||||
,{field: 'goodsxh', title: '原料分类',}
|
||||
,{field: 'abs_avatar', title: '原料图片',align: 'center', toolbar: '#user-info',}
|
||||
,{field: 'goodskc', title: '原料库存',}
|
||||
,{field: 'price', title: '原料单价'}
|
||||
,{field: 'grue_name', title: '隶属部门'}
|
||||
|
||||
,{field: 'create_time', title: '入库时间',}
|
||||
,{fixed: 'right', title: '操作', width: 140,toolbar: '#user-operation'}
|
||||
|
||||
]]
|
||||
,page:true
|
||||
,text: {none: '暂无数据!'}
|
||||
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code":res.code,
|
||||
"msg":res.msg,
|
||||
"count": res.data.count, //解析数据长度
|
||||
"data": res.data.lists, //解析数据列表
|
||||
};
|
||||
}
|
||||
, done: function fix() {
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
$(".layui-table-header tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-header thead tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
window.onresize = function () {
|
||||
fix()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var moreShow = 0;
|
||||
//监听工具条
|
||||
table.on('tool(user-lists)', function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑库存材料'
|
||||
,content: '{:url("Material/edit")}?id='+id
|
||||
,area: ['90%', '90%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find('#edit-submit');
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(edit-submit)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url:'{:url("Material/edit")}?id='+id,
|
||||
data:field,
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}else{
|
||||
layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if(obj.event === 'adjust_level'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定删除原料库存', function(index){
|
||||
$.ajax({
|
||||
url:'{:url("Material/del")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
obj.del();
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
116
application/admin/view/material/typeadd.html
Normal file
116
application/admin/view/material/typeadd.html
Normal file
@@ -0,0 +1,116 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.layui-form-label {
|
||||
color: #6a6f6c;
|
||||
width: 100px;
|
||||
}
|
||||
.layui-input-block {
|
||||
margin-left: 130px;
|
||||
}
|
||||
.tips{
|
||||
color: red;
|
||||
}
|
||||
.goods-li {
|
||||
float: left;
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
padding: 4px;
|
||||
}
|
||||
.goods-img-del-x {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: -4px;
|
||||
right: -2px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: hsla(0, 0%, 60%, .6);
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-user_level" id="layuiadmin-form-user_level" style="padding: 20px 30px 0 0;">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="tips">*</span>分类名称:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="name" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<input type="button" lay-submit lay-filter="add-user_group-submit" id="add-user_group-submit" value="确认">
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
}
|
||||
.layui-input-block {
|
||||
margin-left: 130px;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/plug/formSelects/formSelects-v4.css" />
|
||||
<script src="/static/plug/formSelects/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form','like'], function(){
|
||||
var $ = layui.$
|
||||
,form = layui.form
|
||||
,like = layui.like
|
||||
,formSelects = layui.formSelects
|
||||
;
|
||||
//上传图片
|
||||
like.imageUpload('.goods-img-add', function (uri, element) {
|
||||
if(uri.length>1){
|
||||
layer.msg('最多最能选中1张图片');
|
||||
return;
|
||||
}
|
||||
var html = '<div class="goods-li">\n' +
|
||||
'<img class="goods-img" ' +
|
||||
'src="' + uri[0] + '">' +
|
||||
'<a class="goods-img-del-x" style="display: none">x</a>' +
|
||||
'</div>';
|
||||
element.prev().val(like.getUrlFileName(uri[0], '{$storageUrl}'));
|
||||
element.parent().append(html);
|
||||
element.css('display','none');
|
||||
}, true);
|
||||
//删除图片
|
||||
$(document).on('click', '.goods-img-del-x', function () {
|
||||
$(this).parent().siblings('input').val('');
|
||||
$(this).parent().prev().css('display','block');
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//显示图片
|
||||
$(document).on('click', '.goods-img', function () {
|
||||
var image = $(this).attr('src');
|
||||
like.showImg(image,600);
|
||||
});
|
||||
// 删除按钮的显示与隐藏
|
||||
$(document).on('mouseover', '.goods-img', function () {
|
||||
$(this).next().show();
|
||||
});
|
||||
$(document).on('mouseout', '.goods-img', function () {
|
||||
$(this).next().hide();
|
||||
});
|
||||
$(document).on('mouseover', '.goods-img-del-x', function () {
|
||||
$(this).show();
|
||||
});
|
||||
$(document).on('mouseout', '.goods-img-del-x', function () {
|
||||
$(this).hide();
|
||||
});
|
||||
//三级联动
|
||||
formSelects.value('privilege',select_id);
|
||||
})
|
||||
|
||||
</script>
|
||||
117
application/admin/view/material/typeidt.html
Normal file
117
application/admin/view/material/typeidt.html
Normal file
@@ -0,0 +1,117 @@
|
||||
{layout name="layout2" /}
|
||||
<style>
|
||||
.layui-form-label {
|
||||
color: #6a6f6c;
|
||||
width: 100px;
|
||||
}
|
||||
.layui-input-block {
|
||||
margin-left: 130px;
|
||||
}
|
||||
.tips{
|
||||
color: red;
|
||||
}
|
||||
.goods-li {
|
||||
float: left;
|
||||
opacity: 1;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goods-img {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
padding: 4px;
|
||||
}
|
||||
.goods-img-del-x {
|
||||
position: absolute;
|
||||
z-index: 100;
|
||||
top: -4px;
|
||||
right: -2px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 16px;
|
||||
line-height: 16px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
background: hsla(0, 0%, 60%, .6);
|
||||
border-radius: 10px;
|
||||
}
|
||||
</style>
|
||||
<div class="layui-form" lay-filter="layuiadmin-form-user_level" id="layuiadmin-form-user_level" style="padding: 20px 30px 0 0;">
|
||||
<input type="hidden" name="id" value="{$detail.id}">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"><span class="tips">*</span>服务类别:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="name" value="{$detail.name}" lay-verify="required" lay-verType="tips" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item layui-hide">
|
||||
<input type="button" lay-submit lay-filter="edit-submit" id="edit-submit" value="确认">
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.layui-form-label {
|
||||
width: 100px;
|
||||
}
|
||||
.layui-input-block {
|
||||
margin-left: 130px;
|
||||
}
|
||||
</style>
|
||||
<link rel="stylesheet" href="/static/plug/formSelects/formSelects-v4.css" />
|
||||
<script src="/static/plug/formSelects/formSelects-v4.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'form','like'], function(){
|
||||
var $ = layui.$
|
||||
,form = layui.form
|
||||
,like = layui.like
|
||||
,formSelects = layui.formSelects,
|
||||
select_id = [{$detail.id}];
|
||||
//上传图片
|
||||
like.imageUpload('.goods-img-add', function (uri, element) {
|
||||
if(uri.length>1){
|
||||
layer.msg('最多最能选中1张图片');
|
||||
return;
|
||||
}
|
||||
var html = '<div class="goods-li">\n' +
|
||||
'<img class="goods-img" ' +
|
||||
'src="' + uri[0] + '">' +
|
||||
'<a class="goods-img-del-x" style="display: none">x</a>' +
|
||||
'</div>';
|
||||
element.prev().val(like.getUrlFileName(uri[0], '{$storageUrl}'));
|
||||
element.parent().append(html);
|
||||
element.css('display','none');
|
||||
}, true);
|
||||
//删除图片
|
||||
$(document).on('click', '.goods-img-del-x', function () {
|
||||
$(this).parent().siblings('input').val('');
|
||||
$(this).parent().prev().css('display','block');
|
||||
$(this).parent().remove();
|
||||
});
|
||||
//显示图片
|
||||
$(document).on('click', '.goods-img', function () {
|
||||
var image = $(this).attr('src');
|
||||
like.showImg(image,600);
|
||||
});
|
||||
// 删除按钮的显示与隐藏
|
||||
$(document).on('mouseover', '.goods-img', function () {
|
||||
$(this).next().show();
|
||||
});
|
||||
$(document).on('mouseout', '.goods-img', function () {
|
||||
$(this).next().hide();
|
||||
});
|
||||
$(document).on('mouseover', '.goods-img-del-x', function () {
|
||||
$(this).show();
|
||||
});
|
||||
$(document).on('mouseout', '.goods-img-del-x', function () {
|
||||
$(this).hide();
|
||||
});
|
||||
//三级联动
|
||||
formSelects.value('privilege',select_id);
|
||||
})
|
||||
|
||||
</script>
|
||||
330
application/admin/view/material/typelist.html
Normal file
330
application/admin/view/material/typelist.html
Normal file
@@ -0,0 +1,330 @@
|
||||
{layout name="layout1" /}
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*原料分类下面绑定产品的。请勿直接删除分类,建议更改分类</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<div style="padding-bottom: 10px;">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-user {$view_theme_color}" data-type="send_coupon">增加分类</button>
|
||||
</div>
|
||||
<table id="user-lists" lay-filter="user-lists"></table>
|
||||
<script type="text/html" id="user-operation">
|
||||
<a class="layui-btn layui-btn-normal layui-btn-sm" lay-event="edit">编辑</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm" id="adjust_level" lay-event="adjust_level">删除</a>
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height: auto;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index','table','like','laydate'], function(){
|
||||
var $ = layui.$
|
||||
,form = layui.form
|
||||
,table = layui.table
|
||||
,like = layui.like
|
||||
, laydate = layui.laydate;
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(user-search)', function(data){
|
||||
var field = data.field;
|
||||
//执行重载
|
||||
table.reload('user-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
});
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
//清空查询
|
||||
form.on('submit(user-clear-search)', function(){
|
||||
$('#keyword_type').val('sn');
|
||||
$('#keyword').val(''); //清空输入框
|
||||
$('#level').val(''); //清空输入框
|
||||
$('#group_id').val(''); //清空输入框
|
||||
$('#start_time').val(''); //清空输入框
|
||||
$('#end_time').val(''); //清空输入框
|
||||
form.render('select');
|
||||
//刷新列表
|
||||
table.reload('user-lists', {
|
||||
where: [],
|
||||
page: {
|
||||
curr: 1 //重新从第 1 页开始
|
||||
}
|
||||
});
|
||||
});
|
||||
// 导出
|
||||
form.on('submit(export-file)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url: '{:url("user/exportFile")}',
|
||||
type: 'get',
|
||||
data: field,
|
||||
dataType: 'json',
|
||||
error: function() {
|
||||
layer.msg('导出超时,请稍后再试!');
|
||||
},
|
||||
success: function(res) {
|
||||
table.exportFile(res.data.exportTitle,res.data.exportData, res.data.exportExt, res.data.exportName);
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
layer.msg('导出中请耐心等待~');
|
||||
});
|
||||
//事件
|
||||
var active = {
|
||||
send_coupon:function() { //发放优惠券
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '增加原料分类'
|
||||
,content: '{:url("Material/typeadd")}'
|
||||
, area: ['30%', '30%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'user_group-submit'
|
||||
,submit = layero.find('iframe').contents().find("#add-user_group-submit");
|
||||
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(add-user_group-submit)', function(data){
|
||||
var field = data.field;
|
||||
like.ajax({
|
||||
url:'{:url("Material/typeadd")}',
|
||||
data:field,
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
,set_group:function() { //设置分组
|
||||
var check_status = table.checkStatus('user-lists')
|
||||
,user_list = check_status.data; //得到选中的数据
|
||||
|
||||
|
||||
//是否已选数据
|
||||
if( user_list.length === 0){
|
||||
return layer.msg('请选择员工列表');
|
||||
}
|
||||
//获取所选id
|
||||
ids = [];
|
||||
for (var i in user_list){
|
||||
ids.push(user_list[i]['id']);
|
||||
}
|
||||
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '设置分组'
|
||||
,content: '{:url("user/setGroup")}'
|
||||
,area: ['60%', '60%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submitID = 'user-submit-edit'
|
||||
,submit = layero.find('iframe').contents().find("#set_group-submit");
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(set_group-submit)', function(data){
|
||||
var group_id = data.field.group_id;
|
||||
$.ajax({
|
||||
url:'{:url("user/setGroup")}',
|
||||
data:{group_id:group_id,user_ids:ids},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
$('.layui-btn.layuiadmin-btn-user').on('click', function(){
|
||||
var type = $(this).data('type');
|
||||
active[type] ? active[type].call(this) : '';
|
||||
});
|
||||
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
});
|
||||
|
||||
layui.define(['table', 'form'], function(exports){
|
||||
var $ = layui.$
|
||||
,table = layui.table
|
||||
,form = layui.form;
|
||||
|
||||
//管理员管理
|
||||
table.render({
|
||||
id:'user-lists'
|
||||
,elem: '#user-lists'
|
||||
,url: '{:url("Material/typelist")}' //模拟接口
|
||||
,cols: [[
|
||||
{type: 'checkbox'}
|
||||
,{field: 'id', width: 60, title: 'ID', sort: true,}
|
||||
,{field: 'name', title: '分类名称',}
|
||||
,{field: 'time', title: '增加时间',}
|
||||
,{fixed: 'right', title: '操作', width: 140,toolbar: '#user-operation'}
|
||||
]]
|
||||
,page:true
|
||||
,text: {none: '暂无数据!'}
|
||||
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code":res.code,
|
||||
"msg":res.msg,
|
||||
"count": res.data.count, //解析数据长度
|
||||
"data": res.data.lists, //解析数据列表
|
||||
};
|
||||
}
|
||||
, done: function fix() {
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
$(".layui-table-header tr").each(function (index, val) {
|
||||
$(".layui-table-fixed").each(function () {
|
||||
$($(this).find(".layui-table-header thead tr")[index]).height($(val).height());
|
||||
});
|
||||
});
|
||||
window.onresize = function () {
|
||||
fix()
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var moreShow = 0;
|
||||
//监听工具条
|
||||
table.on('tool(user-lists)', function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
var id = obj.data.id;
|
||||
layer.open({
|
||||
type: 2
|
||||
,title: '编辑原料分类名称'
|
||||
,content: '{:url("Material/typeidt")}?id='+id
|
||||
,area: ['30%', '30%']
|
||||
,btn: ['确定', '取消']
|
||||
,yes: function(index, layero){
|
||||
var iframeWindow = window['layui-layer-iframe'+ index]
|
||||
,submit = layero.find('iframe').contents().find('#edit-submit');
|
||||
//监听提交
|
||||
iframeWindow.layui.form.on('submit(edit-submit)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url:'{:url("Material/typeidt")}',
|
||||
data:field,
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
}else{
|
||||
layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
submit.trigger('click');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if(obj.event === 'adjust_level'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定删除原料分类', function(index){
|
||||
$.ajax({
|
||||
url:'{:url("Material/typedel")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('user-lists'); //数据刷新
|
||||
obj.del();
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
372
application/admin/view/material/usermaterial.html
Normal file
372
application/admin/view/material/usermaterial.html
Normal file
@@ -0,0 +1,372 @@
|
||||
{layout name="layout1" /}
|
||||
<style>
|
||||
.layui-table-cell {
|
||||
height:auto;
|
||||
}
|
||||
.goods-content>div:not(:last-of-type) {
|
||||
border-bottom:1px solid #DCDCDC;
|
||||
}
|
||||
.goods-data::after{
|
||||
display: block;
|
||||
content: '';
|
||||
clear: both;
|
||||
}
|
||||
.goods_name_hide{
|
||||
overflow:hidden;
|
||||
white-space:nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.operation-btn {
|
||||
margin: 5px;
|
||||
}
|
||||
.table-operate{
|
||||
text-align: left;
|
||||
font-size:14px;
|
||||
padding:0 5px;
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
text-overflow:inherit;
|
||||
white-space:normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-card">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
<p>*员工物料申请,请勿轻易删除数据</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab layui-tab-card" lay-filter="tab-all">
|
||||
<ul class="layui-tab-title">
|
||||
<li data-type='' class="layui-this">全部</li>
|
||||
</ul>
|
||||
|
||||
<div class="layui-tab-item layui-show">
|
||||
<div class="layui-card">
|
||||
<div class="layui-form layui-card-header layuiadmin-card-header-auto">
|
||||
<div class="layui-row">
|
||||
|
||||
|
||||
<div class="layui-inline" style="width: 24%;">
|
||||
<label class="layui-form-label">员工姓名:</label>
|
||||
<div class="layui-input-block">
|
||||
<select name="staffid" v-model="selectedOptions" multiple :limit="2" xm-select="privilege" xm-select-search="" xm-select-search-type="dl" xm-select-skin="normal">
|
||||
<option value="">请选择员工</option>
|
||||
{foreach $satff as $val}
|
||||
<option value="{$val.id}">{$val.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="width: 24%;">
|
||||
<label class="layui-form-label">产品名称:</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="name" name="name" id="name" placeholder="请输入产品名称"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">申请日期:</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" id="start_time" name="start_time" autocomplete="off">
|
||||
</div>
|
||||
<div class="layui-input-inline" style="margin-right: 5px;width: 10px;">
|
||||
<label class="layui-form-mid">-</label>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" class="layui-input" id="end_time" name="end_time" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad {$view_theme_color}" lay-submit
|
||||
lay-filter="user-search">查询
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-sm layuiadmin-btn-ad layui-btn-primary " lay-submit
|
||||
lay-filter="user-clear-search">清空查询
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="layui-card-body">
|
||||
<table id="order-lists" lay-filter="order-lists"></table>
|
||||
<script type="text/html" id="status">
|
||||
|
||||
{{# if(d.status==2){}}
|
||||
<button class="layui-btn layui-btn-sm">审核通过</button>
|
||||
{{# }
|
||||
|
||||
else{ }}
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger">等待审核</button>
|
||||
{{# } }}
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="user-info">
|
||||
<img src="{{d.abs_avatar}}" style="height:80px;width: 80px;margin-right: 10px;" class="image-show">
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="user-operation">
|
||||
<div style="color:#3A91FB">
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm layui-bg-blue" id="audit" lay-event="audit">通过</a>
|
||||
<a class="layui-btn layui-bg-purple layui-btn-sm layui-bg-purple" id="noaudit" lay-event="noaudit">拒绝</a>
|
||||
<a class="layui-btn layui-btn-danger layui-btn-sm" id="del" lay-event="del">删除</a>
|
||||
<div>
|
||||
</script>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.config({
|
||||
version:"{$front_version}",
|
||||
base: '/static/plug/layui-admin/dist/layuiadmin/' //静态资源所在路径
|
||||
}).extend({
|
||||
index: 'lib/index' //主入口模块
|
||||
}).use(['index', 'table', 'like', 'laydate'], function () {
|
||||
var $ = layui.$
|
||||
, form = layui.form
|
||||
, table = layui.table
|
||||
, like = layui.like
|
||||
, element = layui.element
|
||||
, laydate = layui.laydate;
|
||||
var listType = '';
|
||||
|
||||
//图片放大
|
||||
$(document).on('click', '.image-show', function () {
|
||||
var src = $(this).attr('src');
|
||||
like.showImg(src,600);
|
||||
});
|
||||
|
||||
//监听搜索
|
||||
form.on('submit(user-search)', function (data) {
|
||||
var field = data.field;
|
||||
//执行重载
|
||||
table.reload('order-lists', {
|
||||
where: field,
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
//清空查询
|
||||
form.on('submit(order-clear-search)', function () {
|
||||
$('#keyword').val('');
|
||||
$('#order_status').val('');
|
||||
$('#goods_name').val('');
|
||||
$('#pay_way').val('');
|
||||
$('#order_type').val('');
|
||||
$('#order_source').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
$('#delivery_type').val('');
|
||||
form.render('select');
|
||||
//刷新列表
|
||||
table.reload('order-lists', {
|
||||
where: [],
|
||||
page: {
|
||||
curr: 1
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// 导出
|
||||
form.on('submit(export-file)', function(data){
|
||||
var field = data.field;
|
||||
$.ajax({
|
||||
url: '{:url("order/exportFile")}?type=' + listType,
|
||||
type: 'get',
|
||||
data: field,
|
||||
dataType: 'json',
|
||||
error: function() {
|
||||
layer.msg('导出超时,请稍后再试!');
|
||||
},
|
||||
success: function(res) {
|
||||
table.exportFile(res.data.exportTitle,res.data.exportData, res.data.exportExt, res.data.exportName);
|
||||
},
|
||||
timeout: 15000
|
||||
});
|
||||
layer.msg('导出中请耐心等待~');
|
||||
});
|
||||
|
||||
//日期时间范围
|
||||
laydate.render({
|
||||
elem: '#start_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
|
||||
laydate.render({
|
||||
elem: '#end_time'
|
||||
,type: 'datetime'
|
||||
,trigger: 'click'
|
||||
});
|
||||
|
||||
//获取列表
|
||||
getList(listType);
|
||||
//切换列表
|
||||
element.on('tab(tab-all)', function (data) {
|
||||
$('#keyword').val('');
|
||||
$('#order_status').val('');
|
||||
$('#goods_name').val('');
|
||||
$('#pay_way').val('');
|
||||
$('#order_type').val('');
|
||||
$('#start_time').val('');
|
||||
$('#end_time').val('');
|
||||
$('#delivery_type').val('');
|
||||
form.render('select');
|
||||
listType = $(this).attr('data-type');
|
||||
getList(listType);
|
||||
if (listType !== ''){
|
||||
$('.order_status').hide();
|
||||
}else {
|
||||
$('.order_status').show();
|
||||
}
|
||||
});
|
||||
|
||||
function getList(type) {
|
||||
table.render({
|
||||
elem: '#order-lists'
|
||||
,url: '{:url("Material/usermaterial")}?type=' + type//模拟接口
|
||||
, cols: [[
|
||||
{type: 'checkbox'}
|
||||
,{field: 'staff_name', title: '申请人姓名',align: 'center',}
|
||||
,{field: 'staff_phone', title: '员工电话',align: 'center',}
|
||||
,{field: 'mater_name', title: '物料名称',align: 'center',}
|
||||
,{field: 'buynums', title: '物料数量',align: 'center',}
|
||||
,{field: 'price', title: '物料单价',align: 'center',}
|
||||
,{field: 'number', title: ' 物料总价',align: 'center',}
|
||||
,{field: 'status', title: ' 审核状态',align: 'center', toolbar: '#status'}
|
||||
,{field: 'create_time', title: '申请时间',align: 'center',}
|
||||
,{fixed: 'right', title: '操作', width:180, toolbar: '#user-operation'}
|
||||
]]
|
||||
, page: true
|
||||
, limit: 17
|
||||
, text: {none: '暂无数据!'}
|
||||
, parseData: function (res) {
|
||||
return {
|
||||
"code": res.code,
|
||||
"msg": res.msg,
|
||||
"count": res.data.count,
|
||||
"data": res.data.lists,
|
||||
};
|
||||
}
|
||||
,done: function(res, curr, count){
|
||||
// 解决操作栏因为内容过多换行问题
|
||||
$(".layui-table-main tr").each(function (index, val) {
|
||||
$($(".layui-table-fixed-l .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
$($(".layui-table-fixed-r .layui-table-body tbody tr")[index]).height($(val).height());
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//监听工具条
|
||||
table.on('tool(order-lists)', function (obj) {
|
||||
var id = obj.data.id;
|
||||
var status=obj.data.status;
|
||||
if(status==2){
|
||||
layui.layer.msg('物料申请已经审核通过无权限删除', {
|
||||
offset: '15px'
|
||||
, icon: 2
|
||||
, time: 1000
|
||||
},
|
||||
)
|
||||
return
|
||||
};
|
||||
|
||||
|
||||
if(obj.event === 'audit'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定物料审核通过?', function(index){
|
||||
$.ajax({
|
||||
url:'{:url("Material/audit")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('order-lists'); //数据刷新
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
if(obj.event === 'noaudit'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定审核不通过?', function(index){
|
||||
$.ajax({
|
||||
url:'{:url("Material/noaudit")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('order-lists'); //数据刷新
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
if(obj.event === 'del'){
|
||||
var id = obj.data.id;
|
||||
layer.confirm('确定删除员工申请物料吗?', function(index){
|
||||
$.ajax({
|
||||
url:'{:url("Material/delusermaterial")}',
|
||||
data:{id:id},
|
||||
type:"post",
|
||||
success:function(res)
|
||||
{
|
||||
if(res.code == 1)
|
||||
{
|
||||
layui.layer.msg(res.msg, {
|
||||
offset: '15px'
|
||||
, icon: 1
|
||||
, time: 1000
|
||||
});
|
||||
layer.close(index); //关闭弹层
|
||||
table.reload('order-lists'); //数据刷新
|
||||
obj.del();
|
||||
}
|
||||
}
|
||||
});
|
||||
layer.close(index);
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user