This commit is contained in:
2024-08-30 17:00:51 +08:00
4 changed files with 86 additions and 72 deletions

View File

@@ -41,19 +41,11 @@
</el-form-item> </el-form-item>
<el-form-item label="订单号"> <el-form-item label="订单号">
<el-input <el-input v-model="query.orderNo" placeholder="请输入订单号" style="width: 300px;"></el-input>
v-model="query.orderNo"
placeholder="请输入订单号"
style="width: 300px;"
></el-input>
</el-form-item> </el-form-item>
<el-form-item label="商品名称"> <el-form-item label="商品名称">
<el-input <el-input v-model="query.productName" placeholder="请输入商品名称" style="width: 300px;"></el-input>
v-model="query.productName"
placeholder="请输入商品名称"
style="width: 300px;"
></el-input>
<el-button type="primary" @click="getTableData">查询</el-button> <el-button type="primary" @click="getTableData">查询</el-button>
<el-button @click="resetHandle">重置</el-button> <el-button @click="resetHandle">重置</el-button>
<el-button icon="el-icon-download" v-loading="downloadLoading" @click="downloadHandle"> <el-button icon="el-icon-download" v-loading="downloadLoading" @click="downloadHandle">
@@ -290,7 +282,7 @@ export default {
this.timeValue = ""; this.timeValue = "";
this.query = { ...this.resetQuery }; this.query = { ...this.resetQuery };
this.page = 0; this.page = 0;
this.getTableData(); this.getTableData(true);
}, },
// 分页大小改变 // 分页大小改变
sizeChange(e) { sizeChange(e) {
@@ -303,7 +295,7 @@ export default {
this.getTableData(); this.getTableData();
}, },
// 获取商品列表 // 获取商品列表
async getTableData() { async getTableData(switchs = false) {
this.tableData.loading = true; this.tableData.loading = true;
try { try {
this.payCount(); this.payCount();
@@ -314,7 +306,7 @@ export default {
orderType: this.orderType, orderType: this.orderType,
...this.query, ...this.query,
productName, productName,
userId:this.$route.query.userId userId: switchs == true ? '' : this.$route.query.userId
}); });
this.tableData.loading = false; this.tableData.loading = false;
this.tableData.data = res.content; this.tableData.data = res.content;
@@ -521,6 +513,7 @@ export default {
} }
} }
} }
.colorStyle { .colorStyle {
color: #ffc315; color: #ffc315;
} }

View File

@@ -1,31 +1,30 @@
<template> <template>
<div> <div>
<el-button type="primary" @click="resetting">添加</el-button> <!-- <el-button type="primary" @click="resetting">添加</el-button> -->
<el-table :data="tableData"> <el-table :data="tableData">
<el-table-column label="类型" prop="type"> <!-- <el-table-column label="类型" prop="type">
<template v-slot="row"> <template v-slot="row">
{{ row.row.type == 'text' ? '文本' : '图片' }} {{ row.row.type == 'text' ? '文本' : '图片' }}
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="描述" prop="name"> </el-table-column> <el-table-column label="描述" prop="name"> </el-table-column>
<el-table-column label="key" prop="autokey"> </el-table-column> <el-table-column label="图片" prop="value">
<el-table-column label="value" prop="value">
<template v-slot="row"> <template v-slot="row">
<template v-if="row.row.id">
<img v-if="row.row.type == 'img'" :src="row.row.value" style="width: 40px;height: 40px;"> <img v-if="row.row.type == 'img'" :src="row.row.value" style="width: 40px;height: 40px;">
</template>
<span v-else>{{ row.row.value }}</span> <span v-else>{{ row.row.value }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新时间" prop="updateTime"> </el-table-column>
<el-table-column label="创建时间" prop="createTime"> </el-table-column>
<el-table-column label="操作" width="250"> <el-table-column label="操作" width="250">
<template v-slot="scope"> <template v-slot="scope">
<el-button type="text" size="mini" round icon="el-icon-edit" <el-button type="text" size="mini" round icon="el-icon-edit"
@click="edit(scope.row.id)">编辑</el-button> @click="edit(scope.row)">编辑</el-button>
<el-popconfirm title="确定删除吗?" @confirm="delHandle([scope.row.id])"> <!-- <el-popconfirm title="确定删除吗?" @confirm="delHandle([scope.row.id])">
<el-button type="text" size="mini" round icon="el-icon-delete" slot="reference"> <el-button type="text" :disabled="!scope.row.id" size="mini" round icon="el-icon-delete" slot="reference">
删除 删除
</el-button> </el-button>
</el-popconfirm> </el-popconfirm> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@@ -38,15 +37,17 @@
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model="form.name" placeholder="请输入内容"></el-input> <el-input v-model="form.name" placeholder="请输入内容"></el-input>
</el-form-item> <el-form-item label="自定义key">
<el-input v-model="form.autokey" placeholder="请输入内容"></el-input>
</el-form-item> </el-form-item>
<!-- <el-form-item label="自定义key">
<el-input v-model="form.autokey" placeholder="请输入内容"></el-input>
</el-form-item> -->
<el-form-item label="上传图片" v-if="form.type == 'img'"> <el-form-item label="上传图片" v-if="form.type == 'img'">
<el-upload :headers="headers" class="avatar-uploader" :action="qiNiuUploadApi" <el-upload :headers="headers" class="avatar-uploader" :action="qiNiuUploadApi"
:show-file-list="false" :on-success="handleSuccess"> :show-file-list="false" :on-success="handleSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar"> <img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i> <i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload> </el-upload>
<span>{{form.detail}}</span>
</el-form-item> </el-form-item>
<el-form-item label="文本" v-else> <el-form-item label="文本" v-else>
<el-input v-model="form.value" placeholder="请输入内容"></el-input> <el-input v-model="form.value" placeholder="请输入内容"></el-input>
@@ -98,13 +99,11 @@ export default {
handleBeforeRemove(file, fileList) { handleBeforeRemove(file, fileList) {
}, },
async edit(id) { async edit(item) {
this.title = '编辑' this.title = '编辑'
let res = await querytbShopExtend(id)
this.form.id = id
this.showLocation = true this.showLocation = true
this.form = res this.form = item
this.imageUrl = res.value this.imageUrl = item.value
}, },
// 删除 // 删除
async delHandle(proId) { async delHandle(proId) {

View File

@@ -1,11 +1,7 @@
<template> <template>
<div> <div>
<el-form ref="form" :model="form" label-width="120px" label-position="left"> <el-form ref="form" :model="form" label-width="120px" label-position="left">
<el-form-item label="校验安全密码">
<el-checkbox v-model="form.isReturn">退款</el-checkbox>
<el-checkbox v-model="form.isMemberIn">会员充值</el-checkbox>
<el-checkbox v-model="form.isMemberReturn">会员退款</el-checkbox>
</el-form-item>
<el-form-item label="操作密码"> <el-form-item label="操作密码">
<el-input v-model="form.password" type="number" @input="jiantingshuru" :disabled="disabled" <el-input v-model="form.password" type="number" @input="jiantingshuru" :disabled="disabled"
:placeholder="disabled ? '******' : '请输入操作密码'" style="width: 200px;"></el-input> :placeholder="disabled ? '******' : '请输入操作密码'" style="width: 200px;"></el-input>
@@ -22,6 +18,17 @@
<el-button type="primary" @click="submitHandle">保存 </el-button> <el-button type="primary" @click="submitHandle">保存 </el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<hr />
<el-form ref="form" :model="form" label-width="120px" label-position="left">
<el-form-item label="校验安全密码">
<el-checkbox v-model="form.isReturn">退款</el-checkbox>
<el-checkbox v-model="form.isMemberIn">会员充值</el-checkbox>
<el-checkbox v-model="form.isMemberReturn">会员退款</el-checkbox>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitHandles">保存 </el-button>
</el-form-item>
</el-form>
</div> </div>
</template> </template>
<script> <script>
@@ -54,19 +61,34 @@ export default {
}, },
async submitHandle() { async submitHandle() {
// if (!this.form.prepareAmount) { if (!this.form.prepareAmount) {
// this.$message({ this.$message({
// message: "请输入验证码或密码" message: "请输入验证码"
// }) })
// return return
// } }
console.log(this.form, 'tiaoshi1') if (!this.form.password) {
if (this.form.password) { this.$message({
message: "请输入密码"
})
return
}
const res = await modfiyUserInfo({ const res = await modfiyUserInfo({
code: this.form.prepareAmount, code: this.form.prepareAmount,
pwd: md5(this.form.password), pwd: md5(this.form.password),
}); });
} else { console.log(222)
this.form.prepareAmount = ''
this.form.password = "******"
this.disabled = true
this.$message({
message: '修改成功',
type: 'success'
})
},
async submitHandles() {
const res = await tbShopInfoPUT({ const res = await tbShopInfoPUT({
// code: this.form.prepareAmount, // code: this.form.prepareAmount,
// id: this.form.id, // id: this.form.id,
@@ -76,10 +98,6 @@ export default {
isMemberIn: this.form.isMemberIn == true ? 1 : 0, isMemberIn: this.form.isMemberIn == true ? 1 : 0,
isMemberReturn: this.form.isMemberReturn == true ? 1 : 0, isMemberReturn: this.form.isMemberReturn == true ? 1 : 0,
}); });
}
this.form.prepareAmount = ''
this.form.password = "******"
this.disabled = true
this.$message({ this.$message({
message: '修改成功', message: '修改成功',
type: 'success' type: 'success'

View File

@@ -251,7 +251,7 @@ export default {
this.$router.push({ this.$router.push({
path: '/order_manage/order_list', path: '/order_manage/order_list',
query: { query: {
userId: d.id userId: d.userId
} }
}) })
}, },
@@ -277,6 +277,10 @@ export default {
this.getTableData(); this.getTableData();
}, },
async sumbit() { async sumbit() {
if (!this.userinfo.amount) {
this.$message.error("请填写金额")
return
}
let res = await midfiyAccount(this.userinfo) let res = await midfiyAccount(this.userinfo)
this.dialogVisible = false this.dialogVisible = false
this.$message.success('修改成功') this.$message.success('修改成功')