瀏覽代碼

次元看板--调整,车间看板保留可以切换工作中心

xiaost 2 月之前
父節點
當前提交
beb76701d5

+ 2 - 1
src/components/shopechart/bottom1Chart/chart.vue

@@ -178,7 +178,8 @@ export default {
       var caller = 'KB!ShopPlanFinishInfo';
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {
-          condition:  "V_OUTLINE='"+this.factory+"'",
+          condition:  "V_OUTLINE='"+this.factory+"'"+
+              " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'"
         }
       }).then((result)=>{
             let dataList = JSON.parse(result.data.data);

+ 2 - 1
src/components/shopechart/bottom2Chart/chart.vue

@@ -222,7 +222,8 @@ export default {
       var caller = 'KB!ShopHourQTY';
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {
-          condition: "V_OUTLINE='"+this.factory+"'",
+          condition: "V_OUTLINE='"+this.factory+"'"+
+              " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'"
         }
       }).then((result)=>{
             let dataList = JSON.parse(result.data.data);

+ 2 - 1
src/components/shopechart/up4Chart/index.vue

@@ -46,7 +46,8 @@ export default {
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",
               {
                 params: {
-                  condition: "V_OUTLINE='"+this.factory+"'",
+                  condition: "V_OUTLINE='"+this.factory+"'"+
+                      " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'"
                 }
               }).then((result)=>{
                         let dataList = JSON.parse(result.data.data);

+ 7 - 5
src/views/prodline/index.vue

@@ -178,6 +178,9 @@ export default {
     },
     handleBlur1 (val){
       sessionStorage.setItem('li_code',val);
+      this.$cookie.set("PRODLI_CODE", val, {
+        expires: 30,
+      });
       location.reload();
     },
     getLines (){
@@ -189,15 +192,14 @@ export default {
               (res)=>{
                 if(res.data.linedata) {
                   const data = res.data.linedata;
-                  sessionStorage.setItem('li_code', data[0].LI_CODE);
-                  /*if(this.$cookie.get("SMT_LI_CODE") && data.some(item => item.LI_CODE === this.$cookie.get("SMT_LI_CODE")) ){
-                    sessionStorage.setItem('li_code', this.$cookie.get("SMT_LI_CODE"));
+                  if(this.$cookie.get("PRODLI_CODE") && data.some(item => item.LI_CODE === this.$cookie.get("PRODLI_CODE")) ){
+                    sessionStorage.setItem('li_code', this.$cookie.get("PRODLI_CODE"));
                   }else {
                     sessionStorage.setItem('li_code', data[0].LI_CODE);
-                    this.$cookie.set("SMT_LI_CODE", data[0].LI_CODE, {
+                    this.$cookie.set("PRODLI_CODE", data[0].LI_CODE, {
                       expires: 30,
                     });
-                  }*/
+                  }
                   this.linedata = data;
                 }else{
                   sessionStorage.setItem('li_code','');

+ 19 - 2
src/views/shop/index.vue

@@ -62,6 +62,15 @@
                 ></el-option>
               </el-select>
 
+              <el-select v-model="wccode" class="dropdown" @change ="handleBlur2" style="width: 120px">
+                <el-option
+                    v-for="item in shopdata"
+                    :key="item.WC_CODE"
+                    :label="item.WC_NAME"
+                    :value="item.WC_CODE"
+                ></el-option>
+              </el-select>
+
               <span class="text">&nbsp;&nbsp;&nbsp;&nbsp;</span>
               <span class="text">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
             </div>
@@ -143,7 +152,7 @@ export default {
     bottom2
   },
   created() {
-
+     this.getShops();
   },
   mounted() {
     this.timeFn()
@@ -171,7 +180,14 @@ export default {
       this.setFactory(val);
       location.reload();
     },
-    /*getShops (){
+    handleBlur2 (val){
+      sessionStorage.setItem('wc_code',val);
+      this.$cookie.set("SHOP_WC_CODE", val, {
+        expires: 30,
+      });
+      location.reload();
+    },
+    getShops (){
       this.$http.get("kanban/getAllWorkCenter.action").then(
               (res)=>{
                 if(res.data.centerdata) {
@@ -195,6 +211,7 @@ export default {
                 console.error(result)
               });
     },
+    /*
     getLines () {
       if (this.wccode != null && this.wccode != '') {
         this.$http.get("kanban/getUpLinesByWorkCenter.action?wccode="+this.wccode).then(

+ 2 - 1
src/views/shop/up1.vue

@@ -52,7 +52,8 @@ export default {
       var caller = 'KB!ShopLinePlan';
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {
-          condition: "V_OUTLINE='"+this.factory+"'",
+          condition: "V_OUTLINE='"+this.factory+"'"+
+                      " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'" ,
         }
       }).then((result)=>{
             let dataList = JSON.parse(result.data.data);

+ 2 - 1
src/views/shop/up2.vue

@@ -52,7 +52,8 @@ export default {
       var caller = 'KB!ShopLineMonthPlan';
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {
-          condition: "V_OUTLINE='"+this.factory+"'",
+          condition: "V_OUTLINE='"+this.factory+"'"+
+              " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'"
         }
       }).then((result)=>{
             let dataList = JSON.parse(result.data.data);

+ 2 - 1
src/views/shop/up3.vue

@@ -49,7 +49,8 @@ export default {
       //关键工序直通率
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100",{
         params: {
-          condition: "V_OUTLINE='"+this.factory+"'",
+          condition: "V_OUTLINE='"+this.factory+"'"+
+              " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'"
         }
       }).then((result)=>{
             let dataList = JSON.parse(result.data.data);

+ 2 - 1
src/views/shop/up4.vue

@@ -73,7 +73,8 @@ export default {
       var caller = 'KB!SHOPDPLANTOUTPUT';
       await this.$http.get("kanban/datalist.action?caller="+caller+"&_noc=1&page=1&pageSize=100", {
         params: {
-          condition: "V_OUTLINE='"+this.factory+"'",
+          condition: "V_OUTLINE='"+this.factory+"'"+
+              " AND v_wccode='"+sessionStorage.getItem('wc_code')+"'"
         }
       })
           .then((result)=>{