ysc před 2 roky
rodič
revize
e5e0e54f64
1 změnil soubory, kde provedl 9 přidání a 7 odebrání
  1. 9 7
      src/views/material/receive.vue

+ 9 - 7
src/views/material/receive.vue

@@ -53,7 +53,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['material:material:add']"
+          v-hasPermi="['material:receive:add']"
         >新增
         </el-button>
       </el-col>
@@ -63,7 +63,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['material:material:add']"
+          v-hasPermi="['material:receive:export']"
         >导出
         </el-button>
       </el-col>
@@ -96,7 +96,7 @@
             icon="el-icon-edit"
             @click="handleSplit(scope.row)"
             v-if="scope.row.monthOrWeek==='1'"
-            v-hasPermi="['material:material:add']"
+            v-hasPermi="['material:receive:add']"
           >周数据
           </el-button>
           <el-button
@@ -105,7 +105,7 @@
             icon="el-icon-edit"
             v-if="showEditBtn(scope.row)"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['material:material:edit']"
+            v-hasPermi="['material:receive:edit']"
           >修改
           </el-button>
           <el-button
@@ -113,7 +113,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['material:material:delete']"
+            v-hasPermi="['material:receive:delete']"
           >删除
           </el-button>
         </template>
@@ -322,8 +322,11 @@ export default {
         }
       }
       if (type === 'week') {
+        let time1 = DateUtil.unix(this.form.recordDate) * 1000
+        let time2 = DateUtil.unix(DateUtil.afterWeek()) * 1000
+        let limitTime = time1 > time2 ? time1 : time2;
         return {
-          disabledDate: time => time.getTime() < DateUtil.unix(DateUtil.afterWeek()) * 1000
+          disabledDate: time => time.getTime() < limitTime
         }
       }
     },
@@ -360,7 +363,6 @@ export default {
       this.form.id = undefined;
       this.form.num = undefined;
       this.form.monthOrWeek = '2'
-      this.form.recordDate = DateUtil.day()
       this.title = "添加周物料计划";
       this.open = true;
     },