Browse Source

bug修改

ljb 8 months ago
parent
commit
0e39745611

+ 1 - 1
src/option/basicResource/technicianRoster.js

@@ -199,7 +199,7 @@ export default {
       prop: 'hireDate',
       type: 'date',
       valueFormat: 'yyyy-MM-dd',
-      // valueFormat: 'yyyy-MM-dd HH:mm:ss',
+      pickerOptions: {},
       span: 12,
       width: 90,
       align: 'center',

+ 1 - 1
src/option/techPerson/cyPersonRoster.js

@@ -18,7 +18,7 @@ export default {
   dialogType: "drawer",
   column: [
     {
-      label: '技术人员花名册',
+      label: '人员花名册信息',
       align: 'center',
       display: false,
       children: [{

+ 17 - 0
src/views/basic-resource/comp-basic-info/technician-roster.vue

@@ -125,6 +125,7 @@ export default window.$crudCommon({
   },
   watch: {
     'params.yearAndMonth'(newVal) {
+      console.log(moment(newVal).startOf('months').format('YYYY-MM-DD'), moment(newVal).endOf('months').format('YYYY-MM-DD'))
       if (newVal.length > 4) {
         // 是否勾选未全年
         this.isSelAnnual = false;
@@ -133,6 +134,22 @@ export default window.$crudCommon({
       }
       this.page.currentPage = 1;
       this.getList(this.page);
+
+
+      this.option.column.forEach(item => {
+        if (item.prop == 'hireDate') {
+          let lastMonthEndDate = moment(newVal).subtract(1, 'months').endOf('months').format('YYYY-MM-DD'); // 上个月最后一天
+          let monthEndDate = moment(newVal).endOf('months').format('YYYY-MM-DD'); // 当前月最后一天
+          item.defaultValue = monthEndDate;
+          item.pickerOptions = {
+            disabledDate(time) {
+              
+
+              return time.getTime() < new Date(lastMonthEndDate).getTime() || time.getTime() > new Date(monthEndDate).getTime();
+            }
+          };
+        }
+      });
     },
   },
   computed: {

+ 13 - 19
src/views/tech-person/month-cjcyry.vue

@@ -122,25 +122,19 @@ export default window.$crudCommon({
       };
     },
     handleZjyyClick() {
-      // if (!this.params.xmId) {
-      //   this.$message.error("请设置“研发项目”后,再操作!");
-      //   return;
-      // }
-      // let xmList = [];
-      // let proList = this.$refs.projectSelectRef.projectList;
-      // proList.forEach(item => {
-      //   if (this.params.xmId.indexOf(item.id) > -1) {
-      //     xmList.push(item);
-      //   }
-      // });
-
-      yyysbmd({ yearAndMonth: this.params.yearAndMonth }).then(({ data }) => {
-        if (data.code == 200) {
-          this.$message.success("引用预算表成功");
-          this.page.currentPage = 1;
-          this.getList(this.page);
-        }
-      });
+      this.$confirm('确认要引用项目预算表中的数据吗?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        yyysbmd({ yearAndMonth: this.params.yearAndMonth }).then(({ data }) => {
+          if (data.code == 200) {
+            this.$message.success("引用预算表成功");
+            this.page.currentPage = 1;
+            this.getList(this.page);
+          }
+        });
+      })
     },
     handleExport() {
       exportBloByPost(`/api/kd-scientific/technician/xm/monthly/export?${this.website.tokenHeader}=${getToken()}`, this.params).then(res => {