Commit 6ba8c908 by yiyu.li

add

parent b7db37a4
......@@ -52,40 +52,53 @@
<div class="row">
<p class="flex">
<span class="infoLabel">工单信息:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.orderNumber
}}</span>
</p>
<p class="flex">
<span class="infoLabel">产品编号:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.productCode
}}</span>
</p>
<p class="flex">
<span class="infoLabel">产品名称:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.productName
}}</span>
</p>
<p class="flex">
<span class="infoLabel">工件编号:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.sn
}}</span>
</p>
</div>
<div class="row">
<p class="flex">
<span class="infoLabel">状态:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.status
}}</span>
</p>
<p class="flex">
<span class="infoLabel">储位编号:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.location
}}</span>
</p>
<p class="flex">
<span class="infoLabel">工装编号:</span>
<span class="info"></span>
<span class="info">{{
orderDetail.fixtureGuid
}}</span>
</p>
<Button type="primary" @click="modal = true"
>储位选择</Button
>
</div>
<div>
<Button type="primary">准备上料</Button>
<Button type="primary" @click="feedReady()"
>准备上料</Button
>
<Button type="primary">安装完成</Button>
</div>
</TabPane>
......@@ -107,7 +120,7 @@
>工单信息:</span
>
<span class="info">{{
orderDetail.code
orderDetail.orderNumber
}}</span>
</p>
<p class="flex">
......@@ -115,7 +128,7 @@
>产品编号:</span
>
<span class="info">{{
orderDetail.code
orderDetail.productCode
}}</span>
</p>
<p class="flex">
......@@ -123,7 +136,7 @@
>产品名称:</span
>
<span class="info">{{
orderDetail.code
orderDetail.productName
}}</span>
</p>
<p class="flex">
......@@ -131,7 +144,7 @@
>工件编号:</span
>
<span class="info">{{
orderDetail.code
orderDetail.sn
}}</span>
</p>
</div>
......@@ -149,7 +162,7 @@
>储位编号:</span
>
<span class="info">{{
orderDetail.code
orderDetail.location
}}</span>
</p>
<p class="flex">
......@@ -157,7 +170,7 @@
>工装编号:</span
>
<span class="info">{{
orderDetail.code
orderDetail.fixtureGuid
}}</span>
</p>
</div>
......@@ -277,7 +290,8 @@ export default {
],
data2: [],
orderDetail: {},
detailobj:{}
detailobj: {},
sectionid: 0,
};
},
created() {
......@@ -327,6 +341,7 @@ export default {
change2(index) {
this.b = index;
let status = this.stationList[index].status;
this.sectionid = this.stationList[index].section;
if (status == 1) {
this.attr2 = true;
}
......@@ -354,8 +369,12 @@ export default {
this.request("/acc/AutomationOperate/ScanCode", data, "get")
.then((res) => {
if (res.data.ret == 1) {
console.log(res.data.data);
this.orderDetail = res.data.data;
let obj = res.data.data;
this.orderDetail = Object.assign(
{},
this.orderDetail,
obj
);
} else {
this.$Message.error(this.$t(res.data, msg));
}
......@@ -367,14 +386,19 @@ export default {
feedReady() {
// 准备上料
if (this.sectionid == 0) {
this.$Message.error("请选择工位");
}
let data = {
section: 13,
code: "234324",
section: this.sectionid,
code: this.orderDetail.fixtureGuid,
};
this.request("/acc/AutomationOperate/Loading", data, "post").thne(
(res) => {
if (res.data.ret == 1) {
console.log(res.data.data);
} else {
this.$Message.error(this.$t(res.data.msg));
}
}
);
......@@ -392,7 +416,6 @@ export default {
},
handleRowChange(currentRow, oldCurrentRow) {
this.detailobj = currentRow;
},
request(url, data, type) {
if (type == "get") {
......
......@@ -5,15 +5,14 @@
<div class="newSearchDiv">
<div class="filter">
<label>工装类别:</label>
<Select
label-in-value
<Cascader
class="searchSelect"
:data="typeTree"
clearable
filterable
change-on-select
v-model="category"
class="searchSelect"
>
</Select>
<Cascader class="searchSelect" :data="typeTree" clearable change-on-select v-model="category" @on-change="changeFrockType"></Cascader>
@on-change="getCategory"
></Cascader>
</div>
<div class="filter">
<label>工装编号:</label>
......@@ -32,8 +31,8 @@
v-model="state"
class="searchSelect"
>
<Option :value="1">可用</Option>
<Option :value="0">停用</Option>
<Option :value="1">可用</Option>
<Option :value="0">停用</Option>
</Select>
</div>
......@@ -120,7 +119,7 @@
<Modal
class="newModalClass"
v-model="modal"
:styles="{ width: '900px' }"
:styles="{ width: '700px' }"
>
<p slot="header">
<span v-show="type == 1">{{ $t("1002") }}</span>
......@@ -134,47 +133,66 @@
<label>父工装类别:</label>
<Cascader
class="searchSelect"
:data="frockTypeTree"
:data="typeTree"
v-model="parentType"
change-on-select
@on-change="changeFrockType1"
@on-change="getCategory1"
></Cascader>
</div>
<div class="filter">
<label><i>*</i>父工装信息:</label>
<Input type="text" class="searchInput" />
</div>
<div class="filter">
<label><i>*</i>父工装编号:</label>
<Input type="text" class="searchInput" />
<label><i>*</i>父工装名称:</label>
<Select
v-model="toolingId1"
label-in-value
clearable
filterable
filter-by-label
class="searchSelect"
>
<Option
v-for="(item, index) in toolingList1"
:value="item.id"
:key="index"
:label="item.name + '#' + item.code"
>{{ item.name + "#" + item.code }}</Option
>
</Select>
</div>
<div style="padding-left: 50px">
<div class="filter">
<label>子工装类别:</label>
<Cascader
class="searchSelect"
:data="frockTypeTree"
v-model="parentType"
:data="typeTree"
v-model="sonType"
change-on-select
@on-change="changeFrockType1"
@on-change="getCategory2"
></Cascader>
</div>
<div class="filter">
<label><i>*</i>子工装信息:</label>
<Input type="text" class="searchInput" />
</div>
<div class="filter">
<label><i>*</i>子工装编号:</label>
<Input type="text" class="searchInput" />
<label><i>*</i>子工装名称:</label>
<Select
v-model="toolingId2"
label-in-value
clearable
filterable
filter-by-label
class="searchSelect"
>
<Option
v-for="(item, index) in toolingList2"
:value="item.id"
:key="index"
:label="item.name + '#' + item.code"
>{{ item.name + "#" + item.code }}</Option
>
</Select>
</div>
</div>
<div class="filter">
<label>备注:</label>
<Input
type="text"
class="searchInput"
v-model="addremark"
/>
<Input type="text" class="searchInput" v-model="remark" />
</div>
<div>
<label>上传文件:</label>
......@@ -206,7 +224,7 @@
</div>
</div>
<div slot="footer">
<Button type="text" size="large" @click="addmodal = false">{{
<Button type="text" size="large" @click="modal = false">{{
$t("1033")
}}</Button>
<Button type="primary" size="large" @click="addPost()">{{
......@@ -221,6 +239,16 @@
export default {
data() {
return {
//导入方法
action:
this.axios.publicPath +
"wms/Upload/Submit?templateName=StorageLocation",
headers: {
token: localStorage.getItem("token"),
timestamp: localStorage.getItem("timestamp"),
nonce: localStorage.getItem("nonce"),
sign: localStorage.getItem("sign"),
},
columns1: [
{
type: "index2",
......@@ -327,29 +355,44 @@ export default {
pagesize: 10,
modal: false,
type: 0,
typeTree:[],
typeTree: [],
category: [],
categoryId: 0,
number: "",
name: "",
state: '',
state: "",
parentType: [],
sonType: [],
parentId: 0,
sonId: 0,
remark: "",
toolingList1: [],
toolingList2: [],
toolingId1: 0,
toolingId2: 0,
spinShow: false,
fileurl: "",
filename: "",
UploadAction: this.axios.publicPath + "config/upload/UploadImage",
};
},
created() {
this.columns1 = this.$time.initTableTitle(this.columns1);
this.initFrockType();
},
methods: {
search(page, pagesize) {
let data = {
category: this.category, //工装类型id
category: this.categoryId, //工装类型id
code: this.number,
name: this.name,
state: this.state, //0停用 1可用
// state: this.state, //0停用 1可用
page: this.page,
pagesize: this.pagesize,
toexcel: 0, //0查询 1导出
// toexcel: 0, //0查询 1导出
};
this.request(
"acc/FixtureToolsAssembly/GetPageList",
"/acc/FixtureToolsAssembly/GetPageList",
data,
"get"
).then((res) => {
......@@ -362,10 +405,135 @@ export default {
this.modal = true;
this.type = 1;
},
addPost() {
let data = {
parentid: this.toolingId1, //父级工装ID
fixturetoolid: this.toolingId2, //工装ID
fileurl: this.fileurl, //url
filename: this.filename, //附件名称
status: 1,
};
this.request("/acc/AutomationLocation/Add", data, "post").then(
(res) => {
if (res.data.ret == 1) {
} else {
this.$Message.error(this.$t(res.data.msg));
}
}
);
},
edit() {},
dele() {},
loadExcel() {},
exportEecel() {},
//工装类型
initFrockType() {
this.axios
.request({
url: "/acc/FixtureTools/GetCategoryList",
method: "get",
})
.then((res) => {
if (res.data.ret == 1) {
let arr = res.data.data;
this.contentTree(arr);
this.typeTree = arr;
}
});
},
getCategory(val) {
this.category = val;
this.categoryId =
this.category.length > 0
? this.category[this.category.length - 1]
: 0;
},
getCategory1(val) {
this.parentType = val;
this.parentId =
this.parentType.length > 0
? this.parentType[this.parentType.length - 1]
: 0;
console.log(val);
console.log(this.parentId);
if (this.parentId != 0) {
this.getToolingList(1);
}
},
getCategory2(val) {
this.sonType = val;
this.sonId =
this.sonType.length > 0
? this.sonType[this.sonType.length - 1]
: 0;
if (this.sonId != 0) {
this.getToolingList(2);
}
},
getToolingList(index) {
let id = 0;
id = index == 1 ? this.parentId : this.sonId;
console.log(index);
this.request(
"/acc/FixtureTools/GetFixtureToolList?categoryid=" + id,
"",
"get"
).then((res) => {
if (res.data.ret == 1) {
if (index == 1) {
this.toolingList1 = res.data.data;
}
if (index == 2) {
this.toolingList2 = res.data.data;
}
} else {
this.$Message.error(this.$t(res.data.msg));
}
});
},
contentTree(arr) {
arr.forEach((ele) => {
ele.disabled = false;
if (
ele.children != undefined &&
ele.children != null &&
ele.children.length != 0
) {
this.contentTree(ele.children);
} else {
ele.children = [];
}
});
},
/*********文件上传 start******** */
handleBeforeUpload(file) {
this.spinShow = true;
if (!file) {
this.spinShow = false;
return false;
}
},
handleSuccess1(res, file) {
this.spinShow = false;
if (res.ret == 1) {
this.$Message.success(this.$t("100378"));
this.filename = file.name;
this.fileurl = res.data;
} else {
this.$Message.error(this.$t(res.msg + ""));
}
},
handleError1() {
this.spinShow = false;
this.$Message.error(this.$t("600512") + "!");
},
delfile() {
this.filename = "";
this.fileurl = "";
},
/*********文件上传 end******** */
request(url, data, type) {
if (type == "get") {
return this.axios.request({
......
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