Bladeren bron

Merge remote-tracking branch 'origin/dev' into dev

001295 1 jaar geleden
bovenliggende
commit
bcacad7571

+ 26 - 10
src/components/popover-select-v2/index.vue

@@ -84,17 +84,17 @@ export default {
         return this.value;
       },
       set(value) {
-        const {
-          $props: { source, dataMapping },
-        } = this;
+        // const {
+        //   $props: { source, dataMapping },
+        // } = this;
 
-        for (let key in dataMapping) {
-          if (dataMapping[key] === "id" || dataMapping[key] === "code") {
-            if (source[key] && source[key] !== "") {
-              source[key] = undefined;
-            }
-          }
-        }
+        // for (let key in dataMapping) {
+        //   if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+        //     if (source[key] && source[key] !== "") {
+        //       source[key] = undefined;
+        //     }
+        //   }
+        // }
         this.$emit("input", value);
       },
     },
@@ -251,6 +251,21 @@ export default {
     handleClear() {
       this.innerValue = "";
     },
+    handleKeyupDel() {
+      console.log("focus");
+      const {
+        $props: { source, dataMapping },
+      } = this;
+
+      for (let key in dataMapping) {
+        if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+          if (source[key] && source[key] !== "") {
+            source[key] = undefined;
+          }
+        }
+      }
+    },
+
   },
   created() {},
   mounted() {},
@@ -269,6 +284,7 @@ export default {
       @clear="handleClear"
       @change="handleChange"
       @keyup.enter.native="handleChange"
+      @keyup.delete.native="handleKeyupDel"
     >
       <i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>
     </el-input>

+ 27 - 12
src/components/popover-select/index.vue

@@ -109,18 +109,18 @@ export default {
         return multiple ? "" : value;
       },
       set(val) {
-        const {
-          $props: { source, dataMapping, multiple },
-        } = this;
-        if (!multiple) {
-          for (let key in dataMapping) {
-            if (dataMapping[key] === "id" || dataMapping[key] === "code") {
-              if (source[key] && source[key] !== "") {
-                source[key] = undefined;
-              }
-            }
-          }
-        }
+        // const {
+        //   $props: { source, dataMapping, multiple },
+        // } = this;
+        // if (!multiple) {
+        //   for (let key in dataMapping) {
+        //     if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+        //       if (source[key] && source[key] !== "") {
+        //         source[key] = undefined;
+        //       }
+        //     }
+        //   }
+        // }
 
         this.$emit("input", val);
       },
@@ -325,6 +325,20 @@ export default {
         }
       }
     },
+    handleKeyupDel() {
+      console.log("focus");
+      const {
+        $props: { source, dataMapping },
+      } = this;
+
+      for (let key in dataMapping) {
+        if (dataMapping[key] === "id" || dataMapping[key] === "code") {
+          if (source[key] && source[key] !== "") {
+            source[key] = undefined;
+          }
+        }
+      }
+    },
   },
   created() {},
   mounted() {},
@@ -344,6 +358,7 @@ export default {
       @clear="handleClear"
       @change="handleChange"
       @keyup.enter.native="handleChange"
+      @keyup.delete.native="handleKeyupDel"
     >
       <i :size="size" class="el-icon-search" slot="suffix" @click="open"> </i>
     </el-input>

+ 8 - 4
src/views/business/spd/target/MonthSaleGoal.vue

@@ -332,7 +332,7 @@
                     </el-tooltip>
                   </template>
                 </el-table-column>
-                <el-table-column label="科室" align="center" prop="department" min-width="200">
+                <el-table-column label="科室" align="center" min-width="200">
                   <template slot-scope="scope">
                     <el-select v-model.trim="monthSaleGoalDetailsList[scope.$index].department" placeholder="请选择科室" filterable>
                       <el-option v-for="dict in dict.type.mk_bo_section" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
@@ -846,7 +846,8 @@
           num: null,
           monthly: new Date().getFullYear().toString() + '-' + (new Date().getMonth() + 1).toString().padStart(2,
             '0'),
-          goalValue: 0
+          goalValue: 0,
+          profitTargetValue: 0
         }
         this.monthSaleGoalDetailsList.push(list)
         this.computeTotal()
@@ -1012,7 +1013,8 @@
           department: row.department,
           num: row.num,
           monthly: row.monthly,
-          goalValue: row.goalValue
+          goalValue: row.goalValue,
+          profitTargetValue: row.profitTargetValue
         }
         this.monthSaleGoalDetailsList.push(list)
         this.computeTotal()
@@ -1319,7 +1321,9 @@
         })
       },
       calculate(row) {
-        row.goalValue = row.num * row.price;
+        if (!(row.price == 0 || row.price == null || row.price == undefined)) {
+          row.goalValue = row.num * row.price;
+        }
       },
       judge() {
         this.isDept = false;

+ 31 - 5
src/views/monitor/job/index.vue

@@ -300,11 +300,15 @@
           </el-col>
           <el-col :span="12">
             <el-form-item label="任务大类" prop="jobType">
-              <el-select v-model="form.jobType" placeholder="请选择任务大类">
+              <el-select
+                v-model="form.jobType"
+                placeholder="请选择任务大类"
+                @change="jobTypeChange"
+              >
                 <el-option
                   v-for="dict in dict.type.sys_oa"
                   :key="dict.value"
-                  :label="dict.label"
+                  :label="dict.value"
                   :value="dict.value"
                 ></el-option>
               </el-select>
@@ -314,9 +318,11 @@
             <el-form-item label="任务小类" prop="jobTypeS">
               <el-select v-model="form.jobTypeS" placeholder="请选择任务小类">
                 <el-option
-                  v-for="dict in dict.type.sys_oa_s"
+                  v-for="dict in dict.type.sys_oa_s.filter(
+                    ({ label }) => label === taskClassLabel
+                  )"
                   :key="dict.value"
-                  :label="dict.label"
+                  :label="dict.value"
                   :value="dict.value"
                 ></el-option>
               </el-select>
@@ -516,6 +522,7 @@ export default {
   ],
   data() {
     return {
+      taskClassLabel: "",
       pickerOptions: {
         shortcuts: [
           {
@@ -585,7 +592,10 @@ export default {
         duration: undefined,
       },
       // 表单参数
-      form: {},
+      form: {
+        jobType: "",
+        jobTypeS: "",
+      },
       // 表单校验
       rules: {
         duration: [{ required: true, message: "不能为空", trigger: "blur" }],
@@ -822,6 +832,22 @@ export default {
         `job_${new Date().getTime()}.xlsx`
       );
     },
+    // 任务大类
+    jobTypeChange(val) {
+      let {
+        dict,
+        form: { jobTypeS },
+      } = this;
+      this.taskClassLabel = dict.type.sys_oa.find(
+        ({ label, value }) => value === val
+      ).label;
+      jobTypeS && jobTypeS !== "" && (this.form.jobTypeS = "");
+    },
   },
 };
 </script>
+<style scoped>
+>>> .el-form-item__content {
+  line-height: 40px;
+}
+</style>