Procházet zdrojové kódy

孙一石 上架下架问题

sys5923812@126.com před 2 týdny
rodič
revize
83cd8f1438

+ 9 - 1
src/api/data/goodsPayment.js

@@ -252,4 +252,12 @@ export function queryTBusShop() {
 		url: '/system/Bushop/queryTBusShop',
 		method: 'get',
 	})
-}
+}
+
+export function handleStatisticsTotal(data) {
+  return request({
+    url: '/system/goodsPayment/handleStatisticsTotal',
+    params: data,
+    method: 'post'
+  })
+}

+ 7 - 0
src/api/data/partnerlist.js

@@ -50,6 +50,13 @@ export function notice(data) {
     data: data
   })
 }
+export function noticeNumber() {
+  return request({
+    url: '/system/goodsNotice/noticeNumber',
+    method: 'post',
+  })
+}
+
 // 下架调用接口
 export function noticedown(data) {
   return request({

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 3802 - 3742
src/views/data/money/index.vue


+ 128 - 156
src/views/data/partner/index.vue

@@ -29,7 +29,7 @@
       <el-form-item label="合作方" prop="gamePlatformMapping">
         <el-select v-model="queryParams.partnerName" placeholder="请选择合作方" filterable clearable>
           <el-option v-for="dict in dict.type.notice_partner" :key="dict.value" :label="dict.label"
-                     :value="dict.value"/>
+                     :value="dict.value" />
         </el-select>
       </el-form-item>
       <!-- <el-form-item label="店铺名称" prop="shopId">
@@ -64,24 +64,24 @@
       </el-form-item>
       <el-form-item label="商品名称" prop="goodsName">
         <el-input v-model="queryParams.goodsName" style="width: 200px;" placeholder="请输入商品名称" clearable
-                  @keyup.enter.native="handleQuery"/>
+                  @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="商品编号" prop="goodsId">
         <el-input v-model="queryParams.goodsId" style="width: 200px;" placeholder="请输入商品编号" clearable
-                  @keyup.enter.native="handleQuery"/>
+                  @keyup.enter.native="handleQuery" />
       </el-form-item>
       <el-form-item label="游戏账号" prop="gameAccount">
         <el-input v-model="queryParams.gameAccount" style="width: 200px;" placeholder="请输入游戏账号" clearable
-                  @keyup.enter.native="handleQuery"/>
+                  @keyup.enter.native="handleQuery" />
       </el-form-item>
 
 
+
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery2">搜索</el-button>
 
         <el-button style="margin-left: 20px;" icon="el-icon-refresh" size="mini"
-                   @click="resetQuery">重置
-        </el-button>
+                   @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
@@ -94,19 +94,18 @@
       </el-select>
       <span v-if="ceshi">
 				<text>通知上架</text>
-				<!--<el-radio v-model="radio" label="500">500</el-radio>-->
-				<!--<el-radio v-model="radio" label="1000">1000</el-radio>-->
-				<!--<el-radio v-model="radio" label="2000">2000</el-radio>-->
-				<!--<el-radio v-model="radio" label="3000">3000</el-radio>-->
-				<!--<el-radio v-model="radio" label="5000">5000</el-radio>-->
+				<el-radio v-model="radio" label="500">500</el-radio>
+				<el-radio v-model="radio" label="1000">1000</el-radio>
+				<el-radio v-model="radio" label="2000">2000</el-radio>
+				<el-radio v-model="radio" label="3000">3000</el-radio>
+				<el-radio v-model="radio" label="5000">5000</el-radio>
 				<el-button @click="startUp()">开始</el-button>
 			</span>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table :data="tableData" :row-class-name="tableRowClassName" border style="width: 100%"
-              @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center"/>
+    <el-table :data="tableData" :row-class-name="tableRowClassName" border style="width: 100%">
+
       <el-table-column prop="gameName" label="游戏名称">
       </el-table-column>
       <el-table-column prop="goodsId" label="商品编号">
@@ -123,7 +122,7 @@
       </el-table-column>
       <el-table-column label="合作方" align="center" prop="partnerName">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.notice_partner" :value="scope.row.partnerName"/>
+          <dict-tag :options="dict.type.notice_partner" :value="scope.row.partnerName" />
         </template>
       </el-table-column>
       <el-table-column prop="publishStatus" label="上架状态">
@@ -170,17 +169,17 @@
 
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
         <template slot-scope="scope">
-          <el-button type="success" size="small" @click="handleSave([scope.row.id])">上架
+          <el-button type="success" size="small" @click="handleSave(scope.row)">上架
           </el-button>
-          <el-button type="primary" size="small" @click="handleUpdata([scope.row.id])">更新
+          <el-button type="primary" size="small" @click="handleUpdata(scope.row)">更新
           </el-button>
-          <el-button type="danger" size="small" @click="handleDelete([scope.row.id])">下架
+          <el-button type="danger" size="small" @click="handleDelete(scope.row)">下架
           </el-button>
         </template>
       </el-table-column>
     </el-table>
     <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
-                @pagination="getList"/>
+                @pagination="getList" />
     <!-- 修改状态信息 -->
     <el-dialog v-if="open" :title="title" :visible.sync="open" append-to-body width="1000px">
       <div style="padding: 10px;overflow: auto">
@@ -198,32 +197,32 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="游戏账号" prop="accountId">
-                <el-input v-model="form.accountId" placeholder="请输入游戏账号"/>
+                <el-input v-model="form.accountId" placeholder="请输入游戏账号" />
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="身份证号" prop="idNo">
-                <el-input v-model="form.idNo" placeholder="请输入身份证号"/>
+                <el-input v-model="form.idNo" placeholder="请输入身份证号" />
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="姓名" prop="name">
-                <el-input v-model="form.name" placeholder="请输入姓名"/>
+                <el-input v-model="form.name" placeholder="请输入姓名" />
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="手机号" prop="mobile">
-                <el-input v-model="form.mobile" placeholder="请输入手机号"/>
+                <el-input v-model="form.mobile" placeholder="请输入手机号" />
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="微信号" prop="wxNo">
-                <el-input v-model="form.wxNo" placeholder="请输入微信号"/>
+                <el-input v-model="form.wxNo" placeholder="请输入微信号" />
               </el-form-item>
             </el-col>
             <el-col :span="12">
               <el-form-item label="备注" prop="remark">
-                <el-input v-model="form.remark" placeholder="请输入备注"/>
+                <el-input v-model="form.remark" placeholder="请输入备注" />
               </el-form-item>
             </el-col>
 
@@ -245,13 +244,12 @@
     listpartner,
     updatepartnerlist,
     getInitGoodsManager,
-    notice
-  } from '@/api/data/partnerlist'
+    notice,
+  } from "@/api/data/partnerlist";
   import {
     queryTBusShop,
     getTBusShopInfo
-  } from '@/api/data/goodsPayment'
-
+  } from "@/api/data/goodsPayment";
   export default {
     dicts: ['notice_partner'],
 
@@ -261,8 +259,8 @@
         disabled: true,
         block: false,
         gameList: [],
-        dsqType: '',
-        optionsStaus: [{
+        dsqType:'',
+        optionsStaus:[{
           value: 'S',
           label: '上架'
         }, {
@@ -312,10 +310,10 @@
         // 总条数
         total: 0,
         // 弹出层标题
-        title: '',
+        title: "",
         // 显示搜索条件
         showSearch: true,
-        ceshi: false,
+        ceshi:false,
         // 是否显示弹出层
         open: false,
         // 查询参数
@@ -338,7 +336,7 @@
           updateStatus: null,
           goodsName: null,
           gameName: null,
-          partnerName: null
+          partnerName: null,
         },
         queryForm: {
           publishStatus: null,
@@ -346,7 +344,7 @@
           updateStatus: null,
           goodsName: null,
           gameName: null,
-          partnerName: null
+          partnerName: null,
         },
         // 表单校验
         rules: {
@@ -379,70 +377,49 @@
             required: true,
             message: '请输入游戏账号',
             trigger: 'change'
-          }]
+          }],
 
         },
         currentIndex: 0,
-        ids: [],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true
-      }
+      };
     },
     created() {
-      this.getList()
-      this.initGoodsManager()
+      this.getList();
+      this.initGoodsManager();
     },
     methods: {
-      handleSelectionChange(selection) {
-        this.ids = selection.map(item => item.id)
-        this.single = selection.length != 1
-        this.multiple = !selection.length
-      },
-
       startUp() {
-        // const currentRes = {
-        //   ids : this.ids
-        // }
-        if (this.dsqType == 'S') {
-          this.handleSave(this.ids)
-        } else if (this.dsqType == 'G') {
-          this.handleUpdata(this.ids)
-        } else if (this.dsqType == 'X') {
-          this.handleDelete(this.ids)
-        }
+        if (this.currentIndex < this.tableData.length) {
+          const currentRes = this.tableData[this.currentIndex];
+          if(this.dsqType=="S"){
+            this.handleSave(currentRes);
+          }else if(this.dsqType=="G"){
+            this.handleUpdata(currentRes);
+          }else if(this.dsqType=="X"){
+            this.handleDelete(currentRes);
+          }
 
-        // if (this.currentIndex < this.tableData.length) {
-        // 	const currentRes = this.tableData[this.currentIndex];
-        // 	if(this.dsqType=="S"){
-        // 		this.handleSave(currentRes);
-        // 	}else if(this.dsqType=="G"){
-        // 		this.handleUpdata(currentRes);
-        // 	}else if(this.dsqType=="X"){
-        // 		this.handleDelete(currentRes);
-        // 	}
-        // 	// 每次处理完一个元素后,更新索引并设置下一次处理的定时器
-        // 	this.currentIndex++;
-        // 	setTimeout(() => {
-        // 		this.startUp();
-        // 	}, Number(this.radio));
-        // } else {
-        // 	// 当数组所有元素都处理完后,重置索引,以便后续重新开始处理(如果需要)
-        // 	this.currentIndex = 0;
-        // 	this.startUp();
-        // }
+          // 每次处理完一个元素后,更新索引并设置下一次处理的定时器
+          this.currentIndex++;
+          setTimeout(() => {
+            this.startUp();
+          }, Number(this.radio));
+        } else {
+          // 当数组所有元素都处理完后,重置索引,以便后续重新开始处理(如果需要)
+          this.currentIndex = 0;
+          this.startUp();
+        }
       },
       tableRowClassName({
                           row,
                           rowIndex
                         }) {
         if (rowIndex === 1 || Number.isInteger((rowIndex - 1) / 4)) {
-          return 'warning-row'
+          return 'warning-row';
         } else if (rowIndex === 3 || Number.isInteger((rowIndex - 3) / 4)) {
-          return 'success-row'
+          return 'success-row';
         }
-        return ''
+        return '';
       },
       // 游戏类型
       initGoodsManager() {
@@ -456,64 +433,64 @@
         getInitGoodsManager().then(res => {
           this.pictureServerPath = res.pictureServerPath
           this.gameList = res.gameList
-        })
+        });
         queryTBusShop().then(response => {
           response.data.forEach((item) => {
             this.deptOptions.push({
               label: item.name,
-              value: item.id
-            })
-          })
-        })
-        return this.deptOptions
+              value: item.id,
+            });
+          });
+        });
+        return this.deptOptions;
       },
 
       /** 查询黑号信息列表 */
       getList() {
-        this.loading = true
+        this.loading = true;
         listpartner(this.queryParams).then(response => {
           // console.log(response)
-          this.tableData = response.rows
+          this.tableData = response.rows;
           this.total = response.total
-          this.loading = false
-        })
+          this.loading = false;
+        });
       },
       //搜索按钮使用
       getList1() {
-        this.loading = true
+        this.loading = true;
         listpartner(this.queryParams).then(response => {
           // console.log(response)
-          this.disabled = false
-          this.block = true
-          this.tableData = response.rows
+          this.disabled = false;
+          this.block = true;
+          this.tableData = response.rows;
           this.total = response.total
-          this.loading = false
-        })
+          this.loading = false;
+        });
       },
 
       /** 搜索按钮操作 */
       handleQuery() {
-        this.disabled = true
-        this.block = false
-        this.queryParams.pageNum = 1
-        this.getList()
+        this.disabled = true;
+        this.block = false;
+        this.queryParams.pageNum = 1;
+        this.getList();
       },
       handleQuery1() {
-        this.queryParams.pageNum = 1
-        this.getList()
+        this.queryParams.pageNum = 1;
+        this.getList();
       },
       handleQuery2() {
-        this.disabled = true
-        this.block = false
-        this.queryParams.pageNum = 1
-        this.getList1()
+        this.disabled = true;
+        this.block = false;
+        this.queryParams.pageNum = 1;
+        this.getList1();
       },
       /** 重置按钮操作 */
       resetQuery() {
-        this.block = false
-        this.disabled = true
-        this.resetForm('queryForm')
-        this.handleQuery1()
+        this.block = false;
+        this.disabled = true;
+        this.resetForm("queryForm");
+        this.handleQuery1();
       },
       // 多选框选中数据
       handleSelectionChange(selection) {
@@ -522,89 +499,85 @@
         this.single = selection.length !== 1
         this.multiple = !selection.length
       },
-
-
-
-      handleSave(ids) {
+      handleSave(e) {
         let query = {
-          // id: e.id,
-          noticeType: 'S',
-          ids : ids
-        }
+          id: e.id,
+          noticeType: "S"
+        };
         notice(query).then(res => {
           if (res.code == 200) {
-            this.$modal.msgSuccess('已通知上架')
-            this.getList()
+            this.$modal.msgSuccess("已通知上架");
+            this.getList();
           } else {
             alert(res.msg)
           }
         })
       },
-      handleUpdata(ids) {
+      handleUpdata(e) {
         let query = {
-          // id: e.id,
-          noticeType: 'U',
-          ids : ids
-        }
+          id: e.id,
+          noticeType: "U"
+        };
         notice(query).then(res => {
           if (res.code == 200) {
-            this.$modal.msgSuccess('已通知更新')
-            this.getList()
+            this.$modal.msgSuccess("已通知更新");
+            this.getList();
           } else {
             alert(res.msg)
           }
         })
       },
-      handleDelete(ids) {
+      handleDelete(e) {
         let query = {
-          // id: e.id,
-          noticeType: 'D',
-          ids : ids
-        }
+          id: e.id,
+          noticeType: "D"
+        };
         notice(query).then(res => {
           if (res.code == 200) {
-            this.$modal.msgSuccess('已通知下架')
-            this.getList()
+            this.$modal.msgSuccess("已通知下架");
+            this.getList();
           } else {
             alert(res.msg)
           }
         })
       },
 
+
       /** 修改按钮操作 */
       handleUpdate(row) {
-        this.open = true
-        this.reset()
+        this.open = true;
+        this.reset();
         const id = row.id || this.ids
         getpartnerlist(id).then(response => {
-          this.form = response.data
-          this.open = true
-          this.title = '修改黑号信息'
-        })
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改黑号信息";
+        });
       },
       /** 提交按钮 */
       submitForm() {
-        this.$refs['form'].validate(valid => {
+        this.$refs["form"].validate(valid => {
           if (valid) {
             if (this.form.id != null) {
               updatepartnerlist(this.form).then(response => {
-                this.$modal.msgSuccess('修改成功')
-                this.open = false
-                this.getList()
-              })
+                this.$modal.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
             } else {
               addpartnerlist(this.form).then(response => {
-                this.$modal.msgSuccess('新增成功')
-                this.open = false
-                this.getList()
-              })
+                this.$modal.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
             }
           }
-        })
-      }
+        });
+      },
+
 
     }
-  }
+  };
 </script>
 <style>
   .el-table .warning-row {
@@ -614,8 +587,7 @@
   .el-table .success-row {
     background: #f0f9eb;
   }
-
-  .start {
+  .start{
     margin: 20px 0;
   }
 </style>

+ 1 - 1
vue.config.js

@@ -5,7 +5,7 @@ function resolve(dir) {
 }
 const CompressionPlugin = require('compression-webpack-plugin')
 const name = process.env.VUE_APP_TITLE || '淘号玩管理系统' // 网页标题
-const port = process.env.port || process.env.npm_config_port || 80 // 端口
+const port = process.env.port || process.env.npm_config_port || 8090 // 端口
 
 // vue.config.js 配置说明
 //官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions