Commit 6faa48d5 by yiyu.li
parents 47dab6e5 26bc8367
<template>
<div class="testdiv">
<div class="divborder">
<h2>基本信息</h2>
<div class="newSearchDiv">
<div class="filter">
<label>工装类别:</label>
......@@ -206,6 +205,13 @@
<label>备注:</label>
<Input type="text" class="searchInput" v-model="remark" />
</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>
<label>上传文件:</label>
<div class="accountInfoUploadFile">
......@@ -412,6 +418,56 @@ export default {
title: "子工装编号",
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,
type: 0,
......@@ -436,6 +492,7 @@ export default {
UploadAction: this.axios.publicPath + "config/upload/UploadImage",
detailobj: {},
childObj: {},
addstatus:'1',//状态 1可用 0停用
};
},
created() {
......@@ -506,6 +563,7 @@ export default {
});
}
this.type = 1;
this.addstatus = '1';//状态 1可用 0停用
},
addPost() {
let url = "";
......@@ -516,6 +574,7 @@ export default {
filename: this.filename, //附件名称
status: 1,
remark: this.remark,
status:this.addstatus,
};
if (this.type == 1) {
url = "/acc/FixtureToolsAssembly/Add";
......@@ -559,6 +618,7 @@ export default {
this.remark = this.childObj.remark;
this.disabled = true;
this.type = 2;
this.addstatus = this.childObj.status+'';//状态 1可用 0停用
this.modal = true;
},
dele() {
......
......@@ -39,9 +39,9 @@ namespace Siger.ApiACC.Controllers
}
[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 list = new List<ResponseAumationFixtureToolsAssembly>();
foreach(var item in data.Data)
......
......@@ -24,7 +24,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
_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
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
{
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)
{
var entities = query.Where(expression).OrderByDescending(q => q.id).AsNoTracking().ToList();
......
......@@ -9,7 +9,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories.Interface
{
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);
......
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