|
|
@@ -53,7 +53,7 @@
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
|
|
|
- <el-select v-model="wccode" class="dropdown" @change ="handleBlur" style="width: 150px">
|
|
|
+ <el-select v-model="wccode" class="dropdown" @change ="handleBlur" style="width: 120px">
|
|
|
<el-option
|
|
|
v-for="item in shopdata"
|
|
|
:key="item.WC_CODE"
|
|
|
@@ -61,6 +61,14 @@
|
|
|
:value="item.WC_CODE"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
+ <el-select v-model="linecode" class="dropdown" @change ="handleBlur1" style="width: 120px">
|
|
|
+ <el-option
|
|
|
+ v-for="item in linedata"
|
|
|
+ :key="item.LI_CODE"
|
|
|
+ :label="item.LI_NAME"
|
|
|
+ :value="item.LI_CODE"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
|
|
|
<span class="text"> </span>
|
|
|
<span class="text">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
|
|
|
@@ -133,7 +141,9 @@ export default {
|
|
|
weekday: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
|
|
|
decorationColor: ['#568aea', '#000000'],
|
|
|
wccode:null,
|
|
|
- shopdata:[]
|
|
|
+ shopdata:[],
|
|
|
+ linecode:null,
|
|
|
+ linedata:[],
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
@@ -170,11 +180,17 @@ export default {
|
|
|
},
|
|
|
handleBlur (val){
|
|
|
sessionStorage.setItem('wc_code',val);
|
|
|
- this.$cookie.set("SMT_wc_code", val, {
|
|
|
+ this.$cookie.set("SHOP_WC_CODE", val, {
|
|
|
expires: 30,
|
|
|
});
|
|
|
location.reload();
|
|
|
},
|
|
|
+ handleBlur1 (val) {
|
|
|
+ sessionStorage.setItem('shli_code', val);
|
|
|
+ this.$cookie.set("SH_LI_CODE", val, {
|
|
|
+ expires: 30,
|
|
|
+ });
|
|
|
+ },
|
|
|
getShops (){
|
|
|
this.$http.get("kanban/getAllWorkCenter.action").then(
|
|
|
(res)=>{
|
|
|
@@ -194,9 +210,34 @@ export default {
|
|
|
this.shopdata = [];
|
|
|
}
|
|
|
this.wccode = sessionStorage.getItem("wc_code");
|
|
|
+ this.getLines();
|
|
|
},(result)=>{
|
|
|
console.error(result)
|
|
|
});
|
|
|
+ },
|
|
|
+ getLines () {
|
|
|
+ if (this.wccode != null && this.wccode != '') {
|
|
|
+ this.$http.get("kanban/getUpLinesByWorkCenter.action?wccode="+this.wccode).then(
|
|
|
+ (res) => {
|
|
|
+ if (res.data.linedata) {
|
|
|
+ const data = res.data.linedata;
|
|
|
+ if (this.$cookie.get("SH_LI_CODE") && data.some(item => item.LI_CODE === this.$cookie.get("SH_LI_CODE"))) {
|
|
|
+ sessionStorage.setItem('shli_code', this.$cookie.get("SH_LI_CODE"));
|
|
|
+ } else {
|
|
|
+ sessionStorage.setItem('shli_code', data[0].LI_CODE);
|
|
|
+ this.$cookie.set("SH_LI_CODE", data[0].LI_CODE, {
|
|
|
+ expires: 30,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.linedata = data;
|
|
|
+ } else {
|
|
|
+ sessionStorage.setItem('shli_code', '');
|
|
|
+ }
|
|
|
+ this.linecode = sessionStorage.getItem("shli_code");
|
|
|
+ }, (result) => {
|
|
|
+ console.error(result)
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|