This commit is contained in:
zmj 2024-06-21 15:45:34 +08:00
commit 4e5cb7e0e1
10 changed files with 71 additions and 28 deletions

View File

@ -2,5 +2,5 @@ NODE_ENV = 'development'
VITE_NOW_TYPE = 'dist' VITE_NOW_TYPE = 'dist'
# Base API # Base API
VITE_APP_BASE_URL='http://192.168.1.22:8545' # VITE_APP_BASE_URL='http://192.168.1.22:8545'
# VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn' VITE_APP_BASE_URL='https://test-multi-store.lihaink.cn'

View File

@ -230,7 +230,7 @@ const basicList = reactive([
percent: 0 percent: 0
} }
]) ])
const startEndTime = ref(['', '']); const startEndTime = ref([new Date(), new Date()]);
// //
const getData = () => { const getData = () => {
let date = ''; let date = '';

View File

@ -200,7 +200,7 @@ const basicList = reactive([
percent: 0 percent: 0
} }
]) ])
const startEndTime = ref(['', '']); const startEndTime = ref([new Date(), new Date()]);
// //
const getData = () => { const getData = () => {
let date = ''; let date = '';

View File

@ -66,7 +66,7 @@
<div class="text-info">{{ item.name }}</div> <div class="text-info">{{ item.name }}</div>
<div class="text-6xl">{{ item.money }}</div> <div class="text-6xl">{{ item.money }}</div>
<div class="text-info">环比增长: <span :class="item.rate > 0 ? 'text-success' : 'text-danger'">{{ <div class="text-info">环比增长: <span :class="item.rate > 0 ? 'text-success' : 'text-danger'">{{
item.rate / 100 }}%</span></div> item.rate }}%</span></div>
</div> </div>
</div> </div>
</div> </div>
@ -288,9 +288,9 @@ const rightOption2: any = reactive(JSON.parse(JSON.stringify(optionModel)))
// //
const colorList = ['#5DB1FF', '#4CD384', '#FFC46A', '#CAA5F1', '#FFC46A', '#4CD384', '#5DB1FF', '#CAA5F1'] const colorList = ['#5DB1FF', '#4CD384', '#FFC46A', '#CAA5F1', '#FFC46A', '#4CD384', '#5DB1FF', '#CAA5F1']
// , 访, , , , , , 退, 退, 访- // , 访, , , , , , 退, 退, 访-
const iconList = ref(['RectangleCopy58', 'RectangleCopy48', 'RectangleCopy65', 'RectangleCopy62', 'RectangleCopy56', 'RectangleCopy55', 'RectangleCopy57', 'RectangleCopy65']); const iconList = ref(['RectangleCopy58', 'RectangleCopy48', 'RectangleCopy65', 'RectangleCopy62', 'RectangleCopy56', 'RectangleCopy55', 'RectangleCopy57', 'RectangleCopy65', 'RectangleCopy61', 'RectangleCopy52', 'RectangleCopy14', 'RectangleCopy32']);
const startEndTime = ref(['', '']); const startEndTime = ref([new Date(), new Date()]);
// //
const getData = () => { const getData = () => {
let date = ''; let date = '';

View File

@ -246,8 +246,15 @@ const basicList = reactive([
num: 0, num: 0,
}, },
{
name: '保证金',
type: 'deposit_amount',
icon: 'RectangleCopy32',
num: 0,
},
]) ])
const startEndTime = ref(['', '']); const startEndTime = ref([new Date(), new Date()]);
const store_id = ref(''); const store_id = ref('');
const formData = ref({}); const formData = ref({});
const tradTypeOption = reactive( const tradTypeOption = reactive(

View File

@ -19,7 +19,11 @@
<el-descriptions-item label="库存">{{ formData.stock }}</el-descriptions-item> <el-descriptions-item label="库存">{{ formData.stock }}</el-descriptions-item>
<el-descriptions-item label="成本">{{ formData.cost }}</el-descriptions-item> <el-descriptions-item label="成本">{{ formData.cost }}</el-descriptions-item>
<el-descriptions-item label="供货价">{{ formData.purchase }}</el-descriptions-item> <el-descriptions-item label="供货价">{{ formData.purchase }}</el-descriptions-item>
<el-descriptions-item label="上浮比例">{{ formData.rose }}</el-descriptions-item> <el-descriptions-item label="上浮比例" :span="2">{{ formData.rose }}</el-descriptions-item>
<el-descriptions-item label="厂家备注" :span="2">
<!-- <div style="white-space: pre;">{{ formData.manufacturer_information }}</div> -->
<div style="white-space: pre;">{{ cMark(formData.manufacturer_information) }}</div>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="适用门店" name="second"> <el-tab-pane label="适用门店" name="second">
@ -141,6 +145,7 @@ const formData = reactive({
cost: "", cost: "",
purchase: "", purchase: "",
rose: "0", rose: "0",
manufacturer_information: ""
}) })
@ -155,6 +160,25 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key] formData[key] = data[key]
} }
} }
}
const cMark = (str:any)=>{
if(str){
return str.replace(/(\d{5,})/g, (match:string) => {
let replacement;
//
if (match.length >= 11) {
// 11
replacement = match.slice(0, -8) + "****" + match.slice(-4);
} else {
// 511
replacement = match.slice(0, -4) + "****";
}
return replacement;
});
}
return '-';
} }
const getDetail = async (row: Record<string, any>) => { const getDetail = async (row: Record<string, any>) => {

View File

@ -31,21 +31,24 @@
<el-form-item label="兑换库存" prop="swap"> <el-form-item label="兑换库存" prop="swap">
<el-input v-model="formData.swap" type="number" class="w-[500px]" clearable placeholder="请输入库存" :readonly="false" /> <el-input v-model="formData.swap" type="number" class="w-[500px]" clearable placeholder="请输入库存" :readonly="false" />
</el-form-item> </el-form-item>
<el-form-item label="终端零售价" prop="price"> <el-form-item label="供货价" prop="purchase">
<el-input v-model="formData.price" type="number" class="w-[500px]" clearable placeholder="请输入终端零售价" :readonly="false" /> <el-input v-model="formData.purchase" type="number" class="w-[500px]" clearable placeholder="请输入供货价" :readonly="false" />
</el-form-item>
<el-form-item label="会员价" prop="vip_price">
<el-input v-model="formData.vip_price" type="number" class="w-[500px]" clearable placeholder="请输入会员价" :readonly="false" />
</el-form-item> </el-form-item>
<el-form-item label="商户价" prop="cost"> <el-form-item label="商户价" prop="cost">
<el-input v-model="formData.cost" type="number" class="w-[500px]" clearable placeholder="请输入商户价" :readonly="false" /> <el-input v-model="formData.cost" type="number" class="w-[500px]" clearable placeholder="请输入商户价" :readonly="false" />
</el-form-item> </el-form-item>
<el-form-item label="供货价" prop="purchase"> <el-form-item label="会员价" prop="vip_price">
<el-input v-model="formData.purchase" type="number" class="w-[500px]" clearable placeholder="请输入供货价" :readonly="false" /> <el-input v-model="formData.vip_price" type="number" class="w-[500px]" clearable placeholder="请输入会员价" :readonly="false" />
</el-form-item>
<el-form-item label="终端零售价" prop="price">
<el-input v-model="formData.price" type="number" class="w-[500px]" clearable placeholder="请输入终端零售价" :readonly="false" />
</el-form-item> </el-form-item>
<el-form-item label="起批量" prop="batch"> <el-form-item label="起批量" prop="batch">
<el-input v-model="formData.batch" type="number" class="w-[500px]" clearable placeholder="请输入起批量" :readonly="false" /> <el-input v-model="formData.batch" type="number" class="w-[500px]" clearable placeholder="请输入起批量" :readonly="false" />
</el-form-item> </el-form-item>
<el-form-item label="厂家备注" prop="manufacturer_information">
<el-input v-model="formData.manufacturer_information" type="textarea" autosize class="w-[500px]" clearable :placeholder="`厂家名称\n联系人姓名\n联系电话`" :readonly="false" />
</el-form-item>
<!-- <el-form-item label="上浮比例" prop="rose"> <!-- <el-form-item label="上浮比例" prop="rose">
<el-input v-model="formData.rose" type="number" class="w-[500px]" clearable placeholder="请输入上浮比例" :readonly="false" > <el-input v-model="formData.rose" type="number" class="w-[500px]" clearable placeholder="请输入上浮比例" :readonly="false" >
<template #suffix>%</template> <template #suffix>%</template>
@ -143,6 +146,7 @@ const formData = reactive({
cost: "", cost: "",
purchase: "1", purchase: "1",
batch: "", batch: "",
manufacturer_information: "",
rose: "0", rose: "0",
is_return: 1, // 1退,2退 is_return: 1, // 1退,2退
is_store_all: 1, // 1 2 is_store_all: 1, // 1 2

View File

@ -43,10 +43,10 @@
<el-table-column label="商品名称" prop="store_name" min-width="200" show-overflow-tooltip /> <el-table-column label="商品名称" prop="store_name" min-width="200" show-overflow-tooltip />
<el-table-column label="分类" prop="cate_name" min-width="120" show-overflow-tooltip /> <el-table-column label="分类" prop="cate_name" min-width="120" show-overflow-tooltip />
<el-table-column label="单位" prop="unit_name" min-width="80" show-overflow-tooltip /> <el-table-column label="单位" prop="unit_name" min-width="80" show-overflow-tooltip />
<el-table-column label="终端零售价" prop="price" min-width="120" show-overflow-tooltip />
<el-table-column label="会员价" prop="vip_price" min-width="120" show-overflow-tooltip />
<el-table-column label="商户价" prop="cost" min-width="120" show-overflow-tooltip />
<el-table-column label="供货价" prop="purchase" min-width="100" show-overflow-tooltip /> <el-table-column label="供货价" prop="purchase" min-width="100" show-overflow-tooltip />
<el-table-column label="商户价" prop="cost" min-width="120" show-overflow-tooltip />
<el-table-column label="会员价" prop="vip_price" min-width="120" show-overflow-tooltip />
<el-table-column label="终端零售价" prop="price" min-width="120" show-overflow-tooltip />
<el-table-column label="起批量" prop="batch" min-width="100" show-overflow-tooltip /> <el-table-column label="起批量" prop="batch" min-width="100" show-overflow-tooltip />
<el-table-column label="售卖库存" prop="stock" min-width="100" show-overflow-tooltip /> <el-table-column label="售卖库存" prop="stock" min-width="100" show-overflow-tooltip />
<el-table-column label="兑换库存" prop="swap" min-width="100" show-overflow-tooltip /> <el-table-column label="兑换库存" prop="swap" min-width="100" show-overflow-tooltip />

View File

@ -29,8 +29,10 @@
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="用户标签">{{ formData.label_name }}</el-descriptions-item> <el-descriptions-item label="用户标签">{{ formData.label_name }}</el-descriptions-item>
<el-descriptions-item label="礼品券">{{ formData.integral }}</el-descriptions-item> <el-descriptions-item label="礼品券">{{ formData.integral }}</el-descriptions-item>
<el-descriptions-item label="返还金">{{ formData.return_money }}</el-descriptions-item> <el-descriptions-item label="返还金">{{ Number(formData.return_money).toFixed(2) }}</el-descriptions-item>
<el-descriptions-item label="采购款">{{ formData.purchase_funds }}</el-descriptions-item> <el-descriptions-item label="采购款">{{ formData.purchase_funds }}</el-descriptions-item>
<el-descriptions-item label="用户余额">{{ formData.now_money }}</el-descriptions-item>
<el-descriptions-item label="累计充值金额">{{ formData.total_recharge_amount }}</el-descriptions-item>
<el-descriptions-item label="用户地址" :span="2">{{ formData.user_address }}</el-descriptions-item> <el-descriptions-item label="用户地址" :span="2">{{ formData.user_address }}</el-descriptions-item>
<el-descriptions-item label="创建时间" :span="2">{{ formData.create_time }}</el-descriptions-item> <el-descriptions-item label="创建时间" :span="2">{{ formData.create_time }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
@ -107,7 +109,9 @@ const formData = reactive({
"label_name": "", "label_name": "",
"sex_text": "", "sex_text": "",
"user_address": "", "user_address": "",
"return_money": 0 "return_money": 0,
"total_recharge_amount": "",
"now_money": ""
}) })

View File

@ -25,11 +25,11 @@
<template #icon> <template #icon>
<icon name="el-icon-Plus" /> <icon name="el-icon-Plus" />
</template> </template>
新增 新增
</el-button> </el-button>
<el-button v-perms="['user.user/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)"> <el-button v-perms="['user.user/delete']" :disabled="!selectData.length" @click="handleDelete(selectData)">
删除 删除
</el-button> --> </el-button> -->
<div class="mt-4"> <div class="mt-4">
<el-table :data="pager.lists" @selection-change="handleSelectionChange" > <el-table :data="pager.lists" @selection-change="handleSelectionChange" >
<!-- <el-table-column type="selection" width="55" /> --> <!-- <el-table-column type="selection" width="55" /> -->
@ -53,9 +53,13 @@
<el-table-column label="用户类型" prop="vip_name" /> <el-table-column label="用户类型" prop="vip_name" />
<el-table-column label="用户标签" prop="label_name" /> <el-table-column label="用户标签" prop="label_name" />
<el-table-column label="礼品券" prop="integral" /> <el-table-column label="礼品券" prop="integral" />
<el-table-column label="返还金" prop="return_money" /> <el-table-column label="返还金" prop="return_money">
<template #default="{ row }">
{{ Number(row.return_money).toFixed(2) }}
</template>
</el-table-column>
<el-table-column label="采购款" prop="purchase_funds" /> <el-table-column label="采购款" prop="purchase_funds" />
<el-table-column label="用户余额" prop="user_money" /> <el-table-column label="用户余额" prop="now_money" />
<el-table-column label="累计充值" prop="total_recharge_amount" /> <el-table-column label="累计充值" prop="total_recharge_amount" />
<el-table-column label="地址" prop="user_address" /> <el-table-column label="地址" prop="user_address" />
<el-table-column label="操作" width="120" fixed="right"> <el-table-column label="操作" width="120" fixed="right">