Commit ba3821c1 by yiyu.li
parents 803bd6e5 d338a74f
...@@ -716,7 +716,7 @@ export default { ...@@ -716,7 +716,7 @@ export default {
'9000491': '人员未找到', '9000491': '人员未找到',
'9000492': '默认展示已存在', '9000492': '默认展示已存在',
'9000493': '未找到储位类别', '9000493': '未找到储位类别',
'9000494': '未找到工装类', '9000494': '未找到工装类',
'9000495': '未找到工装信息', '9000495': '未找到工装信息',
'9000496': 'ID重复', '9000496': 'ID重复',
'9000497': '父级和子级不能相同', '9000497': '父级和子级不能相同',
......
...@@ -743,7 +743,7 @@ export default { ...@@ -743,7 +743,7 @@ export default {
'9000491': '人员未找到', '9000491': '人员未找到',
'9000492': '默认展示已存在', '9000492': '默认展示已存在',
'9000493': '未找到储位类别', '9000493': '未找到储位类别',
'9000494': '未找到工装类', '9000494': '未找到工装类',
'9000495': '未找到工装信息', '9000495': '未找到工装信息',
'9000496': 'ID重复', '9000496': 'ID重复',
'9000497': '父级和子级不能相同', '9000497': '父级和子级不能相同',
......
...@@ -71,8 +71,8 @@ ...@@ -71,8 +71,8 @@
@click="loadExcel()" @click="loadExcel()"
>{{ $t("1005") }}</Button >{{ $t("1005") }}</Button
> >
<!-- <Upload <Upload
style="display: inline-block" style="display:inline-block"
ref="upload" ref="upload"
:action="action" :action="action"
name="excel-file" name="excel-file"
...@@ -81,15 +81,14 @@ ...@@ -81,15 +81,14 @@
:on-format-error="handleFormatError" :on-format-error="handleFormatError"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-error="handleError" :on-error="handleError"
:format="['xlsx']" :format="['xlsx','xls']"
> --> >
<Button <Button
type="primary" type="primary"
class="fourWord" class="fourWord"
icon="md-cloud-upload" icon="md-cloud-upload"
>{{ $t("1006") }}</Button >{{$t('1006')}}</Button>
> </Upload>
<!-- </Upload> -->
<Button <Button
type="primary" type="primary"
class="fourWord" class="fourWord"
...@@ -260,7 +259,7 @@ export default { ...@@ -260,7 +259,7 @@ export default {
//导入方法 //导入方法
action: action:
this.axios.publicPath + this.axios.publicPath +
"acc/Upload/Submit?templateName=FixtureToolsAssmeblyTemplate", "acc/Upload/UploadExcel?templateName=FixtureToolsAssmeblyTemplate",
headers: { headers: {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"), timestamp: localStorage.getItem("timestamp"),
...@@ -810,6 +809,26 @@ export default { ...@@ -810,6 +809,26 @@ export default {
.catch((error) => error); .catch((error) => error);
} }
}, },
handleFormatError(file) {
this.$Message.error(
this.$t("950396") + file.name + this.$t("950397")
);
},
handleSuccess(res, file) {
if (res.ret == 1) {
this.$Message.success(this.$t("950398"));
this.tosearch();
} else {
if ((res.msg + "").indexOf(",") != -1) {
inittip(res.msg);
} else {
this.$Message.error(this.$t(res.data));
}
}
},
handleError() {
this.$Message.error(this.$t("2010006") + "!");
},
}, },
}; };
</script> </script>
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
data(){ data(){
return { return {
//导入方法 //导入方法
action: this.axios.publicPath + "acc/Upload/Submit?templateName=FixtureToolsProductTemplate", action: this.axios.publicPath + "acc/Upload/UploadExcel?templateName=FixtureToolsProductTemplate",
headers: { headers: {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"), timestamp: localStorage.getItem("timestamp"),
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
data(){ data(){
return { return {
//导入方法 //导入方法
action: this.axios.publicPath + "acc/Upload/Submit?templateName=FixtureToolsTemplate", action: this.axios.publicPath + "acc/Upload/UploadExcel?templateName=FixtureToolsTemplate",
headers: { headers: {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"), timestamp: localStorage.getItem("timestamp"),
......
...@@ -86,7 +86,7 @@ export default { ...@@ -86,7 +86,7 @@ export default {
data(){ data(){
return{ return{
//导入方法 //导入方法
action: this.axios.publicPath + "acc/Upload/Submit?templateName=FixtureToolsCategoryTemplate", action: this.axios.publicPath + "acc/Upload/UploadExcel?templateName=FixtureToolsCategoryTemplate",
headers: { headers: {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"), timestamp: localStorage.getItem("timestamp"),
......
...@@ -275,7 +275,7 @@ export default { ...@@ -275,7 +275,7 @@ export default {
addremark:'',//备注 addremark:'',//备注
filename:'', filename:'',
fileurl:'', fileurl:'',
action: this.axios.publicPath + "acc/Upload/Submit?templateName=AutomationLocationTemplate", action: this.axios.publicPath + "acc/Upload/UploadExcel?templateName=AutomationLocationTemplate",
UploadAction: this.axios.publicPath + "config/upload/UploadImage", UploadAction: this.axios.publicPath + "config/upload/UploadImage",
headers: { headers: {
token: localStorage.getItem("token"), token: localStorage.getItem("token"),
......
...@@ -124,7 +124,7 @@ namespace Siger.ApiACC.Controllers ...@@ -124,7 +124,7 @@ namespace Siger.ApiACC.Controllers
ParentPartNumber = son.parentpartnumber, ParentPartNumber = son.parentpartnumber,
ParentFixtureTool = son.parentname, ParentFixtureTool = son.parentname,
ParentSpecfication = son.parentspecfication, ParentSpecfication = son.parentspecfication,
ParentCode = item.parentcode, ParentCode = son.parentcode,
Category = son.category, Category = son.category,
FixtureTool = son.name, FixtureTool = son.name,
PartNumber = son.partnumber, PartNumber = son.partnumber,
......
...@@ -1465,7 +1465,7 @@ namespace Siger.Middlelayer.Common ...@@ -1465,7 +1465,7 @@ namespace Siger.Middlelayer.Common
[Description("未找到储位类别")] [Description("未找到储位类别")]
LocationTypeNotFound, LocationTypeNotFound,
[Description("未找到工装类")] [Description("未找到工装类")]
FixtureToolCatgeoryNotFound, FixtureToolCatgeoryNotFound,
[Description("未找到工装信息")] [Description("未找到工装信息")]
......
...@@ -134,7 +134,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -134,7 +134,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
parentcategoryid = c1 == null ? 0 : c1.id, parentcategoryid = c1 == null ? 0 : c1.id,
parentcategory = c1.name ?? "", parentcategory = c1.name ?? "",
parentpartnumber = t1.partnumber ?? "", parentpartnumber = t1.partnumber ?? "",
parentspecfication = t1.specification ?? "" parentspecfication = t1.specification ?? "",
parentcode = t1.code ?? ""
}; };
var entities = query.OrderByDescending(q => q.id).AsNoTracking().ToList(); var entities = query.OrderByDescending(q => q.id).AsNoTracking().ToList();
return entities; return entities;
......
...@@ -103,6 +103,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -103,6 +103,8 @@ namespace Siger.Middlelayer.AccRepository.Repositories
name = item.Fixture, name = item.Fixture,
parent = parent, parent = parent,
createtime = DateTime.Now, createtime = DateTime.Now,
updatetime = DateTime.Now,
projectId = projectid
}; };
_context.siger_automation_fixture_tools_category.Add(entity); _context.siger_automation_fixture_tools_category.Add(entity);
_context.SaveChanges(); _context.SaveChanges();
......
...@@ -161,7 +161,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -161,7 +161,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
{ {
errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolNotFound}"); errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolNotFound}");
} }
var product = _context.siger_project_product.FirstOrDefault(q => q.projectid == projectid && q.status == (int)RowState.Valid && q.code == item.Product); var product = _context.siger_project_product.FirstOrDefault(q => q.projectid == projectid && q.status == (int)RowState.Valid && q.name == item.Product);
if (product == null) if (product == null)
{ {
errors.Add($"{rowIndex},{(int)RequestEnum.ProductNotFound}"); errors.Add($"{rowIndex},{(int)RequestEnum.ProductNotFound}");
......
...@@ -157,7 +157,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories ...@@ -157,7 +157,7 @@ namespace Siger.Middlelayer.AccRepository.Repositories
errors.Add($"{rowIndex},{(int)RequestEnum.DataExist}"); errors.Add($"{rowIndex},{(int)RequestEnum.DataExist}");
} }
var category = _context.siger_automation_fixture_tools.FirstOrDefault(q => q.name == item.Catgeory && q.projectId == projectid && q.status == (int)RowState.Valid); var category = _context.siger_automation_fixture_tools_category.FirstOrDefault(q => q.name == item.Catgeory && q.projectId == projectid && q.status == (int)RowState.Valid);
if (category == null) if (category == null)
{ {
errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolCatgeoryNotFound}"); errors.Add($"{rowIndex},{(int)RequestEnum.FixtureToolCatgeoryNotFound}");
......
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