前端接口对接
This commit is contained in:
parent
f6417a0845
commit
83a3fdba1d
|
|
@ -13,11 +13,11 @@ layui.use(['form','layer','table'], function () {
|
|||
break;
|
||||
case 'edit':
|
||||
console.log('修改',obj)
|
||||
updateView(obj.data.proId)
|
||||
updateView(obj.data)
|
||||
break;
|
||||
case 'del':
|
||||
console.log('删除',obj)
|
||||
delView(obj.data.proId)
|
||||
delView(obj.data)
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
@ -190,14 +190,18 @@ function checkView(vo) {
|
|||
/**
|
||||
* 修改
|
||||
* */
|
||||
function updateView(id) {
|
||||
function updateView(value) {
|
||||
if(value.lineNum > 0){
|
||||
layer.msg("该工程已绑定人员,无法修改", { icon: 0 })
|
||||
return;
|
||||
}
|
||||
var height = '90%';
|
||||
var width = '55%';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
url: PATH_URL + '/lineProject/getProById',
|
||||
data: JSON.stringify({"proId": id}),
|
||||
data: JSON.stringify({"proId": value.proId}),
|
||||
success: function (data) {
|
||||
var index = layer.open({
|
||||
title: ['修改', 'color:#3B70A1;background-color:#E8ECEB;font-size:20px'],
|
||||
|
|
@ -231,13 +235,17 @@ function updateView(id) {
|
|||
/**
|
||||
* 删除
|
||||
* */
|
||||
function delView(id) {
|
||||
function delView(value) {
|
||||
if(value.lineNum > 0){
|
||||
layer.msg("该工程已绑定人员,无法删除", { icon: 0 })
|
||||
return;
|
||||
}
|
||||
let index = layer.confirm("是否确定删除数据?", function () {
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: PATH_URL + '/lineProject/delProId',
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data: JSON.stringify({ "proIds": id }),
|
||||
data: JSON.stringify({ "proIds": value.proId }),
|
||||
success: function (data) {
|
||||
layer.close(index);
|
||||
if (data.code == 200) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue