Commit efd64148 by yiyu.li

优化

parent b57238d3
......@@ -43,7 +43,12 @@
<div class="choose">
<p class="selectTitle">3.操作</p>
<Tabs type="card" :value="tabindex">
<TabPane label="上料" :disabled="attr1" name="1">
<TabPane
label="上料"
:disabled="attr1"
name="1"
@click="getStorages()"
>
<div class="filter">
<label style="font-size: 16px"
>上料信息:</label
......@@ -116,8 +121,7 @@
<p class="infoLabel">产品图片:</p>
<div>
<img
:src="orderDetail.url
"
:src="orderDetail.url"
alt=""
style="width: 100%"
/>
......@@ -132,7 +136,11 @@
>
</div>
</TabPane>
<TabPane label="下料" :disabled="attr2" name="2"
<TabPane
label="下料"
:disabled="attr2"
name="2"
@click="getStorages()"
><div class="flex">
<div>
<Table
......@@ -332,12 +340,11 @@ export default {
detailobj: {},
sectionid: 0,
tabindex: "1",
locationobj:{}
locationobj: {},
};
},
created() {
this.getProLine();
},
mounted() {
// this.getStations()
......@@ -397,9 +404,15 @@ export default {
},
//获取储位
getStorages() {
let code = '';
code = this.orderDetail.productCode? this.orderDetail.productCode :'';
this.request("/acc/AutomationLocation/GetLocationList?fillsn=1&code="+code, "", "get")
let code = "";
code = this.orderDetail.productCode
? this.orderDetail.productCode
: "";
let data = {
fillsn: this.tabindex == "1" ? 0 : 1,
code: code,
};
this.request("/acc/AutomationLocation/GetLocationList", data, "get")
.then((res) => {
if (res.data.ret == 1) {
this.data1 = res.data.data;
......@@ -419,10 +432,14 @@ export default {
.then((res) => {
if (res.data.ret == 1) {
let obj = res.data.data;
if(obj.url == null || obj.url=='' || obj.url ==undefined){
obj.url = ''
}else{
obj.url = this.axios.publicPath +obj.url;
if (
obj.url == null ||
obj.url == "" ||
obj.url == undefined
) {
obj.url = "";
} else {
obj.url = this.axios.publicPath + obj.url.slice(4);
}
this.orderDetail = Object.assign(
{},
......@@ -451,6 +468,15 @@ export default {
.then((res) => {
if (res.data.ret == 1) {
let obj = res.data.data;
if (
obj.url == null ||
obj.url == "" ||
obj.url == undefined
) {
obj.url = "";
} else {
obj.url = this.axios.publicPath + obj.url.slice(4);
}
this.orderDetail = Object.assign(
{},
this.orderDetail,
......@@ -516,12 +542,12 @@ export default {
return false;
}
if (!this.locationobj.id) {
this.$Message.error("请选择储位");
return false;
this.$Message.error("请选择储位");
return false;
}
let data = {
section: this.sectionid,
id:this.locationobj.id,
id: this.locationobj.id,
};
this.request("/acc/AutomationOperate/Unloading", data, "post").then(
(res) => {
......@@ -562,25 +588,29 @@ export default {
handleRowChange1(currentRow, oldCurrentRow) {
console.log(currentRow);
this.locationobj = currentRow;
this.orderDetail.fixtureGuid = this.detailobj.fixtureguid;
this.orderDetail.fixtureGuid = this.detailobj.fixtureguid;
this.orderDetail.location = this.detailobj.locationid;
if(this.locationobj.id){
this.request("/acc/AutomationOperate/ScanCode?id="+this.locationobj.id, '', "get")
.then((res) => {
if (res.data.ret == 1) {
let obj = res.data.data;
this.orderDetail = Object.assign(
{},
this.orderDetail,
obj
);
} else {
this.$Message.error(this.$t(res.data.msg));
}
})
.catch((err) => {
console.log(err);
});
if (this.locationobj.id) {
this.request(
"/acc/AutomationOperate/ScanCode?id=" + this.locationobj.id,
"",
"get"
)
.then((res) => {
if (res.data.ret == 1) {
let obj = res.data.data;
this.orderDetail = Object.assign(
{},
this.orderDetail,
obj
);
} else {
this.$Message.error(this.$t(res.data.msg));
}
})
.catch((err) => {
console.log(err);
});
}
},
request(url, data, type) {
......
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