Commit f3252829 authored by 张兴海's avatar 张兴海

修复缺陷

parent b868a419
...@@ -81,7 +81,7 @@ public class ActSuppliesController extends BaseController ...@@ -81,7 +81,7 @@ public class ActSuppliesController extends BaseController
List<ActSupplies> list = actSuppliesService.selectActSuppliesList(actSupplies); List<ActSupplies> list = actSuppliesService.selectActSuppliesList(actSupplies);
ExcelUtil<ActSupplies> util = new ExcelUtil<ActSupplies>(ActSupplies.class); ExcelUtil<ActSupplies> util = new ExcelUtil<ActSupplies>(ActSupplies.class);
return util.exportExcel(list, "用友物料"); return util.exportExcel(list, "二级分类数据");
} }
/** /**
...@@ -94,7 +94,7 @@ public class ActSuppliesController extends BaseController ...@@ -94,7 +94,7 @@ public class ActSuppliesController extends BaseController
{ {
List<ActSupplies> list = actSuppliesService.selectActSuppliesListOne(actSupplies); List<ActSupplies> list = actSuppliesService.selectActSuppliesListOne(actSupplies);
ExcelUtil<ActSupplies> util = new ExcelUtil<ActSupplies>(ActSupplies.class); ExcelUtil<ActSupplies> util = new ExcelUtil<ActSupplies>(ActSupplies.class);
return util.exportExcel(list, "物料总分类管理数据"); return util.exportExcel(list, "一级分类数据");
} }
/** /**
......
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.system.domain.ActSuppliesTemplate; import com.ruoyi.system.domain.ActSuppliesTemplate;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -97,6 +98,8 @@ public class ActSuppliesRoleController extends BaseController ...@@ -97,6 +98,8 @@ public class ActSuppliesRoleController extends BaseController
return AjaxResult.success("添加成功"); return AjaxResult.success("添加成功");
} }
/** /**
* 修改导入规则 * 修改导入规则
*/ */
......
...@@ -78,5 +78,7 @@ public interface ActSuppliesMapper ...@@ -78,5 +78,7 @@ public interface ActSuppliesMapper
*/ */
public int countBySuppliesName(String suppliesName); public int countBySuppliesName(String suppliesName);
List<ActSupplies> selectActSuppliesListOne(ActSupplies actSupplies); List<ActSupplies> selectActSuppliesListOne(ActSupplies actSupplies);
} }
...@@ -67,7 +67,9 @@ public interface ActSuppliesRoleMapper ...@@ -67,7 +67,9 @@ public interface ActSuppliesRoleMapper
List<Integer> findall(Integer[] ids); List<Integer> findall(Integer[] ids);
List<Integer> find(Integer id); List<Integer> find(Integer id);
public int countByRoleName(String roleName); public int countByRoleName(ActSuppliesRole actSuppliesRole);
} }
...@@ -80,4 +80,5 @@ public interface IActSuppliesRoleService ...@@ -80,4 +80,5 @@ public interface IActSuppliesRoleService
List<Integer> findall(Integer[] ids); List<Integer> findall(Integer[] ids);
List<Integer> find(Integer id); List<Integer> find(Integer id);
} }
...@@ -59,22 +59,20 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService ...@@ -59,22 +59,20 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
@Override @Override
public int insertActSuppliesRole(ActSuppliesRole actSuppliesRole) public int insertActSuppliesRole(ActSuppliesRole actSuppliesRole)
{ {
String roleName = actSuppliesRole.getRoleName(); int countByRoleName = actSuppliesRoleMapper.countByRoleName(actSuppliesRole);
int countByRoleName = actSuppliesRoleMapper.countByRoleName(roleName);
if(countByRoleName > 0){ if(countByRoleName > 0){
String message = "添加规则失败,规则名称已被占用"; String message = "添加规则失败,规则名称已被占用";
System.out.println(message); System.out.println(message);
/*throw new ServiceException(ServiceCode.ERR_CONFLICT,message);*/ /* throw new ServiceException(ServiceCode.ERR_CONFLICT,message);*/
return 0; return 0;
} }
ActSuppliesRole actSuppliesRole1 = new ActSuppliesRole();
BeanUtils.copyProperties(actSuppliesRole,actSuppliesRole1);
actSuppliesRole.setCreateTime(DateUtils.getNowDate()); actSuppliesRole.setCreateTime(DateUtils.getNowDate());
return actSuppliesRoleMapper.insertActSuppliesRole(actSuppliesRole); return actSuppliesRoleMapper.insertActSuppliesRole(actSuppliesRole);
} }
/** /**
* 修改导入规则 * 修改导入规则
* *
...@@ -84,18 +82,16 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService ...@@ -84,18 +82,16 @@ public class ActSuppliesRoleServiceImpl implements IActSuppliesRoleService
@Override @Override
public int updateActSuppliesRole(ActSuppliesRole actSuppliesRole) public int updateActSuppliesRole(ActSuppliesRole actSuppliesRole)
{ {
String roleName = actSuppliesRole.getRoleName();
int countByRoleName = actSuppliesRoleMapper.countByRoleName(roleName); int countByRoleName = actSuppliesRoleMapper.countByRoleName(actSuppliesRole);
if(countByRoleName > 0){ if(countByRoleName > 0){
String message = "修改规则失败,新的规则名称已被占用"; String message = "修改规则失败,新的规则名称已被占用";
System.out.println(message); System.out.println(message);
/* throw new ServiceException(ServiceCode.ERR_CONFLICT,message);*/ /*throw new ServiceException(ServiceCode.ERR_CONFLICT,message);*/
return 0;
} }
ActSuppliesRole actSuppliesRole2 = new ActSuppliesRole();
BeanUtils.copyProperties(actSuppliesRole,actSuppliesRole2);
actSuppliesRole.setUpdateTime(DateUtils.getNowDate()); actSuppliesRole.setUpdateTime(DateUtils.getNowDate());
return 0; return actSuppliesRoleMapper.updateActSuppliesRole(actSuppliesRole);
/* actSuppliesRoleMapper.insertActSuppliesRole(actSuppliesRole)*/
} }
/** /**
......
...@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="countByRoleName" resultType="int"> <select id="countByRoleName" parameterType="ActSuppliesRole" resultType="int">
select count(*) from act_supplies_role where role_name=#{roleName} select count(*) from act_supplies_role where role_name=#{roleName} AND temp_id=#{tempId}
</select> </select>
......
...@@ -418,6 +418,7 @@ export default { ...@@ -418,6 +418,7 @@ export default {
}) })
}, },
/** 导出设置 */ /** 导出设置 */
handleExport123: debounce(function() { handleExport123: debounce(function() {
// 处理点击事件 // 处理点击事件
......
...@@ -143,6 +143,7 @@ ...@@ -143,6 +143,7 @@
:key="option.suppliesName" :key="option.suppliesName"
:label="option.suppliesName" :label="option.suppliesName"
:value="option.id" :value="option.id"
maxlength="15"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -333,6 +334,7 @@ export default { ...@@ -333,6 +334,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.name=selection.map(item => item.suppliesName)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
...@@ -395,6 +397,7 @@ export default { ...@@ -395,6 +397,7 @@ export default {
}).catch(()=>{ }).catch(()=>{
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
......
...@@ -377,7 +377,7 @@ export default { ...@@ -377,7 +377,7 @@ export default {
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
const name = row.suppliesName || this.name; const name = row.suppliesName || this.name;
this.$confirm('是否确认删除物料总分类管理编号为"' + row.name + '"的数据项?', "警告", { this.$confirm('是否确认删除物料总分类管理编号为"' + name + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
...@@ -394,9 +394,9 @@ export default { ...@@ -394,9 +394,9 @@ export default {
}).catch(()=>{ }).catch(()=>{
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
debugger
const queryParams = this.queryParams; const queryParams = this.queryParams;
this.$confirm('是否确认导出所有一级分类数据项?', "警告", { this.$confirm('是否确认导出所有一级分类数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
......
...@@ -111,6 +111,7 @@ export default { ...@@ -111,6 +111,7 @@ export default {
this.depss = response.rows; this.depss = response.rows;
}); });
}, },
/** 下拉选和页面luckysheet绑定 */ /** 下拉选和页面luckysheet绑定 */
handleOptionChange() { handleOptionChange() {
......
...@@ -441,6 +441,7 @@ export default { ...@@ -441,6 +441,7 @@ export default {
} }
}, },
/** 详情按钮操作 */ /** 详情按钮操作 */
handleSave(row) { handleSave(row) {
......
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="规则名称" prop="roleName"> <el-form-item label="规则名称" prop="roleName">
<!-- <el-select v-model="queryParams.roleName" filterable clearable placeholder="请选择规则" >
<el-option
v-for="option in options1"
:key="option.roleName"
:label="option.roleName"
:value="option.id"
></el-option>-->
<el-input <el-input
v-model="queryParams.roleName" v-model="queryParams.roleName"
placeholder="请输入规则名称" placeholder="请输入规则名称"
...@@ -27,6 +34,7 @@ ...@@ -27,6 +34,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
<!-- </el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择状态"> <el-select v-model="queryParams.status" placeholder="请选择状态">
...@@ -147,7 +155,15 @@ ...@@ -147,7 +155,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="规则名称" prop="roleName"> <el-form-item label="规则名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入规则名称" /> <el-input v-model="form.roleName" placeholder="请输入规则名称" maxlength="15"/>
<!-- <el-select v-model="queryParams.roleName" filterable clearable placeholder="请选择规则" >
<el-option
v-for="option in options1"
:key="option.roleName"
:label="option.roleName"
:value="option.id"
></el-option>
</el-select>-->
</el-form-item> </el-form-item>
<el-form-item label="状态"> <el-form-item label="状态">
<el-select v-model="form.status" style="width:380px"> <el-select v-model="form.status" style="width:380px">
...@@ -178,6 +194,7 @@ export default { ...@@ -178,6 +194,7 @@ export default {
loading: true, loading: true,
// 选中数组 // 选中数组
ids: [], ids: [],
name:[],
// 非单个禁用 // 非单个禁用
single: true, single: true,
// 非多个禁用 // 非多个禁用
...@@ -190,6 +207,7 @@ export default { ...@@ -190,6 +207,7 @@ export default {
suppliesroleList: [], suppliesroleList: [],
options:[], options:[],
options1:[],
// 弹出层标题 // 弹出层标题
title: "", title: "",
...@@ -222,6 +240,7 @@ export default { ...@@ -222,6 +240,7 @@ export default {
}, },
methods: { methods: {
/**启用 */ /**启用 */
toggleEnable(suppliesRole){ toggleEnable(suppliesRole){
console.log('你点击了【' + suppliesRole.s+'】的开关控件,当前开关值:' + suppliesRole.status); console.log('你点击了【' + suppliesRole.s+'】的开关控件,当前开关值:' + suppliesRole.status);
...@@ -264,6 +283,7 @@ export default { ...@@ -264,6 +283,7 @@ export default {
getnameid(){ getnameid(){
saveSid().then(response =>{ saveSid().then(response =>{
this.options = response.rows; this.options = response.rows;
this.options1=response.rows;
}) })
}, },
...@@ -309,6 +329,7 @@ export default { ...@@ -309,6 +329,7 @@ export default {
// 多选框选中数据 // 多选框选中数据
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id) this.ids = selection.map(item => item.id)
this.name = selection.map(item => item.roleName)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
...@@ -351,7 +372,8 @@ export default { ...@@ -351,7 +372,8 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const ids = row.id || this.ids; const ids = row.id || this.ids;
this.$confirm('是否确认删除规则名称为"' + row.roleName + '"的数据项?', "警告", { const name = row.roleName || this.name;
this.$confirm('是否确认删除规则名称为"' + name + '"的数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
...@@ -368,6 +390,7 @@ export default { ...@@ -368,6 +390,7 @@ export default {
}).catch(()=>{ }).catch(()=>{
}) })
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
......
...@@ -199,6 +199,7 @@ ...@@ -199,6 +199,7 @@
<!-- <el-button type="primary" @click="addInputs">添加规则</el-button>--> <!-- <el-button type="primary" @click="addInputs">添加规则</el-button>-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="转换类型" prop="detailYS"> <el-form-item label="转换类型" prop="detailYS">
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment