소스 검색

专利批准日期控制只能选择今天以前的时间

baichengfei 5 년 전
부모
커밋
6dfebd21f4

+ 25 - 22
src/dashoo.cn/frontend_web/src/components/oilsupplier/patentlist.vue

@@ -47,7 +47,7 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="批准日期" prop="ApprovalDate">
-              <el-date-picker style="width: 100%" v-model="PatentForm.ApprovalDate" type="date" placeholder="请选择批准日期">
+              <el-date-picker style="width: 100%" v-model="PatentForm.ApprovalDate" type="date" placeholder="请选择批准日期" :picker-options="patentPickerOptions">
               </el-date-picker>
             </el-form-item>
           </el-col>
@@ -94,6 +94,11 @@
         SupplierTypeCode: '0',
         status: '0',
         patentList: [],
+        patentPickerOptions: {
+          disabledDate (time) {
+            return time.getTime() > Date.now() - 8.64e6
+          }
+        },
         Title: '',
         PatentForm: {
           Id: '',
@@ -220,35 +225,33 @@
       },
       deletedata (val) {
         let _this = this
-      _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
-        })
-          .then(() => {
-            _this.$axios.delete('patent/patentdelete/' + val.Id, {})
-              .then(function (response) {
-                // response
-                if (response.data.code === 0) {
-                  _this.$message({
-                    type: 'success',
-                    message: response.data.message
-                  })
+        }).then(() => {
+          _this.$axios.delete('patent/patentdelete/' + val.Id, {})
+            .then(function (response) {
+              // response
+              if (response.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: response.data.message
+                })
                 _this.initData()
               } else {
-                  _this.$message({
-                    type: 'warning',
-                    message: response.data.message
-                  })
+                _this.$message({
+                  type: 'warning',
+                  message: response.data.message
+                })
               }
-              })
-              .catch(function (error) {
-                console.log(error)
+            }).catch(function (error) {
+              console.log(error)
             })
-        })
-          .catch(() => {})
-    },
+        }).catch(() => {})
+      },
       showDialog () {
+        console.log('1223')
         this.Title = '专利及专有技术'
         this.PatentForm.Id = 0
         this.PatentForm.SupplierCertId = this.SupplierCertId

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -1644,6 +1644,7 @@ export default {
     // 企业人员结构情况
     updateNumberEntity () {
       this.$refs['EntityFormNumber'].validate((valid) => {
+        // TODO 检查各部门人员数,不能大于总人员数
         if (valid) {
           if (!this.CheckCompanyBase()) {
             return false