This commit is contained in:
faiz 2024-05-29 10:16:23 +08:00
parent fc7e8a1232
commit 88fdda086a
6 changed files with 109 additions and 41 deletions

View File

@ -3,12 +3,12 @@ ENV = 'development'
# http://192.168.1.43:8324/admin
# http://mer.crmeb.net/admin
# base api
VUE_APP_BASE_API = 'https://api.tropjoin.com/'
# VUE_APP_BASE_API = 'https://plus.hwms.shop'
VUE_APP_BASE_API = 'http://192.168.1.50:8080'
# VUE_APP_BASE_API = 'https://api.tropjoin.com/'
# socket 连接地址
VUE_APP_WS_URL = 'ws://https://api.tropjoin.com/'
# VUE_APP_WS_URL = 'ws://plus.hwms.shop'
VUE_APP_WS_URL = 'ws://http://192.168.1.50:8080'
# VUE_APP_WS_URL = 'ws://https://api.tropjoin.com/'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.

View File

@ -10,8 +10,8 @@ export function uploadVideoOfLocal(data) {
/**
* @description 商品分类 -- 列表
*/
export function storeCategoryListApi() {
return request.get('store/category/lst')
export function storeCategoryListApi(id) {
return request.get(`store/category/lst?store_category_id=${id}`)
}
/**
* @description 商品分类 -- 新增表单

View File

@ -27,31 +27,6 @@
</div>
</div>
</el-col>
<el-col :span="6" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">浏览量</span>
<span class="card-date">今日</span>
</div>
<count-to
:start-val="0"
:end-val="statisticsData.today.visitNum"
:duration="3000"
class="card-panel-num"
/>
<div class="card-panel-compared">
周环比
<i :class="Number(statisticsData.lastWeekRate.visitNum)>=0?'up':'down'">{{ statisticsData.lastWeekRate.visitNum ? (statisticsData.lastWeekRate.visitNum*100*1000/1000).toFixed(2) : 0.00 }}%</i>
<i :class="Number(statisticsData.lastWeekRate.visitNum)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" />
</div>
<div class="card-panel-date">
<span class="date_text">昨日数据</span>
<span class="date_num">{{ statisticsData.yesterday.visitNum }}</span>
</div>
</div>
</div>
</el-col>
<el-col :span="6" class="content">
<div class="card-panel">
<div class="card-panel-description">
@ -104,6 +79,37 @@
</div>
</div>
</el-col>
<el-col :span="6" class="content">
<div class="card-panel">
<div class="card-panel-description">
<div class="card-panel-text">
<span class="card-order">{{ statisticsData.prize.title }}</span>
<span class="card-date">今日</span>
</div>
<div class="card-panel-box">
<div class="card-panel-content" v-for="item in statisticsData.prize.list">
<count-to
:start-val="0"
:end-val="item.c"
:duration="3000"
class="card-panel-num"
/>
<span>{{ item.u }}</span>
</div>
</div>
<!-- <div class="card-panel-compared">
周环比
<i :class="Number(statisticsData.lastWeekRate.visitNum)>=0?'up':'down'">{{ statisticsData.lastWeekRate.visitNum ? (statisticsData.lastWeekRate.visitNum*100*1000/1000).toFixed(2) : 0.00 }}%</i>
<i :class="Number(statisticsData.lastWeekRate.visitNum)>=0?'el-icon-caret-top':'el-icon-caret-bottom'" />
</div>
<div class="card-panel-date">
<span class="date_text">昨日数据</span>
<span class="date_num">{{ statisticsData.yesterday.visitNum }}</span>
</div> -->
</div>
</div>
</el-col>
</el-row>
<el-row :gutter="14" class="panel-group-count">
<el-col :span="3" class="card-panel-item">
@ -261,6 +267,19 @@ export default {
color: #8C8C8C;
background: #fff;
position: relative;
min-height: 182px;
}
.card-panel-box{
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 50px;
flex-wrap: wrap;
}
.card-panel-content{
flex: 1;
flex-basis: 33%;
text-align: center;
}
.card-panel-description {
padding: 0 20px;

View File

@ -189,11 +189,11 @@
<div class="title">银行卡信息</div>
<el-row v-if="merData.financial_bank">
<el-col :span="12">
<el-form-item label="名:" prop="financial_bank.name">
<el-form-item label="结算卡户名:" prop="financial_bank.name">
<el-input
size="small"
v-model="merData.financial_bank.name"
placeholder="请输入名"
placeholder="请输入结算卡户名"
class="selWidth"
/>
</el-form-item>
@ -233,6 +233,29 @@
</el-form-item>
</el-col>
</el-row>
<el-row v-if="merData.ext">
<el-col :span="12">
<el-form-item label="法人姓名:" prop="financial_bank.bank_code">
<el-input
size="small"
v-model="merData.ext.idcard.name"
placeholder="请输入法人姓名"
class="selWidth"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="法人身份证:" prop="financial_bank.inter_bank">
<el-input
size="small"
oninput ="value=value.replace(/[^\d]/g,'')"
v-model="merData.ext.idcard.number"
placeholder="请输入法人身份证"
class="selWidth"
/>
</el-form-item>
</el-col>
</el-row>
</div>
</el-tab-pane>
<el-tab-pane label="经营信息" name="operate">

View File

@ -41,7 +41,7 @@
</li>
<li class="item">
<div class="title">支付时间</div>
<div>{{ orderDetailList.create_time }}</div>
<div>{{ orderDetailList.pay_time }}</div>
</li>
</ul>
</div>

View File

@ -13,8 +13,9 @@
:data="tableData.data"
size="small"
row-key="store_category_id"
:default-expand-all="false"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
lazy
:load="load"
:tree-props="{children: 'children'}"
>
<el-table-column
label="分类名称"
@ -80,7 +81,7 @@
<el-table-column label="操作" min-width="60" fixed="right">
<template slot-scope="scope">
<el-button type="text" size="small" @click="onEdit(scope.row.store_category_id)">编辑</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.store_category_id, scope.$index)">删除</el-button>
<el-button type="text" size="small" @click="handleDelete(scope.row.store_category_id, scope.$index,scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -101,13 +102,15 @@ export default {
moren: require("@/assets/images/bjt.png"),
isChecked: false,
listLoading: true,
childrenData:[],
tableData: {
data: [],
total: 0
},
tableFrom: {
page: 1,
limit: 20
limit: 20,
store_category_id:0
}
}
},
@ -115,10 +118,26 @@ export default {
this.getList()
},
methods: {
getChildren(id){
storeCategoryListApi(id)
.then((res) => {
this.childrenData = res.data
})
.catch((res) => {
this.$message.error(res.message);
});
},
load(tree, treeNode, resolve) {
let that = this;
that.getChildren(tree.store_category_id)
setTimeout(() => {
resolve(that.childrenData)
}, 1000)
},
//
getList() {
this.listLoading = true
storeCategoryListApi(this.tableFrom).then(res => {
storeCategoryListApi('').then(res => {
this.tableData.data = res.data
this.tableData.total = res.data.count
this.listLoading = false
@ -144,11 +163,18 @@ export default {
this.$modalForm(storeCategoryUpdateApi(id)).then(() => this.getList())
},
//
handleDelete(id, idx) {
handleDelete(id, idx,row) {
console.log(row);
this.$modalSure().then(() => {
storeCategoryDeleteApi(id).then(({ message }) => {
if(row.parent){
let index = this.childrenData.map(item => item).indexOf(row)
this.childrenData.splice(index,1);
}else{
this.tableData.data.splice(idx,1);
}
this.$message.success(message)
this.getList()
// this.getList()
}).catch(({ message }) => {
this.$message.error(message)
})