Browse Source

Merge branch 'feat/zry' of http://39.101.133.168:8807/yanjiaqing/gold_vue into feat/zry

feat/zry
zry 3 weeks ago
parent
commit
81e2cf8fe5
  1. 66
      gold-system/src/views/goldBeen/goldenBeenConsum.vue
  2. 66
      gold-system/src/views/goldBeen/goldenBeenDetail.vue
  3. 58
      gold-system/src/views/managerecharge/activity.vue
  4. 59
      gold-system/src/views/managerecharge/rate.vue
  5. 29
      gold-system/src/views/usergold/index.vue

66
gold-system/src/views/goldBeen/goldenBeenConsum.vue

@ -66,17 +66,30 @@
style="width: 220px"
/>
</el-form-item>
<el-form-item prop="createTime">
<el-text class="mx-1" size="large">消费时间</el-text>
<el-form-item prop="startTime">
<el-text class="mx-1" size="large">开始时间</el-text>
<el-date-picker
v-model="detailY.createTime"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="YYYY-MM-DD HH:mm:ss"
v-model="detailY.startTime"
type="date"
placeholder="开始日期"
style="width: 240px"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
<el-form-item prop="endTime">
<el-text class="mx-1" size="large">结束时间</el-text>
<el-date-picker
v-model="detailY.endTime"
type="date"
placeholder="结束日期"
style="width: 240px"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
<el-button style="margin-left: 10px" @click="getToday()"></el-button>
<el-button @click="getYesterday()"></el-button>
<el-button @click="get7Days()">近7天</el-button>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="search">查询</el-button>
@ -185,7 +198,8 @@ const ruleFormRef = ref<FormInstance>()
const detailY = ref({
jwcode: '',
ipAddress: '',
createTime: '',
startTime:'',
endTime:'',
// channel: '', //
sourceName: '', //
sourceType: '' //
@ -194,11 +208,44 @@ const getObj = ref({
pageNum: 1,
pageSize: 50
})
//
const getToday = function () {
const today = new Date()
//
const startDate = moment(today).startOf('day').format('YYYY-MM-DD HH:mm:ss')
//
const endDate = moment(today).endOf('day').format('YYYY-MM-DD HH:mm:ss')
detailY.value.startTime = startDate
detailY.value.endTime = endDate
search()
}
//
const getYesterday = function () {
const yesterday = moment().subtract(1, 'days')
//
const startDate = yesterday.startOf('day').format('YYYY-MM-DD HH:mm:ss')
//
const endDate = yesterday.endOf('day').format('YYYY-MM-DD HH:mm:ss')
detailY.value.startTime = startDate
detailY.value.endTime = endDate
search()
}
// 7
const get7Days = function () {
//
const startDate = moment().subtract(6, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss')
//
const endDate = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
detailY.value.startTime = startDate
detailY.value.endTime = endDate
search()
}
//
const getInit = async function () {
try {
console.log('搜索参数', getObj.value)
const [startTime, endTime] = detailY.value.createTime
const startTime = detailY.value.startTime
const endTime = detailY.value.endTime
// POST
const result = await API({
url: '/dou/getSpend',
@ -233,6 +280,7 @@ const trimJwCode = () => {
detailY.value.sourceName = detailY.value.sourceName.replace(/\s/g, '');
}
}
//
const search = function () {
trimJwCode();

66
gold-system/src/views/goldBeen/goldenBeenDetail.vue

@ -57,19 +57,31 @@
/>
</el-select>
</el-form-item> -->
<el-form-item prop="createTime">
<el-text class="mx-1" size="large">充值时间</el-text>
<el-form-item prop="startTime">
<el-text class="mx-1" size="large">开始时间</el-text>
<el-date-picker
v-model="detailY.createTime"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="detailY.startTime"
type="date"
placeholder="开始日期"
style="width: 240px"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
:unlinkPanels="true"
/>
</el-form-item>
<el-form-item prop="endTime">
<el-text class="mx-1" size="large">结束时间</el-text>
<el-date-picker
v-model="detailY.endTime"
type="date"
placeholder="结束日期"
style="width: 240px"
format="YYYY-MM-DD HH:mm:ss"
value-format="YYYY-MM-DD HH:mm:ss"
/>
</el-form-item>
<el-button style="margin-left: 10px" @click="getToday()"></el-button>
<el-button @click="getYesterday()"></el-button>
<el-button @click="get7Days()">近7天</el-button>
<el-form-item>
<el-button type="primary" @click="search">查询</el-button>
<el-button type="success" @click="reset(ruleFormRef)">重置</el-button>
@ -412,6 +424,38 @@ const rules = ref({
jwcode: [{ required: true, message: '请输入精网号', trigger: 'blur' }],
area: [{ required: true, message: '请选择所属地区', trigger: 'change' }]
})
//
const getToday = function () {
const today = new Date()
//
const startDate = moment(today).startOf('day').format('YYYY-MM-DD HH:mm:ss')
//
const endDate = moment(today).endOf('day').format('YYYY-MM-DD HH:mm:ss')
detailY.value.startTime = startDate
detailY.value.endTime = endDate
search()
}
//
const getYesterday = function () {
const yesterday = moment().subtract(1, 'days')
//
const startDate = yesterday.startOf('day').format('YYYY-MM-DD HH:mm:ss')
//
const endDate = yesterday.endOf('day').format('YYYY-MM-DD HH:mm:ss')
detailY.value.startTime = startDate
detailY.value.endTime = endDate
search()
}
// 7
const get7Days = function () {
//
const startDate = moment().subtract(6, 'days').startOf('day').format('YYYY-MM-DD HH:mm:ss')
//
const endDate = moment().endOf('day').format('YYYY-MM-DD HH:mm:ss')
detailY.value.startTime = startDate
detailY.value.endTime = endDate
search()
}
//
const getArea = async () => {
try {
@ -454,7 +498,6 @@ const detailY = ref({
orderNo: '',
payStyle: '',
type: '',
createTime: '',
startTime:'',
endTime:''
})
@ -548,7 +591,8 @@ const getInit = async function (
) {
try {
console.log('搜索参数', getObj.value)
const [startTime, endTime] = detailY.value.createTime
const startTime = detailY.value.startTime
const endTime = detailY.value.endTime
console.log(startTime, endTime)
// POST
const result = await API({
@ -633,8 +677,8 @@ const getCount = async () => {
data: {
jwcode: detailY.value.jwcode,
deptName: detailY.value.deptName,
startTime: detailY.value.createTime[0],
endTime: detailY.value.createTime[1],
startTime: detailY.value.startTime,
endTime: detailY.value.endTime,
orderNo: detailY.value.orderNo,
type: detailY.value.type
// payStyle: detailY.value.payStyle

58
gold-system/src/views/managerecharge/activity.vue

@ -95,7 +95,58 @@ const get = async function (val) {
ElMessage.error('请求失败')
}
}
//
const getToday = function () {
const today = new Date()
const startDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
)
const endDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 1
)
getTime.value = [startDate, endDate]
console.log('getTime', getTime.value)
get()
}
//
const getYesterday = function () {
const yesterday = new Date()
yesterday.setDate(yesterday.getDate() - 1)
const startDate = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
)
const endDate = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate() + 1
)
getTime.value = [startDate, endDate]
console.log('getTime', getTime.value)
get()
}
// 7
const get7Days = function () {
const today = new Date()
const startDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() - 6
)
const endDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 1
)
getTime.value = [startDate, endDate]
console.log('getTime', getTime.value)
get()
}
//
const trim = () => {
if (activity.value.activityName) {
@ -223,6 +274,11 @@ const del = (row) => {
start-placeholder="起始时间"
end-placeholder="结束时间"
/>
<el-button style="margin-left: 10px" @click="getToday()"
></el-button
>
<el-button @click="getYesterday()"></el-button>
<el-button @click="get7Days()">近7天</el-button>
</div>
<div class="head-card-btn">
<el-button type="success" @click="reset()">重置</el-button>

59
gold-system/src/views/managerecharge/rate.vue

@ -97,6 +97,62 @@ const get = async function (val) {
//
}
}
//
const getToday = function () {
const today = new Date();
const startDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate()
);
const endDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 1
);
// value1!!value1!!lhl
value1.value = [startDate, endDate];
console.log('value1', value1.value);
get();
}
//
const getYesterday = function () {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
const startDate = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate()
);
const endDate = new Date(
yesterday.getFullYear(),
yesterday.getMonth(),
yesterday.getDate() + 1
);
// value1
value1.value = [startDate, endDate];
console.log('value1', value1.value);
get();
}
// 7
const get7Days = function () {
const today = new Date();
const startDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() - 6
);
const endDate = new Date(
today.getFullYear(),
today.getMonth(),
today.getDate() + 1
);
// value1
value1.value = [startDate, endDate];
console.log('value1', value1.value);
get();
}
//
const search = function () {
getObj.value.pageNum = 1
@ -464,6 +520,9 @@ function handleInput(value) {
:size="size"
value-format="YYYY-MM-DD"
/>
<el-button style="margin-left: 10px" @click="getToday"></el-button>
<el-button @click="getYesterday"></el-button>
<el-button @click="get7Days">近7天</el-button>
<!-- 按钮 -->
<el-button
class="button-item"

29
gold-system/src/views/usergold/index.vue

@ -128,7 +128,31 @@ const trimJwCode = () => {
detailY.value.jwcode = detailY.value.jwcode.replace(/\s/g, '');
}
}
//
const getToday = function () {
const today = moment()
const startDate = today.startOf('day').toDate()
const endDate = today.endOf('day').toDate()
getTime.value = [startDate, endDate]
search()
}
//
const getYesterday = function () {
const yesterday = moment().subtract(1, 'day')
const startDate = yesterday.startOf('day').toDate()
const endDate = yesterday.endOf('day').toDate()
getTime.value = [startDate, endDate]
search()
}
// 7
const get7Days = function () {
const startDate = moment().subtract(6, 'day').startOf('day').toDate()
const endDate = moment().endOf('day').toDate()
getTime.value = [startDate, endDate]
search()
}
//
const search = function () {
trimJwCode();
@ -559,8 +583,11 @@ const handleCurrentChange = function (val) {
range-separator="至"
start-placeholder="起始时间"
end-placeholder="结束时间"
style="margin-right: 700px"
style="margin-right: 50px"
/>
<el-button @click="getToday()"></el-button>
<el-button @click="getYesterday()"></el-button>
<el-button @click="get7Days()">近7天</el-button>
<el-button type="success" @click="exportExcel">导出Excel表格</el-button>
<el-button type="success" @click="reset()">重置</el-button>
<el-button type="primary" @click="search()">查询</el-button>

Loading…
Cancel
Save