admin/src/api/business/combo.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
admin/src/views/combo/components/OrderDetail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
admin/src/views/combo/components/SaleDetail.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
admin/src/views/combo/order.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
admin/src/views/combo/record.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
admin/src/api/business/combo.js
@@ -34,7 +34,7 @@ } export function comboReDetailPost(params) { return request.get('/business/goodsorder/getGoodsorderCanBanlanceDTO', {params}) return request.get('/business/goodsorder/getGoodsorderCanBanlanceDTO', { params }) } export function comboOrderRefundPost(data) { return request.post('/business/goodsorder/backGoodsorder', data, { @@ -42,7 +42,7 @@ }) } export function comboOrderDetailPost(params) { return request.get('/business/goodsorder/discountOrderDetail', {params}) return request.get('/business/goodsorder/discountOrderDetail', { params }) } export function comboListOrderEx(data) { @@ -50,4 +50,34 @@ trim: true, download: true }) } export function comboSalePage(data) { return request.post('/business/discountMember/page', data, { trim: true }) } export function comboSaleEx(data) { return request.post('/business/discountMember/exportExcel', data, { trim: true, download: true }) } export function comboSaleAdjust(data) { return request.post('/business/discountMember/adjust', data, { trim: true }) } export function comboSaleCancel(data) { return request.post('/business/discountMember/cancel', data, { trim: true }) } export function comboSalerDetailPost(id) { return request.get('/business/discountMember/' + id) } export function discountLogLog(data) { return request.post('/business/discountLog/page', data, { trim: true }) } admin/src/views/combo/components/OrderDetail.vue
@@ -1,45 +1,95 @@ <template> <GlobalWindow :title="title" :visible.sync="visible" :confirm-working="isWorking"> <div class="title">æ¯ä»æç»</div> <el-table :data="list" stripe border> <el-table-column prop="id" label="订åç¼å·" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="onlineorderId" label="交æåå·" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="refundType" label="交æç±»å" width="100px" align="center"> <GlobalWindow :title="title" width="1000px" :visible.sync="visible" :confirm-working="isWorking"> <div class="title">订åä¿¡æ¯</div> <div class="info_warp"> <div class="item"> <div class="la">订åç¼å·ï¼</div> <div class="val">{{ info.id }}</div> </div> <div class="item"> <div class="la">订åç¶æï¼</div> <div class="val">{{ info.status == 1 ? 'å·²æ¯ä»' : 'æªæ¯ä»' }}</div> </div> <div class="item"> <div class="la">ä¸åæ¶é´ï¼</div> <div class="val">{{ info.createDate }}</div> </div> <div class="item"> <div class="la">æ¯ä»æ¶é´ï¼</div> <div class="val">{{ info.payDate }}</div> </div> <div class="item"> <div class="la">订åéé¢ï¼</div> <div class="val">{{ info.money }}</div> </div> <div class="item"> <div class="la">æ¯ä»æ¹å¼ï¼</div> <div class="val">{{ info.payWay == 0 ? '微信' : 'æ¯ä»å®' }}</div> </div> <div class="item"> <div class="la">æ¯ä»åå·ï¼</div> <div class="val">{{ info.onlineOrderid }}</div> </div> <div class="item"> <div class="la">宿æ¶é´ï¼</div> <div class="val">{{ info.closeDate }}</div> </div> <div class="item"> <div class="la">夿³¨ï¼</div> <div class="val">{{ info.closeInfo }}</div> </div> </div> <div class="title">ä¹°å®¶ä¿¡æ¯</div> <div class="info_warp"> <div class="item"> <div class="la">å¢ç§°ï¼</div> <div class="val">{{ form.member.name }}</div> </div> <div class="item"> <div class="la">ææºå·ï¼</div> <div class="val">{{ form.member.phone }}</div> </div> <div class="item"> <div class="la">openIdï¼</div> <div class="val">{{ form.member.openid }}</div> </div> </div> <div class="title">ååä¿¡æ¯</div> <el-table :data="[goods]" stripe border> <el-table-column prop="name" min-width="100px" label="å¥é¤å¡" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="refundType" label="æææ" min-width="160px" align="center"> <template slot-scope="{row}"> {{ typeToStr(row.refundType) }} {{ row.startDate }} è³ {{ row.endDate }} </template> </el-table-column> <el-table-column prop="money" label="交æéé¢(å )" width="100px" align="center"></el-table-column> <el-table-column prop="payWay" label="æ¸ é" width="100px" align="center"> <el-table-column label="æ°é" width="80px" align="center"> <template slot-scope="{row}"> {{ row.payWay==0? '微信' : 'æ¯ä»å®' }} <span>1</span> </template> </el-table-column> <el-table-column prop="payDate" label="äº¤ææ¶é´" width="150px" align="center"></el-table-column> <el-table-column prop="price" label="ä»·æ ¼" width="100px" align="center"></el-table-column> <el-table-column prop="payWay" label="ç¶æ" width="100px" align="center"> <template slot-scope="{row}"> {{ info.status == 1 ? 'å·²æ¯ä»' : 'æªæ¯ä»' }} </template> </el-table-column> </el-table> <div class="title">éªè¡è®°å½</div> <el-table :data="memberRidesList" stripe border > <el-table-column prop="openid" label="ç¨æ·" width="250px" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="bikeCode" label="车è¾ç¼å·" width="100px" align="center"></el-table-column> <el-table-column prop="bikeType" label="车类å" width="200px" align="center"></el-table-column> <el-table-column prop="rideTime" label="ååºæ¶é¿(å)" width="200px" align="center"></el-table-column> <el-table-column prop="duration" label="计费æ¶é¿(å)" width="200px" align="center"></el-table-column> <el-table-column prop="bikeType" label="车类å" width="150px" align="center"></el-table-column> <el-table-column prop="rentDate" label="ååºæ¶é´" width="150px" align="center"></el-table-column> <el-table-column prop="backDate" label="è¿è½¦æ¶é´" width="150px" align="center"></el-table-column> <el-table-column prop="closeStatus" fixed="right" label="ç»ç®ç¶æ" width="100px" align="center"> <template slot-scope="{row}"> {{ row.closeStatus == 0 ? 'æªç»ç®' : 'å·²ç»ç®' }} <div v-if="form.refundList && form.refundList.length > 0" class="title">鿬¾ä¿¡æ¯</div> <el-table v-if="form.refundList && form.refundList.length > 0" :data="form.refundList" stripe border> <el-table-column prop="createDate" label="鿬¾æ¶é´" min-width="180px" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="money" label="鿬¾éé¢" min-width="100px" align="center"></el-table-column> <el-table-column label="ç¶æ" min-width="100px" align="center"> <template v-slot="{row}"> <span v-if="row.status == 0">é¢é款</span> <span v-if="row.status == 1">鿬¾å¤±è´¥</span> <span v-if="row.status == 2">鿬¾å®æ</span> </template> </el-table-column> <el-table-column prop="reason" label="鿬¾å¤æ³¨" min-width="100px" align="center"></el-table-column> <el-table-column prop="creatorName" label="æä½äºº" min-width="100px" align="center"></el-table-column> </el-table> <div slot="footer"> <el-button @click="visible=false">è¿å</el-button> <el-button @click="visible = false">è¿å</el-button> </div> </GlobalWindow> </template> @@ -52,12 +102,14 @@ name: 'OperaSitesWindow', extends: BaseOpera, components: { GlobalWindow }, data () { data() { return { // è¡¨åæ°æ® form: { goodsorderId: '' member: {} }, info: {}, goods: {}, list: [], memberRidesList: [], // 0ç»ç®é款 1强å¶ç»ç®é款 2ç»ç®å鿬¾ [99: èætype æ¯ä»æ¼é] @@ -78,7 +130,11 @@ this.title = title this.visible = true // æ°å»º console.log('target', target) this.form = target this.info = target.goodsOrder this.goods = target.discountMember this.$nextTick(() => { this.list = target.payOrderDTOList this.memberRidesList = target.memberRidesList @@ -86,7 +142,7 @@ }) }, typeToStr(type) { let temp = this.type.find(item => item.id == type ) let temp = this.type.find(item => item.id == type) return temp ? temp.label : '-' } }, @@ -94,7 +150,23 @@ } </script> <style scoped> <style scoped lang="scss"> .info_warp { display: flex; flex-wrap: wrap; font-size: 14px; .item { display: flex; width: 33.3%; margin-bottom: 6px; .val { color: #666666; } } } .title { font-size: 18px; font-weight: 600; admin/src/views/combo/components/SaleDetail.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,138 @@ <template> <GlobalWindow title="å¥é¤å¡è¯¦æ " :visible.sync="isShowModal" width="1000px" @close="close" @confirm="close"> <div> <div class="modal_title">å¥é¤åç§°ï¼{{ detail.name }}</div> <div class="place"> <span>å¥é¤å·ï¼{{ detail.code }}</span> <span v-if="detail.useType == 1">æææï¼{{ detail.useDays }}天</span> <span v-if="detail.useType == 0">æææï¼{{ detail.useStartDate }}è³{{ detail.useEndDate }}</span> <span v-if="detail.useType == 2">æææï¼{{ detail.useStartDate }}è³{{ detail.useEndDate }}</span> </div> <div class="df_ac"> <el-tabs style="flex: 1;" v-model="activeTab" @tab-click="handleClick"> <el-tab-pane label="å¥é¤ä½¿ç¨æç»" name="0" /> <el-tab-pane label="å¥é¤æä½è®°å½" name="2" /> </el-tabs> <div style="border-bottom: 2px solid #e5e7ec; margin-top: 1px;">{{ activeTab == 0 ? 'ä½¿ç¨æ åµ' : 'æä½æ åµ' }}ï¼{{ pagination.total }}次</div> </div> <el-table v-if="activeTab == 0" v-loading="loading" :data="list" stripe border> <el-table-column prop="createDate" align="center" label="ä½¿ç¨æ¶é´" min-width="100" show-overflow-tooltip /> <el-table-column prop="discountMemberId" align="center" label="å ³è订å" min-width="120" show-overflow-tooltip /> <el-table-column prop="" align="center" label="éªè½¦æ¶é¿" min-width="80" show-overflow-tooltip> <template v-slot="{ row }"> {{ row.rideTime }}åé </template> </el-table-column> <el-table-column prop="ridePrice" align="center" label="æµæ£éé¢" min-width="100" show-overflow-tooltip /> </el-table> <el-table v-if="activeTab == 2" v-loading="loading" :data="list" stripe border> <el-table-column prop="createDate" align="center" label="æä½æ¶é´" min-width="100" show-overflow-tooltip /> <el-table-column prop="info" align="center" label="æä½ç±»å" min-width="100" show-overflow-tooltip> <template v-slot="{ row }"> <span v-if="row.type == 0">ç¨æ·éªè¡ä½¿ç¨</span> <span v-if="row.type == 1">å¹³å°ä½åº</span> <span v-if="row.type == 2">å¹³å°è°æ´</span> </template> </el-table-column> <el-table-column prop="editInfo" align="center" label="æä½å¤æ³¨" min-width="100" show-overflow-tooltip /> <el-table-column prop="creatorName" align="center" label="æä½äºº" min-width="100" show-overflow-tooltip /> </el-table> <div class="table_btns"> <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> </div> </div> </GlobalWindow> </template> <script> import { comboSalerDetailPost, discountLogLog } from '@/api/business/combo.js' import GlobalWindow from '@/components/common/GlobalWindow' import BasePageTemp from '@/components/base/BasePageTemp' export default { name: 'ComboDetail', extends: BasePageTemp, components: { GlobalWindow }, data() { return { isShowModal: false, activeTab: '0', detail: {}, pagination: { page: 1, rows: 10 }, totalCount: 0, list: [], loading: false } }, created() { // this.detail = this.$route.query // this.comboDetail() }, methods: { getDetail(row) { comboSalerDetailPost(row.id).then(res => { this.detail = res this.getList() }, () => { }) }, handleClick(val) { this.getList() }, getList(page) { const { pagination, activeTab, detail } = this this.loading = true if (page) { pagination.page = page } discountLogLog({ model: { type: activeTab, discountMemberId: detail.id }, capacity: pagination.pageSize, page: pagination.page, }).then(res => { this.loading = false this.list = res.records || [] this.pagination.total = res.total || 0 }, () => { this.loading = false }) }, close() { this.isShowModal = false this.$emit('close') }, currentPageChange(val) { this.pagination.page = val this.comboDetail() }, pageSizeChange(val) { this.pagination.rows = val this.comboDetail() } } } </script> <style lang="scss" scoped> .modal_title { font-size: 18px; font-weight: 500; margin-bottom: 6px; } .place { color: #999999; font-size: 13px; display: flex; margin-bottom: 8px; span { margin-right: 60px; } } </style> admin/src/views/combo/order.vue
@@ -6,7 +6,7 @@ <el-button type="primary" @click="handleEx()">导åº</el-button> </div> <el-table v-loading="loading" :data="list" stripe border> <el-table-column prop="code" align="center" label="订åç¼å·" min-width="180" show-overflow-tooltip> <el-table-column prop="code" align="center" label="订åç¼å·" min-width="200" show-overflow-tooltip> <template scope="{row}"> <span @click="handleDetail(row.id)" class="primaryColor pointer">{{ row.code }}</span> </template> @@ -15,7 +15,7 @@ <el-table-column prop="money" align="center" label="å计(å )" min-width="80" show-overflow-tooltip /> <el-table-column prop="money" align="center" label="å®ä»(å )" min-width="80" show-overflow-tooltip /> <el-table-column prop="refundMoney" align="center" label="å·²ééé¢(å )" min-width="100" show-overflow-tooltip /> <el-table-column prop="memberId" align="center" label="ç¨æ·ä¿¡æ¯" min-width="140" show-overflow-tooltip /> <el-table-column prop="memberId" align="center" label="ç¨æ·ä¿¡æ¯" min-width="200" show-overflow-tooltip /> <el-table-column prop="payWay" align="center" label="æ¯ä»æ¹å¼" min-width="80" show-overflow-tooltip> <template v-slot="{ row }"> <span v-if="row.payWay == 0">微信æ¯ä»</span> @@ -32,7 +32,8 @@ <el-table-column label="æä½" fixed="right" align="center" min-width="80" show-overflow-tooltip> <template v-slot="{ row }"> <span @click="handleDetail(row.id)" class="primaryColor pointer">æ¥ç详æ </span> <span v-if="row.status == 1 && (row.refundMoney < row.money)" @click="handRefund(row.id)" class="primaryColor pointer ml10">鿬¾</span> <span v-if="row.status == 1 && (row.refundMoney < row.money)" @click="handRefund(row.id)" class="primaryColor pointer ml10">鿬¾</span> </template> </el-table-column> </el-table> @@ -73,19 +74,22 @@ label: '订åç¼å·', }, { filed: 'name', filed: 'discountName', type: 'input', label: 'å¥é¤å¡', placeholder: '请è¾å ¥å¡åç§°', }, { filed: 'pay', filed: 'payWay', type: 'select', label: 'æ¯ä»æ¹å¼', options: [] options: [ { label: '微信', value: 0 }, { label: 'æ¯ä»å®', value: 1 }, ] }, { filed: 'status', filed: 'payStatus', type: 'select', label: '订åç¶æ', options: [ @@ -94,12 +98,12 @@ ] }, { filed: 'time', filed: 'selDate', type: 'date', label: 'æ¯ä»æ¶é´', }, { filed: 'username', filed: 'openid', type: 'input', label: 'ç¨æ·ä¿¡æ¯', }, @@ -117,22 +121,33 @@ this.$refs.RefundRef.open(id) }, handleDetail(id) { comboOrderDetailPost({id}) comboOrderDetailPost({ id }) .then(res => { this.$refs.OrderDetailRef.open('订å详æ ', res) if (res) { this.$refs.OrderDetailRef.open('订å详æ ', res) } }) .catch(err => { this.$tip.apiFailed(err) }) }, handleEx() { const { pagination, filters } = this this.$dialog.exportConfirm('确认导åºåï¼') .then(() => { this.loading = true if (filters.selDate && filters.selDate.length > 0) { filters.startDate = filters.selDate[0] filters.endDate = filters.selDate[1] } else { filters.startDate = null filters.endDate = null } comboListOrderEx({ page: 1, capacity: 1000000, model: this.filters model: filters }) .then(response => { this.download(response) @@ -155,6 +170,13 @@ const { pagination, filters } = this this.loading = true if (page) { pagination.page = page } if (filters.selDate && filters.selDate.length > 0) { filters.startDate = filters.selDate[0] filters.endDate = filters.selDate[1] } else { filters.startDate = null filters.endDate = null } comboOrderPost({ model: { ...filters, admin/src/views/combo/record.vue
@@ -2,71 +2,48 @@ <div class="main_app"> <Breadcrumb /> <QueryForm v-model="querys" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clearQueryForm"> <template #btns> <el-button v-if="meta.indexOf('MealsUseDetailExport') > -1" type="primary" @click="comboRecordExport">导åº</el-button> </template> <template #indate> <el-date-picker v-model="querys.indate" type="datetimerange" range-separator="è³" start-placeholder="å¼å§æ¥æ" end-placeholder="ç»ææ¥æ" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" class="w400" :picker-options="pickerOptions" /> </template> </QueryForm> <div class="table_btns"> <el-button v-preventReClick plain type="primary" @click="handleEx">导åº</el-button> <el-button v-preventReClick plain type="danger" @click="openModal('zuofei')">ä½åº</el-button> <el-button v-preventReClick plain @click="openModal('tiaozheng')">å¥é¤è°æ´</el-button> <el-button plain type="primary" @click="handleEx">导åº</el-button> <el-button plain type="danger" @click="openModal('zuofei')">ä½åº</el-button> <el-button plain @click="openModal('tiaozheng')">å¥é¤è°æ´</el-button> </div> <el-table v-loading="loading" :data="list" stripe border @selection-change="handleSelectionChange"> <el-table-column fixed="left" align="center" type="selection" :selectable="handleDisable" width="55" /> <el-table-column align="center" label="å¥é¤ç¥¨å·" width="300" show-overflow-tooltip> <el-table-column align="center" label="å¥é¤ç¥¨å·" min-width="160" show-overflow-tooltip> <template v-slot="scope"> <span class="primaryColor pointer" @click="comboDetail(scope.row)">{{ scope.row.id }}</span> scope.row.code }}</span> </template> </el-table-column> <el-table-column align="center" label="å¥é¤ç±»å" width="120"> <el-table-column align="center" label="å¥é¤ç±»å" min-width="80"> <template v-slot="scope"> <span v-if="scope.row.mealsType === '0'">é¨ç¥¨æ¬¡å¡</span> <span v-if="scope.row.mealsType === '1'">é¨ç¥¨æéå¡</span> <span v-if="scope.row.mealsType === '2'">é¢å®æ¬¡å¡</span> <span v-if="scope.row.mealsType === '3'">课ç¨é¢çº¦æ¬¡å¡</span> <span v-if="scope.row.mealsType === '4'">è¯¾ç¨æéå¡</span> <span v-if="scope.row.type == '0'">æéå¡</span> <span v-if="scope.row.type == '1'">次å¡</span> </template> </el-table-column> <el-table-column align="center" label="å¥é¤åç§°" show-overflow-tooltip width="160" prop="mealsName" /> <el-table-column align="center" label="ç¨æ·ä¿¡æ¯" min-width="240" prop="memberInfo" show-overflow-tooltip /> <el-table-column align="center" label="ä½¿ç¨æ¬¡æ°" width="80" prop="useCount"> <el-table-column align="center" label="å¥é¤åç§°" show-overflow-tooltip min-width="100" prop="name" /> <el-table-column align="center" label="ç¨æ·ä¿¡æ¯" min-width="100" prop="openid" show-overflow-tooltip /> <el-table-column align="center" label="ä½¿ç¨æ¬¡æ°" min-width="80" prop="useTimes"> </el-table-column> <el-table-column align="center" label="æææ¥æ" min-width="200" prop="remainCount"> <template v-slot="scope"> <span v-if="scope.row.mealsType === '1'">-</span> <span v-else>{{ scope.row.useCount }}</span> <span>{{ scope.row.useStartDate }}è³{{ scope.row.useEndDate }}</span> </template> </el-table-column> <el-table-column align="center" label="æææ¥æ" width="80" prop="remainCount"> <el-table-column align="center" label="å¥é¤ç¶æ" min-width="80"> <template v-slot="scope"> <span v-if="scope.row.mealsType === '1'">-</span> <span v-else>{{ scope.row.remainCount }}</span> <span v-if="scope.row.status == '0'" class="text_success">æ£å¸¸</span> <span v-if="scope.row.status == '1'" class="text_warning">ä½åº</span> <span v-if="scope.row.status == '2'" class="text-danger">å¾ æ¯ä»</span> </template> </el-table-column> <el-table-column fixed="right" align="center" label="å¥é¤ç¶æ" width="80"> <template v-slot="scope"> <span v-if="scope.row.status === '0'" class="text_success">æ£å¸¸</span> <span v-if="scope.row.status === '1'" class="text_warning">å»ç»</span> <span v-if="scope.row.status === '2'" class="text-danger">ä½åº</span> <span v-if="scope.row.status === '3'" class="text-danger">失æ</span> </template> </el-table-column> <el-table-column align="center" label="æææ¥æ" width="120" prop="validTime" /> <el-table-column align="center" label="æä½" fixed="right" width="150"> <el-table-column align="center" label="æä½" fixed="right" min-width="150"> <template v-slot="scope"> <template> <el-button v-if=" meta.indexOf('MealsMemberPartRefund') > -1 && (scope.row.status == '0' || scope.row.status == '1') " type="text" @click="rowClickRefund(scope.row)">鿬¾</el-button> <el-button v-if="scope.row.status == '0'" type="text" @click="getServiceChargePriceBtn('2', scope.row.id)">å»ç»</el-button> <el-button v-if="scope.row.status == '0'" type="text" @click="openCan(scope.row)">ä½åº</el-button> <span v-else>-</span> </template> </template> </el-table-column> @@ -78,14 +55,14 @@ <el-dialog title="å¥é¤è°æ´" :visible.sync="isShowAdjust" width="500px"> <div class="adjust_modal"> <div style="margin-top: -30px; margin-bottom: 10px;"> <el-radio v-model="adjustData.aa" label="1">å·²éå½å2æ¡æ°æ®</el-radio> <el-radio v-model="adjustData.flag" label="0">å·²é{{ selList.length }}æ¡æ°æ®</el-radio> </div> <div style="margin-bottom: 16px;"> <el-radio v-model="adjustData.aa" label="1">å·²éç°æç鿡件ä¸å ¨é¨ç11æ¡æ°æ®</el-radio> <el-radio v-model="adjustData.flag" label="1">éç°æç鿡件ä¸å ¨é¨ç{{ pagination.total }}æ¡æ°æ®</el-radio> </div> <div class="df_ac mb5"> <span class="key">æææå¢å ï¼</span> <el-input v-model="adjustData.addTime" oninput="value=value.replace(/[^\d]/g,'')" class="flex1 mr10" /> <el-input v-model="adjustData.addNum" oninput="value=value.replace(/[^\d]/g,'')" class="flex1 mr10" /> <span>天</span> </div> <div class="df_ac mb20"> @@ -99,26 +76,43 @@ </div> <span slot="footer" class="dialog-footer"> <el-button @click="isShowAdjust = false">åæ¶</el-button> <el-button v-preventReClick type="primary" :loading="subLoading" @click="handleModelEnter">ç¡®å®</el-button> <el-button type="primary" :loading="subLoading" @click="handleModelEnter">ç¡®å®</el-button> </span> </el-dialog> <el-dialog title="å¥é¤ä½åº" :visible.sync="isShowCan" width="500px"> <div class="adjust_modal" style="margin-top: -30px;"> <div class="red" style="font-size: 16px;">ç¡®å®ä½åºéä¸å¥é¤åï¼ä½åºåï¼å¥é¤ä¸å¯ä½¿ç¨</div> <div class="df_ac mt10"> <el-input type="textarea" v-model="remarkCan" placeholder="请æè¦æ±è¾å ¥å¤æ³¨è¯´æï¼éå¿ å¡«" /> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="isShowCan = false">åæ¶</el-button> <el-button type="primary" :loading="subLoading" @click="handleCan">ç¡®å®</el-button> </span> </el-dialog> <Refund v-if="isShowRefund" ref="RefundRef" @close="isShowRefund = false" @success="refundSuccess" /> <Detail v-if="isShowDetail" ref="detailRef" /> <orderDialog ref="child" @orderSuccess="getList()" /> <Detail ref="DetailRef" /> </div> </template> <script> import { pickerOptions } from './components/config' import BasePageTemp from '@/components/base/BasePageTemp' import Breadcrumb from '@/layouts/Breadcrumb' // import Detail from '../comboDetail' // import Refund from './refund.vue' import Detail from './components/SaleDetail.vue' import { Message } from 'element-ui' import { comboSalePage, comboSaleEx, comboSaleCancel, comboSaleAdjust, } from '@/api/business/combo.js' export default { name: 'SalesRecord', extends: BasePageTemp, components: { Breadcrumb }, components: { Breadcrumb, Detail }, data() { return { exportLoading: false, @@ -126,19 +120,19 @@ isShowRefund: false, queryFormConfig: { formItems: [{ filed: 'id', filed: 'code', type: 'input', label: 'å¥é¤ç¥¨å·', placeholder: '请è¾å ¥å¥é¤å·', clearable: true }, { filed: 'mealsName', filed: 'name', type: 'input', label: 'å¥é¤åç§°', placeholder: '请è¾å ¥å¥é¤åç§°', clearable: true }, { filed: 'memberSearchValue', filed: 'openid', type: 'input', label: 'ç¨æ·ä¿¡æ¯', clearable: true @@ -150,13 +144,12 @@ clearable: true, options: [ { value: '0', label: 'æ£å¸¸' }, { value: '1', label: 'å»ç»' }, { value: '2', label: 'ä½åº' }, { value: '3', label: '失æ' }] { value: '1', label: 'ä½åº' }, // { value: '2', label: 'å¾ æ¯ä»' } ] }], online: true }, pickerOptions, querys: { id: '', mealsName: '', @@ -167,17 +160,21 @@ saleRecordList: [], saleRecordTotal: 0, selectSalesList: [], selList: [], saleRecordLoading: false, subLoading: false, isShowModal: false, isShowCan: false, ModalTitle: '', ModalText: '', ModelRemark: '', remarkCan: '', // â¬ï¸adjustè°æ´ç¸å ³ isShowAdjust: false, isShowCan: false, canList: [], adjustData: { flag: 0, addNum: '', addTime: '' }, @@ -187,7 +184,7 @@ }, created() { // this.meta = this.$route.meta.buttons || [] // this.getList(1) this.getList(1) }, methods: { rowClickRefund(row) { @@ -201,84 +198,53 @@ this.isShowRefund = false this.getList() }, getServiceChargePriceBtn(type, mealsMemberId) { this.serviceChargeId = mealsMemberId getServiceChargePrice({ param: { type, mealsMemberId } }).then((res) => { if (res.errorCode === '000000') { this.serviceChargePrice = res.record.price this.openModal('dongjie') } }) handleEx() { const { pagination, filters } = this this.$dialog.exportConfirm('确认导åºåï¼') .then(() => { this.loading = true comboSaleEx({ page: 1, capacity: 1000000, model: filters }) .then(response => { this.download(response) }) .catch(e => { this.$tip.apiFailed(e) }) .finally(() => { this.loading = false }) }) .catch(() => { }) }, handleEx() { const { querys } = this this.exportLoading = true recordExport({ param: { ...querys } }).then((res) => { this.exportLoading = false if (res.errorCode === '000000') { const a = document.createElement('a') // å建ä¸ä¸ªaæ ç¾å ç´ a.style.display = 'none' // 设置å ç´ ä¸å¯è§ a.href = res.record.showUrl // 设置ä¸è½½å°å document.body.appendChild(a) // å å ¥ a.click() // 触åç¹å»,ä¸è½½ document.body.removeChild(a) // this.$message.success('å¯¼åºæå') } }) .catch(() => { this.exportLoading = false }) openCan(row) { this.isShowCan = true this.canList = [row] }, handleDisable(row, index) { if (row.status === '2') { return false } else { return true } handleDisable(row) { // return row.status == 0 return true }, // æ¥è¯¢è¡¨æ ¼æ°æ® getList(page) { const { querys, pagination } = this if (page) { pagination.page = page this.pagination.page = Number(page) } if (querys.indate && querys.indate.length > 0) { querys.startTime = querys.indate[0] querys.endTime = querys.indate[1] } else { querys.startTime = null querys.endTime = null } pagination.firstQueryTime = parseTime(new Date()) this.saleRecordLoading = true comboSalesRecordPost({ pagination, param: { ...querys, venueId: sessionStorage.getItem('venueId') } const { pagination, filters } = this this.loading = true if (page) { pagination.page = page } comboSalePage({ model: { ...filters }, capacity: pagination.pageSize, page: pagination.page, }).then(res => { this.saleRecordLoading = false if (res.errorCode === '000000') { this.saleRecordLoading = false this.saleRecordTotal = res.totalCount this.saleRecordList = res.recordList if (res.totalCount && res.recordList.length === 0 && pagination.page > 1) { this.getList(Math.ceil(res.totalCount / pagination.rows)) } } }).catch(() => { this.saleRecordLoading = false this.loading = false this.list = res.records || [] this.pagination.total = res.total || 0 }, () => { this.loading = false }) }, clearQueryForm() { @@ -288,19 +254,11 @@ }, // æå¼modal å»ç» è§£å» ä½åº openModal(type) { const { selectSalesList } = this const { selList } = this this.ModelRemark = '' this.adjustData.addNum = '' this.adjustData.addTime = '' switch (type) { case 'dongjie': this.ModalTitle = 'å¥é¤å»ç»' this.ModalText = 'ç¡®å®å»ç»éä¸å¥é¤åï¼å»ç»åï¼å¥é¤å°æ æ³ä½¿ç¨' break case 'jiedong': this.ModalTitle = 'å¥é¤è§£å»' this.ModalText = 'ç¡®å®è§£å»éä¸å¥é¤åï¼è§£å»åï¼å¥é¤å¯ç«å³çæä½¿ç¨' break case 'zuofei': this.ModalTitle = 'å¥é¤ä½åº' this.ModalText = 'ç¡®å®ä½åºéä¸å¥é¤åï¼ä½åºåï¼å¥é¤ä¸å¯ä½¿ç¨' @@ -311,28 +269,21 @@ default: break } if (selectSalesList.length === 0 && type !== 'dongjie') { return this.$message.warning(`请å éæ©è¦${this.ModalTitle.slice(2)}çå¥é¤`) if (selList.length === 0 && type == 'zuofei') { return Message.warning(`请å éæ©è¦${this.ModalTitle.slice(2)}çå¥é¤`) } if (this.ModalTitle === 'å¥é¤è°æ´') { this.isShowAdjust = true this.adjustData = { flag: '0' } } else { this.isShowModal = true this.isShowCan = true } }, // ç¡®å® å»ç» è§£å» ä½åº handleModelEnter() { // if (!this.ModelRemark) { // this.$message.warning('æä½å¤æ³¨å¿ å¡«') // return // } switch (this.ModalTitle) { case 'å¥é¤å»ç»': this.Freeze() break case 'å¥é¤è§£å»': this.Unfreeze() break case 'å¥é¤ä½åº': this.cancellation() break @@ -343,92 +294,27 @@ break } }, // å»ç» Freeze() { const that = this const data = { type: '1', handleRemake: this.ModelRemark, isCreateOrder: '1', id: this.serviceChargeId } this.subLoading = true handleComboSalesPost({ param: { ...data } }).then(res => { this.subLoading = false this.isShowModal = false if (res.errorCode === '000000') { const obj = res.record if (obj && obj.price) { obj.goodsInfos = obj.serviceChargeOrderInfo obj.allPrice = obj.price this.$refs.child.continuePay(obj, 'handlingFees') } else { this.$message.success('å»ç»æå') this.getList() } // } else if (res.errorCode === '200001') { this.$confirm('å卿ªå¤ç订å, æ¯å¦è·³è½¬?', 'æç¤º', { confirmButtonText: 'ç¡®å®', cancelButtonText: 'åæ¶', type: 'warning', callback: () => { }, beforeClose: (action, ctx, close) => { if (action !== 'confirm') { close() return } ctx.confirmButtonLoading = true that.$router.push({ name: 'HandlingFees' }) } }).finally(() => { this.subLoading = false this.isShowModal = false }) } }) }, // è§£å» async Unfreeze() { const data = { type: '2', handleRemake: this.ModelRemark, id: this.selectSalesList.map(i => i.id).join(',') } this.subLoading = true const res = await handleComboSalesPost({ param: { ...data } }).catch(() => { this.subLoading = false this.isShowModal = false }) this.subLoading = false this.isShowModal = false if (res && res.errorCode === '000000') { this.$message.success('è§£å»æå') this.getList() } }, // è°æ´ async handleAdjust() { if (!this.adjustData.addNum && !this.adjustData.addTime) { return this.$message.warning('请è¾å ¥è¦è°æ´çæææå¤©æ°æè ä½é次æ°') return Message.warning('请è¾å ¥è¦è°æ´çæææå¤©æ°æè ä½é次æ°') } const data = { type: '3', handleRemake: this.ModelRemark, addNum: this.adjustData.addNum || 0, addTime: this.adjustData.addTime || 0, id: this.selectSalesList.map(i => i.id).join(',') info: this.ModelRemark, addDays: this.adjustData.addNum || 0, choseIdList: this.adjustData.flag == 0 ? this.selList.map(i => i.id) : [], ...this.filters } this.subLoading = true const res = await handleComboSalesPost({ param: { ...data } }).catch(() => { const res = await comboSaleAdjust({ ...data }).catch(() => { this.subLoading = false this.isShowModal = false this.isShowCan = false }) this.subLoading = false this.isShowModal = false if (res && res.errorCode === '000000') { this.$message.success('å¥é¤è°æ´æå') this.isShowCan = false if (res) { Message.success('å¥é¤è°æ´æå') this.getList() this.isShowAdjust = false } @@ -436,36 +322,46 @@ // ä½åº async cancellation() { const data = { type: '4', handleRemake: this.ModelRemark, id: this.selectSalesList.map(i => i.id).join(',') handleRemake: this.remarkCan, choseIdList: this.selList.map(i => i.id) } this.subLoading = true const res = await handleComboSalesPost({ param: { ...data } }).catch(() => { const res = await comboSaleCancel({ ...data }).catch(() => { this.subLoading = false this.isShowModal = false this.isShowCan = false }) this.subLoading = false this.isShowModal = false if (res && res.errorCode === '000000') { this.$message.success('ä½åºæå') this.isShowCan = false if (res) { Message.success('ä½åºæå') this.getList() } }, async handleCan() { const data = { handleRemake: this.remarkCan, choseIdList: this.canList.map(i => i.id) } this.subLoading = true const res = await comboSaleCancel({ ...data }).catch(() => { this.subLoading = false this.isShowCan = false }) this.subLoading = false this.isShowCan = false if (res) { Message.success('ä½åºæå') this.getList() } }, handleSelectionChange(val) { this.selectSalesList = val this.selList = val }, comboDetail(item) { this.isShowDetail = true this.$nextTick(() => { this.$refs.detailRef.isShowModal = true this.$refs.detailRef.comboDetail(item) this.$refs.DetailRef.isShowModal = true this.$refs.DetailRef.getDetail(item) }) // this.$router.push({ // name: 'comboDetail', // query: item // }) }, pageSizeChange(val) { this.pagination.rows = val @@ -484,9 +380,9 @@ text-align: right; } } .el-dialog__body{ } .el-dialog__body {} .text_warning { color: #e89e42; }