Selaa lähdekoodia

【新增】到货通知

howie 2 vuotta sitten
vanhempi
commit
4ca6ef4c56

+ 8 - 7
src/layout/components/Navbar.vue

@@ -16,12 +16,12 @@
           ></i>
         </el-tooltip>
       </div> -->
-      <div class="right-menu-item hover-effect" @click="isNotice=!isNotice" style="display: flex;">
+      <!-- <div class="right-menu-item hover-effect" @click="handleNotice"  style="display: flex;">
         <el-badge value="示">
           <i class="el-icon-message-solid" style="font-size: 24px; line-height: 50px"></i>
         </el-badge>
         <span style="font-size: 16px; margin-left: 15px;">到货通知</span>
-      </div>
+      </div> -->
       <div class="right-menu-item hover-effect" @click="toEngine">
         <i class="el-icon-s-platform" style="font-size: 18px;"></i>
         <span style="font-size: 16px; margin-left: 6px;">家用工程机登录</span>
@@ -68,7 +68,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="到货通知" :modal="false" :visible.sync="isNotice" center >
+    <el-dialog title="到货通知" :modal="false" :visible.sync="isNotice" center @close="handleNotice">
       <el-table :data="[]">
         <el-table-column property="date" label="产品编号" ></el-table-column>
         <el-table-column property="name" label="物料编码" ></el-table-column>
@@ -180,7 +180,6 @@ export default {
       wsConnectErrorTime: 1,
       websock: null,
       lockReconnect: false,
-      isNotice:false
     };
   },
   mounted() {
@@ -221,13 +220,15 @@ export default {
     noticeVisible() {
       return this.noticeCount > 0;
     },
-    ...mapGetters(["sidebar", "avatar", "device", "name"]),
+    ...mapGetters(["sidebar", "avatar", "device", "name","isNotice"]),
   },
   methods: {
     getList(){
-
     }
-,
+    ,
+    handleNotice(){
+      this.$store.commit("user/SET_STATUS",!this.isNotice);
+    },
     toggleSideBar() {
       this.$store.dispatch("app/toggleSideBar");
     },

+ 1 - 0
src/store/getters.js

@@ -7,6 +7,7 @@ const getters = {
   userid: (state) => state.user.userid,
   phone: (state) => state.user.phone,
   name: (state) => state.user.name,
+  isNotice:(state) =>state.user.isNotice,
   menus: (state) => state.user.menus,
   customerId: (state) => state.user.customerId,
   customerName: (state) => state.user.customerName,

+ 5 - 0
src/store/modules/user.js

@@ -20,6 +20,7 @@ const getDefaultState = () => {
     customerName: "", //经销商名称
     customerNumber: "", //经销商编码
     showMessages: null, //
+    isNotice:false
   };
 };
 
@@ -29,6 +30,9 @@ const mutations = {
   RESET_STATE: (state) => {
     Object.assign(state, getDefaultState());
   },
+  SET_STATUS(state,status){
+    state.isNotice = status
+  },
   SET_USERID: (state, userid) => {
     state.userid = userid;
   },
@@ -58,6 +62,7 @@ const mutations = {
       state.showMessages = true;
     } else {
       state.showMessages = false;
+      state.isNotice = false
     }
   },
 };

+ 2 - 2
src/views/supply/engin/components/commerce_detail.vue

@@ -13,7 +13,7 @@
         <div class="diy-table-1">
           <el-row>
             <el-col :span="8" class="item">
-              <div class="label">工程登录编号</div>
+              <div class="label">工程订单号</div>
               <div class="value">{{detailData.enginOrderNo}}</div>
             </el-col>
             <el-col :span="8" class="item">
@@ -37,7 +37,7 @@
               <div class="value">{{detailData.refMachineType}}</div>
             </el-col>
             <el-col :span="8" class="item">
-              <div class="label">工程订单号</div>
+              <div class="label">工程登录编号</div>
               <div class="value">{{detailData.refEnginRecordNo}}</div>
             </el-col>
             <el-col :span="8" class="item">

+ 2 - 2
src/views/supply/engin/components/commerce_examine.vue

@@ -9,7 +9,7 @@
     <div class="diy-table-1">
       <el-row>
         <el-col :span="8" class="item">
-          <div class="label">工程登录编号</div>
+          <div class="label">工程订单号</div>
           <div class="value">{{detailData.enginOrderNo}}</div>
         </el-col>
         <el-col :span="8" class="item">
@@ -33,7 +33,7 @@
               <div class="value">{{detailData.refMachineType}}</div>
             </el-col>
         <el-col :span="8" class="item">
-          <div class="label">工程订单号</div>
+          <div class="label">工程登录编号</div>
           <div class="value">{{detailData.refEnginRecordNo}}</div>
         </el-col>
         <el-col :span="8" class="item">

+ 5 - 2
src/views/supply/engin/components/commerce_form.vue

@@ -179,7 +179,7 @@
     <div class="main-title">
       <div class="title">货品信息</div>
       <div>
-        <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px"  @change="setStock">
+        <el-select v-model="warehouseValue" placeholder="请选择发货仓库" size="small" style="margin-right: 10px"  @change="setStock" :disabled="!flag">
           <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
         </el-select>
         <el-button type="primary" size="small" icon="el-icon-search" @click="checkStock">检查库存</el-button>
@@ -438,6 +438,7 @@ export default {
         createDate: '',
         fileNo: '',
         salesMan: '',
+
         examineRemark: '',
       },
       mainFormRules: {
@@ -475,7 +476,7 @@ export default {
 
       warehouseList: [],
       warehouseValue: '',
-
+      flag:false,
       isFirst: false,
       salesmanList: [],
     }
@@ -514,12 +515,14 @@ export default {
     goodsList: {
       handler(newValue, oldValue) {
         if(this.goodsList && this.goodsList.length) {
+            this.flag = true
           if(this.isFirst) {
             this.isFirst = false;
           }else {
             // this.mainForm.salesMan = this.goodsList[0].serviceId;
           }
         }else {
+          this.flag = false
           this.mainForm.salesMan = '';
         }
       },

+ 2 - 2
src/views/supply/engin/components/commerce_return.vue

@@ -9,7 +9,7 @@
     <div class="diy-table-1">
       <el-row>
         <el-col :span="8" class="item">
-          <div class="label">工程登录编号</div>
+          <div class="label">工程订单号</div>
           <div class="value">{{detailData.enginOrderNo}}</div>
         </el-col>
         <el-col :span="8" class="item">
@@ -33,7 +33,7 @@
               <div class="value">{{detailData.refMachineType}}</div>
             </el-col>
         <el-col :span="8" class="item">
-          <div class="label">工程订单号</div>
+          <div class="label">工程登录编号</div>
           <div class="value">{{detailData.refEnginRecordNo}}</div>
         </el-col>
         <el-col :span="8" class="item">