Commit d7dada67 by yiyu.li

bugd

parent 048d2734
......@@ -325,6 +325,7 @@ export default {
this.$Message.success(this.$t(msg))
},
adddata () {
console.log(this.addmtype);
if (this.addmtype === 1) {
this.addtypename = this.addtypename
if (this.addtypename === '') {
......@@ -350,10 +351,12 @@ export default {
return false
}
let data = {
parentid: this.addparentid,
parentid: this.addmtype==2? this.addparentid:0,
description: this.adddescription,
title: this.addtitle
}
console.log(data);
// return;
axios.request({
url: '/config/MachineType/AddDcategory',
data: data,
......
......@@ -72,7 +72,7 @@
>{{ $t("1005") }}</Button
>
<Upload
style="display:inline-block"
style="display: inline-block"
ref="upload"
:action="action"
name="excel-file"
......@@ -81,13 +81,14 @@
:on-format-error="handleFormatError"
:on-success="handleSuccess"
:on-error="handleError"
:format="['xlsx','xls']"
:format="['xlsx', 'xls']"
>
<Button
type="primary"
class="fourWord"
icon="md-cloud-upload"
>{{$t('1006')}}</Button>
>{{ $t("1006") }}</Button
>
</Upload>
<Button
type="primary"
......@@ -270,7 +271,7 @@ export default {
columns1: [
{
type: "expand",
width: "50",
// width: "50",
render: (h, params) => {
// let str = "";
// if (params.row.managetype === 1) {
......@@ -462,18 +463,18 @@ export default {
UploadAction: this.axios.publicPath + "config/upload/UploadImage",
detailobj: {},
childObj: {},
addstatus:'1',//状态 1可用 0停用
addstatus: "1", //状态 1可用 0停用
};
},
created() {
this.columns1 = this.$time.initTableTitle(this.columns1);
this.columns2 = this.$time.initTableTitle(this.columns2);
// this.columns2 = this.$time.initTableTitle(this.columns2);
this.initFrockType();
this.tosearch();
},
methods: {
tosearch(){
tosearch() {
this.page = 1;
this.pagesize = 10;
this.search(0);
......@@ -486,26 +487,29 @@ export default {
state: this.state, //0停用 1可用
page: this.page,
pagesize: this.pagesize,
toexcel:toexcel //0查询 1导出
toexcel: toexcel, //0查询 1导出
};
this.request(
"/acc/FixtureToolsAssembly/GetPageList",
data,
"get"
).then((res) => {
if(toexcel === 1){
if (toexcel === 1) {
if (res.data.ret === 1) {
window.location.href =
this.axios.publicPath + "" + res.data.data;
} else {
this.$Message.error(this.$t(res.data.msg));
}
}
else{
} else {
this.total = 0;
this.data1 = [];
let data = res.data.data;
if (res.data.ret == 1 &&Array.isArray(data)&&data.length) {
if (
res.data.ret == 1 &&
Array.isArray(data) &&
data.length
) {
this.total = res.data.total;
this.data1 = res.data.data;
}
......@@ -533,14 +537,14 @@ export default {
});
}
this.type = 1;
this.addstatus = '1';//状态 1可用 0停用
this.addstatus = "1"; //状态 1可用 0停用
},
addPost() {
if(!this.toolingId1){
if (!this.toolingId1) {
this.$Message.error("请选择父工装");
return false;
}
if(!this.toolingId2){
if (!this.toolingId2) {
this.$Message.error("请选择子工装");
return false;
}
......@@ -553,7 +557,7 @@ export default {
filename: this.filename, //附件名称
status: 1,
remark: this.remark,
status:this.addstatus,
status: this.addstatus,
};
if (this.type == 1) {
url = "/acc/FixtureToolsAssembly/Add";
......@@ -597,7 +601,7 @@ export default {
this.remark = this.childObj.remark;
this.disabled = true;
this.type = 2;
this.addstatus = this.childObj.status+'';//状态 1可用 0停用
this.addstatus = this.childObj.status + ""; //状态 1可用 0停用
this.modal = true;
},
dele() {
......@@ -638,8 +642,10 @@ export default {
}
},
loadExcel() {
this.axios.request({
url: "/config/Download/GetTemplate?name=FixtureToolsAssmeblyTemplate",
this.axios
.request({
url:
"/config/Download/GetTemplate?name=FixtureToolsAssmeblyTemplate",
method: "get",
})
.then((res) => {
......
......@@ -302,6 +302,7 @@ export default {
.then((res) => {
if (res.data.ret === 1) {
this.$Message.success(this.$t("1058"));
this.page = 1;
this.search(0);
} else {
this.$Message.error(this.$t(res.data.msg));
......
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