Jelajahi Sumber

Merge branch 'live' into edit

戴艳蓉 3 tahun lalu
induk
melakukan
77f5aff32c

+ 2 - 0
src/components/exam-form/index.js

@@ -0,0 +1,2 @@
+import Main from './main.vue'
+export default Main

+ 171 - 0
src/components/exam-form/main.vue

@@ -0,0 +1,171 @@
+<template>
+  <el-form
+    ref="ruleForm"
+    :model="ruleForm"
+    status-icon
+    :rules="rulesThis"
+    label-width="100px"
+    class="demo-ruleForm"
+  >
+    <el-row>
+      <el-col :span="12"
+        ><el-form-item label="审核状态" prop="state">
+          <el-select
+            v-model="ruleForm.state"
+            placeholder="请选择审核状态"
+            style="width: 100%"
+          >
+            <el-option
+              v-for="item in stateList"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="驳回节点" prop="status">
+          <el-select
+            v-model="ruleForm.status"
+            placeholder="请选择驳回节点"
+            style="width: 100%"
+          >
+            <template v-for="item in statusList">
+              <el-option
+                v-if="!item.hidden"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+              >
+              </el-option>
+            </template>
+          </el-select>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-form-item label="审核备注" prop="contactor" style="width: 100%">
+      <el-input
+        type="textarea"
+        placeholder="请输入审核备注"
+        v-model="ruleForm.remark"
+        maxlength="250"
+        :autosize="{ minRows: 2, maxRows: 4 }"
+        show-word-limit
+      />
+    </el-form-item>
+  </el-form>
+</template>
+
+<script>
+export default {
+  name: "exam-form",
+  // mixins: [resToken],
+  props: ["size", "statusList", "disabled"],
+  /**
+   * 属性集合
+   * @param {String}        size             : 组件大小            非必填
+   * @param {Array}         statusList       : 驳回至备选项         必填
+   * @param {Boolean}       disabled         : 是否禁用            必填
+   *
+   */
+  /**
+   * 事件集合
+   * @searchChange             : 选中值变化调用   抛出选中数据
+   */
+  data() {
+    return {
+      loading: false,
+      stateList: [
+        {
+          value: "1",
+          label: "通过",
+        },
+        {
+          value: "0",
+          label: "驳回",
+        },
+      ],
+      showModelThis: this.showModel,
+      ruleForm: {
+        state: "1", // 通过or驳回
+        rebut: "", //驳回至
+        remark: "",
+      },
+      rulesThis: this.rules,
+      rules: {
+        state: [
+          {
+            required: true,
+            message: "请选择审核状态",
+            trigger: "change",
+          },
+        ],
+        rebut: [
+          {
+            required: true,
+            message: "请选择驳回节点",
+            trigger: "change",
+          },
+        ],
+        remark: [
+          { required: true, message: "请输入仓库详细地址", trigger: "blur" },
+          {
+            min: 1,
+            max: 250,
+            message: "长度在 1 到 250 个字符",
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  watch: {
+    isDetail: function (val, old) {
+      if (this.isDetail !== val) {
+        this.options = [];
+        this.selectLoading = false;
+        this.getList();
+      }
+    },
+  },
+  created() {
+    this.options = [];
+    this.selectLoading = false;
+    this.getList();
+  },
+  methods: {
+    async selectChange(e) {
+      this.$emit("searchChange", e);
+    },
+    async getList() {
+      this.options = [];
+      const res = await asyncRequest.list({});
+      if (res && res.code === 0 && res.data) {
+        this.options = res.data;
+        this.recursion(this.options);
+      } else {
+        this.options = [];
+      }
+    },
+    recursion(list) {
+      list.map((v) => {
+        if (v && Array.isArray(v.child)) {
+          v.value = v.id + "";
+          v.label = v.name;
+          if (v.child.length === 0) {
+            delete v["child"];
+          } else {
+            this.recursion(v.child);
+          }
+        }
+        return v;
+      });
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 0 - 0
src/components/exam-form/审核表单


+ 3 - 3
src/components/period-date-picker/main.vue

@@ -7,7 +7,7 @@
       type="date"
       :size="size"
       :style="{ width: width }"
-      placeholder="开始日期"
+      :placeholder="placeholder||'' + '开始日期'"
       value-format="yyyy-MM-dd"
       :picker-options="pickerOptions1"
       :editable="false"
@@ -23,7 +23,7 @@
       class="date-picker"
       :style="{ width: width }"
       type="date"
-      placeholder="结束日期"
+      :placeholder="placeholder||'' + '结束日期'"
       :disabled="isEdit"
       :picker-options="pickerOptions2"
       :editable="false"
@@ -39,7 +39,7 @@
 // timeReturned 返回值{startTime: Number,endTime: Number}
 export default {
   name: "PeriodDatePicker",
-  props: ["start", "end", "disabled", "size", "width", "type"],
+  props: ["start", "end", "disabled", "size", "width", "type", "placeholder"],
   data() {
     return {
       startTime: this.start,

+ 13 - 6
src/views/interest/account/index.vue

@@ -101,14 +101,21 @@
           </div>
         </template>
 
-        <template #depart="{ scope }">
+        <template #depart_info="{ scope }">
           <el-tag
             style="margin: 0 3px 0 0"
             :size="tablebtnSize"
             type="''"
-            v-for="(ditem, dindex) in scope.row.depart"
-            :key="ditem.name + dindex"
-            >{{ ditem.name }}</el-tag
+            v-for="(ditem, dindex) in scope.row.depart_info"
+            :key="ditem + dindex"
+          >
+            <span
+              v-for="(cItem, cindex) in ditem"
+              :key="cItem + dindex + cindex"
+            >
+              <span v-show="cindex > 0">/</span><span>{{ cItem }}</span>
+            </span>
+            {{ ditem.name }}</el-tag
           >
         </template>
         <template #status="{ scope }">
@@ -291,9 +298,9 @@ export default {
           width: "110px",
         },
         {
-          prop: "depart",
+          prop: "depart_info",
           label: "所在部门",
-          _slot_: "depart",
+          _slot_: "depart_info",
           // width: "80px",
         },
         {