guarantee-lsq 2 years ago
parent
commit
79ed3ebce0

+ 9 - 6
src/views/preparation/preparation/Preparation.vue

@@ -28,7 +28,7 @@
       <div class="table-operator" style="margin-bottom: 8px;">
         <a-row>
           <a-col :md="16">
-            <a-button type="primary" icon="plus" @click="handleAdd()">新增</a-button>
+            <a-button type="primary" icon="plus" @click="handleAdd()">筹建工单</a-button>
             <a-button style="margin-left: 8px" v-if="$auth('preparation-preparations-export')" type="primary" icon="download" @click="doExport">导出</a-button>
             <a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('preparation-preparations-del')">
               <a-menu slot="overlay">
@@ -103,6 +103,7 @@ export default {
       advanced: false,
       visible: true,
       statusMap: {},
+      preparationMap: {},
       // 查询参数
       queryParam: {
         searchType: this.searchType
@@ -127,8 +128,11 @@ export default {
         {
           title: '公司',
           checked: true,
-          width: '150',
-          dataIndex: 'companyName'
+          width: '200',
+          dataIndex: 'parentPositionId',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Object.getField(this.preparationMap, text)
+          }
         },
         {
           title: '申请部门',
@@ -159,9 +163,7 @@ export default {
           checked: true,
           dataIndex: 'status',
           width: 150,
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.statusMap, text)
-          }
+          scopedSlots: { customRender: 'status' }
         },
         {
           title: '操作',
@@ -206,6 +208,7 @@ export default {
     // 下拉框map
     this.tableOption()
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_PREPARATION_STATUS)
+    this.preparationMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PREPARATION_PARENT)
   },
   methods: {
     tableOption () {

+ 4 - 2
src/views/preparation/preparation/modules/Detail.vue

@@ -10,7 +10,7 @@
     <a-descriptions :column="3" bordered>
       <a-descriptions-item label="单据号">{{ model.no }}</a-descriptions-item>
       <a-descriptions-item label="申请人">{{ model.createdUserName }}</a-descriptions-item>
-      <a-descriptions-item label="公司">{{ model.companyName }}</a-descriptions-item>
+      <a-descriptions-item label="公司">{{ BaseTool.Object.getField(preparationMap,model.parentPositionId) }}</a-descriptions-item>
       <a-descriptions-item label="申请部门">{{ model.deptName }}</a-descriptions-item>
       <a-descriptions-item label="建筑物">{{ model.positionName }}</a-descriptions-item>
       <a-descriptions-item label="报修时间">{{ model.applyTime }}</a-descriptions-item>
@@ -74,11 +74,12 @@ export default {
       modalTitle: null,
       visible: false,
       statusMap: {},
+      preparationMap: {},
       // 下拉框map
       model: {
         'id': null,
         'positionName': null,
-        'companyName': null,
+        'parentPositionId': null,
         'deptName': null,
         'applyTime': null,
         'content': null,
@@ -104,6 +105,7 @@ export default {
   created () {
     // 下拉框map
     this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REPAIR_PREPARATION_STATUS)
+    this.preparationMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.PREPARATION_PARENT)
   },
   methods: {
     base (record) {