瀏覽代碼

代码修改

daiqisheng 3 年之前
父節點
當前提交
5a2fc3f137
共有 2 個文件被更改,包括 94 次插入5 次删除
  1. 82 3
      src/pages/main/performance/components/form.vue
  2. 12 2
      src/pages/main/performance/department.vue

+ 82 - 3
src/pages/main/performance/components/form.vue

@@ -2,12 +2,12 @@
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:03:02
  * @LastEditors: daiqisheng
- * @LastEditTime: 2022-04-19 13:59:04
+ * @LastEditTime: 2022-04-22 15:32:04
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\form.vue
 -->
 <template>
   <el-form :inline="true" :model="object">
-    <el-row :gutter="24" v-if="form.length < 4">
+    <!-- <el-row :gutter="24" v-if="form.length < 5">
       <el-col
         v-for="({ props, label, type, dictionary }, index) in form"
         :key="index"
@@ -73,7 +73,78 @@
           }}
         </el-button>
       </el-col>
-    </el-row>
+    </el-row> -->
+    <div v-if="form.length < 5" class="template-input">
+      <!-- 输入框 -->
+      <div class="template-input">
+        <div
+          class="flex-1 margin-right-10"
+          v-for="({ props, label, type, dictionary }, index) in form"
+          :key="index"
+          :span="6"
+        >
+          <el-form-item :label="label">
+            <template v-if="type === 'select'">
+              <el-select
+                v-model="object[props]"
+                :placeholder="label"
+                filterable
+                clearable
+              >
+                <el-option
+                  :label="label"
+                  :value="value"
+                  v-for="({ label, value }, index) in dictionary"
+                  :key="index"
+                ></el-option>
+              </el-select>
+            </template>
+            <template v-else-if="['datetime', 'date', 'month'].includes(type)">
+              <el-date-picker
+                v-model="object[props]"
+                :type="type"
+                :placeholder="label"
+              >
+              </el-date-picker>
+            </template>
+            <template v-else-if="type === 'dateRange'">
+              <el-date-picker
+                v-model="object[props]"
+                type="datetimerange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+              >
+              </el-date-picker>
+            </template>
+            <template v-else>
+              <el-input
+                v-model="object[props]"
+                :placeholder="label"
+                clearable
+              ></el-input>
+            </template>
+          </el-form-item>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="template-input">
+        <el-form-item>
+          <el-button type="primary" @click="handleSearch">搜索</el-button>
+        </el-form-item>
+      </div>
+      <p class="width-100 flex-justify-align-end margin-top-10">
+        <el-button
+          v-for="({ label, props, unlogo }, index) in handle"
+          :key="index"
+          @click="handleSubmit(props)"
+        >
+          <i v-if="!unlogo" class="el-icon-document-add font-weight-bold" />{{
+            label
+          }}
+        </el-button>
+      </p>
+    </div>
     <div v-else>
       <div class="template-content">
         <div class="template-left">
@@ -256,6 +327,9 @@ export default {
 };
 </script>
 <style lang="scss" scope>
+.width-100 {
+  width: 100%;
+}
 .template {
   &-head {
     display: flex;
@@ -264,6 +338,11 @@ export default {
     margin-left: 10px;
     margin-top: 10px;
   }
+  &-input {
+    display: flex;
+    flex-wrap: wrap;
+    margin-bottom: 10px;
+  }
   &-content {
     display: flex;
     justify-content: space-between;

+ 12 - 2
src/pages/main/performance/department.vue

@@ -445,7 +445,7 @@ export default {
           label: "状态",
           props: "status",
           type: "select",
-          // 0.待处理  1.待汇总 2.待审批  3.已完成
+          // 0.待处理  1.待汇总 2.待审批  3.已完成  4已提交 5未提交  6待二级副总审批    7待二级正总审批
           dictionary: [
             {
               label: "已撤回",
@@ -476,6 +476,14 @@ export default {
               label: "未提交",
               value: "5",
             },
+            {
+              label: "待二级副总审批",
+              value: "6",
+            },
+            {
+              label: "待二级正总审批",
+              value: "7",
+            },
           ],
         },
       ],
@@ -572,6 +580,8 @@ export default {
             3: "已完成",
             4: "已提交",
             5: "未提交",
+            6: "待二级副总审批",
+            7: "待二级正总审批",
           },
         },
         {
@@ -650,7 +660,7 @@ export default {
           ? this.$formatDate(data.issuedDate, "YYYY-MM-DD HH:mm:ss")
           : data.issuedDate,
       };
-      console.log(this.table_search,'daaad');
+      console.log(this.table_search, "daaad");
       this.page = 1;
       this.handleInit({
         ...this.table_search,