xuefy 3 роки тому
батько
коміт
74ae7e6ad9
1 змінених файлів з 18 додано та 9 видалено
  1. 18 9
      front-vue/src/views/service/invoice/invoice.vue

+ 18 - 9
front-vue/src/views/service/invoice/invoice.vue

@@ -54,14 +54,14 @@
             </el-date-picker>
         </el-form-item>
         <el-form-item label="发票类型" prop="ziiType">
-            <el-input
-            v-model.trim="queryParams.ziiType"
-            placeholder="请输入发票类型"
-            clearable
-            size="small"
-            maxlength="25"
-            @keyup.enter.native="handleQuery"
-            />
+          <el-select v-model="queryParams.ziiType" placeholder="请选择发票类型" clearable size="small">
+              <el-option
+                v-for="dict in typeOptions"
+                :key="dict.dictValue"
+                :label="dict.dictLabel"
+                :value="dict.dictValue"
+              />
+            </el-select>
         </el-form-item>
         <el-form-item label="购方" prop="ziiPurchaserName">
             <el-input
@@ -99,7 +99,7 @@
       <el-table-column label="开票日期" align="center" prop="ziiDate" :show-overflow-tooltip="true" v-if="uncheckList.ziiDate"/>
       <el-table-column label="开票金额" align="center" :formatter="moneyFormat" prop="ziiAmount" :show-overflow-tooltip="true" v-if="uncheckList.ziiAmount"/>
       <el-table-column label="合计金额" align="center" :formatter="moneyFormat" prop="ziiTotalAmount" :show-overflow-tooltip="true" v-if="uncheckList.ziiTotalAmount"/>
-      <el-table-column label="发票类型" align="center" prop="ziiType" :show-overflow-tooltip="true" v-if="uncheckList.ziiType"/>
+      <el-table-column label="发票类型" :formatter="typeFormat" align="center" prop="ziiType" :show-overflow-tooltip="true" v-if="uncheckList.ziiType"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width='300' fixed="right" >
         <template slot-scope="scope">
           <el-button
@@ -217,6 +217,8 @@ export default {
       // 表单参数
       form: {
       },
+      //发票类型
+      typeOptions: [],
       //筛选按钮的数据列表,与table表头的数据一致 --显示隐藏列用
       tableList: [
             {
@@ -263,6 +265,9 @@ export default {
     };
   },
   created() {
+    this.getDicts("zc_invoice_type").then(response => {
+      this.typeOptions = response.data;
+    });
     this.getList();
   },
   activated () {
@@ -304,6 +309,10 @@ export default {
         this.loading = false;
       });
     },
+    //格式化类型
+    typeFormat(row, column) {
+      return this.selectDictLabel(this.typeOptions, row.ziiType);
+    },
     // 取消按钮
     cancel() {
       this.open = false;