Bläddra i källkod

Merge branch 'master' of http://git.tjyourong.com.cn/ctop/adsp-vue

zhuxinbo 4 år sedan
förälder
incheckning
110d17adee

+ 31 - 45
src/views/modules/advertiser/ProjectTransferRecordList.vue

@@ -7,40 +7,33 @@
         <a-row :gutter="24">
 
           <a-col :md="6" :sm="8">
-            <a-form-item label="账户id">
-              <a-input placeholder="请输入账户id" v-model="queryParam.accountId"></a-input>
+            <a-form-item label="账户">
+              <!--<a-input placeholder="请输入账户id" v-model="queryParam.accountId"></a-input>-->
+              <j-dict-select-tag v-model="queryParam.accountId" placeholder="请选择用户名称" dictCode="ctop_user_allocation,auth_name,account_id,account_status = '0'"/>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="8">
-            <a-form-item label="源项目">
-              <a-input placeholder="请输入源项目" v-model="queryParam.soucreProject"></a-input>
+            <a-form-item label="状态">
+              <a-select default-value="0" v-model="queryParam.status">
+                <a-select-option value="0">
+                  全部
+                </a-select-option>
+                <a-select-option value="1">
+                  审核中
+                </a-select-option>
+                <a-select-option value="2">
+                  已通过
+                </a-select-option>
+                <a-select-option value="3">
+                  已驳回
+                </a-select-option>
+              </a-select>
             </a-form-item>
           </a-col>
-          <template v-if="toggleSearchStatus">
-            <a-col :md="6" :sm="8">
-              <a-form-item label="目标项目">
-                <a-input placeholder="请输入目标项目" v-model="queryParam.targetProject"></a-input>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="8">
-              <a-form-item label="转户操作人">
-                <a-input placeholder="请输入转户操作人" v-model="queryParam.userId"></a-input>
-              </a-form-item>
-            </a-col>
-            <a-col :md="6" :sm="8">
-              <a-form-item label="状态">
-                <a-input placeholder="请输入状态" v-model="queryParam.status"></a-input>
-              </a-form-item>
-            </a-col>
-          </template>
           <a-col :md="6" :sm="8" >
             <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
               <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
             </span>
           </a-col>
 
@@ -50,17 +43,7 @@
 
     <!-- 操作按钮区域 -->
     <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-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>
+      <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
     </div>
 
     <!-- table区域-begin -->
@@ -75,11 +58,11 @@
       :pagination="ipagination"
       :loading="loading"
       @change="handleTableChange">
-
-        <span slot="action" slot-scope="text, record" v-show="record.status!=1">
-          <a @click="handleEdit(record)">撤销</a>
+        <span slot="action" slot-scope="text, record">
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
         </span>
-
     </a-table>
     <!-- table区域-end -->
 
@@ -91,6 +74,7 @@
 <script>
   import ProjectTransferRecordModal from './modules/ProjectTransferRecordModal'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import {postAction} from "../../../api/manage";
 
   export default {
     name: "ProjectTransferRecordList",
@@ -146,11 +130,9 @@
           }
         ],
         url: {
-          list: "/ctop/projectTransferRecord/list",
+          list: "/ctop/projectTransferRecord/auditList",
           delete: "/ctop/projectTransferRecord/delete",
-          deleteBatch: "/ctop/projectTransferRecord/deleteBatch",
-          exportXlsUrl: "ctop/projectTransferRecord/exportXls",
-          importExcelUrl: "ctop/projectTransferRecord/importExcel",
+          deleteBatch: "/ctop/projectTransferRecord/deleteBatch"
         },
       }
     },
@@ -160,7 +142,11 @@
       }
     },
     methods: {
-
+      handleDele(record){
+        if(confirm("确认要删除此数据?")){
+          postAction()
+        }
+      }
     }
   }
 </script>

+ 155 - 0
src/views/modules/advertiser/ProjectTransferRecordInitiatedList.vue

@@ -0,0 +1,155 @@
+<template>
+  <a-card :bordered="false">
+
+    <!-- 查询区域 -->
+    <div class="table-page-search-wrapper">
+      <a-form layout="inline">
+        <a-row :gutter="24">
+
+          <a-col :md="6" :sm="8">
+            <a-form-item label="账户">
+              <!--<a-input placeholder="请输入账户id" v-model="queryParam.accountId"></a-input>-->
+              <j-dict-select-tag v-model="queryParam.accountId" placeholder="请选择用户名称" dictCode="ctop_user_allocation,auth_name,account_id,account_status = '0'"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8">
+            <a-form-item label="状态">
+              <a-select default-value="0" v-model="queryParam.status">
+                <a-select-option value="0">
+                  全部
+                </a-select-option>
+                <a-select-option value="1">
+                  审核中
+                </a-select-option>
+                <a-select-option value="2">
+                  已通过
+                </a-select-option>
+                <a-select-option value="3">
+                  已驳回
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="8" >
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+            </span>
+          </a-col>
+
+        </a-row>
+      </a-form>
+    </div>
+
+    <!-- 操作按钮区域 -->
+    <div class="table-operator">
+      <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
+    </div>
+
+    <!-- table区域-begin -->
+
+    <a-table
+      ref="table"
+      size="middle"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      @change="handleTableChange">
+        <span slot="action" slot-scope="text, record">
+          <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
+            <a>删除</a>
+          </a-popconfirm>
+        </span>
+    </a-table>
+    <!-- table区域-end -->
+
+    <!-- 表单区域 -->
+    <projectTransferRecord-modal ref="modalForm" @ok="modalFormOk"></projectTransferRecord-modal>
+  </a-card>
+</template>
+
+<script>
+  import ProjectTransferRecordModal from './modules/ProjectTransferRecordModal'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+  import {postAction} from "../../../api/manage";
+
+  export default {
+    name: "ProjectTransferRecordList",
+    mixins:[JeecgListMixin],
+    components: {
+      ProjectTransferRecordModal
+    },
+    data () {
+      return {
+        description: '账户转项目记录管理页面',
+        // 表头
+        columns: [
+          {
+            title: '账户id',
+            align:"center",
+            dataIndex: 'accountId'
+          },
+          {
+            title: '账户名称',
+            align:"center",
+            dataIndex: 'accountId_dictText'
+          },
+          {
+            title: '原项目',
+            align:"center",
+            dataIndex: 'soucreProject_dictText'
+          },
+          {
+            title: '目标项目',
+            align:"center",
+            dataIndex: 'targetProject_dictText'
+          },
+          {
+            title: '申请人',
+            align:"center",
+            dataIndex: 'userId_dictText'
+          },
+          {
+            title: '审核人',
+            align:"center",
+            dataIndex: 'reviewerId_dictText'
+          },
+          {
+            title: '审核状态',
+            align:"center",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title: '操作',
+            dataIndex: 'action',
+            align:"center",
+            scopedSlots: { customRender: 'action' },
+          }
+        ],
+        url: {
+          list: "/ctop/projectTransferRecord/initiatedList",
+          delete: "/ctop/projectTransferRecord/delete",
+          deleteBatch: "/ctop/projectTransferRecord/deleteBatch"
+        },
+      }
+    },
+    computed: {
+      importExcelUrl: function(){
+        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+      }
+    },
+    methods: {
+      handleDele(record){
+        if(confirm("确认要删除此数据?")){
+          postAction()
+        }
+      }
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less'
+</style>

+ 0 - 173
src/views/modules/advertiser/ProjectTransferRecordListbak.vue

@@ -1,173 +0,0 @@
-<template>
-  <a-card :bordered="false">
-
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline">
-        <a-row :gutter="24">
-
-          <a-col :md="6" :sm="8">
-            <a-form-item label="账户id">
-              <a-input placeholder="请输入账户id" v-model="queryParam.accountId"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="源项目">
-              <a-input placeholder="请输入源项目" v-model="queryParam.soucreProject"></a-input>
-            </a-form-item>
-          </a-col>
-        <template v-if="toggleSearchStatus">
-        <a-col :md="6" :sm="8">
-            <a-form-item label="目标项目">
-              <a-input placeholder="请输入目标项目" v-model="queryParam.targetProject"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="转户操作人">
-              <a-input placeholder="请输入转户操作人" v-model="queryParam.userId"></a-input>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="8">
-            <a-form-item label="状态">
-              <a-input placeholder="请输入状态" v-model="queryParam.status"></a-input>
-            </a-form-item>
-          </a-col>
-          </template>
-          <a-col :md="6" :sm="8" >
-            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
-              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
-              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
-              <a @click="handleToggleSearch" style="margin-left: 8px">
-                {{ toggleSearchStatus ? '收起' : '展开' }}
-                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
-              </a>
-            </span>
-          </a-col>
-
-        </a-row>
-      </a-form>
-    </div>
-
-    <!-- 操作按钮区域 -->
-    <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-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>
-
-    <!-- table区域-begin -->
-
-      <a-table
-        ref="table"
-        size="middle"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        @change="handleTableChange">
-
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-          <a-divider type="vertical" />
-          <a @click="handleEdit(record)">通过</a>
-          <a-divider type="vertical" />
-          <a @click="handleEdit(record)">驳回</a>
-        </span>
-
-      </a-table>
-    <!-- table区域-end -->
-
-    <!-- 表单区域 -->
-    <projectTransferRecord-modal ref="modalForm" @ok="modalFormOk"></projectTransferRecord-modal>
-  </a-card>
-</template>
-
-<script>
-  import ProjectTransferRecordModal from './modules/ProjectTransferRecordModal'
-  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-
-  export default {
-    name: "ProjectTransferRecordList",
-    mixins:[JeecgListMixin],
-    components: {
-      ProjectTransferRecordModal
-    },
-    data () {
-      return {
-        description: '账户转项目记录管理页面',
-        // 表头
-        columns: [
-		   {
-            title: '账户id',
-            align:"center",
-            dataIndex: 'accountId'
-           },
-          {
-            title: '账户名称',
-            align:"center",
-            dataIndex: 'accountId_dictText'
-          },
-		   {
-            title: '原项目',
-            align:"center",
-            dataIndex: 'soucreProject_dictText'
-           },
-		   {
-            title: '目标项目',
-            align:"center",
-            dataIndex: 'targetProject_dictText'
-           },
-		   {
-            title: '申请人',
-            align:"center",
-            dataIndex: 'userId_dictText'
-           },
-          {
-            title: '审核人',
-            align:"center",
-            dataIndex: 'reviewerId_dictText'
-          },
-          {
-            title: '审核状态',
-            align:"center",
-            dataIndex: 'status'
-           },
-          {
-            title: '操作',
-            dataIndex: 'action',
-            align:"center",
-            scopedSlots: { customRender: 'action' },
-          }
-        ],
-		url: {
-          list: "/ctop/projectTransferRecord/list",
-          delete: "/ctop/projectTransferRecord/delete",
-          deleteBatch: "/ctop/projectTransferRecord/deleteBatch",
-          exportXlsUrl: "ctop/projectTransferRecord/exportXls",
-          importExcelUrl: "ctop/projectTransferRecord/importExcel",
-       },
-    }
-  },
-  computed: {
-    importExcelUrl: function(){
-      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
-    }
-  },
-    methods: {
-
-    }
-  }
-</script>
-<style scoped>
-  @import '~@assets/less/common.less'
-</style>