广告功能
This commit is contained in:
@@ -124,3 +124,50 @@ export function countRecord(data) {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 广告列表
|
||||
* @returns
|
||||
*/
|
||||
export function adget(params) {
|
||||
return request({
|
||||
url: "/api/ad",
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告新增单位
|
||||
* @returns
|
||||
*/
|
||||
export function adpost(data) {
|
||||
return request({
|
||||
url: `/api/miniAppPages`,
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 广告编辑详情
|
||||
* @returns
|
||||
*/
|
||||
export function adput(data) {
|
||||
return request({
|
||||
url: '/api/miniAppPages',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告删除商品
|
||||
* @returns
|
||||
*/
|
||||
export function addelete(params) {
|
||||
return request({
|
||||
url: "/api/miniAppPages/" + params,
|
||||
method: "put",
|
||||
});
|
||||
}
|
||||
|
||||
47
src/api/goxcx.js
Normal file
47
src/api/goxcx.js
Normal file
@@ -0,0 +1,47 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/**
|
||||
* 列表
|
||||
* @returns
|
||||
*/
|
||||
export function miniAppPagesget(params) {
|
||||
return request({
|
||||
url: "/api/miniAppPages",
|
||||
method: "get",
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单位
|
||||
* @returns
|
||||
*/
|
||||
export function miniAppPagespost(data) {
|
||||
return request({
|
||||
url: `/api/miniAppPages`,
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑详情
|
||||
* @returns
|
||||
*/
|
||||
export function miniAppPagesput(data) {
|
||||
return request({
|
||||
url: '/api/miniAppPages',
|
||||
method: 'put',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
* @returns
|
||||
*/
|
||||
export function miniAppPagesdelete(params) {
|
||||
return request({
|
||||
url: "/api/miniAppPages/" + params,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
155
src/views/application/advertisement.vue
Normal file
155
src/views/application/advertisement.vue
Normal file
@@ -0,0 +1,155 @@
|
||||
<template>
|
||||
<div style="padding: 20px;">
|
||||
<el-form ref="query" style="display: flex;" :model="query" label-width="80px">
|
||||
<el-form-item label="展示位置">
|
||||
<el-select clearable v-model="query.showPosition" placeholder="请选择">
|
||||
<el-option label="首页" value="home" />
|
||||
<el-option label="点餐页" value="make_order" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-select clearable v-model="query.status" placeholder="请选择">
|
||||
<el-option label="可见" value="1" />
|
||||
<el-option label="不可见" value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList">查询</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = true">新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;">
|
||||
<el-table-column prop="name" label="弹窗广告">
|
||||
<template v-slot="scope">
|
||||
<img :src="scope.row.imgUrl" style="width: 100px;height: 100px;">
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="showPosition" label="弹窗位置">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.showPosition == 'home' ? '首页' : "点餐页" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="showPosition" label="是否可见">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.status" :active-value="1" :inactive-value="0"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="path" label="弹窗频率" />
|
||||
<el-table-column prop="createTime" label="创建日期" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delHandle(scope.row.id)">
|
||||
<el-button type="text" round slot="reference">
|
||||
删除
|
||||
</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="">
|
||||
<el-pagination :total="tableData.length" layout="total, prev, pager, next, jumper"></el-pagination>
|
||||
</div> -->
|
||||
<!-- 增减余额弹窗 -->
|
||||
<el-dialog :title="title + '页面'" :visible.sync="dialogVisible" width="30%">
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="页面名称">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item> <el-form-item label="页面路径">
|
||||
<el-input v-model="form.path"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">可见</el-radio>
|
||||
<el-radio :label="2">不可见</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="sumbit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { adget, adpost, adput, addelete } from '@/api/application'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
query: {
|
||||
showPosition: "", status: ""
|
||||
},
|
||||
form: {
|
||||
name: "",
|
||||
path: "",
|
||||
status: 1,
|
||||
},
|
||||
title: '新增',
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
watch: {
|
||||
'form.type': (n, o) => {
|
||||
if (n == 'img') {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
showChange() { },
|
||||
async sumbit() {
|
||||
this.dialogVisible = false
|
||||
if (this.title == '新增') {
|
||||
await adpost(this.form)
|
||||
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
await adput(this.form)
|
||||
|
||||
this.$message({
|
||||
message: '编辑成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
this.form = {
|
||||
status: 1
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 编辑
|
||||
async edit(item) {
|
||||
this.title = '编辑'
|
||||
this.dialogVisible = true
|
||||
this.form = item
|
||||
},
|
||||
// 删除
|
||||
async delHandle(pagesId) {
|
||||
let res = await addelete(pagesId)
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
async getList() {
|
||||
let res = await adget({
|
||||
shopId: localStorage.getItem("shopId"),
|
||||
...this.query
|
||||
})
|
||||
this.tableData = res
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
@@ -1,12 +1,12 @@
|
||||
<!-- 耗材列表的新增耗材盘点 -->
|
||||
<template>
|
||||
<el-dialog title="耗材盘点" :visible.sync="dialogVisible" width="80%" @open="form.note = ''">
|
||||
<el-dialog title="耗材盘点" :visible.sync="dialogVisible" width="80%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-position="left" inline>
|
||||
<el-form-item label="账存数量">
|
||||
<el-input v-model="form.balance" readonly style="width: 180px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="实际数量">
|
||||
<el-input-number v-model="form.stocktakinNum" :min="0" :step="1" step-strictly
|
||||
<el-input-number v-model="form.stockNumber" :min="0" :step="1" step-strictly
|
||||
style="width: 180px;"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="盈亏数量">
|
||||
@@ -78,7 +78,8 @@ export default {
|
||||
productId: '', // 必传
|
||||
stocktakinNum: '', // 必传
|
||||
price: '', // 商品价格 非必传 为空盘点价格为商品价格
|
||||
note: "" // 盘点备注 非必传
|
||||
remark: "", // 盘点备注 非必传
|
||||
stockNumber: 0
|
||||
},
|
||||
rules: {
|
||||
stocktakinNum: [
|
||||
@@ -109,20 +110,29 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
profitNumber() {
|
||||
return this.form.stocktakinNum - this.form.balance
|
||||
console.log(this.form, '盈亏数量')
|
||||
if (this.form.balance == undefined) {
|
||||
return this.form.stockNumber - 0
|
||||
} else {
|
||||
return this.form.stockNumber - this.form.balance
|
||||
}
|
||||
},
|
||||
profitPrice() {
|
||||
return formatDecimal(this.profitNumber * this.form.price && 0)
|
||||
console.log(this.form, '盈亏金额')
|
||||
return formatDecimal((this.form.stockNumber - this.form.balance) * this.form.price)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
onSubmitHandle() {
|
||||
this.$refs.form.validate(async valid => {
|
||||
if (valid) {
|
||||
try {
|
||||
this.form.lpNum = this.profitNumber
|
||||
// this.form.stockNumber = this.form.stocktakinNum
|
||||
this.loading = true
|
||||
let res = await tbConCheck(this.form)
|
||||
console.log(this.form);
|
||||
this.$emit('success', res)
|
||||
// this.dialogVisible = false
|
||||
this.loading = false
|
||||
@@ -140,10 +150,16 @@ export default {
|
||||
})
|
||||
},
|
||||
show(obj) {
|
||||
this.form.remark = ''
|
||||
this.form.stocktakinNum = 0
|
||||
this.form.lpNum = 0
|
||||
// this.form.stockNumber = 0
|
||||
|
||||
this.form = Object.assign(this.form, obj)
|
||||
this.dialogVisible = true
|
||||
this.form.conInfoId = obj.consId
|
||||
this.form.stockNumber = obj.balance
|
||||
this.form.stockNumber = obj.balance * 1
|
||||
this.form.price == null ? 0 : this.form.price
|
||||
|
||||
this.searhForm.skuId = obj.productId
|
||||
this.searhForm.productId = obj.consId
|
||||
@@ -166,9 +182,7 @@ export default {
|
||||
const res = await tbConCheckGet({
|
||||
page: this.tableData.page,
|
||||
size: this.tableData.size,
|
||||
name: this.searhForm.name,
|
||||
skuId: this.searhForm.category,
|
||||
productId: this.searhForm.productId,
|
||||
conInfoId: this.searhForm.productId,
|
||||
sort: 'id,desc',
|
||||
})
|
||||
this.tableData.list = res.content
|
||||
|
||||
@@ -110,9 +110,11 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
profitNumber() {
|
||||
// 盈亏数量
|
||||
return this.form.stocktakinNum - this.detail.stockNumber
|
||||
},
|
||||
profitPrice() {
|
||||
// 盈亏金额
|
||||
return formatDecimal((this.form.stocktakinNum - this.detail.stockNumber) * this.detail.salePrice)
|
||||
}
|
||||
},
|
||||
|
||||
@@ -52,70 +52,75 @@
|
||||
</div>
|
||||
<div class="head-container" id="table_drag">
|
||||
<el-table ref="table" :data="tableData.data" v-loading="tableData.loading" row-key="id">
|
||||
<!-- <el-table-column prop="id" label="ID" width="50px" /> -->
|
||||
<el-table-column label="耗材名称" prop="conName" align="center" />
|
||||
<!-- <el-table-column label="耗材代码" prop="conCode" /> -->
|
||||
<el-table-column label="分类名称" prop="conTypeName" align="center" />
|
||||
<el-table-column label="单位" prop="conUnit" align="center" />
|
||||
<el-table-column label="耗材名称" prop="conName" style="width: 100px;">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.editNYD == 1">
|
||||
<el-input v-model="scope.row.conName" placeholder="请输入内容" @blur="conNameClick(scope.row)"></el-input>
|
||||
</div>
|
||||
<span v-else>
|
||||
{{ scope.row.conName }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="scope.row.editNYD = 1"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分类名称" prop="conTypeName"></el-table-column>
|
||||
<el-table-column label="单位" prop="conUnit">
|
||||
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.editNYD == 2">
|
||||
<el-input v-model="scope.row.conUnit" placeholder="请输入内容" @blur="conNameClick(scope.row)"></el-input>
|
||||
</div>
|
||||
<span v-else>
|
||||
{{ scope.row.conUnit }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="scope.row.editNYD = 2"></i>
|
||||
</template>
|
||||
|
||||
<el-table-column label="现有库存" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="现有库存">
|
||||
<template v-slot="scope">
|
||||
<span :class="[computedClass(scope.row.balance)]"> {{ scope.row.balance }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="耗材消耗" prop="conConsume" align="center" />
|
||||
<el-table-column label="耗材入库" prop="conIn" align="center" />
|
||||
<el-table-column label="耗材出库" prop="conOut" align="center" />
|
||||
<el-table-column label="耗材反还" prop="conReturn" align="center" />
|
||||
<el-table-column label="库存开关" prop="conReturn" align="center">
|
||||
<el-table-column label="耗材消耗" prop="conConsume" />
|
||||
<el-table-column label="耗材入库" prop="conIn" />
|
||||
<el-table-column label="耗材出库" prop="conOut" />
|
||||
<el-table-column label="耗材反还" prop="conReturn" />
|
||||
<el-table-column label="库存开关" prop="conReturn">
|
||||
<template v-slot="scope">
|
||||
<el-switch v-model="scope.row.isCheck" active-value="1" inactive-value="0"
|
||||
@change="showChange($event, scope.row)"></el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- <el-table-column label="业务编码" prop="bizCode" /> -->
|
||||
<!-- <el-table-column label="业务说明" prop="bizName" /> -->
|
||||
<!-- <el-table-column label="商品名称" prop="productName" /> -->
|
||||
<!-- <el-table-column label="正负号标识" prop="bizType" /> -->
|
||||
<!-- <el-table-column label="耗材id" prop="consId" /> -->
|
||||
<!-- <el-table-column label="创建时间" prop="createTime"></el-table-column> -->
|
||||
<!-- <el-table-column label="所属商品" width="320" align="center">
|
||||
<el-table-column label="所属商品" width="220">
|
||||
<template v-slot="scope">
|
||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item)" :key="item.productId" type="text">{{
|
||||
item.productName }}</el-button>
|
||||
{{ scope.row.productId }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="所属商品" width="320" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-button v-for="(item) in scope.row.product" @click="toGoods(item)" :key="item.productId" type="text">{{
|
||||
item.productName }}</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="最近入库量" prop="lasterInStock" /> -->
|
||||
<el-table-column label="库存数量" align="center" prop="stockNumber">
|
||||
<el-table-column label="库存数量" prop="stockNumber">
|
||||
<template v-slot="scope">
|
||||
{{ (scope.row.balance).toFixed(2) }}
|
||||
<!-- {{ (scope.row.stockNumber - scope.row.stockConsume).toFixed(2) }} -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="预警值" prop="conWarning">
|
||||
<template v-slot="scope">
|
||||
<div v-if="scope.row.editNYD == 3">
|
||||
<el-input v-model="scope.row.conWarning" placeholder="请输入内容" @blur="conNameClick(scope.row)"></el-input>
|
||||
</div>
|
||||
<span v-else>
|
||||
{{ scope.row.conWarning }}
|
||||
</span>
|
||||
<i class="el-icon-edit" @click="scope.row.editNYD = 3"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="预警值" align="center" prop="conWarning" />
|
||||
<!-- <el-table-column label="单位耗材值" prop="surplusStock" /> -->
|
||||
<!-- <el-table-column label="排序" prop="sort" sortable /> -->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
|
||||
<el-table-column label="创建时间" prop="createTime" width="200">
|
||||
<!-- <template v-slot="scope">
|
||||
{{ dayjs(scope.row.createTime).format("YYYY-MM-DD HH:mm:ss") }}
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="更新时间" prop="updateTime" width="200"> -->
|
||||
<!-- <template v-slot="scope">
|
||||
{{ dayjs(scope.row.createdAt).format('YYYY-MM-DD HH:mm:ss') }}
|
||||
</template> -->
|
||||
<!-- </el-table-column> -->
|
||||
<el-table-column label="操作" width="250" fixed="right">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="editorHandle(scope.row)">编辑</el-button>
|
||||
@@ -506,7 +511,7 @@ export default {
|
||||
downloadLoading: false,
|
||||
uploadLoading: false,
|
||||
dialogVisible: false,
|
||||
consRecordItem: ''
|
||||
consRecordItem: '',
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
@@ -541,7 +546,7 @@ export default {
|
||||
}
|
||||
},
|
||||
toGoods(data) {
|
||||
|
||||
|
||||
this.$router.push({
|
||||
path: '/product/product',
|
||||
query: {
|
||||
@@ -569,6 +574,15 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
async conNameClick(row) {
|
||||
await postapitbConsInfo([{
|
||||
id: row.consId,
|
||||
...row,
|
||||
shopId: localStorage.getItem('shopId')
|
||||
}])
|
||||
row.editNYD = 0
|
||||
this.$message.success('修改成功')
|
||||
},
|
||||
computedClass(num) {
|
||||
if (num > 0) {
|
||||
return 'green'
|
||||
@@ -639,8 +653,9 @@ export default {
|
||||
this.tableData.data = res.content.map(v => {
|
||||
const productIds = v.productId ? v.productId.split(',') : []
|
||||
return {
|
||||
...v,
|
||||
product: productIds.map((str, index) => {
|
||||
...v,
|
||||
editNYD: 0,
|
||||
product: productIds.map((str, index) => {
|
||||
const startIndex = str.indexOf('_')
|
||||
const productId = str.slice(0, startIndex)
|
||||
const productName = str.slice(startIndex + 1, str.length)
|
||||
@@ -815,6 +830,7 @@ export default {
|
||||
},
|
||||
// 显示耗材记录
|
||||
async clicksee(item) {
|
||||
console.log(item, '耗材记录')
|
||||
this.consRecordItem = item
|
||||
this.clickseetypedialogshow = true;
|
||||
this.getConsRecord()
|
||||
@@ -826,7 +842,7 @@ export default {
|
||||
const res = await gettbConsInfoFlow({
|
||||
page: this.clickseetableData.page,
|
||||
size: this.clickseetableData.size,
|
||||
consId: this.consRecordItem.id,
|
||||
consId: this.consRecordItem.consId,
|
||||
conName: this.consRecordItem.conName,
|
||||
shopId: localStorage.getItem("shopId")
|
||||
});
|
||||
|
||||
@@ -962,10 +962,8 @@ export default {
|
||||
},
|
||||
async submitForm(formName) {
|
||||
if (this.dialogtitle == "编辑") {
|
||||
let { id, surplusStock } = this.surplusStocks;
|
||||
await puttbProskuCon({
|
||||
id,
|
||||
surplusStock,
|
||||
...this.surplusStocks
|
||||
});
|
||||
this.$message({
|
||||
message: "修改成功",
|
||||
|
||||
@@ -163,6 +163,8 @@ export default {
|
||||
type: 'success'
|
||||
});
|
||||
} catch (error) {
|
||||
this.$emit('success', null)
|
||||
this.loading = false
|
||||
console.log(error)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-pagination :total="tableData.total" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
<el-pagination :total="tableData.total" @size-change="handleSizeChange" :current-page="tableData.page + 1" :page-size="tableData.size"
|
||||
@current-change="paginationChange" layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
@@ -228,6 +228,10 @@ export default {
|
||||
console.log(error)
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.tableData.size = val
|
||||
this.getTableData()
|
||||
},
|
||||
// 获取商品分类列表
|
||||
async tbShopCategoryGet() {
|
||||
try {
|
||||
|
||||
123
src/views/shop/components/goxcx.vue
Normal file
123
src/views/shop/components/goxcx.vue
Normal file
@@ -0,0 +1,123 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button type="primary" @click="dialogVisible = true">
|
||||
新增
|
||||
</el-button>
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" :data="tableData" style="width: 100%;">
|
||||
<el-table-column prop="name" label="页面名称" />
|
||||
<el-table-column prop="path" label="页面路径" />
|
||||
<el-table-column prop="status" label="状态">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.status == 1 ? "可见" : "不可见" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="创建日期" />
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="edit(scope.row)">编辑</el-button>
|
||||
<el-popconfirm title="确定删除吗?" @confirm="delHandle(scope.row.id)">
|
||||
<el-button type="text" round slot="reference">
|
||||
删除
|
||||
</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="">
|
||||
<el-pagination :total="tableData.length" layout="total, prev, pager, next, jumper"></el-pagination>
|
||||
</div> -->
|
||||
<!-- 增减余额弹窗 -->
|
||||
<el-dialog :title="title + '页面'" :visible.sync="dialogVisible" width="30%">
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="页面名称">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item> <el-form-item label="页面路径">
|
||||
<el-input v-model="form.path"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio :label="1">可见</el-radio>
|
||||
<el-radio :label="2">不可见</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="sumbit">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { miniAppPagesget, miniAppPagespost, miniAppPagesput, miniAppPagesdelete } from '@/api/goxcx'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [],
|
||||
form: {
|
||||
name: "",
|
||||
path: "",
|
||||
status: 1,
|
||||
},
|
||||
title: '新增',
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
},
|
||||
watch: {
|
||||
'form.type': (n, o) => {
|
||||
if (n == 'img') {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
async sumbit() {
|
||||
this.dialogVisible = false
|
||||
if (this.title == '新增') {
|
||||
await miniAppPagespost(this.form)
|
||||
|
||||
this.$message({
|
||||
message: '添加成功',
|
||||
type: 'success'
|
||||
})
|
||||
} else {
|
||||
await miniAppPagesput(this.form)
|
||||
|
||||
this.$message({
|
||||
message: '编辑成功',
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
this.form = {
|
||||
status: 1
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
// 编辑
|
||||
async edit(item) {
|
||||
this.title = '编辑'
|
||||
this.dialogVisible = true
|
||||
this.form = item
|
||||
},
|
||||
// 删除
|
||||
async delHandle(pagesId) {
|
||||
let res = await miniAppPagesdelete(pagesId)
|
||||
this.$message({
|
||||
message: '删除成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.getList()
|
||||
},
|
||||
async getList() {
|
||||
let res = await miniAppPagesget()
|
||||
this.tableData = res
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
@@ -6,6 +6,7 @@
|
||||
<!-- <el-tab-pane label="通知配置" name="3"></el-tab-pane> -->
|
||||
<el-tab-pane label="安全设置" name="4"></el-tab-pane>
|
||||
<el-tab-pane label="扩展参数" name="5"></el-tab-pane>
|
||||
<el-tab-pane label="跳转小程序" name="6"></el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
<shopInfo v-if="activeName == 1" />
|
||||
@@ -13,6 +14,7 @@
|
||||
<notice v-if="activeName == 3" />
|
||||
<securitySetting v-if="activeName == 4" />
|
||||
<extend v-if="activeName == 5" />
|
||||
<goxcx v-if="activeName == 6" />
|
||||
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,11 +25,12 @@ import shopSetting from './components/shopSetting'
|
||||
import notice from './components/notice'
|
||||
import securitySetting from './components/securitySetting'
|
||||
import extend from './components/extend'
|
||||
import goxcx from './components/goxcx'
|
||||
export default {
|
||||
components: {
|
||||
shopInfo,
|
||||
shopSetting,
|
||||
notice,securitySetting,extend
|
||||
notice,securitySetting,extend,goxcx
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -88,18 +88,19 @@
|
||||
{{ scope.row.lastLoginAt | timeFilter }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="操作" width="200"> -->
|
||||
<!-- <template v-slot="scope">
|
||||
<el-button type="text" @click="">历史订单</el-button>
|
||||
<el-button type="text" @click="">充值记录</el-button>
|
||||
<el-button type="text" @click="">余额</el-button> -->
|
||||
<el-table-column label="操作" width="200">
|
||||
<template v-slot="scope">
|
||||
<el-button type="text" @click="">编辑</el-button>
|
||||
<el-button type="text" @click="editPop(scope.row)">增减余额</el-button>
|
||||
<!-- <el-button type="text" @click="">历史订单</el-button>
|
||||
<el-button type="text" @click="">充值记录</el-button> -->
|
||||
|
||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="delTableHandle([scope.row.id])">
|
||||
<el-button type="text" icon="el-icon-delete" style="margin-left: 20px !important;"
|
||||
slot="reference">删除</el-button>
|
||||
</el-popconfirm> -->
|
||||
<!-- </template> -->
|
||||
<!-- </el-table-column> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
@@ -107,6 +108,34 @@
|
||||
@size-change="sizeChange" @current-change="paginationChange"
|
||||
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||
</div>
|
||||
|
||||
<!-- 增减余额弹窗 -->
|
||||
<el-dialog title="增减余额" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
|
||||
<el-form ref="form" :model="userinfo" label-width="80px">
|
||||
<el-form-item label="用户">
|
||||
{{ userinfo.nickName }}
|
||||
</el-form-item>
|
||||
<el-form-item label="增减">
|
||||
<el-radio-group v-model="userinfo.IncreaseDeduction">
|
||||
<el-radio :label="1">增加</el-radio>
|
||||
<el-radio :label="2">备选项</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="余额">
|
||||
<el-input v-model="userinfo.nickName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-radio-group v-model="userinfo.type">
|
||||
<el-radio :label="1">消费</el-radio>
|
||||
<el-radio :label="2">充值退款</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -132,6 +161,12 @@ export default {
|
||||
size: 10,
|
||||
loading: false,
|
||||
total: 0
|
||||
},
|
||||
dialogVisible: false,
|
||||
userinfo: {
|
||||
nickName: '',
|
||||
IncreaseDeduction: 1,
|
||||
type: 1
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -146,6 +181,13 @@ export default {
|
||||
this.getShopInfo();
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.userinfo = {}
|
||||
},
|
||||
editPop(d) {
|
||||
this.dialogVisible = true
|
||||
this.userinfo.nickName = d.nickName
|
||||
},
|
||||
toPage(type) {
|
||||
const pages = {
|
||||
charge: "charge_list",
|
||||
|
||||
Reference in New Issue
Block a user