gcz před 4 roky
rodič
revize
e9b61d63d2
3 změnil soubory, kde provedl 188 přidání a 0 odebrání
  1. 8 0
      src/api/intention.js
  2. 6 0
      src/router/index.js
  3. 174 0
      src/views/pms/intention/index.vue

+ 8 - 0
src/api/intention.js

@@ -0,0 +1,8 @@
+import request from '@/utils/request'
+export function fetchList(params) {
+  return request({
+    url:'/oms/pre/web/list',
+    method:'get',
+    params:params
+  })
+}

+ 6 - 0
src/router/index.js

@@ -136,6 +136,12 @@ export const asyncRouterMap = [
         component: () => import('@/views/pms/brand/index'),
         meta: {title: '品牌管理', icon: 'product-brand'}
       },
+      {
+        path: 'intention',
+        name: 'intention',
+        component: () => import('@/views/pms/intention/index'),
+        meta: {title: '意向管理', icon: 'product-brand'}
+      },
       {
         path: 'addBrand',
         name: 'addBrand',

+ 174 - 0
src/views/pms/intention/index.vue

@@ -0,0 +1,174 @@
+<template> 
+  <div class="app-container">
+    <el-card class="filter-container" shadow="never">
+      <div>
+        <i class="el-icon-search"></i>
+        <span>筛选搜索</span>
+        <el-button
+          style="float:right"
+          type="primary"
+          @click="handleSearchList()"
+          size="small">
+          查询搜索
+        </el-button>
+        <el-button
+          style="float:right;margin-right: 15px"
+          @click="handleResetSearch()"
+          size="small">
+          重置
+        </el-button>
+      </div>
+      <div style="margin-top: 15px">
+        <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
+          <el-form-item label="输入搜索:">
+            <el-input v-model="listQuery.productName" class="input-width" placeholder="产品名称" clearable></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+    </el-card>
+    <el-card class="operate-container" shadow="never">
+      <i class="el-icon-tickets"></i>
+      <span>数据列表</span>
+    </el-card>
+    <div class="table-container">
+      <el-table ref="roleTable"
+                :data="list"
+                style="width: 100%;"
+                v-loading="listLoading" border>
+
+        <el-table-column label="产品" show-overflow-tooltip align="center">
+          <template slot-scope="scope">{{scope.row.productName}}</template>
+        </el-table-column>
+        <el-table-column label="品牌" show-overflow-tooltip align="center">
+          <template slot-scope="scope">{{scope.row.productBrand}}</template>
+        </el-table-column>
+        <el-table-column label="公司名称" show-overflow-tooltip align="center">
+          <template slot-scope="scope">{{scope.row.compName}}</template>
+        </el-table-column>
+        <el-table-column label="有意向者" show-overflow-tooltip align="center">
+          <template slot-scope="scope">{{scope.row.memberNickname}}</template>
+        </el-table-column>
+        <el-table-column label="有意向时间" show-overflow-tooltip align="center">
+          <template slot-scope="scope">{{scope.row.createDate | formatDateTime}}</template>
+        </el-table-column>        
+        
+        <!-- <el-table-column label="操作" width="160" fixed="right" align="center">
+          <template slot-scope="scope">
+            <el-row>
+            <el-button size="mini" v-if="originupdate"
+                       type="text"
+                       @click="handleUpdateorigin(scope.$index, scope.row)">
+              编辑
+            </el-button>             
+            <el-button size="mini" v-if="intentiondelete"
+                       type="text"
+                       @click="handleDelete(scope.$index, scope.row)">删除
+            </el-button>
+            </el-row>
+          </template>
+        </el-table-column> -->
+      </el-table>
+    </div>
+    <div class="pagination-container">
+      <el-pagination
+        background
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        layout="total, sizes,prev, pager, next,jumper"
+        :current-page.sync="listQuery.pageNo"
+        :page-size="listQuery.pageSize"
+        :page-sizes="[5,10,15]"
+        :total="total">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+  import {fetchList} from '@/api/intention';
+  import {formatDate} from '@/utils/date';
+
+  const defaultListQuery = {
+    pageNo: 1,
+    pageSize: 10,
+    productName: null
+  };
+
+  export default {
+    name: 'roleList',
+    data() {
+      return {
+        listQuery: Object.assign({}, defaultListQuery),
+        list: null,
+        total: null,
+        listLoading: false,
+        dialogVisible: false,
+        isEdit: false
+      }
+    },
+    created() {
+      this.getList();
+    },
+    filters: {
+      formatDateTime(time) {
+        if (time == null || time === '') {
+          return 'N/A';
+        }
+        let date = new Date(time);
+        return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
+      }
+    },
+    methods: {
+      handleResetSearch() {
+        this.listQuery = Object.assign({}, defaultListQuery);
+      },
+      handleSearchList() {
+        this.listQuery.pageNo = 1;
+        this.getList();
+      },
+      handleSizeChange(val) {
+        this.listQuery.pageNo = 1;
+        this.listQuery.pageSize = val;
+        this.getList();
+      },
+      handleCurrentChange(val) {
+        this.listQuery.pageNo = val;
+        this.getList();
+      },
+
+      handleDelete(index, row) {
+        this.$confirm('是否要删除该关注?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let id = [];
+          id.push(row.id);
+          let params=new URLSearchParams();
+          params.append("id",id);
+          console.log('del-params',params);
+          deleteIntention(params).then(response => {
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+            this.getList();
+          });
+        });
+      },
+      getList() {
+        this.listLoading = true;
+        fetchList(this.listQuery).then(response => {
+          console.log('response',JSON.parse(JSON.stringify(response)));
+          this.listLoading = false;
+          this.list = response.data.list;
+          this.total = response.data.total;
+        }).catch(err => {
+          this.listLoading = false;
+        });
+      }
+    }
+  }
+</script>
+<style></style>
+
+