| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '../../utils/request' |
| | | |
| | | // æ¥è¯¢ |
| | | export function fetchList (data) { |
| | | return request.post('/business/shop/pageMoney', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function exportExcel (data) { |
| | | return request.post('/business/shop/exportExcelMoney', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | |
| | | this.$emit('success') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | // this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | |
| | | this.visible = true |
| | | this.info = target |
| | | this.form.type = 0 |
| | | this.form.userType = 0 |
| | | this.form.userType = userType || 0 |
| | | this.form.memberId = target.id |
| | | this.form.num = null |
| | | this.form.remark = null |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="80%" |
| | | :visible.sync="visible" |
| | | > |
| | | <TableLayout :permissions="['business:integral:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="" prop="type"> |
| | | <el-select v-model="searchForm.type" placeholder="è¯·éæ©æ¶æ¯ç±»å" @change="search" > |
| | | <el-option :key="0" :value="0" label="æ¶å
¥"></el-option> |
| | | <el-option :key="1" :value="1" label="æ¯åº"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="orderCode"> |
| | | <el-input v-model="searchForm.orderCode" placeholder="请è¾å
¥è®¢åå·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="" prop="objType"> |
| | | <el-select v-model="searchForm.objType" placeholder="è¯·éæ©æ¶è´¹ç±»å" @change="search" > |
| | | <el-option :key="16" :value="16" label="订åç»ç®"></el-option> |
| | | <el-option :key="17" :value="17" label="ä½é¢æç°"></el-option> |
| | | <el-option :key="19" :value="19" label="æç°éå"></el-option> |
| | | <el-option :key="20" :value="20" label="订åç»ç®éå"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <div class="date-style" style="display: inline"> |
| | | <el-form-item label="äº¤ææ¶é´" prop="starttime" > |
| | | <el-date-picker |
| | | style="width: 160px" |
| | | v-model="searchForm.starttime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | placeholder="å¼å§æ¶é´" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="-" label-width="10px" prop="endtime" > |
| | | <el-date-picker |
| | | style="width: 160px" |
| | | v-model="searchForm.endtime" |
| | | type="datetime" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="è³" |
| | | placeholder="æªæ¢æ¶é´" |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | </div> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:integral:exportExcel']" @click="exportExcel">导åº</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="createDate" align="center" label="äº¤ææ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column prop="type" align="center" label="æ¶æ¯ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type==0" class="green">æ¶å
¥</span> |
| | | <span v-else class="red">æ¯åº</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" align="center" label="éé¢ï¼å
ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="totalNum" align="center" label="å½åä½é¢ï¼å
ï¼" min-width="100px"></el-table-column> |
| | | <el-table-column prop="strObjType" align="center" label="交æç±»å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="orderCode" align="center" label="交æåå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" align="center" label="交æè¯´æ" min-width="150px" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | export default { |
| | | name: 'OperaIntegralShopMoneyWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination}, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | visible: false, |
| | | tabelHeight: null, |
| | | info: {}, |
| | | // æç´¢ |
| | | searchForm: { |
| | | memberId: null, |
| | | userType: 2, |
| | | type: '', |
| | | starttime: '', |
| | | objType: null, |
| | | endtime: '', |
| | | orderCode: '' |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.config({ |
| | | module: 'ç¨æ·ä¿¡æ¯è¡¨', |
| | | api: '/business/integral', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, info) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.info = info |
| | | this.searchForm.memberId = info.id |
| | | this.search() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | .header-b{ |
| | | display: inline-block; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .header-blue{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid #216EEE; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: #216EEE; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-btn{ |
| | | display: inline-block; |
| | | border: none; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | } |
| | | .info-item{ |
| | | display: flex; |
| | | width: 100%; |
| | | margin: 15px; |
| | | } |
| | | .info-item-a{ |
| | | flex: 1; |
| | | font-size: 14px; |
| | | |
| | | } |
| | | .info-item-a span{ |
| | | font-weight: 600; |
| | | } |
| | | .info-item-a .btn{ |
| | | font-size: 12px !important; |
| | | cursor: pointer !important; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="info-item"></div> |
| | | </div> |
| | | <div style="display: block"> |
| | | <div style="display: block;margin-bottom: 50px;"> |
| | | <div class="header"> |
| | | <div class="header-b">积åæç»</div> |
| | | <div v-if="info.phone!=null && info.phone!=''" class="header-btn"> |
| | | <div class="header-btn"> |
| | | <el-button style="display: inline" type="primary" @click="changeIntegral">积åè°æ´</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | > |
| | | <el-table-column prop="type" label="è·å¾/æ£é¤" align="center" min-width="150px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.saleType == 1?'æ£é¤':'è·å¾'}} |
| | | </template> |
| | | <span v-if="row.type==0" class="green">è·å¾</span> |
| | | <span v-else class="red">æ£é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ°é" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="totalNum" label="ä½é¢" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="strObjType" label="æ¶è´¹ç±»å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" label="æ¶è´¹å
容" align="center" min-width="150px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="orderCode" label="å
³è订å" align="center" min-width="150px"></el-table-column> |
| | |
| | | row.oldGoodsPrice = row.goodsPrice |
| | | }, |
| | | blurEvent (row, curIndex, column) { |
| | | if(this.price >= row.goodsPrice) { |
| | | if(this.price <= row.goodsPrice) { |
| | | this.$tip.error('ä¾è´§ä»·ä¸è½ä½äºéå®ä»·') |
| | | row.isPriceSelected = !row.isPriceSelected |
| | | row.goodsPrice = row.oldGoodsPrice// ä»·æ ¼è¿å |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | width="100%" |
| | | :visible.sync="visible" |
| | | > |
| | | <div style="display: block;"> |
| | | <div class="platgroup_tabs"> |
| | | <div class="tab" :class="{ active: activeGroup === item.id }" @click="groupClick(item)" |
| | | v-for="(item, i) in groupList" :key="i"> |
| | | {{ item.name }} |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template v-if="activeGroup ==0"> |
| | | <div style="display: block;"> |
| | | <div class="header"> |
| | | <div class="header-b">åºæ¬ä¿¡æ¯</div> |
| | | <div v-if="info.status !=1" class="header-green">æ£å¸¸</div> |
| | | <div v-if="info.status ==1" class="header-red">ç¦ç¨</div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">ç»éååç§°ï¼<span>{{info.name || ''}}</span><span class="blue header-blue">{{ info.saleType == 1?'èªç±éè´':'å¹³å°éºè´§'}}</span></div> |
| | | <div class="info-item-a">é¨åºIDï¼<span>{{info.code || ''}}</span></div> |
| | | <div class="info-item-a">ç»å½è´¦å·ï¼<span>{{info.username || ''}}</span></div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">æå±å°åºï¼<span>{{info.bigAreaName || ''}}</span></div> |
| | | <div class="info-item-a">çå¸åºï¼<span v-if="info.areas">{{(info.areas.provinceName||'') + (info.areas.cityName||'') + (info.areas.name||'')}}</span></div> |
| | | <div class="info-item-a">详ç»å°åï¼<span>{{info.addr || ''}}</span></div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">è系人ï¼<span>{{info.realname || ''}}</span></div> |
| | | <div class="info-item-a">ææºå·ï¼<span>{{info.phone || ''}}</span></div> |
| | | <div class="info-item-a">å建æ¶é´ï¼<span>{{info.createDate || ''}}</span></div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">å®ä½ä¿¡æ¯ï¼<span>ç»åº¦ï¼{{info.longitude || '-'}} 维度ï¼{{info.latitude|| '-'}}</span></div> |
| | | <div class="info-item-a">è¥ä¸æ¶é´ï¼<span>{{info.startTime || ''}}</span></div> |
| | | <div class="info-item-a"></div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">é¨å¤´å¾ï¼ |
| | | <div> <el-image v-if="info.imgurlfull" style="margin-left: 100px; width: 100px; height: 100px; border-radius: 2px;" :src="info.imgurlfull" :preview-src-list="[info.imgurlfull]"></el-image></div> |
| | | </div> |
| | | <div class="info-item-a"></div> |
| | | <div class="info-item-a"></div> |
| | | </div> |
| | | <div class="info-item"></div> |
| | | </div> |
| | | <div style="display: block"> |
| | | <div class="header"> |
| | | <div class="header-b">èµè´¨ä¿¡æ¯</div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">æ³äººå§åï¼<span>{{info.legalPersonName || ''}}</span></div> |
| | | <div class="info-item-a">èç³»çµè¯ï¼<span>{{info.legalPersonPhone || ''}}</span></div> |
| | | <div class="info-item-a"></div> |
| | | </div> |
| | | <div class="info-item"> |
| | | <div class="info-item-a"> 身份è¯ï¼ |
| | | <div style="display: inline-block;width: 300px;margin-left: 100px;"> |
| | | <el-image v-if="info.idcardImg" style="width: 100px; height: 100px; border-radius: 2px;display: inline-block;" |
| | | :src="info.imgFullUrl +info.idcardImg" |
| | | :preview-src-list="[info.imgFullUrl +info.idcardImg]"></el-image> |
| | | <el-image v-if="info.idcardImgBack" style="margin-left:10px;width: 100px; height: 100px; border-radius: 2px;display: inline-block;" |
| | | :src="info.imgFullUrl +info.idcardImgBack" |
| | | :preview-src-list="[info.imgFullUrl +info.idcardImgBack]"></el-image> |
| | | </div> |
| | | </div> |
| | | <div class="info-item-a">è¥ä¸æ§ç
§ï¼ |
| | | <div style="display: inline-block;width: 300px;margin-left: 100px;"> |
| | | <el-image v-if="info.businessImg" style="width: 100px; height: 100px; border-radius: 2px;" |
| | | :src="info.imgFullUrl +info.businessImg" |
| | | :preview-src-list="[info.imgFullUrl +info.businessImg]"></el-image> |
| | | </div> |
| | | </div> |
| | | <div class="info-item-a"></div> |
| | | </div> |
| | | <div class="info-item"></div> |
| | | </div> |
| | | <div style="display: block;margin-bottom: 50px;"> |
| | | <div class="header"> |
| | | <div class="header-b">é宿¨¡å¼åæ´è®°å½</div> |
| | | </div> |
| | | <TableLayout > |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | v-loading="isWorking.search0" |
| | | :data="tableData0.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="type" label="åæ´ç±»å" fixed align="center" min-width="150px">é宿¨¡å¼</el-table-column> |
| | | <el-table-column prop="beforeInfo" label="åæ´å" fixed align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="afterInfo" label="åæ´å" fixed align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" align="center" min-width="300px"></el-table-column> |
| | | <el-table-column prop="createName" label="æä½äºº" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="æä½æ¶é´" align="center" min-width="150px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange0" |
| | | @current-change="handlePageChange0" |
| | | :pagination="tableData0.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="activeGroup == 2"> |
| | | <div style="display: block;margin-bottom: 50px;"> |
| | | <div class="header"> |
| | | <div class="header-b">积åæç»</div> |
| | | <div class="header-btn"> |
| | | <el-button style="display: inline" type="primary" @click="changeIntegral">积åè°æ´</el-button> |
| | | </div> |
| | | </div> |
| | | <TableLayout > |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <div > |
| | | <div style="float: left; margin-bottom: 20px;width:50%;"> |
| | | <div class="info-item"> |
| | | <div class="info-item-a">ç°æç§¯åï¼<span>{{info.integral || 0}}</span></div> |
| | | <div class="info-item-a">累计积åï¼<span>{{info.totalIntegral || 0}}</span></div> |
| | | </div> |
| | | </div> |
| | | <div style="float: right; margin-bottom: 20px;"> |
| | | <el-select v-model="searchForm2.type" placeholder="å
¨é¨" clearable @change="search" style="width: 120px;" > |
| | | <el-option :key="0" :value="0" label="è·å¾" ></el-option> |
| | | <el-option :key="1" :value="1" label="æ£é¤" ></el-option> |
| | | </el-select> |
| | | <el-button @click="handlePageChange2(1)" type="ç¹å»å·æ°" icon="el-icon-refresh" style="margin-left: 10px;" ></el-button> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | v-loading="isWorking.search2" |
| | | :data="tableData2.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="type" label="è·å¾/æ£é¤" align="center" min-width="150px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.type==0" class="green">è·å¾</span> |
| | | <span v-else class="red">æ£é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ°é" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="totalNum" label="ä½é¢" fixed align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="strObjType" label="æ¶è´¹ç±»å" align="center" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" label="æ¥æº" align="center" min-width="150px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="remark" label="夿³¨" align="center" min-width="200px"></el-table-column> |
| | | <el-table-column prop="orderCode" label="å
³è订å" align="center" min-width="150px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å卿¶é´" align="center" min-width="200px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange2" |
| | | @current-change="handlePageChange2" |
| | | :pagination="tableData2.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | </TableLayout> |
| | | </div> |
| | | </template> |
| | | <template v-slot:footer> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </template> |
| | | <OperaChangeShopRecordWindow ref="OperaChangeShopRecordWindow"/> |
| | | <OperaChangeIntegralWindow ref="OperaChangeIntegralWindow" @success="successBiz"/> |
| | | </GlobalWindow> |
| | | </template> |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaChangeShopRecordWindow from '@/components/business/OperaChangeShopRecordWindow' |
| | | import OperaChangeIntegralWindow from '@/components/business/OperaChangeIntegralWindow' |
| | | import { shopDetail as detail } from '@/api/business/shop' |
| | | import { fetchList as actionList } from '@/api/business/userAction' |
| | | import { fetchList as integralList } from '@/api/business/integral' |
| | | export default { |
| | | name: 'OperaShopInfoWindow', |
| | | extends: BaseTable, |
| | | components: { GlobalWindow, TableLayout, Pagination, OperaChangeShopRecordWindow, OperaChangeIntegralWindow }, |
| | | data () { |
| | | return { |
| | | title: '', |
| | | visible: false, |
| | | tabelHeight: null, |
| | | activeGroup: -1, |
| | | groupList: [{ id: 0, name: 'åºæ¬ä¿¡æ¯' }, { id: 1, name: 'éå®ä¿¡æ¯' }, { id: 2, name: '积åä¿¡æ¯' }], |
| | | info: {}, |
| | | // æç´¢ |
| | | searchForm2: { |
| | | memberId: '', |
| | | userType: 1, |
| | | type: null |
| | | }, |
| | | isWorking: { |
| | | search0: false, |
| | | search1: false, |
| | | search2: false |
| | | }, |
| | | tableData0: { |
| | | // å·²éä¸çæ°æ® |
| | | selectedRows: [], |
| | | // æåºçåæ®µ |
| | | sorts: [], |
| | | // å½åé¡µæ°æ® |
| | | list: [], |
| | | // å页 |
| | | pagination: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | }, |
| | | tableData2: { |
| | | // å·²éä¸çæ°æ® |
| | | selectedRows: [], |
| | | // æåºçåæ®µ |
| | | sorts: [], |
| | | // å½åé¡µæ°æ® |
| | | list: [], |
| | | // å页 |
| | | pagination: { |
| | | pageIndex: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | |
| | | created () { |
| | | this.config({ |
| | | module: 'ç¨æ·ä¿¡æ¯è¡¨', |
| | | api: '/business/integral', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | groupClick(item){ |
| | | this.activeGroup = item.id |
| | | }, |
| | | successBiz () { |
| | | this.handlePageChange2(1) |
| | | this.loadInfo() |
| | | this.$emit('success') |
| | | }, |
| | | loadInfo () { |
| | | detail(this.info.id).then(res => { |
| | | this.info = res || this.info |
| | | }) |
| | | }, |
| | | showChangeRecord () { |
| | | if (this.info) { |
| | | this.$refs.OperaChangeShopRecordWindow.open('客æ·ç»éååæ´è®°å½', this.info) |
| | | } |
| | | }, |
| | | changeIntegral () { |
| | | if (this.info) { |
| | | this.$refs.OperaChangeIntegralWindow.open('ç»éå积åè°æ´', this.info, 1) |
| | | } |
| | | }, |
| | | open (title, info) { |
| | | this.title = title |
| | | this.visible = true |
| | | this.info = info |
| | | this.activeGroup = 0 |
| | | this.searchForm2.memberId = info.id |
| | | if (this.info.imgurl) { |
| | | this.info.imgurlfull = this.info.imgFullUrl + this.info.imgurl |
| | | } |
| | | this.handlePageChange0(1) |
| | | this.handlePageChange2(1) |
| | | }, |
| | | handleSizeChange0 (pageSize) { |
| | | this.tableData0.pagination.pageSize = pageSize |
| | | this.search0() |
| | | }, |
| | | // 页ç åæ´å¤ç |
| | | handlePageChange0 (pageIndex) { |
| | | this.tableData0.pagination.pageIndex = pageIndex || this.tableData0.pagination.pageIndex |
| | | this.isWorking.search0 = true |
| | | actionList({ |
| | | page: this.tableData0.pagination.pageIndex, |
| | | capacity: this.tableData0.pagination.pageSize, |
| | | model: { type: 1, memberId: this.info.id }, // é宿¨¡å¼åæ´ |
| | | sorts: this.tableData0.sorts |
| | | }) |
| | | .then(data => { |
| | | this.tableData0.list = data.records |
| | | this.tableData0.pagination.total = data.total |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search0 = false |
| | | }) |
| | | }, |
| | | handleSizeChange2 (pageSize) { |
| | | this.tableData0.pagination.pageSize = pageSize |
| | | this.search0() |
| | | }, |
| | | // 页ç åæ´å¤ç |
| | | handlePageChange2 (pageIndex) { |
| | | this.tableData2.pagination.pageIndex = pageIndex || this.tableData2.pagination.pageIndex |
| | | this.isWorking.search2 = true |
| | | integralList({ |
| | | page: this.tableData0.pagination.pageIndex, |
| | | capacity: this.tableData0.pagination.pageSize, |
| | | model: this.searchForm2, // é宿¨¡å¼åæ´ |
| | | sorts: this.tableData2.sorts |
| | | }) |
| | | .then(data => { |
| | | this.tableData2.list = data.records |
| | | this.tableData2.pagination.total = data.total |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search2 = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .platgroup_tabs { |
| | | flex: 1; |
| | | display: flex; |
| | | border-bottom: 1px solid #dfe2e8; |
| | | margin-bottom: 30px; |
| | | .tab { |
| | | color: #666666; |
| | | margin-right: 40px; |
| | | cursor: pointer; |
| | | padding-bottom: 10px; |
| | | border-bottom: 2px solid #fff; |
| | | } |
| | | |
| | | .active { |
| | | font-weight: 500; |
| | | font-size: 15px; |
| | | color: #216EEE; |
| | | border-bottom: 2px solid #216EEE; |
| | | } |
| | | } |
| | | .table-pagination{ |
| | | position: fixed !important; |
| | | bottom: 50px; |
| | | } |
| | | .header-b{ |
| | | display: inline-block; |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | } |
| | | .header-green{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid green; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: green; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-red{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid red; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: red; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-blue{ |
| | | display: inline-block; |
| | | font-size: 12px; |
| | | border: 1px solid #216EEE; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | color: #216EEE; |
| | | border-radius: 5px ; |
| | | } |
| | | .header-btn{ |
| | | display: inline-block; |
| | | border: none; |
| | | padding: 2px 10px; |
| | | margin-left: 20px; |
| | | } |
| | | .info-item{ |
| | | display: flex; |
| | | width: 100%; |
| | | margin: 15px; |
| | | } |
| | | .info-item-a{ |
| | | flex: 1; |
| | | font-size: 14px; |
| | | |
| | | } |
| | | .info-item-a span{ |
| | | font-weight: 600; |
| | | } |
| | | .info-item-a .btn{ |
| | | font-size: 12px !important; |
| | | cursor: pointer !important; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <!-- |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:integral:exportExcel']" @click="exportExcel">导åº</el-button> |
| | | --> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="remark" label="æµæ°´å·" align="center" min-width="100px"></el-table-column> |
| | | <!-- <el-table-column prop="remark" label="æµæ°´å·" align="center" min-width="100px"></el-table-column>--> |
| | | <el-table-column prop="nickName" label="ç¨æ·" align="center" min-width="100px"> </el-table-column> |
| | | <el-table-column prop="phone" align="center" label="ææºå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="type" align="center" label="æ¶æ¯ç±»å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.type==0?'æ¶å
¥':'æ¯åº' }} |
| | | <span v-if="row.type==0" class="green">è·å¾</span> |
| | | <span v-else class="red">æ£é¤</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" align="center" label="æ°é" min-width="100px"></el-table-column> |
| | | <el-table-column prop="totalNum" align="center" label="å½åä½é¢" min-width="100px"></el-table-column> |
| | | <el-table-column prop="strObjType" align="center" label="æ¶è´¹ç±»å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" align="center" label="åå¨å
容" min-width="150px" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="orderCode" align="center" label="交æåå·" min-width="100px"></el-table-column> |
| | | <el-table-column prop="content" align="center" label="æ¶æ¯è¯´æ" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" align="center" label="å卿¶é´" min-width="100px"></el-table-column> |
| | | </el-table> |
| | | <pagination |
| | |
| | | userType: 0, |
| | | type: '', |
| | | starttime: '', |
| | | objType: null, |
| | | endtime: '', |
| | | orderCode: '' |
| | | } |
| | |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:shop:create', 'business:shop:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaShopWindow.open('æ°å»ºåºéº')" icon="el-icon-plus" v-permissions="['business:shop:create']">æ°å»º</el-button></li> |
| | | <li><el-button type="primary" @click="$refs.operaShopWindow.open('æ°å»ºç»éå')" icon="el-icon-plus" v-permissions="['business:shop:create']">æ°å»º</el-button></li> |
| | | <!-- <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete" v-permissions="['business:shop:delete']">å é¤</el-button></li> --> |
| | | </ul> |
| | | <el-table |
| | |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaShopWindow ref="operaShopWindow" @success="handlePageChange"/> |
| | | <OperaShopDetailWindow ref="operaShopDetailWindow" /> |
| | | <OperaShopInfoWindow ref="OperaShopInfoWindow" /> |
| | | <ResetPwdShopWindow ref="resetPwdWindow"/> |
| | | </TableLayout> |
| | | </template> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaShopWindow from '@/components/business/OperaShopWindow' |
| | | import OperaShopDetailWindow from '@/components/business/OperaShopDetailWindow' |
| | | import OperaShopInfoWindow from '@/components/business/OperaShopInfoWindow' |
| | | import { resetPwd, updateIsRecById } from '@/api/business/shop' |
| | | import ResetPwdShopWindow from '@/components/business/ResetPwdShopWindow' |
| | | export default { |
| | | name: 'Shop', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaShopWindow, OperaShopDetailWindow, ResetPwdShopWindow }, |
| | | components: { TableLayout, Pagination, OperaShopWindow, OperaShopInfoWindow, ResetPwdShopWindow }, |
| | | data () { |
| | | return { |
| | | |
| | |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'åºéºåºæ¬ä¿¡æ¯è¡¨', |
| | | module: 'ç»éååºæ¬ä¿¡æ¯è¡¨', |
| | | api: '/business/shop', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | |
| | | }) |
| | | }, |
| | | showDetail (row) { |
| | | this.$refs.operaShopDetailWindow.open('åºéºè¯¦æ
', row) |
| | | this.$refs.OperaShopInfoWindow.open('ç»éå详æ
', row) |
| | | } |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:integral:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="ç»éååç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥ç»éååç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é¨åºID" prop="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥é¨åºID" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button type="primary" :loading="isWorking.export" v-permissions="['business:shop:exportExcel']" @click="exportExcel">导åº</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="name" label="ç»éååç§°" align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="code" label="é¨åºID" align="center" min-width="150px"> </el-table-column> |
| | | <el-table-column prop="amount" align="center" label="è´¦æ·ä½é¢ï¼å
ï¼" min-width="150px"> |
| | | <template slot-scope="{row}">{{row.amount || 0}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="jiesuanIng" align="center" label="å¾
ç»ç®ï¼å
ï¼" min-width="150px"> |
| | | <template slot-scope="{row}">{{row.jiesuanIng || 0}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="withdrawIng" align="center" label="æç°ä¸ï¼å
ï¼" min-width="150px"> |
| | | <template slot-scope="{row}">{{row.withdrawIng || 0}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="withdrawTotal" align="center" label="累计æç°ï¼å
ï¼" min-width="150px"> |
| | | <template slot-scope="{row}">{{row.withdrawTotal || 0}}</template> |
| | | </el-table-column> |
| | | <el-table-column prop="withdrawDate" align="center" label="æè¿æç°æ¶é´" min-width="150px"></el-table-column> |
| | | <el-table-column |
| | | label="æä½" |
| | | min-width="100" |
| | | fixed="right" |
| | | align="center" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.OperaIntegralShopMoneyWindow.open('æ¥è¯¢ç»éåä½é¢æç»', row)" icon="el-icon-edit" >æ¥è¯¢æç»</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <OperaIntegralShopMoneyWindow ref="OperaIntegralShopMoneyWindow"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaIntegralShopMoneyWindow from '@/components/business/OperaIntegralShopMoneyWindow' |
| | | export default { |
| | | name: 'Integral', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination ,OperaIntegralShopMoneyWindow}, |
| | | data () { |
| | | return { |
| | | createDate: [], |
| | | // æç´¢ |
| | | searchForm: { |
| | | code: '', |
| | | name: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ç»éåè´¦æ·æç»', |
| | | api: '/business/shopMoney', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | } |
| | | } |
| | | </script> |
| | |
| | | @RequiresPermissions("business:integral:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Integral> pageWrap, HttpServletResponse response) throws Exception { |
| | | List<Integral> list=integralService.findPage(pageWrap).getRecords(); |
| | | for(Integral model:list){ |
| | | if(Constants.equalsInteger(model.getType(),Constants.ZERO)){ |
| | | model.setStrType("æ¶å
¥"); |
| | | }else if(Constants.equalsInteger(model.getType(),Constants.ONE)){ |
| | | model.setStrType("æ¯åº"); |
| | | } |
| | | model.setStrObjType(Constants.IntegralObjType.getName(model.getObjType())); |
| | | } |
| | | ExcelExporter.build(Integral.class).export(list, "ç¨æ·ç§¯åæç»"+ DateUtil.getNowLongTime(), response); |
| | | ExcelExporter.build(Integral.class).export(list, "ç»éåä½é¢æç»"+ DateUtil.getNowLongTime(), response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.Shop; |
| | | import com.doumee.dao.system.vo.ShopMoneyVO; |
| | | import com.doumee.dao.web.dto.ResetSystemUserPwdDTO; |
| | | import com.doumee.service.business.ShopService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | return ApiResponse.success(shopService.findPage(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("å页æ¥è¯¢è´¦å·æç»") |
| | | @PostMapping("/pageMoney") |
| | | @RequiresPermissions("business:shop:query") |
| | | public ApiResponse<PageData<ShopMoneyVO>> findPageMoney (@RequestBody PageWrap<Shop> pageWrap) { |
| | | return ApiResponse.success(shopService.findPageMoney(pageWrap)); |
| | | } |
| | | |
| | | @ApiOperation("æ¥è¯¢æææ°æ®") |
| | | @PostMapping("/findAll") |
| | | @RequiresPermissions("business:shop:query") |
| | |
| | | public void exportExcel (@RequestBody PageWrap<Shop> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Shop.class).export(shopService.findPage(pageWrap).getRecords(), "åºéºåºæ¬ä¿¡æ¯è¡¨", response); |
| | | } |
| | | @ApiOperation("导åºExcel") |
| | | @PostMapping("/exportExcelMoney") |
| | | @RequiresPermissions("business:shop:exportExcel") |
| | | public void exportExcelMoney (@RequestBody PageWrap<Shop> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(ShopMoneyVO.class).export(shopService.findPageMoney(pageWrap).getRecords(), "ç»éåè´¦å·æç»", response); |
| | | } |
| | | |
| | | @ApiOperation("æ ¹æ®IDæ¥è¯¢") |
| | | @GetMapping("/{id}") |
| | |
| | | |
| | | public enum UserActionType { |
| | | CHANGE_SHOP(0, "ç»éåæ´æ¢","ç±ã${param1}ãäºã${param2}ãï¼è¿è¡ãç»éåæ´æ¢ã" ), |
| | | CHANGE_SALETYPE(1, "ç»éåæ´æ¢é宿¨¡å¼","ç±ã${param1}ãäºã${param2}ãï¼è¿è¡ãé宿¨¡å¼åæ´ã" ), |
| | | ; |
| | | |
| | | // æååé |
| | |
| | | private Integer creator; |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´" ,index = 8,width = 10) |
| | | @ExcelColumn(name="äº¤ææ¶é´" ,index =1,width = 10) |
| | | private Date createDate; |
| | | |
| | | @ApiModelProperty(value = "æ´æ°äººç¼ç ", example = "1") |
| | |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "å
容") |
| | | @ExcelColumn(name="æ¶æ¯è¯´æ",index =7,width = 10) |
| | | @ExcelColumn(name="交æè¯´æ",index =7,width = 10) |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "对象ç¼ç 0平尿³¨å 1ç¾å° 2å享é请 3é请æ°ç¨æ· 4å
æ¢åå", example = "1") |
| | |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "æ¶æ¯ç±»å 0æ¶å
¥ 1æ¯åº", example = "1") |
| | | @ExcelColumn(name="æ¶æ¯ç±»å",index =2,width = 10,valueMapping = "0=æ¶å
¥;1=æ¯åº;") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "æ°é", example = "1") |
| | | @ExcelColumn(name="æ¶æ¯éé¢",index =4,width = 10) |
| | | @ExcelColumn(name="æ¶æ¯éé¢(å
)",index =3,width = 10) |
| | | private BigDecimal num; |
| | | |
| | | @ApiModelProperty(value = "å½åä½é¢", example = "1") |
| | | @ExcelColumn(name="å½åä½é¢",index =5,width = 10) |
| | | @ExcelColumn(name="å½åä½é¢(å
)",index =4,width = 10) |
| | | private BigDecimal totalNum; |
| | | |
| | | @ApiModelProperty(value = "交æåå·") |
| | | @ExcelColumn(name="å
³è订åå·",index =6,width = 10) |
| | | private String orderCode; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·æ°æ®ç±»åï¼0=æ¶è´¹è
积åï¼1=ç»éå积åï¼2=ç»éåç»ç®éé¢ï¼") |
| | | private Integer userType; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·æµç§°") |
| | | @ExcelColumn(name="ç¨æ·",index =1,width = 10) |
| | | @TableField(exist = false) |
| | | private String nickName; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·ææºå·") |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ææºå·",index =2,width = 10) |
| | | private String phone; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="æ¶æ¯ç±»å",index =3,width = 10) |
| | | private String strType; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å¼å§æ¶é´ ") |
| | | @TableField(exist = false) |
| | |
| | | private Date endtime; |
| | | |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç±»å",index =6,width = 10) |
| | | @ExcelColumn(name="交æç±»å",index =5,width = 10) |
| | | private String strObjType; |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.system.vo; |
| | | |
| | | |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel("ç»éåè´¦æ·æç»å¯¹è±¡") |
| | | public class ShopMoneyVO { |
| | | |
| | | @ApiModelProperty(value = "主é®", example = "1") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "åºéºåç§°") |
| | | @ExcelColumn(name="ç»éååç§°",width = 10,index = 1) |
| | | private String name; |
| | | @ApiModelProperty(value = "é¨åºID") |
| | | @ExcelColumn(name="é¨åºID",width = 10,index = 2) |
| | | private String code; |
| | | @ApiModelProperty(value = "坿ç°éé¢") |
| | | @ExcelColumn(name="è´¦å·ä½é¢ï¼å
ï¼",width = 10,index = 3) |
| | | private BigDecimal amount; |
| | | @ApiModelProperty(value = "ç»ç®ä¸") |
| | | @ExcelColumn(name="ç»ç®ä¸ï¼å
ï¼",width = 10,index = 4) |
| | | private BigDecimal jiesuanIng; |
| | | @ApiModelProperty(value = "æç°ä¸éé¢") |
| | | @ExcelColumn(name="æç°ä¸ï¼å
ï¼",width = 10,index = 5) |
| | | private BigDecimal withdrawIng; |
| | | @ApiModelProperty(value = "累计æç°éé¢") |
| | | @ExcelColumn(name="累计æç°ï¼å
ï¼",width = 10,index =6 ) |
| | | private BigDecimal withdrawTotal; |
| | | @ApiModelProperty(value = "æè¿æç°æ¶é´") |
| | | @ExcelColumn(name="æè¿æç°æ¶é´",width = 10,index =7,dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date withdrawDate; |
| | | } |
| | |
| | | import com.doumee.dao.business.model.Integral; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Shop; |
| | | import com.doumee.dao.system.vo.ShopMoneyVO; |
| | | import com.doumee.dao.web.dto.MemberDTO; |
| | | import com.doumee.dao.web.dto.ResetSystemUserPwdDTO; |
| | | import com.doumee.dao.web.dto.ShopLoginDTO; |
| | |
| | | |
| | | String setGoodsPrice(Shop shop); |
| | | |
| | | PageData<ShopMoneyVO> findPageMoney(PageWrap<Shop> pageWrap); |
| | | } |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | |
| | | queryWrapper.selectAll(Integral.class); |
| | | queryWrapper.selectAs(Member::getNickname, Fund::getNickName); |
| | | queryWrapper.selectAs(Member::getImgurl, Fund::getImgurl); |
| | | queryWrapper.selectAs(Member::getPhone, Fund::getPhone); |
| | | |
| | | queryWrapper.selectAs(Member::getNickname, Integral::getNickName); |
| | | queryWrapper.selectAs(Member::getImgurl, Integral::getImgurl); |
| | | queryWrapper.selectAs(Member::getPhone, Integral::getPhone); |
| | | queryWrapper.leftJoin(Member.class, Member::getId, Integral::getMemberId); |
| | | |
| | | queryWrapper.eq(pageWrap.getModel().getMemberId() != null, Integral::getMemberId, pageWrap.getModel().getMemberId()); |
| | | queryWrapper.eq(pageWrap.getModel().getType() != null, Integral::getType, pageWrap.getModel().getType()); |
| | | queryWrapper.eq(pageWrap.getModel().getUserType() != null, Integral::getUserType, pageWrap.getModel().getUserType()); |
| | | queryWrapper.eq( pageWrap.getModel().getObjType() !=null, Integral::getObjType, pageWrap.getModel().getObjType()); |
| | | queryWrapper.and(StringUtils.isNotBlank(pageWrap.getModel().getNickName()), ms -> ms.like(Member::getNickname, pageWrap.getModel().getNickName()) |
| | | .or().like(Member::getPhone, pageWrap.getModel().getNickName()) |
| | | ); |
| | |
| | | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(result.getRecords())){ |
| | | for (Integral integral:result.getRecords()) { |
| | | integral.setStrType(Constants.IntegralObjType.getName(integral.getObjType())); |
| | | integral.setStrObjType(Constants.IntegralObjType.getName(integral.getObjType())); |
| | | } |
| | | } |
| | | return PageData.from(result); |
| | |
| | | Date date = new Date(); |
| | | Integral integral = new Integral(); |
| | | Constants.IntegralObjType integralObjType =null; |
| | | if(Constants.equalsInteger(param.getUserType(), Constants.ZERO)){ |
| | | if(Constants.equalsInteger(param.getUserType(), Constants.ZERO)){//ç¨æ·è´¦å· |
| | | MPJLambdaWrapper<Member> queryWrapper =new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(Member.class); |
| | | queryWrapper.selectAs(Shop::getName,Member::getShopName); |
| | |
| | | .setSql(param.getType() == 1,"integral = ifnull(integral,0)-" + param.getNum())); |
| | | |
| | | integralObjType = param.getType()==0?Constants.IntegralObjType.SYSTEM_RECHARGE:Constants.IntegralObjType.SYSTEM_DEDUCT; |
| | | integral.setTotalNum(param.getType() == 0? Constants.formatBigdecimal(model.getIntegral()).add(integral.getNum()):Constants.formatBigdecimal(model.getIntegral()).subtract(integral.getNum())); |
| | | }else{ |
| | | integral.setTotalNum(param.getType() == 0? Constants.formatBigdecimal(model.getIntegral()).add(param.getNum()):Constants.formatBigdecimal(model.getIntegral()).subtract(param.getNum())); |
| | | integral.setUserType(Constants.ZERO); |
| | | }else{//ç»éåè´¦æ· |
| | | Shop model = shopMapper.selectById(param.getMemberId()); |
| | | if(model == null ||Constants.equalsObject(model.getIsdeleted(),Constants.ONE)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"ç»éåä¿¡æ¯æ¥è¯¢æ æï¼"); |
| | |
| | | .setSql(param.getType() == 0,"total_integral = ifnull(total_integral,0)+" + num)//累计å¢å |
| | | .setSql(param.getType() == 0,"integral = ifnull(integral,0)+" + param.getNum()) |
| | | .setSql(param.getType() == 1,"integral = ifnull(integral,0)-" + param.getNum())); |
| | | |
| | | integralObjType = param.getType()==0?Constants.IntegralObjType.SHOP_SYSTEM_RECHARGE:Constants.IntegralObjType.SHOP_SYSTEM_DEDUCT; |
| | | integral.setTotalNum(param.getType() == 0? Constants.formatBigdecimal(model.getIntegral()).add(integral.getNum()):Constants.formatBigdecimal(model.getIntegral()).subtract(integral.getNum())); |
| | | integralObjType = param.getType()==0?Constants.IntegralObjType.SHOP_SYSTEM_RECHARGE:Constants.IntegralObjType.SHOP_SYSTEM_DEDUCT; |
| | | integral.setTotalNum(param.getType() == 0? Constants.formatBigdecimal(model.getIntegral()).add(param.getNum()):Constants.formatBigdecimal(model.getIntegral()).subtract(param.getNum())); |
| | | integral.setUserType(Constants.ONE); |
| | | } |
| | | integral.setCreateDate(new Date()); |
| | | integral.setCreator(user.getId()); |
| | |
| | | integral.setType(param.getType()); |
| | | integral.setRemark(param.getRemark()); |
| | | integral.setOrderCode(null); |
| | | integral.setUserType(Constants.ZERO); |
| | | integralMapper.insert(integral); |
| | | } |
| | | @Override |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.config.Jwt.JwtPayLoad; |
| | | import com.doumee.config.Jwt.JwtTokenUtil; |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.GoodsorderJoinMapper; |
| | | import com.doumee.dao.business.join.MemberJoinMapper; |
| | | import com.doumee.dao.business.*; |
| | | import com.doumee.dao.business.join.ProductLabelJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.model.Labels; |
| | |
| | | import com.doumee.dao.business.model.ShopScan; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.dao.system.vo.ShopMoneyVO; |
| | | import com.doumee.dao.web.dto.*; |
| | | import com.doumee.dao.web.dto.shop.*; |
| | | import com.doumee.dao.web.request.MyCustomerRequest; |
| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.xpath.operations.Bool; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.ApplicationEventPublisher; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | |
| | | |
| | | @Autowired |
| | | private ShopMapper shopMapper; |
| | | @Autowired |
| | | private UserActionMapper userActionMapper; |
| | | |
| | | @Autowired |
| | | private GoodsMapper goodsMapper; |
| | | @Autowired |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void updateById(Shop shop) { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | if(shop.getId()==null ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(), ResponseStatus.BAD_REQUEST.getMessage()); |
| | | } |
| | | isCreateParamValid(shop,user); |
| | | Shop model = shopMapper.selectById(shop.getId()); |
| | | if(model.getId()==null || Constants.equalsInteger(model.getIsdeleted(),Constants.ONE) ){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | shop.setEditor(user.getId()); |
| | | shop.setEditDate(new Date()); |
| | | |
| | | shopMapper.updateById(shop); |
| | | if(shop.getSaleType() !=null && !Constants.equalsInteger(shop.getSaleType(),model.getSaleType())){ |
| | | //妿é宿¨¡å¼åçç¼ç ï¼è®°å½åæ´è®°å½ |
| | | //æ´æ¢æ¥å¿è®°å½ |
| | | UserActionServiceImpl.saveUserActionBiz(user,shop.getId(), |
| | | Constants.UserActionType.CHANGE_SALETYPE, |
| | | userActionMapper, |
| | | shop.getEditDate(), |
| | | new String[]{user.getUsername(), DateUtil.getPlusTime2(shop.getEditDate())}, |
| | | JSONObject.toJSONString(shop) , |
| | | Constants.equalsInteger(model.getSaleType(),Constants.ONE)?"èªç±éè´":"å¹³å°éºè´§", |
| | | Constants.equalsInteger(shop.getSaleType(),Constants.ONE)?"èªç±éè´":"å¹³å°éºè´§"); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | Shop shop= shopJoinMapper.selectJoinOne(Shop.class,queryWrapper); |
| | | String path = systemDictDataBiz.queryByCode(Constants.OSS, Constants.RESOURCE_PATH).getCode() |
| | | + systemDictDataBiz.queryByCode(Constants.OSS, Constants.SHOP_FILE).getCode(); |
| | | if(Objects.nonNull(shop)&&StringUtils.isNotBlank(shop.getImgurl())){ |
| | | shop.setImgFullUrl(path+shop.getImgurl()); |
| | | } |
| | | shop.setImgFullUrl(path); |
| | | shop.setAreas(AreasServiceImpl.getAddressByAreaId(shop.getAreaId())); |
| | | if(shop.getLatitude()!=null && shop.getLongitude()!=null){ |
| | | shop.setLocationInfo(shop.getLatitude().doubleValue()+","+shop.getLongitude().doubleValue()); |
| | |
| | | } |
| | | |
| | | } |
| | | return PageData.from(result ); |
| | | } |
| | | @Override |
| | | public PageData<ShopMoneyVO> findPageMoney(PageWrap<Shop> pageWrap){ |
| | | IPage<Shop> page = new Page<>(pageWrap.getPage(), pageWrap.getCapacity()); |
| | | MPJLambdaWrapper<Shop> queryWrapper = new MPJLambdaWrapper<>(); |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper |
| | | .selectAll(Shop.class) |
| | | .select("(select sum(price) from goodsorder g where g.DISTRIBUTION_SHOP_ID=t.id and g.status in (1,2) and g.isdeleted=0) as jiesuanIng" ) |
| | | .select("(select g.create_date from withdraw_record g where g.MEMBER_ID=t.id and g.isdeleted=0 order by g.id desc limit 1 ) as withdrawDate" ) |
| | | .select("(select sum(g.amount) from withdraw_record g where g.MEMBER_ID=t.id and g.status=1 and g.isdeleted=0 ) as withdrawTotal" ) |
| | | .select("(select sum(g.amount) from withdraw_record g where g.MEMBER_ID=t.id and g.status=0 and g.isdeleted=0 ) as withdrawIng" ); |
| | | queryWrapper.eq(Shop::getIsdeleted, Constants.ZERO); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getCode()) ,Shop::getCode,pageWrap.getModel().getCode()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getUsername()) ,Shop::getName,pageWrap.getModel().getUsername()); |
| | | queryWrapper.like(StringUtils.isNotBlank(pageWrap.getModel().getName()) ,Shop::getName,pageWrap.getModel().getName()); |
| | | queryWrapper.orderByDesc(Shop::getId); |
| | | IPage<ShopMoneyVO> result = shopJoinMapper.selectJoinPage(page, ShopMoneyVO.class, queryWrapper); |
| | | return PageData.from(result ); |
| | | } |
| | | |
| | |
| | | } |
| | | //é»è®¤skuä¿¡æ¯ |
| | | GoodsSku goodsSku = goodsSkuList.get(0); |
| | | if(Constants.formatBigdecimal(goodsSku.getPrice()).compareTo(Constants.formatBigdecimal(dto.getGoodsPrice())) >=0){ |
| | | if(Constants.formatBigdecimal(goodsSku.getPrice()).compareTo(Constants.formatBigdecimal(dto.getGoodsPrice()))<=0){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"对ä¸èµ·ï¼ä¾è´§ä»·ä¸å
许大äºååéå®ä»·ï¼"); |
| | | } |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |