瀏覽代碼

供应商api 产品列表

hebinlong 4 年之前
父節點
當前提交
7904b5d35f
共有 3 個文件被更改,包括 132 次插入1 次删除
  1. 1 1
      src/api/channel.js
  2. 11 0
      src/api/product.js
  3. 120 0
      src/views/product/index.vue

+ 1 - 1
src/api/channel.js

@@ -5,7 +5,7 @@ export default {
     return request({
       url: '/supplier/list',
       method: 'POST',
-      data: operator
+      params: operator
     })
   }
 

+ 11 - 0
src/api/product.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+
+export default {
+  Search(operator) {
+    return request({
+      url: '/sys/product/info',
+      method: 'GET',
+      params: operator
+    })
+  }
+}

+ 120 - 0
src/views/product/index.vue

@@ -0,0 +1,120 @@
+<template>
+  <div>
+    <!-- <el-button type="primary" round @click="Search()">DEBUG重请求</el-button> -->
+    <el-table v-loading="loading" :data="tableData" border style="width: 100%">
+      <el-table-column type="selection" />
+
+      <el-table-column label="产品ID" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.productId }}</span>
+        </template>
+      </el-table-column>
+
+      <!-- <el-table-column label="流量包ID" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.packageId }}</span>
+            </template>
+        </el-table-column> -->
+
+      <!-- <el-table-column label="产品代码" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.productCode }}</span>
+            </template>
+        </el-table-column> -->
+
+      <el-table-column label="产品名称" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.productName }}</span>
+        </template>
+      </el-table-column>
+
+      <!-- <el-table-column label="产品类别" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span v-if="scope.row.productType==1">话费</span>
+                <span v-if="scope.row.productType==2">流量</span>
+            </template>
+        </el-table-column> -->
+
+      <el-table-column label="面额" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.productPrice }}</span>
+        </template>
+      </el-table-column>
+
+      <!-- <el-table-column label="产品归属" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.productBelongTo }}</span>
+            </template>
+        </el-table-column> -->
+
+      <!-- <el-table-column label="产品描述" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.productDesc }}</span>
+            </template>
+        </el-table-column> -->
+
+      <!-- <el-table-column label="创建者" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.creator }}</span>
+            </template>
+        </el-table-column> -->
+
+      <!-- <el-table-column label="创建时间" width="160" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.createTime }}</span>
+            </template>
+        </el-table-column> -->
+
+      <!-- <el-table-column label="更新者" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.updator }}</span>
+            </template>
+        </el-table-column> -->
+
+      <!-- <el-table-column label="更新时间" width="100" align="center" show-overflow-tooltip>
+            <template slot-scope="scope">
+                <span>{{ scope.row.updateTime }}</span>
+            </template>
+        </el-table-column> -->
+
+      <el-table-column label="运营商" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <!-- 运营商  1 : 移动  2 : 电信  3 : 联通 -->
+          <span v-if="scope.row.Isp==1">移动</span>
+          <span v-if="scope.row.Isp==2">电信</span>
+          <span v-if="scope.row.Isp==3">联通</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="适用区域" width="100" align="center" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <span>{{ scope.row.ZONE }}</span>
+        </template>
+      </el-table-column>
+
+    </el-table>
+  </div>
+</template>
+
+<script>
+
+import api from '@/api/product'
+export default {
+  data() {
+    return {
+      tableData: []
+    }
+  },
+  methods: {
+    Search(operator) {
+      api.Search(operator).then((resp) => {
+        this.tableData = resp.data.data
+      })
+    }
+  }
+}
+</script>
+
+<style>
+
+</style>