Browse Source

1.1 修改随设备耗材立刻重新计算使用率

64060764@qq.com 1 year ago
parent
commit
fcb241a98b

File diff suppressed because it is too large
+ 9 - 0
index.html


+ 4 - 1
src/permission.js

@@ -17,6 +17,9 @@ router.beforeEach(async (to, from, next) => {
   // start progress bar
   NProgress.start();
   console.log(to);
+  // if (to.path) {
+  //   window._hmt.push(['_trackPageview', '/#' + to.fullPath]);
+  // }
   // set page title
   document.title = getPageTitle(to.meta.title);
 
@@ -77,7 +80,7 @@ router.beforeEach(async (to, from, next) => {
       setInterval(() => {
         store.dispatch("user/setNums");
       }, 30000)
-      
+
       const hasGetUserInfo = store.getters.name;
       if (hasGetUserInfo) {
         next();

+ 6 - 6
src/views/oa-management/consumble-watch/index.vue

@@ -247,12 +247,12 @@
             	size="mini"
             	@click="showEditConsumbleDialog(scope.row)"
             >编辑</el-button>
-						<el-button
-								type="text"
-								style="color: #FF4949;"
-								size="mini"
-								@click="resumeConsumableFnc(scope.row)"
-						>恢复</el-button>
+<!--						<el-button-->
+<!--								type="text"-->
+<!--								style="color: #FF4949;"-->
+<!--								size="mini"-->
+<!--								@click="resumeConsumableFnc(scope.row)"-->
+<!--						>恢复</el-button>-->
             <el-button
             	type="text"
               style="color: #FF4949;"

+ 15 - 2
src/views/oa-management/consumble-watch/operate-consumble/index.vue

@@ -149,8 +149,8 @@
 
         </template>
       </el-form-item>
-      <el-form-item label="使用率" v-if="type === 'edit'">
-        <el-input-number
+      <el-form-item label="使用率" v-if="type=='edit' && operateConsumbleForm.consumption_algorithm_id==5">
+        <el-input-number disabled
           v-model="operateConsumbleForm.utilization_rate"
           size="medium"
           :controls="false"
@@ -162,6 +162,19 @@
         ></el-input-number
         >%
       </el-form-item>
+        <el-form-item label="使用率" v-if="type=='edit' && operateConsumbleForm.consumption_algorithm_id!=5">
+            <el-input-number
+                             v-model="operateConsumbleForm.utilization_rate"
+                             size="medium"
+                             :controls="false"
+                             :min="0"
+                             :max="100"
+                             :step="0.01"
+                             style="width:220px !important;"
+                             label="描述文字"
+            ></el-input-number
+            >%
+        </el-form-item>
       <el-form-item label="消耗周期">
         <el-input-number
           style="width:220px !important;"