Przeglądaj źródła

积分管理,看板,列表,兑换记录

chenchhuanbao 1 miesiąc temu
rodzic
commit
0404a866cb

+ 87 - 18
src/views/jfsc/components/centerDrawer.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="myDialog">
     <el-dialog
-      title="积分兑换记录"
+      :title="menuTitle[isIndex]"
       :visible.sync="isShow"
       width="70%"
       :before-close="handleClose">
@@ -19,8 +19,8 @@
               </div>
             </div>
 
-          <el-table
-            :data="tableData"
+          <el-table v-if="isIndex==1"
+            :data="dhData"
             style="width: 100%;margin-top: 24px">
             <el-table-column
              type="index"
@@ -42,8 +42,10 @@
               width="180">
             </el-table-column>
             <el-table-column
-              prop="address"
               label="订单状态">
+              <template slot-scope="scope">
+               <span class="dot" :class="'dot'+scope.row.status" v-html="getStatus(scope.row.status)"></span>
+              </template>
             </el-table-column>
             <el-table-column
               prop="name"
@@ -58,8 +60,39 @@
               label="发放人">
             </el-table-column>
           </el-table>
+
+
+
+
+          <el-table v-else
+                :data="tableData"
+                style="width: 100%;margin-top: 24px">
+            <el-table-column
+              type="index"
+              label="#"
+              width="180">
+            </el-table-column>
+            <el-table-column
+              prop="name"
+              label="宣传标题"
+              width="180">
+            </el-table-column>
+            <el-table-column
+              prop="address"
+              label="发布单位">
+            </el-table-column>
+            <el-table-column
+              prop="name"
+              label="发布时间"
+              width="180">
+            </el-table-column>
+            <el-table-column
+              prop="address"
+              label="浏览积分">
+            </el-table-column>
+          </el-table>
         </div>
-      <div style="text-align: right"><el-button class="mybutton" type="primary" @click="isShow = false">确 定</el-button></div>
+      <div style="text-align: right"><el-button class="mybutton" type="primary" @click="handleClose">确 定</el-button></div>
     </el-dialog>
 
   </div>
@@ -68,30 +101,40 @@
 <script>
 export default {
   name: "centerDrawer",
-  props:['isShow'],
+  props:['isShow','isIndex'],
   data(){
     return{
+      menuTitle:['积分获取记录','积分兑换记录'],
       dialogVisible: false,
-      tableData: [{
+      dhData: [{
         date: '2016-05-02',
         name: '王小虎',
-        address: '上海市普陀区金沙江路 1518 弄'
-      }, {
-        date: '2016-05-04',
-        name: '王小虎',
-        address: '上海市普陀区金沙江路 1517 弄'
-      }, {
-        date: '2016-05-01',
+        address: '上海市普陀区金沙江路 1518 弄',
+        status:0
+      },{
+        date: '2016-05-02',
         name: '王小虎',
-        address: '上海市普陀区金沙江路 1519 弄'
-      }, {
-        date: '2016-05-03',
+        address: '上海市普陀区金沙江路 1518 弄',
+        status:1
+      }],
+      tableData: [{
+        date: '2016-05-02',
         name: '王小虎',
-        address: '上海市普陀区金沙江路 1516 弄'
+        address: '上海市普陀区金沙江路 1518 弄'
       }]
     }
   },
   methods:{
+    getStatus(st){
+      switch (st) {
+        case 0:
+          return  `<span>已领取</span>`;
+          break
+        case 1:
+          return  `<span>待领取</span>`;
+          break
+      }
+    },
     handleClose(){
       this.$emit('closeDialog')
     }
@@ -100,6 +143,32 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.dot{
+  display: inline-block;
+  padding-left: 12px;
+  position: relative;
+  &:before{
+    position: absolute;
+    content: '';
+    width: 5px;
+    height: 5px;
+    border-radius:50%;
+    left: 0px;
+    top: 10px;
+  }
+}
+.dot0{
+  color: #909399;
+  &:before{
+    background: #909399;
+  }
+}
+.dot1{
+  color: #ED7B2F;
+  &:before{
+    background: #ED7B2F;
+  }
+}
 .myDialog{
   .mybutton{
     width: 88px;

+ 26 - 16
src/views/jfsc/dhgl.vue

@@ -1,20 +1,23 @@
 <template>
+  <div class="route_body">
     <div class="content_body">
-        <dhglSearch ref="dhglSearch" @search="search" @research="research"></dhglSearch>
-        <TableDom ref="TableDom" :page="page" :option="option" :tableList="tableList" menuwidth="200"
-            @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange">
-            <template v-slot:menu="{ scope }">
-                <el-button @click="rowView(scope)" type="text" size="mini">查看</el-button>
-                <el-button v-if="scope.row.lqzt == '待领取'" @click="rowView(scope)" type="text" size="mini">发放</el-button>
-            </template>
-        </TableDom>
-        <LeftDrawer ref="leftDrawer" :drawerDatas="drawerDatas" :selectedIndex="selectedIndex"
-            :detailMaxPage="page.total" @prevPage="prevPage" @nextPage="nextPage" title="商品详情" type="edit">
-            <template slot-scope="scope">
-                <DhglDrawer :dataInfo="scope.scope"></DhglDrawer>
-            </template>
-        </LeftDrawer>
+      <dhglSearch ref="dhglSearch" @search="search" @research="research"></dhglSearch>
+      <TableDom ref="TableDom" :page="page" :option="option" :tableList="tableList" menuwidth="200"
+                @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange">
+        <template v-slot:menu="{ scope }">
+          <el-button @click="rowView(scope)" type="text" size="mini">查看</el-button>
+          <el-button v-if="scope.row.lqzt == '待领取'" @click="rowView(scope)" type="text" size="mini">发放</el-button>
+        </template>
+      </TableDom>
+      <LeftDrawer ref="leftDrawer" :drawerDatas="drawerDatas" :selectedIndex="selectedIndex"
+                  :detailMaxPage="page.total" @prevPage="prevPage" @nextPage="nextPage" title="商品详情" type="edit">
+        <template slot-scope="scope">
+          <DhglDrawer :dataInfo="scope.scope"></DhglDrawer>
+        </template>
+      </LeftDrawer>
     </div>
+  </div>
+
 </template>
 <script>
 import TableDom from '@/components/table-dom/index.vue'
@@ -50,9 +53,16 @@ export default {
             ],
         }
     },
-    methods: {}
+    methods: {
+      search(){
+
+      },
+      research(){
+
+      }
+    }
 }
 </script>
 <style lang="scss" scoped>
 @use '@/styles/public/table-style.scss';
-</style>
+</style>

+ 6 - 4
src/views/jfsc/jfgl.vue

@@ -12,14 +12,14 @@
         <TableDom ref="TableDom" :page="page" :option="option" :tableList="tableList" menuwidth="200"
                   @handleSizeChange="handleSizeChange" @handleCurrentChange="handleCurrentChange">
           <template v-slot:menu="{ scope }">
-            <el-button @click="rowView(scope)" type="text" size="mini">获取记录</el-button>
-            <el-button @click="rowView(scope)" type="text" size="mini">兑换记录</el-button>
+            <el-button @click="rowView(scope,0)" type="text" size="mini">获取记录</el-button>
+            <el-button @click="rowView(scope,1)" type="text" size="mini">兑换记录</el-button>
           </template>
         </TableDom>
       </div>
     </div>
 
-    <centerDrawer ref="centerDrawer" :is-show="dialogVisible" @closeDialog="dialogVisible=false"></centerDrawer>
+    <centerDrawer ref="centerDrawer" :isIndex="showIndex" :is-show="dialogVisible" @closeDialog="dialogVisible=false"></centerDrawer>
 
   </div>
 
@@ -34,6 +34,7 @@ export default {
   components: { TableDom, jfglSearch,Kanban,centerDrawer},
   data(){
     return{
+      showIndex:0,
       dialogVisible:false,
       tableList: [
         {
@@ -61,7 +62,8 @@ export default {
     }
   },
   methods:{
-    rowView(){
+    rowView(row,index){
+      this.showIndex = index
       this.dialogVisible = true
     }
   }

+ 1 - 1
src/views/xxgk/XxgkSearch.vue

@@ -54,4 +54,4 @@ export default {
 </script>
 <style lang="scss" scoped>
 @use '@/styles/searchgroup.scss';
-</style>
+</style>