Commit efd64148 by yiyu.li

优化

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