ysc před 1 rokem
rodič
revize
4b977b2245

+ 8 - 2
src/views/dashboard/index.vue

@@ -20,7 +20,7 @@
         </div>
       </el-card>
       <el-card class="card">
-        <div class="card-text" @click="newTaskOpen=!newTaskOpen">
+        <div class="card-text" @click="toTaskView">
           <div class="card-left"><i class="el-icon-s-order"></i></div>
           <div class="card-right">
             <div class="card-text-title">新任务</div>
@@ -166,7 +166,7 @@ export default {
       detailForm: false,
       auditForm: {},
       auditOpen: false,
-      auditRules:{
+      auditRules: {
         auditResult: [
           {required: true, message: "审核意见不能为空", trigger: "change"}
         ]
@@ -230,6 +230,12 @@ export default {
         this.enforceRemindCount = data.enforceRemindCount
       })
     },
+    toTaskView() {
+      if (this.newTaskNum === 0) {
+        return
+      }
+      this.$router.push(`/task/view`)
+    },
     toMyReceive() {
       this.$router.push(`/material/myReceive`)
     },

+ 8 - 1
src/views/material/asset.vue

@@ -209,6 +209,7 @@
                 type="date"
                 value-format="yyyy-MM-dd"
                 placeholder="选择日期"
+                :picker-options="pickerOptions"
                 style="width: 205px">
               </el-date-picker>
             </el-form-item>
@@ -289,7 +290,7 @@
               <div>{{ transferForm.num }}</div>
             </el-form-item>
             <el-form-item label="流转数量" prop="receiveNum" v-if="transferForm.assetType==='1'">
-              <el-input-number v-model="transferForm.receiveNum"></el-input-number>
+              <el-input-number v-model="transferForm.receiveNum" :max="transferForm.num"></el-input-number>
               <el-tooltip class="item" effect="dark" content="不填表示领取剩余全部库存" placement="right">
                 <div style="margin-left: 10px" class="el-icon-info"></div>
               </el-tooltip>
@@ -387,6 +388,7 @@ import {categoryTree} from "@/api/material/category";
 import {getDeptUserTree} from "@/api/system/user";
 import {getDictData} from "@/api/system/dict";
 import {addTransfer, getTransferList} from "@/api/material/transfer";
+import DateUtil from "@/utils/date";
 
 
 export default {
@@ -429,6 +431,11 @@ export default {
           {required: true, message: "定位位置不能为空", trigger: "blur"}
         ]
       },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() > DateUtil.unix(DateUtil.day()) * 1000
+        }
+      },
 
       transferOpen: false,
       transferForm: {},

+ 4 - 0
src/views/task/projectView.vue

@@ -303,6 +303,10 @@ export default {
     },
     cellDbClick(row, column, cell, event) {
       let feedbackDate = DateUtil.getFeedBackDate(this.queryParams.rangeDate, column.property)
+      if (DateUtil.unix(feedbackDate) > DateUtil.unix()) {
+        this.$message.warning("评论时间不能超过:" + DateUtil.day())
+        return;
+      }
       this.form = {
         id: undefined,
         taskName: row.taskName,

+ 20 - 10
src/views/task/task.vue

@@ -518,8 +518,11 @@ export default {
       this.title = "添加任务";
       listProject().then(response => {
         this.projectOptions = this.handleTree(response.data, "id");
-        if (this.selectProjectId) {
-          this.form.projectId = this.selectProjectId
+        if (this.selectProjectId && this.projectOptions.length > 0) {
+          let ids = this.projectOptions.map(item => item.id);
+          if (ids.indexOf(this.selectProjectId) < 0) {
+            this.form.projectId = this.selectProjectId
+          }
         }
       });
     },
@@ -612,6 +615,13 @@ export default {
 
     /** 提交按钮 */
     submitForm() {
+      if (this.projectOptions.length > 0) {
+        let ids = this.projectOptions.map(item => item.id);
+        if (ids.indexOf(this.form.projectId) > -1) {
+          this.$message.warning("不可选择分类")
+          return
+        }
+      }
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.beginDate = this.form.rangeDate[0]
@@ -669,15 +679,15 @@ export default {
     },
 
     cancelConfirm() {
-      this.open = false;
-      this.splitOpen = false;
       this.confirmOpen = false;
-      this.$refs.dut2.clearText()
-      let dutSplit = this.$refs.dutSplit || [];
-      for (let key in dutSplit) {
-        dutSplit[key].clearText()
-      }
-      this.resetForm("splitForm");
+      // this.open = false;
+      // this.splitOpen = false;
+      // this.$refs.dut2.clearText()
+      // let dutSplit = this.$refs.dutSplit || [];
+      // for (let key in dutSplit) {
+      //   dutSplit[key].clearText()
+      // }
+      // this.resetForm("splitForm");
     },
 
     /** 审核提交按钮 */