Browse Source

日销售汇总

master
liupopo 2 years ago
parent
commit
289cc4777c
  1. 24
      supervise-crm-ui/src/views/industry/industryAdd.vue
  2. 30
      supervise-crm-ui/src/views/industry/industryInfo.vue
  3. 25
      supervise-crm-ui/src/views/projectType/projectTypeAdd.vue
  4. 2
      supervise-crm-ui/src/views/projectType/projectTypeInfo.vue
  5. 21
      supervise-customer-ui/src/api/report/salesstatisticsday.js
  6. 154
      supervise-customer-ui/src/views/kucun/zhsj/index.vue
  7. 4
      yxt-portal-ui/src/views/Home/Home.vue
  8. 4
      yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/salesstatisticsday/ReportSalesStatisticsDayRest.java

24
supervise-crm-ui/src/views/industry/industryAdd.vue

@ -33,21 +33,21 @@
</template> </template>
<script> <script>
import req from '@/api/dataDict/dataDict' import req from '@/api/dataDict/datadict'
export default { export default {
data() { data() {
return { return {
submitdisabled: false, submitdisabled: false,
formobj: { formobj: {
sid: "", sid: '',
industryName: "", industryName: '',
remarks: "" remarks: ''
} }
} }
}, },
methods: { methods: {
saveOrUpdate() { saveOrUpdate() {
console.log(">>>>>>>>>saveOrUpdate", this.formobj) console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.sid) { if (this.formobj.sid) {
req.updateindustry(this.formobj) req.updateindustry(this.formobj)
.then(resp => { .then(resp => {
@ -57,13 +57,12 @@
type: 'success', type: 'success',
message: resp.msg message: resp.msg
}) })
this.handleReturn("true") this.handleReturn('true')
} else { } else {
// resp.code // resp.code
} }
}) })
.catch(() => {}) .catch(() => {})
} else { } else {
req.saveindustry(this.formobj) req.saveindustry(this.formobj)
.then(resp => { .then(resp => {
@ -73,7 +72,7 @@
type: 'success', type: 'success',
message: resp.msg message: resp.msg
}) })
this.handleReturn("true") this.handleReturn('true')
} else { } else {
// resp.code // resp.code
} }
@ -84,9 +83,9 @@
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.formobj = { this.formobj = {
sid: "", sid: '',
industryName: "", industryName: '',
remarks: "" remarks: ''
} }
this.$emit('doback') this.$emit('doback')
}, },
@ -100,7 +99,6 @@
if (resp.success) { if (resp.success) {
this.formobj = resp.data this.formobj = resp.data
} }
}) })
.catch(e => { .catch(e => {
this.formobj = row this.formobj = row
@ -171,4 +169,4 @@
} }
} }
</style> </style>

30
supervise-crm-ui/src/views/industry/industryInfo.vue

@ -26,8 +26,13 @@
<!-- End 项目列表头部 --> <!-- End 项目列表头部 -->
<!-- Start 项目列表 --> <!-- Start 项目列表 -->
<div class=""> <div class="">
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%" <el-table
@selection-change="handleSelectionChange"> v-loading="tableLoading"
:data="dataList"
border
style="width: 100%"
@selection-change="handleSelectionChange"
>
<!-- <el-table-column fixed width="50" type="selection" align="center" /> --> <!-- <el-table-column fixed width="50" type="selection" align="center" /> -->
<el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" /> <el-table-column fixed width="80" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="操作" align="center" width="180"> <el-table-column label="操作" align="center" width="180">
@ -36,8 +41,8 @@
<el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button> <el-button type="primary" size="mini" @click="toRelevancyInfo(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="industryName" label="项目行业名称" align="center" /> <el-table-column prop="industryName" label="项目行业名称" align="center" />
<el-table-column prop="remarks" label="项目行业说明" align="center"/> <el-table-column prop="remarks" label="项目行业说明" align="center" />
</el-table> </el-table>
</div> </div>
@ -45,8 +50,14 @@
<div class="pages"> <div class="pages">
<div class="tit" /> <div class="tit" />
<!-- 翻页 --> <!-- 翻页 -->
<pagination v-show="dataList.length > 0" :total="queryParams.total" :page.sync="queryParams.current" <pagination
:limit.sync="queryParams.size" class="pagination" @pagination="loadList" /> v-show="dataList.length > 0"
:total="queryParams.total"
:page.sync="queryParams.current"
:limit.sync="queryParams.size"
class="pagination"
@pagination="loadList"
/>
</div> </div>
</div> </div>
</div> </div>
@ -57,7 +68,7 @@
</template> </template>
<script> <script>
import req from '@/api/dataDict/dataDict' import req from '@/api/dataDict/datadict'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'
@ -98,7 +109,7 @@
size: 10, size: 10,
total: 0, total: 0,
params: { params: {
industryName: '', industryName: ''
} }
}, },
sids: [] sids: []
@ -173,7 +184,7 @@
total: 0, total: 0,
params: { params: {
code: '', code: '',
name: '', name: ''
} }
} }
this.loadList() this.loadList()
@ -188,7 +199,6 @@
this.$refs['divadd'].showEdit(row) this.$refs['divadd'].showEdit(row)
}, },
toRelevancyInfo(row) { toRelevancyInfo(row) {
const tip = '请确认是否删除所选记录?' const tip = '请确认是否删除所选记录?'
this.$confirm(tip, '提示', { this.$confirm(tip, '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',

25
supervise-crm-ui/src/views/projectType/projectTypeAdd.vue

@ -33,21 +33,21 @@
</template> </template>
<script> <script>
import req from '@/api/dataDict/dataDict' import req from '@/api/dataDict/datadict'
export default { export default {
data() { data() {
return { return {
submitdisabled: false, submitdisabled: false,
formobj: { formobj: {
sid: "", sid: '',
typeName: "", typeName: '',
remarks: "" remarks: ''
} }
} }
}, },
methods: { methods: {
saveOrUpdate() { saveOrUpdate() {
console.log(">>>>>>>>>saveOrUpdate", this.formobj) console.log('>>>>>>>>>saveOrUpdate', this.formobj)
if (this.formobj.sid) { if (this.formobj.sid) {
req.updateClass(this.formobj) req.updateClass(this.formobj)
.then(resp => { .then(resp => {
@ -57,13 +57,12 @@
type: 'success', type: 'success',
message: resp.msg message: resp.msg
}) })
this.handleReturn("true") this.handleReturn('true')
} else { } else {
// resp.code // resp.code
} }
}) })
.catch(() => {}) .catch(() => {})
} else { } else {
req.saveClass(this.formobj) req.saveClass(this.formobj)
.then(resp => { .then(resp => {
@ -73,7 +72,7 @@
type: 'success', type: 'success',
message: resp.msg message: resp.msg
}) })
this.handleReturn("true") this.handleReturn('true')
} else { } else {
// resp.code // resp.code
} }
@ -84,9 +83,9 @@
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.formobj = { this.formobj = {
sid: "", sid: '',
typeName: "", typeName: '',
remarks: "" remarks: ''
} }
this.$emit('doback') this.$emit('doback')
}, },
@ -100,7 +99,6 @@
if (resp.success) { if (resp.success) {
this.formobj = resp.data this.formobj = resp.data
} }
}) })
.catch(e => { .catch(e => {
this.formobj = row this.formobj = row
@ -171,4 +169,5 @@
} }
} }
</style> </style>

2
supervise-crm-ui/src/views/projectType/projectTypeInfo.vue

@ -55,7 +55,7 @@
</template> </template>
<script> <script>
import req from '@/api/dataDict/dataDict' import req from '@/api/dataDict/datadict'
import ButtonBar from '@/components/ButtonBar' import ButtonBar from '@/components/ButtonBar'
import Pagination from '@/components/pagination' import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye' import pageye from '@/components/pagination/pageye'

21
supervise-customer-ui/src/api/report/salesstatisticsday.js

@ -0,0 +1,21 @@
import request from '@/utils/request'
// 日销售汇总
export default {
// 查询近30天的列表
listOneMonth: function() {
return request({
baseURL: '/api/report',
url: '/sales/statistics/day/listOneMonth'
})
},
// 统计某天数据
countForDay: function(params) {
return request({
baseURL: '/api/report',
url: '/sales/statistics/day/countForDay',
method: 'get',
params: params
})
}
}

154
supervise-customer-ui/src/views/kucun/zhsj/index.vue

@ -6,71 +6,125 @@
<div>{{ viewTitle }}</div> <div>{{ viewTitle }}</div>
<!-- start 添加修改按钮 --> <!-- start 添加修改按钮 -->
<div> <div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> <!-- <el-button type="info" size="small" @click="handleReturn()">关闭</el-button> -->
</div> </div>
<!-- end 添加修改按钮 --> <!-- end 添加修改按钮 -->
<!-- end 详情按钮 --> <!-- end 详情按钮 -->
</div> </div>
<div class="main-content" style="margin-top: 10px;">
<el-row :gutter="20">
<el-col :span="16">
<el-card class="box-card" :body-style="{ padding: '0px' }">
<div slot="header" class="clearfix">
<span>日销售金额汇总列表</span>
</div>
<div>
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
<el-table-column fixed width="60" label="序号" type="index" align="center" />
<el-table-column prop="orderDate" label="数据日期" align="center" width="120" />
<el-table-column prop="zydAmount" label="直营店金额" align="center" width="150" />
<el-table-column prop="pifaAmount" label="批发金额" align="center" width="150" />
<el-table-column prop="jmdAmount" label="加盟店金额" align="center" width="150" />
<el-table-column prop="countAmount" label="合计金额" align="center" />
</el-table>
</div>
</el-card></el-col>
<el-col :span="8">
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>选择日期汇总</span>
</div>
<div>
<el-date-picker v-model="tocountday" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" />
<el-button type="primary" style="margin-left: 10px;" @click="docount">重新汇总</el-button>
</div>
</el-card>
</el-col>
</el-row>
</div>
</div> </div>
</template> </template>
<script> <script>
import req from '@/api/supervise/purchaseapplicationmanagement' import req from '@/api/report/salesstatisticsday'
export default { export default {
name: 'PurchaseApplicationManagementInfo', name: 'KucunZhsj',
data() { data() {
return { return {
submitdisabled: false, submitdisabled: false,
viewTitle: '综合数据上报', viewTitle: '日销售金额汇总',
tableKey: 0, tableKey: 0,
index: 0, index: 0,
totalQuantity: '', // totalQuantity: '', //
amountInTotal: '', // amountInTotal: '', //
formobj: {}, formobj: {},
rules: {} rules: {},
} tableLoading: false,
}, dataList: [],
created() {}, tocountday: new Date()
methods: { }
handleReturn() { },
this.formobj = {} created() {
this.$refs['form_obj'].resetFields() this.loadList()
this.$emit('doback')
}, },
showInfo(row) { methods: {
this.$nextTick(() => { //
this.$refs['form_obj'].clearValidate() // indexMethod(index) {
}) // var pagestart = (this.queryParams.current - 1) * this.queryParams.size
this.viewTitle = '【审核编号】详情' // var pageindex = index + 1 + pagestart
req.fetchBySid(row.sid).then((resp) => { // return pageindex
if (resp.success) { // },
this.formobj = resp.data loadList() {
if (this.formobj.pros.length > 0) { req.listOneMonth().then(res => {
this.totalQuantity = this.formobj.pros.length this.dataList = res.data
var aa = 0 })
for (var i = 0; i < this.formobj.pros.length; i++) { },
if (this.formobj.pros[i].totalPrice !== '') { docount() {
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice) const p = {
day: this.tocountday
}
req.countForDay(p).then(res => {
console.log('1111', res)
this.loadList()
}).catch(e => {
console.log('docount::::', e)
})
},
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【审核编号】详情'
req.fetchBySid(row.sid).then((resp) => {
if (resp.success) {
this.formobj = resp.data
if (this.formobj.pros.length > 0) {
this.totalQuantity = this.formobj.pros.length
var aa = 0
for (var i = 0; i < this.formobj.pros.length; i++) {
if (this.formobj.pros[i].totalPrice !== '') {
aa = parseFloat(aa) + parseFloat(this.formobj.pros[i].totalPrice)
}
} }
this.amountInTotal = aa
} }
this.amountInTotal = aa } else {
// resp.code
} }
} else { }).catch(e => {
// resp.code this.formobj = row
} })
}).catch(e => { }
this.formobj = row
})
} }
} }
}
</script> </script>
<style scoped> <style scoped>
.title { .title {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
</style> </style>

4
yxt-portal-ui/src/views/Home/Home.vue

@ -436,8 +436,8 @@
if (index === 10) { if (index === 10) {
window.open('/#/index', '_blank') window.open('/#/index', '_blank')
} else if (index === 0) { } else if (index === 0) {
// window.open('http://192.168.3.8:9532/#/' + '?token=' + getStorage(), '_blank') window.open('http://127.0.0.1:9531/#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank') // window.open('http://jianguan.yyundong.com/customer/#/' + '?token=' + getStorage(), '_blank')
} else if (index === 1) { } else if (index === 1) {
// window.open('http://192.168.3.8:9531#/' + '?token=' + getStorage(), '_blank') // window.open('http://192.168.3.8:9531#/' + '?token=' + getStorage(), '_blank')
window.open('http://jianguan.yyundong.com/report/#/' + '?token=' + getStorage(), '_blank') window.open('http://jianguan.yyundong.com/report/#/' + '?token=' + getStorage(), '_blank')

4
yxt_supervise/supervise-report/supervise-report-biz/src/main/java/com/yxt/supervise/report/biz/salesstatisticsday/ReportSalesStatisticsDayRest.java

@ -26,8 +26,8 @@ public class ReportSalesStatisticsDayRest {
if (StrUtil.isBlank(day)) if (StrUtil.isBlank(day))
return rb.setMsg("必须指定日期"); return rb.setMsg("必须指定日期");
try { try {
DateTime parse = DateUtil.parse(day, "yyyy-MM-dd"); String currDay = DateUtil.format(new Date(), "yyyy-MM-dd");
if (parse.isAfterOrEquals(new Date())) { if (day.compareTo(currDay) >= 0) {
return rb.setMsg("只能统计之前日期"); return rb.setMsg("只能统计之前日期");
} }
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save