浏览代码

警告明细

wyh 1 年之前
父节点
当前提交
1d84c723eb

+ 8 - 1
src/views/module_kzks/costModelList/CostModelList.vue

@@ -152,6 +152,9 @@
 
     <cost-model-detail-modal ref="costModelListModal"></cost-model-detail-modal>
 
+    <!-- 警告 -->
+    <cost-model-jg-modal ref="costModelJgModal"></cost-model-jg-modal>
+
   </a-card>
 </template>
 
@@ -163,13 +166,15 @@
   import CostModelListModal from './modules/CostModelListModal'
   import { costModelInform, exportXlsCbmxItem } from '@/api/kzksApi.js'
 import CostModelDetailModal from './modulesDetail/CostModelDetailModal.vue'
+import CostModelJgModal from './modulesDetail/CostModelJgModal.vue'
 
   export default {
     name: 'CostModelListList',
     mixins:[JeecgListMixin, mixinDevice],
     components: {
       CostModelListModal,
-      CostModelDetailModal
+      CostModelDetailModal,
+        CostModelJgModal
     },
     data () {
       return {
@@ -463,6 +468,8 @@ import CostModelDetailModal from './modulesDetail/CostModelDetailModal.vue'
       // 警告
       handleJG(record){
         console.log(record)
+        this.$refs.costModelJgModal.id = record.id
+        this.$refs.costModelJgModal.show()
       }
     }
   }

+ 50 - 0
src/views/module_kzks/costModelList/modulesDetail/CostModelJgModal.vue

@@ -0,0 +1,50 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    cancelText="关闭"
+    @cancel="handleCancel">
+
+    <cost-model-msg-list :id="id"></cost-model-msg-list>
+
+    <template slot="footer">
+      <a-button @click="handleCancel">关闭</a-button>
+    </template>
+  </j-modal>
+</template>
+
+<script>
+import CostModelMsgList from '../../costModelMsg/CostModelMsgList.vue';
+
+  export default {
+    name: 'CostModelJgModal',
+    components: {
+        CostModelMsgList
+    },
+    data () {
+      return {
+        id: null,
+        title: '警告明细',
+        width: '60%',
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      show() {
+        this.visible = true
+        // this.$refs.wxf.getList(this.id, this.columnType)
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      },
+    }
+  }
+</script>

+ 50 - 19
src/views/module_kzks/costModelMsg/CostModelMsgList.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card :bordered="false">
     <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
+    <!-- <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
           <a-col :xl="6" :lg="7" :md="8" :sm="24">
@@ -33,32 +33,32 @@
           </a-col>
         </a-row>
       </a-form>
-    </div>
+    </div> -->
     <!-- 查询区域-END -->
 
     <!-- 操作按钮区域 -->
-    <div class="table-operator">
+    <!-- <div class="table-operator">
       <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
       <a-button type="primary" icon="download" @click="handleExportXls('成本模型导入提示信息')">导出</a-button>
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
+      </a-upload> -->
       <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
+      <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
       <a-dropdown v-if="selectedRowKeys.length > 0">
         <a-menu slot="overlay">
           <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
         </a-menu>
         <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
       </a-dropdown>
-    </div>
+    </div> -->
 
     <!-- table区域-begin -->
     <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
+      <!-- <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
         <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
         <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
+      </div> -->
 
       <a-table
         ref="table"
@@ -70,7 +70,6 @@
         :dataSource="dataSource"
         :pagination="ipagination"
         :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
         class="j-table-force-nowrap"
         @change="handleTableChange">
 
@@ -94,7 +93,7 @@
           </a-button>
         </template>
 
-        <span slot="action" slot-scope="text, record">
+        <!-- <span slot="action" slot-scope="text, record">
           <a @click="handleEdit(record)">编辑</a>
 
           <a-divider type="vertical" />
@@ -111,7 +110,7 @@
               </a-menu-item>
             </a-menu>
           </a-dropdown>
-        </span>
+        </span> -->
 
       </a-table>
     </div>
@@ -126,6 +125,7 @@
   import { mixinDevice } from '@/utils/mixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import CostModelMsgModal from './modules/CostModelMsgModal'
+  import { getAction } from '@/api/manage'
 
   export default {
     name: 'CostModelMsgList',
@@ -133,6 +133,7 @@
     components: {
       CostModelMsgModal
     },
+    props: ['id'],
     data () {
       return {
         description: '成本模型导入提示信息管理页面',
@@ -168,14 +169,14 @@
             align:"center",
             dataIndex: 'xiangmuMsg'
           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            fixed:"right",
-            width:147,
-            scopedSlots: { customRender: 'action' }
-          }
+          // {
+          //   title: '操作',
+          //   dataIndex: 'action',
+          //   align:"center",
+          //   fixed:"right",
+          //   width:147,
+          //   scopedSlots: { customRender: 'action' }
+          // }
         ],
         url: {
           list: "/costModelMsg/costModelMsg/list",
@@ -198,6 +199,36 @@
       },
     },
     methods: {
+      loadData(arg) {
+        this.queryParam.xiangmuId = this.id
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          if (res.success) {
+            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.records||res.result;
+            if(res.result.total)
+            {
+              this.ipagination.total = res.result.total;
+            }else{
+              this.ipagination.total = 0;
+            }
+            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          }else{
+            this.$message.warning(res.message)
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
       initDictConfig(){
       },
       getSuperFieldList(){