Commit 6faa48d5 by yiyu.li
parents 47dab6e5 26bc8367
<template> <template>
<div class="testdiv"> <div class="testdiv">
<div class="divborder"> <div class="divborder">
<h2>基本信息</h2>
<div class="newSearchDiv"> <div class="newSearchDiv">
<div class="filter"> <div class="filter">
<label>工装类别:</label> <label>工装类别:</label>
...@@ -206,6 +205,13 @@ ...@@ -206,6 +205,13 @@
<label>备注:</label> <label>备注:</label>
<Input type="text" class="searchInput" v-model="remark" /> <Input type="text" class="searchInput" v-model="remark" />
</div> </div>
<div class="filter">
<label><i>*</i>状态:</label>
<RadioGroup v-model="addstatus">
<Radio label="1"><span>可用</span></Radio>
<Radio label="0"><span>停用</span></Radio>
</RadioGroup>
</div>
<div> <div>
<label>上传文件:</label> <label>上传文件:</label>
<div class="accountInfoUploadFile"> <div class="accountInfoUploadFile">
...@@ -412,6 +418,56 @@ export default { ...@@ -412,6 +418,56 @@ export default {
title: "子工装编号", title: "子工装编号",
key: "code", key: "code",
}, },
{
title: "状态",
key: "status",
render: (h, params) => {
let str = "";
if (params.row.status === 1) {
str = "可用";
} else {
str = "停用";
}
return h("span", str);
},
},
{
title: "备注",
key: "remark",
},
{
title: "附件",
key: "filename",
render: (h, params) => {
return h(
"span",
{
style: {
color: "#2b85e4",
cursor: "pointer",
},
on: {
click: () => {
let name = params.row.filename;
let url = params.row.fileurl;
if (url) {
this.downFile(url, name);
}
},
},
},
params.row.filename
);
},
},
{
title: "维护人",
key: "updator",
},
{
title: "维护时间",
key: "updatetime",
},
], ],
modal: false, modal: false,
type: 0, type: 0,
...@@ -436,6 +492,7 @@ export default { ...@@ -436,6 +492,7 @@ export default {
UploadAction: this.axios.publicPath + "config/upload/UploadImage", UploadAction: this.axios.publicPath + "config/upload/UploadImage",
detailobj: {}, detailobj: {},
childObj: {}, childObj: {},
addstatus:'1',//状态 1可用 0停用
}; };
}, },
created() { created() {
...@@ -506,6 +563,7 @@ export default { ...@@ -506,6 +563,7 @@ export default {
}); });
} }
this.type = 1; this.type = 1;
this.addstatus = '1';//状态 1可用 0停用
}, },
addPost() { addPost() {
let url = ""; let url = "";
...@@ -516,6 +574,7 @@ export default { ...@@ -516,6 +574,7 @@ export default {
filename: this.filename, //附件名称 filename: this.filename, //附件名称
status: 1, status: 1,
remark: this.remark, remark: this.remark,
status:this.addstatus,
}; };
if (this.type == 1) { if (this.type == 1) {
url = "/acc/FixtureToolsAssembly/Add"; url = "/acc/FixtureToolsAssembly/Add";
...@@ -559,6 +618,7 @@ export default { ...@@ -559,6 +618,7 @@ export default {
this.remark = this.childObj.remark; this.remark = this.childObj.remark;
this.disabled = true; this.disabled = true;
this.type = 2; this.type = 2;
this.addstatus = this.childObj.status+'';//状态 1可用 0停用
this.modal = true; this.modal = true;
}, },
dele() { dele() {
......
...@@ -39,9 +39,9 @@ namespace Siger.ApiACC.Controllers ...@@ -39,9 +39,9 @@ namespace Siger.ApiACC.Controllers
} }
[HttpGet] [HttpGet]
public IActionResult GetPageList(string category, string code, string name, int page, int pagesize, string toexcel = "") public IActionResult GetPageList(string category, string code, string name, string state, int page, int pagesize, string toexcel = "")
{ {
var data = _toolsAssemblyRepository.GetPagedList(category.ToInt(), code, name, ProjectId, page, pagesize, toexcel); var data = _toolsAssemblyRepository.GetPagedList(category.ToInt(), code, name,state.ToInt(), ProjectId, page, pagesize, toexcel);
var categorys = _toolsCategoryRepository.GetList(q => q.projectId == ProjectId && q.status == (int)RowState.Valid).ToList(); var categorys = _toolsCategoryRepository.GetList(q => q.projectId == ProjectId && q.status == (int)RowState.Valid).ToList();
var list = new List<ResponseAumationFixtureToolsAssembly>(); var list = new List<ResponseAumationFixtureToolsAssembly>();
foreach(var item in data.Data) foreach(var item in data.Data)
......
...@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
_context = context; _context = context;
} }
public IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int projectid, int page, int pagesize, string toexcel = "") public IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int state, int projectid, int page, int pagesize, string toexcel = "")
{ {
var query = from q in _context.siger_automation_fixture_tools_assembly var query = from q in _context.siger_automation_fixture_tools_assembly
join t1 in _context.siger_automation_fixture_tools on q.parent equals t1.guid into tt1 join t1 in _context.siger_automation_fixture_tools on q.parent equals t1.guid into tt1
...@@ -78,7 +78,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -78,7 +78,12 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{ {
nameExpression = q => q.name.Contains(name); nameExpression = q => q.name.Contains(name);
} }
var expression = categoryExpression.And(codeExpression).And(nameExpression); Expression<Func<ResponseAumationFixtureToolsAssembly, bool>> stateExpression = f => true;
if (state > 0)
{
stateExpression = q => q.status == state;
}
var expression = categoryExpression.And(codeExpression).And(nameExpression).And(stateExpression);
if (toexcel.ToInt() == 1) if (toexcel.ToInt() == 1)
{ {
var entities = query.Where(expression).OrderByDescending(q => q.id).AsNoTracking().ToList(); var entities = query.Where(expression).OrderByDescending(q => q.id).AsNoTracking().ToList();
......
...@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface ...@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{ {
public interface IAutomationFixtureToolsAssemblyRepository : IAccRepositoryBase<siger_automation_fixture_tools_assembly> public interface IAutomationFixtureToolsAssemblyRepository : IAccRepositoryBase<siger_automation_fixture_tools_assembly>
{ {
IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int projectid, int page, int pagesize, string toexcel = ""); IPagedCollectionResult<ResponseAumationFixtureToolsAssembly> GetPagedList(int category, string code, string name, int state, int projectid, int page, int pagesize, string toexcel = "");
IEnumerable<ResponseAumationFixtureToolsAssembly> GetDetailList(string parent, int projectid); IEnumerable<ResponseAumationFixtureToolsAssembly> GetDetailList(string parent, int projectid);
......
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