Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
# Conflicts:
# server/services/src/main/java/com/doumee/dao/business/model/DiscountMember.java
已添加19个文件
已删除1个文件
已修改26个文件
| | |
| | | "private": true, |
| | | "scripts": { |
| | | "serve": "vue-cli-service serve", |
| | | "dev": "vue-cli-service serve", |
| | | "build:pro": "vue-cli-service build", |
| | | "build:dev": "vue-cli-service build --mode staging", |
| | | "lint": "vue-cli-service lint", |
| | |
| | | "eslint-plugin-standard": "^4.0.0", |
| | | "eslint-plugin-vue": "^6.2.2", |
| | | "lint-staged": "^9.5.0", |
| | | "node-sass": "^4.14.1", |
| | | "node-sass": "^4.14.1", |
| | | "vue-cli-plugin-element-ui": "~1.1.4", |
| | | "vue-template-compiler": "^2.6.14" |
| | | }, |
| | |
| | | <div id="app"></div> |
| | | <!-- built files will be auto injected --> |
| | | </body> |
| | | <script charset="utf-8" src="https://map.qq.com/api/gljs?libraries=tools&v=1.exp&key=HLMBZ-BQ6LM-AY46S-6B5SN-C3DJT-MVBKL"></script> |
| | | <script> |
| | | |
| | | </script> |
| | |
| | | .el-transfer__buttons { |
| | | padding: 0 16px !important; |
| | | } |
| | | .main_app{ |
| | | padding: 6px 16px; |
| | | } |
| | | .flex1{ |
| | | flex: 1; |
| | | } |
| | | .primaryColor{ |
| | | color: $primary-color; |
| | | } |
| | | .pointer{ |
| | | cursor: pointer; |
| | | } |
| | | .w200{ |
| | | width: 200px !important; |
| | | } |
| | | .w400{ |
| | | width: 400px !important; |
| | | } |
| | | |
| | | .w100{ |
| | | width: 100px !important; |
| | | } |
| | | .ml16{ |
| | | margin-left: 16px; |
| | | } |
| | | .ml10{ |
| | | margin-left: 10px; |
| | | } |
| | | .mr16{ |
| | | margin-right: 16px; |
| | | } |
| | | .mr10{ |
| | | margin-right: 10px; |
| | | } |
| | | .placeholder9{ |
| | | color: #999999; |
| | | font-size: 12px; |
| | | } |
| | | .df_ac{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | .table_btns{ |
| | | background-color: #fff; |
| | | padding: 16px 16px 10px 16px; |
| | | } |
| | | .table-header { |
| | | background-color: #F5F6F8!important; |
| | | th { |
| | |
| | | // 主è²è° |
| | | $primary-color: #216EEE; |
| | | $primaryColor: #216EEE; |
| | | $primary-title-start-color: #3582ff; |
| | | $primary-title-color: #216EcE; |
| | | $primary-color-sel: #0046c6; |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <script> |
| | | import Pagination from '@/components/common/Pagination' |
| | | import QueryForm from '@/components/common/QueryForm' |
| | | export default { |
| | | name: 'BasePageTemp', |
| | | components: { |
| | | Pagination, |
| | | QueryForm, |
| | | }, |
| | | data () { |
| | | return { |
| | | loading: false, |
| | | pagination: { |
| | | pageSize: 10, |
| | | page: 1, |
| | | total: 0 |
| | | }, |
| | | filters: {}, |
| | | list: [], |
| | | total: 0, |
| | | } |
| | | }, |
| | | methods: { |
| | | getList(){}, |
| | | clear() { |
| | | this.filters = {} |
| | | this.pagination.pageSize = 10 |
| | | this.pagination.page = 1 |
| | | this.getList() |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import QueryForm from './queryForm.vue' |
| | | |
| | | export default QueryForm |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="doumee-filter"> |
| | | <el-form inline label-suffix="ï¼" @submit.native.prevent> |
| | | <template v-for="(item, index) in queryFormConfig.formItems"> |
| | | <el-form-item v-if="item.type === 'input' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <el-input v-model="searchForm[item.filed]" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :placeholder="item.label" class="w200" |
| | | @change="changeForm(item.filed)" @keyup.enter.native="handlekeyup(item.keyup || false)" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'moneySelect' && (showZk || index < listLength)" :label="item.label" :key="item.label"> |
| | | <el-input v-model="searchForm[item.filedStrt]" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :placeholder="item.start" style="width: 150px" /> |
| | | <div class="date-division-line" style="margin-left: 10px;margin-bottom: 0;">~</div> |
| | | <el-input v-model="searchForm[item.filedEnd]" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :placeholder="item.end" style="width: 150px" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'select' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <el-select v-model="searchForm[item.filed]" :filterable="item.filterable || true" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :placeholder="item.label" class="w200" |
| | | @change="changeForm(item.filed)"> |
| | | <el-option v-for="opt, i in item.options" :key="i" :value="item.valueCode ? opt[item.valueCode] : opt.value" |
| | | :label="item.labelCode ? opt[item.labelCode] : opt.label" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'date' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <el-date-picker v-model="searchForm[item.filed]" type="date" value-format="yyyy-MM-dd" class="w200" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :placeholder="item.label" :picker-options="item.pickerOptions || {}" |
| | | @change="changeForm(item.filed)" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'daterange' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <el-date-picker v-model="searchForm[item.filed]" value-format="yyyy-MM-dd" type="daterange" |
| | | range-separator="è³" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :start-placeholder="item.start || ''" :end-placeholder="item.end || ''" |
| | | :picker-options="item.pickerOptions || {}" class="w400" @change="changeForm(item.filed)" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'timePicker' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <el-time-picker v-model="searchForm[item.filed]" is-range range-separator="è³" format="HH:mm" |
| | | value-format="HH:mm" start-placeholder="å¼å§æ¶é´" end-placeholder="ç»ææ¶é´" placeholder="éæ©æ¶é´èå´" class="w400" |
| | | @change="changeForm(item.filed)" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'datetimerange' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <el-date-picker v-model="searchForm[item.filed]" format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" type="datetimerange" :default-time="['00:00:00', '23:59:59']" |
| | | :picker-options="item.pickerOptions || pickerOptions" range-separator="è³" |
| | | :clearable="(item.clearable !== null && item.clearable !== undefined && item.clearable !== '') ? item.clearable : true" |
| | | :start-placeholder="item.start || 'å¼å§æ¶é´'" :end-placeholder="item.end || 'ç»ææ¶é´'" class="w400" |
| | | @change="changeForm(item.filed)" /> |
| | | </el-form-item> |
| | | <el-form-item v-if="item.type === 'slot' && (showZk || index < listLength)" :label="item.label" :key="item.filed"> |
| | | <slot :name="item.filed" /> |
| | | </el-form-item> |
| | | </template> |
| | | <!-- æä½ --> |
| | | <el-form-item> |
| | | <el-button style="width: 56px" type="primary" @click="handleQuery">æç´¢</el-button> |
| | | <el-button style="width: 56px" v-if="showQk" @click="clear">éç½®</el-button> |
| | | <slot name="btns" /> |
| | | <template v-if="queryFormConfig.formItems.length > listLength"> |
| | | <el-button v-if="!showZk" type="text" @click="zkBtn">å±å¼<i |
| | | class="el-icon-caret-bottom primaryColor" /></el-button> |
| | | <el-button v-if="showZk" type="text" @click="zkBtn">æ¶èµ·<i class="el-icon-caret-top primaryColor" /></el-button> |
| | | </template> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | value: { |
| | | type: Object, |
| | | default: () => { } |
| | | }, |
| | | showQk: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | listLength: { |
| | | type: Number, |
| | | default: 6 |
| | | }, |
| | | queryFormConfig: { |
| | | type: Object, |
| | | default: () => { } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | showZk: false, |
| | | pickerOptions: { |
| | | shortcuts: [{ |
| | | text: 'è¿7天', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(end.getTime() - 3600 * 1000 * 24 * 6) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: 'è¿30天', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(end.getTime() - 3600 * 1000 * 24 * 29) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: 'è¿60天', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(end.getTime() - 3600 * 1000 * 24 * 59) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: 'è¿90天', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(end.getTime() - 3600 * 1000 * 24 * 89) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }], |
| | | disabledDate(time) { |
| | | var curDate = new Date(new Date().toLocaleDateString()).getTime() |
| | | var preDate = new Date(curDate + 24 * 60 * 60 * 1000 - 1) |
| | | return time.getTime() > preDate |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | emits: ['input', 'handleQuery', 'clear'], |
| | | computed: { |
| | | searchForm: { |
| | | get() { |
| | | return this.value |
| | | }, |
| | | set(value) { |
| | | this.$emit('input', value) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | handleQuery() { |
| | | this.$emit('handleQuery') |
| | | }, |
| | | handlekeyup(pd) { |
| | | if (pd) { |
| | | this.$emit('handleQuery') |
| | | } |
| | | }, |
| | | changeForm(filed) { |
| | | this.$emit('changeForm', filed) |
| | | }, |
| | | zkBtn() { |
| | | this.showZk = !this.showZk |
| | | this.$emit('zkBtn', this.zk) |
| | | }, |
| | | clear() { |
| | | this.$emit('clear') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .doumee-filter { |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | flex-wrap: wrap; |
| | | align-items: center; |
| | | background-color: #fff; |
| | | border-bottom: 10px solid #f7f8f9; |
| | | /* margin: 0 -20px; */ |
| | | padding: 16px 16px 0 16px; |
| | | |
| | | .el-input, |
| | | .el-select { |
| | | width: 200px; |
| | | margin-right: 16px; |
| | | margin-bottom: 16px; |
| | | height: 36px; |
| | | |
| | | .el-input__inner { |
| | | /* color: $textColor; */ |
| | | padding: 0 16px; |
| | | } |
| | | } |
| | | |
| | | .el-date-editor { |
| | | width: 200px; |
| | | margin-right: 16px; |
| | | margin-bottom: 16px; |
| | | |
| | | .el-input__inner { |
| | | padding-left: 30px; |
| | | } |
| | | } |
| | | |
| | | .el-button { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .el-form-item { |
| | | margin-bottom: 16px; |
| | | margin-right: 16px; |
| | | |
| | | .el-input, |
| | | .el-select, |
| | | .el-date-editor { |
| | | margin-right: 0; |
| | | } |
| | | |
| | | .el-input, |
| | | .el-select, |
| | | .el-date-editor, |
| | | .el-button { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | this.editor = Object.seal(editor) |
| | | }, |
| | | onChange (editor) { |
| | | console.log(this.html); |
| | | // console.log(this.html); |
| | | // debugger |
| | | if (!this.html||this.content.content==this.html) { |
| | | return |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="table-header"> |
| | | <el-breadcrumb separator="/"> |
| | | <el-breadcrumb-item v-for="path in paths" :key="path">{{ path }}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | computed: { |
| | | paths() { |
| | | return this.$route.meta.paths |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .table-header { |
| | | overflow: hidden; |
| | | padding: 6px 16px 12px; |
| | | flex-shrink: 0; |
| | | |
| | | // 页é¢è·¯å¾ |
| | | .el-breadcrumb { |
| | | .el-breadcrumb__item { |
| | | .el-breadcrumb__inner { |
| | | color: #ABB2BE; |
| | | font-size: 12px; |
| | | } |
| | | |
| | | &:last-of-type .el-breadcrumb__inner { |
| | | color: #606263; |
| | | font-size: 14px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="å¥é¤è¯¦æ
" :visible.sync="isShowModal" :confirm-working="isLoading" width="1000px" @close="close" |
| | | @confirm="close"> |
| | | <div class="detail_header"> |
| | | <div class="sp_bew"> |
| | | <div class="left"> |
| | | <el-image v-if="detail.fullImgurl" :src="detail.fullImgurl" class="img" /> |
| | | <div class="title_wrap"> |
| | | <div> |
| | | <span class="title">{{ detail.name }}</span> |
| | | <span class="status">{{ detail.status === '1' ? 'å·²å¯ç¨' : 'ç¦ç¨' }}</span> |
| | | </div> |
| | | <div class="placeholder9 mt10">æ¯æ¥éå®ééï¼{{ detail.circulationDay }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="item"> |
| | | <div class="key">æ»åæ¾æ°é</div> |
| | | <div class="value">{{ detail.circulationAll || '-' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="key">å·²é宿°é</div> |
| | | <div class="value">{{ detail.sellNum }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="key">å©ä½æ°é</div> |
| | | <div v-if="detail.circulationAll" class="value">{{ detail.surplusDay }}</div> |
| | | <div v-else class="value">{{ detail.surplusDay || '-' }}</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="createTime_wrap"> |
| | | <span class="item">å建æ¶é´ï¼{{ detail.createTime }}</span> |
| | | <span class="item">å建人ï¼{{ detail.creator }}</span> |
| | | <span class="item">æåæ´æ°æ¶é´ï¼{{ detail.editTime }}</span> |
| | | <span class="item">æ´æ°äººï¼{{ detail.editor }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="separate" /> |
| | | <div class="property-title">å¥é¤å±æ§</div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤åç§°ï¼</div> |
| | | <div class="value">{{ detail.name }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤ç±»åï¼</div> |
| | | <div v-if="detail.mealsType == '0'" class="value">æéå¡</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">{{ detail.mealsType == '1' || detail.mealsType == '4' ? 'æ¯æ¥éªè¡éå¶ï¼' : 'å¥é¤æ¬¡æ°ï¼' }}</div> |
| | | <div v-if="detail.mealsType == '1' || detail.mealsType == '4'" class="value"> |
| | | <span>{{ detail.inOutNum || 'ä¸éå¶' }}</span> |
| | | </div> |
| | | <div v-else class="value"><span>{{ detail.nums }}</span></div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">使ç¨è¯´æï¼</div> |
| | | <div class="value"> |
| | | <div>{{ detail.content }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="property-title">éç¨è§å</div> |
| | | <div class="line"> |
| | | <div class="key">é宿¶é´æ®µï¼</div> |
| | | <div class="value">{{ detail.circulationAll || 'ä¸éé' }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">ä½¿ç¨æ¶é´ï¼</div> |
| | | <div class="value">{{ detail.circulationDay }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">éç¨èå´ï¼</div> |
| | | <div class="value">{{ detail.useVenue }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">éç¨é¡¹ç®ï¼</div> |
| | | <div class="value">{{ detail.useProject }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ»éé¢ï¼</div> |
| | | <div class="value">{{ detail.useClassInfo || 'ä¸éå¶' }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ¯æ¥éé¢ï¼</div> |
| | | <div class="value">{{ detail.useTeacherInfo || 'ä¸éé¢' }}</div> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | <script> |
| | | // import { comboDetailPost, mealsCancelUse } from '@/api' |
| | | // import dayjs from 'dayjs' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | name: 'ComboDetail', |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowModal: false, |
| | | isLoading: false, |
| | | activeTab: '0', |
| | | detail: {}, |
| | | pagination: { |
| | | page: 1, |
| | | rows: 10 |
| | | }, |
| | | totalCount: 0, |
| | | dataList: [], |
| | | tableLoading: false |
| | | } |
| | | }, |
| | | created() { |
| | | // this.detail = this.$route.query |
| | | // this.comboDetail() |
| | | }, |
| | | methods: { |
| | | mealsCancelUseBtn(businessId, mealsMemberId) { |
| | | const that = this |
| | | this.$alert('ç¡®å®è¦æ¤é使ç¨ï¼', 'æ¤é使ç¨', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | callback: action => { |
| | | if (action === 'confirm') { |
| | | mealsCancelUse({ |
| | | param: { |
| | | businessId, mealsMemberId |
| | | } |
| | | }).then((res) => { |
| | | if (res.errorCode === '000000') { |
| | | that.$message.success('æ¤éä½¿ç¨æå') |
| | | that.comboDetail() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | getDetail(detail) { |
| | | const { activeTab, pagination } = this |
| | | const param = { |
| | | listType: activeTab, |
| | | type: detail.type, |
| | | id: detail.id |
| | | } |
| | | this.tableLoading = true |
| | | comboDetailPost({ pagination, param }).then(res => { |
| | | this.tableLoading = false |
| | | this.dataList = res.record.data || [] |
| | | this.totalCount = res.record.count || 0 |
| | | this.detail = { ...detail, useProject: res.record.useProject } |
| | | this.$nextTick(() => { |
| | | this.$refs.tableo.doLayout() |
| | | }) |
| | | }, () => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | tabClick(val) { |
| | | this.comboDetail(this.detail) |
| | | }, |
| | | goBack() { |
| | | this.$router.replace(`/combo/salesRecord`) |
| | | }, |
| | | 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> |
| | | @import "@/assets/style/variables.scss"; |
| | | |
| | | .line { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 20px; |
| | | font-size: 14px; |
| | | |
| | | // padding-left: 16px; |
| | | .key { |
| | | color: #666666; |
| | | width: 100px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .value { |
| | | color: #222222; |
| | | } |
| | | } |
| | | |
| | | .detail_header { |
| | | font-size: 14px; |
| | | |
| | | .sp_bew { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .left { |
| | | display: flex; |
| | | |
| | | .img { |
| | | width: 50px; |
| | | height: 50px; |
| | | margin-right: 20px; |
| | | } |
| | | |
| | | .title { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #222222; |
| | | } |
| | | |
| | | .status { |
| | | border-radius: 2px; |
| | | border: 1px solid $primaryColor; |
| | | color: $primaryColor; |
| | | margin-left: 10px; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | display: flex; |
| | | background-color: #F4F7FC; |
| | | border-radius: 2px; |
| | | |
| | | .item { |
| | | padding: 14px 20px; |
| | | |
| | | .key { |
| | | font-size: 12px; |
| | | color: #666666; |
| | | } |
| | | |
| | | .value { |
| | | margin-top: 8px; |
| | | color: #222222; |
| | | font-weight: 600; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .createTime_wrap { |
| | | display: flex; |
| | | /* justify-content: flex-end; */ |
| | | margin: 16px 0; |
| | | |
| | | .item { |
| | | margin-right: 30px; |
| | | color: #999999; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .separate { |
| | | height: 1px; |
| | | margin: 20px -20px; |
| | | padding: 0 20px; |
| | | background-color: #DFE2E8; |
| | | } |
| | | |
| | | .tip { |
| | | font-size: 14px; |
| | | line-height: 1.5; |
| | | color: #333; |
| | | } |
| | | .property-title{ |
| | | margin-bottom: 16px; |
| | | color: $primaryColor; |
| | | } |
| | | .device-uploader { |
| | | width: 80px; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | background-color: #fff; |
| | | cursor: pointer; |
| | | border: 1px dashed #ccc; |
| | | border-radius: 8px; |
| | | transition: all 0.3s; |
| | | margin-right: 20px; |
| | | |
| | | &:hover { |
| | | border-color: $primaryColor; |
| | | |
| | | .uploader-icon { |
| | | color: $primaryColor; |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-upload { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | position: relative; |
| | | |
| | | .file { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | background-size: contain; |
| | | background-position: center; |
| | | background-repeat: no-repeat; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .delete { |
| | | background-color: rgba(0, 0, 0, 0.5); |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | top: 0; |
| | | left: 0; |
| | | display: none; |
| | | align-items: center; |
| | | justify-content: center; |
| | | |
| | | .icon { |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | &:hover { |
| | | .delete { |
| | | display: flex; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .uploader-icon { |
| | | color: #aaaaaa; |
| | | font-size: 22px; |
| | | transition: all 0.3s; |
| | | } |
| | | } |
| | | |
| | | .count-style { |
| | | display: inline-block; |
| | | width: 45%; |
| | | height: 60px; |
| | | } |
| | | |
| | | .division-line { |
| | | text-align: center; |
| | | display: inline-block; |
| | | color: #999; |
| | | width: 50px; |
| | | } |
| | | |
| | | .clock { |
| | | display: inline-block; |
| | | } |
| | | |
| | | .upload-style { |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | | // width: 60px; |
| | | // height: 60px; |
| | | border: none; |
| | | } |
| | | |
| | | .img-style { |
| | | margin: auto; |
| | | background-color: #eee; |
| | | width: 90px; |
| | | height: 60px; |
| | | vertical-align: middle; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 60px; |
| | | height: 60px; |
| | | display: block; |
| | | } |
| | | |
| | | .line-style { |
| | | background-color: #dfe2e8; |
| | | height: 1px; |
| | | // width: 80%; |
| | | // margin: 0 auto; |
| | | margin-bottom: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow :title="param.id ? 'ç¼è¾å¥é¤' : 'æ°å»ºå¥é¤'" :visible.sync="isShowModal" :confirm-working="isLoading" |
| | | width="1000px" @close="close" @confirm="confirm"> |
| | | <el-form :model="param" label-width="100px" ref="form" :rules="rules"> |
| | | <div class="form_title">åºæ¬ä¿¡æ¯</div> |
| | | <el-form-item label="å¥é¤åç§°" prop="name"> |
| | | <el-input class="w200" v-model="param.name" placeholder="请è¾å
¥å¥é¤åç§°" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="ç±»å"> |
| | | <el-select class="w200" :disabled="true" v-model="param.warehouseId"> |
| | | <el-option label="æéå¡" :value="0"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯æ¥éªè¡éå¶"> |
| | | <div> |
| | | <el-radio v-model="param.aa" label="1">ä¸éå¶</el-radio> |
| | | <el-radio v-model="param.aa" label="2">éå¶æ¶é¿</el-radio> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="éå®ä»·"> |
| | | <el-input class="w200" v-model="param.name" placeholder="请è¾å
¥ä»·æ ¼" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="å线价"> |
| | | <el-input class="w200" v-model="param.name" placeholder="请è¾å
¥å±ç¤ºçå线价" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="é宿¸ é"> |
| | | <el-checkbox v-model="param.ada">å°ç¨åºç«¯</el-checkbox> |
| | | </el-form-item> |
| | | <el-form-item label="å¥é¤å¾ç"> |
| | | <div class="df_ac"> |
| | | <UploadAvatarImage :file="{ 'imgurlfull': param.fileFullUrl, 'imgurl': param.fileUrl }" |
| | | :uploadData="{ folder: 'ywPatrol/' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" /> |
| | | <div class="img_place"> |
| | | <div>ä¸ä¼ å¾çä¸å
许æ¶åæ¿æ²»ææä¸è²æ
;</div> |
| | | <div>å¾çæ ¼å¼å¿
须为ï¼png,PNG,jpeg,jpg,JPGï¼ä¸å¯å¤§äº2Mï¼å»ºè®®ä½¿ç¨</div> |
| | | <div>ngæ ¼å¼å¾çï¼ä»¥ä¿ææä½³ææï¼å»ºè®®å¾ç尺寸为144px*144px</div> |
| | | </div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="å¥é¤ç®ä»"> |
| | | <el-input class="w400" v-model="param.name" placeholder="请è¾å
¥å¥é¤ç®ä»" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="å¥é¤æè¿°"> |
| | | <RichEditor :content="{ content: param.content }" @edit="param.content = $event"></RichEditor> |
| | | </el-form-item> |
| | | <div class="form_title"> |
| | | <div>éç¨è§å</div> |
| | | <div class="placeholder9">é宿¶é´ãä½¿ç¨æ¶é´ç设置</div> |
| | | </div> |
| | | <el-form-item label="é宿¶æ®µ"> |
| | | <el-date-picker class="w400" v-model="param.value1" value-format="yyyy-MM-dd" type="daterange" range-separator=" ~ " /> |
| | | </el-form-item> |
| | | <div class="df_ac"> |
| | | <el-form-item label="ä½¿ç¨æ¶é´" class="mr16"> |
| | | <el-select v-model="param.aaadd" style="width: 140px;"> |
| | | <el-option label="åºå®æ¥æ" :value="0"></el-option> |
| | | <el-option label="è´ä¹°åçæ" :value="1"></el-option> |
| | | <el-option label="æå®æ¥æçæ" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label-width="80px" label="åºå®æ¥æ"> |
| | | <el-date-picker v-model="param.value1" value-format="yyyy-MM-dd" type="daterange" range-separator=" ~ " /> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item label-width="60px" label="æææ"> |
| | | <el-input style="width: 130px;" v-model="param.name" placeholder="请è¾å
¥ææå¤©æ°" v-trim /> |
| | | </el-form-item> --> |
| | | <el-form-item label-width="0px"> |
| | | <div class="df_ac"> |
| | | <el-date-picker class="w200" v-model="param.dasdas" value-format="yyyy-MM-dd" type="date" /> |
| | | <span class="ml10 mr10">å¼å§çæï¼æææ</span> |
| | | <el-input style="width: 130px;" v-model="param.name" placeholder="请è¾å
¥ææå¤©æ°" v-trim /> |
| | | <span class="ml10">天</span> |
| | | </div> |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="éç¨èå´"> |
| | | <el-checkbox-group v-model="param.checkList"> |
| | | <el-checkbox label="工使¥"></el-checkbox> |
| | | <el-checkbox label="è忥"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label="éç¨é¡¹ç®"> |
| | | <el-checkbox-group v-model="param.checkList"> |
| | | <el-checkbox label="èªè¡è½¦"></el-checkbox> |
| | | <el-checkbox label="çµå¨è½¦"></el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | <el-form-item label="æ»éé¢"> |
| | | <el-input class="w400" v-model="param.name" placeholder="请è¾å
¥æ»å宿°é" v-trim /> |
| | | <div class="placeholder9">请è¾å
¥æ»å宿°éï¼éé大äºè¯¥æ°éåï¼ä¸åæ¯æéå®ï¼ä¸ºç©ºè¡¨ç¤ºä¸éå¶</div> |
| | | </el-form-item> |
| | | <el-form-item label="æ¥éé¢"> |
| | | <el-input class="w400" v-model="param.name" placeholder="请è¾å
¥åæ¥å宿°é" v-trim /> |
| | | <div class="placeholder9">请è¾å
¥æ¥å宿°éï¼å½æ¥éé大äºè¯¥æ°éåï¼ä¸åæ¯æéå®ï¼ä¸ºç©ºè¡¨ç¤ºä¸éå¶</div> |
| | | </el-form-item> |
| | | |
| | | |
| | | |
| | | </el-form> |
| | | <!-- --> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | // import { fetchList as getStoreList } from '@/api/ywWarehouse' |
| | | // import { ywOutinboundCreate } from '@/api/store/index' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { StoreTypeOps, rules } from './config' |
| | | import { Message } from 'element-ui' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | // import dayjs from 'dayjs' |
| | | export default { |
| | | name: 'OperaCategoryWindow', |
| | | components: { GlobalWindow, UploadAvatarImage, RichEditor }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | param: { checkList: [], content: '' }, |
| | | isShowModal: false, |
| | | isShowSel: false, |
| | | isLoading: false, |
| | | isUploading: false, |
| | | // éªè¯è§å |
| | | rules, |
| | | storeList: [], |
| | | list: [], |
| | | StoreTypeOps: [], |
| | | |
| | | dataList: [], |
| | | } |
| | | }, |
| | | created() { |
| | | // this.initData() |
| | | |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | const { param, list } = this |
| | | if (list.length == 0) return Message.warning('请å
éæ©ç©æä¿¡æ¯') |
| | | let count = 0 // å
¥åºæ°éå¿
å¡« |
| | | list.forEach(item => { |
| | | if (!item.stock) count++ |
| | | }) |
| | | if (count > 0) return Message.warning('请è¾å
¥æ£ç¡®çå
¥åºæ°é') |
| | | this.isLoading = true |
| | | ywOutinboundCreate({ |
| | | ...param, |
| | | recordList: list |
| | | }).then(res => { |
| | | this.isLoading = false |
| | | Message.success('æäº¤æå') |
| | | this.$emit('success') |
| | | this.close() |
| | | }, () => { |
| | | this.isLoading = false |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | initData() { |
| | | this.$set(this.param, 'doneDate', dayjs().format('YYYY-MM-DD')) |
| | | getStoreList({ capacity: 9999, page: 1, model: { status: 0 } }).then(res => { |
| | | this.storeList = res.records || [] |
| | | }) |
| | | }, |
| | | changeSel(val) { |
| | | const list = val |
| | | list.forEach(item => { |
| | | const index = this.list.findIndex(i => i.id == item.id) |
| | | if (index == -1) { |
| | | item.materialId = item.id |
| | | item.multifile = null |
| | | item.createDate = null |
| | | this.list.push(item) |
| | | } |
| | | }) |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.$set(this.param, 'fileUrl', file.imgurl) |
| | | this.$set(this.param, 'fileFullUrl', file.imgurlfull) |
| | | }, |
| | | handleOpenMaterial() { |
| | | this.isShowSel = true |
| | | this.$nextTick(() => { |
| | | this.$refs.AssetSelRef.isShowModal = true |
| | | this.$refs.AssetSelRef.getList() |
| | | }) |
| | | }, |
| | | close() { |
| | | this.isShowModal = false |
| | | this.$emit('close') |
| | | }, |
| | | getDetail(id) { |
| | | getInfoById(id).then(res => { |
| | | this.param = res |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/variables.scss"; |
| | | |
| | | .form_title { |
| | | display: flex; |
| | | align-items: center; |
| | | color: $primary-color; |
| | | margin-bottom: 16px; |
| | | |
| | | .placeholder9 { |
| | | color: #999999; |
| | | font-size: 12px; |
| | | margin-left: 12px; |
| | | } |
| | | } |
| | | .img_place{ |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | margin-left: 12px; |
| | | color: #999999; |
| | | font-size: 12px; |
| | | padding: 8px 0; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <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"> |
| | | <template slot-scope="{row}"> |
| | | {{ typeToStr(row.refundType) }} |
| | | </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"> |
| | | <template slot-scope="{row}"> |
| | | {{ row.payWay==0? '微信' : 'æ¯ä»å®' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="payDate" label="äº¤ææ¶é´" width="150px" align="center"></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 ? 'æªç»ç®' : 'å·²ç»ç®' }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div slot="footer"> |
| | | <el-button @click="visible=false">è¿å</el-button> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | // import GoodsOrderList from './goodsOrderList.vue' |
| | | export default { |
| | | name: 'OperaSitesWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | goodsorderId: '' |
| | | }, |
| | | list: [], |
| | | memberRidesList: [], |
| | | // 0ç»ç®é款 1强å¶ç»ç®é款 2ç»ç®å鿬¾ [99: èætype æ¯ä»æ¼é] |
| | | type: [ |
| | | { label: 'ç»ç®é款', id: 0 }, |
| | | { label: 'å¹³å°èªå¨ç»ç®é款', id: 1 }, |
| | | { label: '强å¶ç»ç®é款', id: 2 }, |
| | | { label: 'ç»ç®å鿬¾', id: 3 }, |
| | | { label: 'æ¯ä»æ¼é', id: 99 }, |
| | | ], |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | methods: { |
| | | open(title, target) { |
| | | debugger |
| | | this.title = title |
| | | this.visible = true |
| | | // æ°å»º |
| | | this.form = target |
| | | this.$nextTick(() => { |
| | | this.list = target.payOrderDTOList |
| | | this.memberRidesList = target.memberRidesList |
| | | // this.$refs.goodsOrderList.reload(target.model) |
| | | }) |
| | | }, |
| | | typeToStr(type) { |
| | | let temp = this.type.find(item => item.id == type ) |
| | | return temp ? temp.label : '-' |
| | | } |
| | | }, |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | font-size: 18px; |
| | | font-weight: 600; |
| | | color: #333; |
| | | margin-bottom: 20px; |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export const pickerOptions = { // 精确å°ç§ |
| | | disabledDate(time) { |
| | | return time.getTime() < new Date(new Date().toLocaleDateString()).getTime() |
| | | }, |
| | | shortcuts: [ |
| | | { |
| | | text: '7天å
失æ', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | end.setTime(start.getTime() + 3600 * 1000 * 24 * 7) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '30天å
失æ', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | end.setTime(start.getTime() + 3600 * 1000 * 24 * 30) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | }, |
| | | { |
| | | text: '90天å
失æ', |
| | | onClick(picker) { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | end.setTime(start.getTime() + 3600 * 1000 * 24 * 90) |
| | | picker.$emit('pick', [start, end]) |
| | | } |
| | | } |
| | | ] |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main_app"> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="table_btns"> |
| | | <el-button type="primary" @click="handleEdit()">æ°å¢</el-button> |
| | | </div> |
| | | <el-table v-loading="loading" :data="list" stripe border> |
| | | <el-table-column prop="code" label="å¥é¤åç§°" align="center" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="å¥é¤ç±»å" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="次æ°" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="æææ" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="ä»·æ ¼" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="æ»åè¡æ°é" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="å·²å®å®é" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="é宿¸ é" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="é宿¶æ®µ" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="ç¶æ" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column label="æä½" fixed="right" align="center" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span @click="handleDetail(row)" class="primaryColor pointer">æ¥ç详æ
</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table_btns"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | <!-- --> |
| | | <Edit v-if="isShowEdit" @close="isShowEdit = false" @success="getList" ref="EditRef" /> |
| | | <ComboDetail v-if="isShowDetail" ref="DetailRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import BasePageTemp from '@/components/base/BasePageTemp' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Edit from './components/Edit' |
| | | import ComboDetail from './components/ComboDetail.vue' |
| | | export default { |
| | | extends: BasePageTemp, |
| | | components: { |
| | | TableLayout, |
| | | Edit, |
| | | ComboDetail |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isShowEdit: false, |
| | | isShowDetail: false, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | filed: 'name', |
| | | type: 'input', |
| | | label: 'å¥é¤åç§°', |
| | | }, |
| | | { |
| | | filed: 'type', |
| | | type: 'select', |
| | | label: 'éç¨é¡¹ç®', |
| | | labelCode: 'name', |
| | | valueCode: 'id', |
| | | options: [] |
| | | }, |
| | | { |
| | | filed: 'status', |
| | | type: 'select', |
| | | label: 'ç¶æ', |
| | | options: [] |
| | | }, |
| | | ], |
| | | online: true |
| | | }, |
| | | list: [{}] |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getList() |
| | | // this.initData() |
| | | }, |
| | | methods: { |
| | | handleSub() { |
| | | this.$refs.ruleForm.validate((valid) => { |
| | | if (valid) { |
| | | alert('submit!') |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit() { |
| | | this.isShowEdit = true |
| | | this.$nextTick(() => { |
| | | this.$refs.EditRef.isShowModal = true |
| | | }) |
| | | }, |
| | | handleDetail(row) { |
| | | this.isShowDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.DetailRef.isShowModal = true |
| | | // this.$refs.DetailRef.getDetail(row.id) |
| | | }) |
| | | }, |
| | | handleEx() { |
| | | this.$dialog.exportConfirm('确认导åºåï¼') |
| | | .then(() => { |
| | | this.loading = true |
| | | ywOutinboundEx({ |
| | | page: this.pagination.page, |
| | | capacity: 1000000, |
| | | model: this.filters |
| | | }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }) |
| | | .catch(() => { }) |
| | | }, |
| | | initData() { |
| | | getStoreList({ capacity: 9999, page: 1, model: {} }).then(res => { |
| | | this.queryFormConfig.formItems[1].options = res.records || [] |
| | | }) |
| | | }, |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | if (page) { pagination.page = page } |
| | | ywOutinboundPage({ |
| | | model: { |
| | | ...filters, |
| | | inOut: 0 |
| | | }, |
| | | // sorts: [{ direction: 'DESC', property: 'param1' }], |
| | | capacity: pagination.pageSize, |
| | | page: page, |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | | this.list.forEach(item => { |
| | | item.typeName = this.StoreTypeOps[item.type].name |
| | | }) |
| | | this.pagination.total = res.total || 0 |
| | | }, () => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | clear() { |
| | | this.filters = { inOut: 0 } |
| | | this.pagination.pageSize = 10 |
| | | this.pagination.page = 1 |
| | | this.getList() |
| | | }, |
| | | handleSizeChange(capacity) { |
| | | this.pagination.pageSize = capacity |
| | | this.getList() |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="main_app"> |
| | | <Breadcrumb /> |
| | | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> |
| | | <div class="table_btns"> |
| | | <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="140" show-overflow-tooltip> |
| | | <template scope="{row}"> |
| | | <span class="primaryColor pointer">{{ row.orderId }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" align="center" label="å¥é¤å¡" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="" align="center" label="å计(å
)" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="" align="center" label="å®ä»(å
)" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="" align="center" label="å·²ééé¢(å
)" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" align="center" label="ç¨æ·ä¿¡æ¯" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="" align="center" label="订åç¶æ" min-width="110" show-overflow-tooltip /> |
| | | <el-table-column label="æä½" fixed="right" align="center" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span @click="handleDetail(row.id)" v-permissions="['business:ywoutinboundrecord:query']" |
| | | class="primaryColor pointer">æ¥ç详æ
</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table_btns"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | <!-- --> |
| | | <OrderDetail v-if="isShowDetail" ref="OrderDetailRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import BasePageTemp from '@/components/base/BasePageTemp' |
| | | import Breadcrumb from '@/layouts/Breadcrumb' |
| | | import OrderDetail from './components/OrderDetail.vue' |
| | | export default { |
| | | extends: BasePageTemp, |
| | | components: { |
| | | Breadcrumb, |
| | | OrderDetail |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isShowDetail: false, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | filed: 'orderId', |
| | | type: 'input', |
| | | label: '订åç¼å·', |
| | | }, |
| | | { |
| | | filed: 'name', |
| | | type: 'input', |
| | | label: 'å¥é¤å¡', |
| | | placeholder: '请è¾å
¥å¡åç§°', |
| | | }, |
| | | { |
| | | filed: 'pay', |
| | | type: 'select', |
| | | label: 'æ¯ä»æ¹å¼', |
| | | options: [] |
| | | }, |
| | | { |
| | | filed: 'status', |
| | | type: 'select', |
| | | label: '订åç¶æ', |
| | | options: [] |
| | | }, |
| | | { |
| | | filed: 'time', |
| | | type: 'date', |
| | | label: 'æ¯ä»æ¶é´', |
| | | }, |
| | | { |
| | | filed: 'username', |
| | | type: 'input', |
| | | label: 'ç¨æ·ä¿¡æ¯', |
| | | }, |
| | | ], |
| | | online: true |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getList() |
| | | // this.initData() |
| | | }, |
| | | methods: { |
| | | handleDetail(id) { |
| | | getDetail(id) |
| | | .then(res => { |
| | | this.$refs.OrderDetailRef.open('订å详æ
', res) |
| | | }) |
| | | .catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | }, |
| | | handleEx() { |
| | | this.$dialog.exportConfirm('确认导åºåï¼') |
| | | .then(() => { |
| | | this.loading = true |
| | | ywOutinboundEx({ |
| | | page: this.pagination.page, |
| | | capacity: 1000000, |
| | | model: this.filters |
| | | }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }) |
| | | .catch(() => { }) |
| | | }, |
| | | initData() { |
| | | getStoreList({ capacity: 9999, page: 1, model: {} }).then(res => { |
| | | this.queryFormConfig.formItems[1].options = res.records || [] |
| | | }) |
| | | }, |
| | | getList(page) { |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | if (page) { pagination.page = page } |
| | | ywOutinboundPage({ |
| | | model: { |
| | | ...filters, |
| | | inOut: 0 |
| | | }, |
| | | // sorts: [{ direction: 'DESC', property: 'param1' }], |
| | | capacity: pagination.pageSize, |
| | | page: page, |
| | | }).then(res => { |
| | | this.loading = false |
| | | this.list = res.records || [] |
| | | this.list.forEach(item => { |
| | | item.typeName = this.StoreTypeOps[item.type].name |
| | | }) |
| | | this.pagination.total = res.total || 0 |
| | | }, () => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style></style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <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> |
| | | </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> |
| | | <template v-slot="scope"> |
| | | <span class="primaryColor pointer" @click="comboDetail(scope.row)">{{ |
| | | scope.row.id |
| | | }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="å¥é¤ç±»å" width="120"> |
| | | <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> |
| | | </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"> |
| | | <template v-slot="scope"> |
| | | <span v-if="scope.row.mealsType === '1'">-</span> |
| | | <span v-else>{{ scope.row.useCount }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="æææ¥æ" width="80" prop="remainCount"> |
| | | <template v-slot="scope"> |
| | | <span v-if="scope.row.mealsType === '1'">-</span> |
| | | <span v-else>{{ scope.row.remainCount }}</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"> |
| | | <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> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="table_btns"> |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | |
| | | <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> |
| | | </div> |
| | | <div style="margin-bottom: 16px;"> |
| | | <el-radio v-model="adjustData.aa" label="1">å·²éç°æç鿡件ä¸å
¨é¨ç11æ¡æ°æ®</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" /> |
| | | <span>天</span> |
| | | </div> |
| | | <div class="df_ac mb20"> |
| | | <span class="key" /> |
| | | <span class="text_warning">ä¿®æ¹åå¥é¤æææå¢å 以ä¸å¤©æ°</span> |
| | | </div> |
| | | <div class="df_ac mt20"> |
| | | <span class="key">è°æ´å¤æ³¨ï¼</span> |
| | | <el-input v-model="ModelRemark" style="width: 356px" placeholder="请æè¦æ±è¾å
¥å¤æ³¨è¯´æï¼éå¿
å¡«" /> |
| | | </div> |
| | | </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> |
| | | </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()" /> |
| | | </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' |
| | | export default { |
| | | name: 'SalesRecord', |
| | | extends: BasePageTemp, |
| | | components: { Breadcrumb }, |
| | | data() { |
| | | return { |
| | | exportLoading: false, |
| | | isShowDetail: false, |
| | | isShowRefund: false, |
| | | queryFormConfig: { |
| | | formItems: [{ |
| | | filed: 'id', |
| | | type: 'input', |
| | | label: 'å¥é¤ç¥¨å·', |
| | | placeholder: '请è¾å
¥å¥é¤å·', |
| | | clearable: true |
| | | }, { |
| | | filed: 'mealsName', |
| | | type: 'input', |
| | | label: 'å¥é¤åç§°', |
| | | placeholder: '请è¾å
¥å¥é¤åç§°', |
| | | clearable: true |
| | | }, { |
| | | filed: 'memberSearchValue', |
| | | type: 'input', |
| | | label: 'ç¨æ·ä¿¡æ¯', |
| | | clearable: true |
| | | }, { |
| | | filed: 'status', |
| | | type: 'select', |
| | | label: 'ç¶æ', |
| | | placeholder: 'è¯·éæ©ç¶æ', |
| | | clearable: true, |
| | | options: [ |
| | | { value: '0', label: 'æ£å¸¸' }, |
| | | { value: '1', label: 'å»ç»' }, |
| | | { value: '2', label: 'ä½åº' }, |
| | | { value: '3', label: '失æ' }] |
| | | }], |
| | | online: true |
| | | }, |
| | | pickerOptions, |
| | | querys: { |
| | | id: '', |
| | | mealsName: '', |
| | | memberSearchValue: '', |
| | | status: '', |
| | | indate: [] |
| | | }, |
| | | |
| | | saleRecordList: [], |
| | | saleRecordTotal: 0, |
| | | selectSalesList: [], |
| | | saleRecordLoading: false, |
| | | subLoading: false, |
| | | |
| | | isShowModal: false, |
| | | ModalTitle: '', |
| | | ModalText: '', |
| | | ModelRemark: '', |
| | | // â¬ï¸adjustè°æ´ç¸å
³ |
| | | isShowAdjust: false, |
| | | adjustData: { |
| | | addNum: '', |
| | | addTime: '' |
| | | }, |
| | | serviceChargePrice: '', |
| | | serviceChargeId: '' |
| | | } |
| | | }, |
| | | created() { |
| | | // this.meta = this.$route.meta.buttons || [] |
| | | // this.getList(1) |
| | | }, |
| | | methods: { |
| | | rowClickRefund(row) { |
| | | this.isShowRefund = true |
| | | this.$nextTick(() => { |
| | | this.$refs.RefundRef.getPrice(row) |
| | | this.$refs.RefundRef.isShow = true |
| | | }) |
| | | }, |
| | | refundSuccess() { |
| | | 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') |
| | | } |
| | | }) |
| | | .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 |
| | | }) |
| | | }, |
| | | handleDisable(row, index) { |
| | | if (row.status === '2') { |
| | | return false |
| | | } else { |
| | | 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') |
| | | } |
| | | }).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 |
| | | }) |
| | | }, |
| | | clearQueryForm() { |
| | | // eslint-disable-next-line no-unused-vars |
| | | this.querys = {} |
| | | this.getList(1) |
| | | }, |
| | | // æå¼modal å»ç» è§£å» ä½åº |
| | | openModal(type) { |
| | | const { selectSalesList } = 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 = 'ç¡®å®ä½åºéä¸å¥é¤åï¼ä½åºåï¼å¥é¤ä¸å¯ä½¿ç¨' |
| | | break |
| | | case 'tiaozheng': |
| | | this.ModalTitle = 'å¥é¤è°æ´' |
| | | break |
| | | default: |
| | | break |
| | | } |
| | | if (selectSalesList.length === 0 && type !== 'dongjie') { |
| | | return this.$message.warning(`请å
éæ©è¦${this.ModalTitle.slice(2)}çå¥é¤`) |
| | | } |
| | | if (this.ModalTitle === 'å¥é¤è°æ´') { |
| | | this.isShowAdjust = true |
| | | } else { |
| | | this.isShowModal = true |
| | | } |
| | | }, |
| | | // ç¡®å® å»ç» è§£å» ä½åº |
| | | handleModelEnter() { |
| | | // if (!this.ModelRemark) { |
| | | // this.$message.warning('æä½å¤æ³¨å¿
å¡«') |
| | | // return |
| | | // } |
| | | switch (this.ModalTitle) { |
| | | case 'å¥é¤å»ç»': |
| | | this.Freeze() |
| | | break |
| | | case 'å¥é¤è§£å»': |
| | | this.Unfreeze() |
| | | break |
| | | case 'å¥é¤ä½åº': |
| | | this.cancellation() |
| | | break |
| | | case 'å¥é¤è°æ´': |
| | | this.handleAdjust() |
| | | break |
| | | default: |
| | | 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('请è¾å
¥è¦è°æ´çæææå¤©æ°æè
ä½é次æ°') |
| | | } |
| | | 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(',') |
| | | } |
| | | |
| | | 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() |
| | | this.isShowAdjust = false |
| | | } |
| | | }, |
| | | // ä½åº |
| | | async cancellation() { |
| | | const data = { |
| | | type: '4', |
| | | 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() |
| | | } |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.selectSalesList = val |
| | | }, |
| | | comboDetail(item) { |
| | | this.isShowDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.detailRef.isShowModal = true |
| | | this.$refs.detailRef.comboDetail(item) |
| | | }) |
| | | |
| | | // this.$router.push({ |
| | | // name: 'comboDetail', |
| | | // query: item |
| | | // }) |
| | | }, |
| | | pageSizeChange(val) { |
| | | this.pagination.rows = val |
| | | this.getList(1) |
| | | } |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .adjust_modal { |
| | | .df_ac { |
| | | .key { |
| | | width: 92px; |
| | | text-align: right; |
| | | } |
| | | } |
| | | .el-dialog__body{ |
| | | |
| | | } |
| | | .text_warning { |
| | | color: #e89e42; |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="ç»å¶å°å¾å车åºå" :visible.sync="isShowModal" :confirm-working="isWorking" @confirm="confirm" |
| | | width="1000px"> |
| | | <div class="map_title">ç«ç¹åç§° å车åºåç»å¶</div> |
| | | <div id="mapContainer" style="width: 100%; height: calc( 100% - 40px )"></div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowModal: false, |
| | | isWorking: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$nextTick(() => { |
| | | this.initMap() |
| | | }) |
| | | }, |
| | | methods: { |
| | | initMap() { |
| | | this.map = new TMap.Map(document.getElementById("mapContainer"), { |
| | | zoom: 14, // 设置å°å¾ç¼©æ¾çº§å« |
| | | center: new TMap.LatLng(30.656964, 104.066186), // 设置å°å¾ä¸å¿ç¹åæ |
| | | }) |
| | | var polygon = new TMap.MultiPolygon({ |
| | | map: this.map, |
| | | }) |
| | | this.editor = new TMap.tools.GeometryEditor({ |
| | | // TMap.tools.GeometryEditor ææ¡£å°åï¼https://lbs.qq.com/webApi/javascriptGL/glDoc/glDocEditor |
| | | map: this.map, // ç¼è¾å¨ç»å®çå°å¾å¯¹è±¡ |
| | | overlayList: [ |
| | | // å¯ç¼è¾å¾å± ææ¡£å°åï¼https://lbs.qq.com/webApi/javascriptGL/glDoc/glDocEditor#4 |
| | | { |
| | | overlay: polygon, |
| | | id: "polygon", |
| | | }, |
| | | ], |
| | | actionMode: TMap.tools.constants.EDITOR_ACTION.DRAW, // ç¼è¾å¨ç工使¨¡å¼ |
| | | activeOverlayId: this.activeId, // æ¿æ´»å¾å± |
| | | snappable: true, // å¼å¯å¸é |
| | | }) |
| | | // çå¬ç»å¶ç»æäºä»¶ï¼è·åç»å¶å ä½å¾å½¢ |
| | | this.editor.on("draw_complete", (geometry) => { |
| | | console.log('ææé¡¶ç¹åæ éå', geometry) |
| | | // å¤è¾¹å½¢å¤ç |
| | | if (this.activeId === "polygon") { |
| | | console.log("å¾å°é¡¶ç¹ç»çº¬åº¦çæ°ç»", geometry.paths) |
| | | } |
| | | }) |
| | | }, |
| | | confirm() { } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .map_title { |
| | | font-size: 16px; |
| | | font-weight: 500; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | #mapContainer { |
| | | |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | width="600px" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="ç«ç¹ç¼å·" prop="code"> |
| | | <el-input v-model="form.code" :disabled="form.id" placeholder="请è¾å
¥ç«ç¹ç¼å·ï¼å
¨å±å¯ä¸" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ç«ç¹åç§°" prop="name"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥ç«ç¹åç§°" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æ¯å¦å¼å¸¸ä¸æ¥" prop="needNotice"> |
| | | <el-radio-group v-model="form.needNotice"> |
| | | <el-radio :label="0">䏿¥</el-radio> |
| | | <el-radio :label="1">ä¸ä¸æ¥</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="ç«ç¹ip" prop="ip"> |
| | | <el-input v-model="form.ip" placeholder="请è¾å
¥ç«ç¹ipå°å" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="ç«ç¹ç«¯å£å·" prop="port"> |
| | | <el-input v-model="form.port" placeholder="请è¾å
¥ç«ç¹ç«¯å£å·" v-trim/> |
| | | </el-form-item> --> |
| | | |
| | | <!-- <el-form-item label="夿³¨" prop="info"> |
| | | <el-input v-model="form.info" placeholder="请è¾å
¥å¤æ³¨" v-trim/> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | name: 'OperaSitesWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | code: '', |
| | | needNotice:0, |
| | | ip: '', |
| | | port: '' |
| | | |
| | | // createDate: '', |
| | | // creator: '', |
| | | // editDate: '', |
| | | // editor: '', |
| | | // isdeleted: '', |
| | | // info: '', |
| | | // name: '', |
| | | // code: '', |
| | | // status: '', |
| | | // lockNum: '', |
| | | |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | code: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ç¼å·', tigger: 'blur' }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹åç§°', tigger: 'blur' }, |
| | | ], |
| | | ip: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ipå°å', tigger: 'blur' }, |
| | | ], |
| | | port: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ç«¯å£å·', tigger: 'blur' }, |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/sites', |
| | | 'field.id': 'id' |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | width="600px" |
| | | > |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="车è¾ç±»å" prop="code"> |
| | | <el-select v-model="form.named" placeholder="è¯·éæ©"> |
| | | <el-option label="3人çµå¨è½¦" :value="0"></el-option> |
| | | <el-option label="4人çµå¨è½¦" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车è¾ç¼å·" prop="code"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥è½¦è¾ç¼å·" v-trim/> |
| | | </el-form-item> |
| | | <el-form-item label="æ§å¶å¨SN" prop="needNotice"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥æ§å¶å¨SN" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | name: 'OperaSitesWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | code: '', |
| | | needNotice:0, |
| | | ip: '', |
| | | port: '' |
| | | |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | code: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ç¼å·', tigger: 'blur' }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹åç§°', tigger: 'blur' }, |
| | | ], |
| | | ip: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ipå°å', tigger: 'blur' }, |
| | | ], |
| | | port: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ç«¯å£å·', tigger: 'blur' }, |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/sites', |
| | | 'field.id': 'id' |
| | | }) |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:sites:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="ç«ç¹ç¼å·" prop="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥ç«ç¹ç¼å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç«ç¹åç§°" prop="name"> |
| | | <el-input v-model="searchForm.name" placeholder="请è¾å
¥ç«ç¹åç§°" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:sites:create']"> |
| | | <li><el-button type="primary" @click="$refs.operaSitesWindow.open('æ°å»ºç«ç¹')" icon="el-icon-plus" v-permissions="['business:sites:create']">æ°å»º</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="code" label="ç«ç¹ç¼å·" :sort-method="(a,b)=>{ return a.code-b.code}" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="ç«ç¹åç§°" sortable min-width="100px" align="center"></el-table-column> |
| | | |
| | | <el-table-column prop="createTime" label="å建æ¶é´" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:sites:update', 'business:sites:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | align="center" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleDraw(row)">ç»å¶å°å¾åºå</el-button> |
| | | <el-button type="text" @click="$refs.operaSitesWindow.open('ç¼è¾ç«ç¹', row)" icon="el-icon-edit" v-permissions="['business:sites:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:sites:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaSitesWindow ref="operaSitesWindow" @success="handlePageChange" /> |
| | | <!-- æ¥çäºç»´ç --> |
| | | <AMap v-if="isShowMap" ref="MapRef" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaSitesWindow from './components/SitesWindow' |
| | | import AMap from './components/Map.vue' |
| | | export default { |
| | | name: 'Sites', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaSitesWindow, AMap }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | id: '', |
| | | createDate: '', |
| | | creator: '', |
| | | editDate: '', |
| | | editor: '', |
| | | isdeleted: '', |
| | | info: '', |
| | | name: '', |
| | | code: '', |
| | | status: '', |
| | | lockNum: '', |
| | | ip: '', |
| | | clientVersion: '' |
| | | }, |
| | | isShowMap: false |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ç«ç¹ä¿¡æ¯è¡¨', |
| | | api: '/business/sites', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | handleDraw() { |
| | | this.isShowMap = true |
| | | this.$nextTick(() => { |
| | | this.$refs.MapRef.isShowModal = true |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:sites:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="车è¾ç¼å·" prop="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥è½¦è¾ç¼å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <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="çµéæ
åµ" prop="name"> |
| | | <el-select v-model="searchForm.status" placeholder="çµéæ
åµ" @change="search"> |
| | | <el-option label="æ£å¸¸" value="0" /> |
| | | <el-option label="çµéä½" value="1" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:sites:create']"> |
| | | <li><el-button type="primary" @click="$refs.TramEditRef.open('æ°å¢è½¦è¾')" icon="el-icon-plus" v-permissions="['business:sites:create']">æ°å»º</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | border |
| | | > |
| | | <el-table-column prop="code" label="车è¾ç¼ç " :sort-method="(a,b)=>{ return a.code-b.code}" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="车è¾ç±»å" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="æ§å¶å¨SN" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="å½åçµåå¼" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="çµéæ
åµ" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="ç«ç¹ç¼å·" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="name" label="ç«ç¹åç§°" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="createTime" label="æåé讯æ¶é´" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:sites:update', 'business:sites:delete'])" |
| | | label="æä½" |
| | | min-width="160" |
| | | align="center" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.QRcode.open('æ¥çäºç»´ç ', row.code)" icon="el-icon-picture-outline-round">æ¥çäºç»´ç </el-button> |
| | | <el-button type="text" @click="$refs.TramEditRef.open('ç¼è¾è½¦è¾', row)" icon="el-icon-edit" v-permissions="['business:sites:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:sites:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <TramEdit ref="TramEditRef" @success="handlePageChange"/> |
| | | <!-- æ¥çäºç»´ç --> |
| | | <QRcode ref="QRcode" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TramEdit from './components/TramEdit.vue' |
| | | import QRcode from '@/components/business/QRcode' |
| | | export default { |
| | | name: 'Sites', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, TramEdit, QRcode }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | id: '', |
| | | createDate: '', |
| | | creator: '', |
| | | editDate: '', |
| | | editor: '', |
| | | isdeleted: '', |
| | | info: '', |
| | | name: '', |
| | | code: '', |
| | | status: '', |
| | | lockNum: '', |
| | | ip: '', |
| | | clientVersion: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ç«ç¹ä¿¡æ¯è¡¨', |
| | | api: '/business/sites', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | } |
| | | } |
| | | </script> |
| | |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.dao.business.model.DiscountMember; |
| | | import com.doumee.dao.business.web.request.DiscountMemberDTO; |
| | | import com.doumee.service.business.DiscountMemberService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:discountmember:query") |
| | | public ApiResponse findById(@PathVariable String id) { |
| | | return ApiResponse.success(discountMemberService.findById(id)); |
| | | return ApiResponse.success(discountMemberService.getDetail(id)); |
| | | } |
| | | |
| | | @ApiOperation("å¥é¤å¡æ¥åº") |
| | | @PostMapping("/cancel") |
| | | @RequiresPermissions("business:discountmember:update") |
| | | public ApiResponse cancel(@RequestBody DiscountMemberDTO model) { |
| | | discountMemberService.cancel(model); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | @ApiOperation("å¥é¤å¡è°æ´") |
| | | @PostMapping("/adjust") |
| | | @RequiresPermissions("business:discountmember:update") |
| | | public ApiResponse adjust(@RequestBody DiscountMemberDTO model) { |
| | | discountMemberService.adjust(model); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.business.model.WxBillDetail; |
| | | import com.doumee.dao.business.vo.DiscountGoodsorderExportVO; |
| | | import com.doumee.dao.business.vo.GoodsorderExportVO; |
| | | import com.doumee.dao.business.vo.GoodsorderTotalDataVO; |
| | | import com.doumee.dao.business.web.request.GoodsorderBackDTO; |
| | | import com.doumee.dao.business.web.request.GoodsorderCanBanlanceDTO; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailDTO; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailVO; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.doumee.service.business.RefundService; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | @RequiresPermissions("business:goodsorder:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<Goodsorder> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(Goodsorder.class).exportWithFirstAndEnd(goodsorderService.findPage(pageWrap).getRecords(), "订åå表_"+System.currentTimeMillis(),"订åå表_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("å¥é¤å¡è®¢åå表-导åºExcel") |
| | | @PostMapping("/discountExportExcel") |
| | | @RequiresPermissions("business:goodsorder:exportExcel") |
| | | public void discountExportExcel (@RequestBody PageWrap<Goodsorder> pageWrap, HttpServletResponse response) { |
| | | List<Goodsorder> goodsorders = goodsorderService.findPage(pageWrap).getRecords(); |
| | | List<DiscountGoodsorderExportVO> discountGoodsorderExportVOList = new ArrayList<>(); |
| | | for (Goodsorder goodsorder:goodsorders) { |
| | | DiscountGoodsorderExportVO discountGoodsorderExportVO = new DiscountGoodsorderExportVO(); |
| | | BeanUtils.copyProperties(goodsorder,discountGoodsorderExportVO); |
| | | discountGoodsorderExportVO.setPayMoney(discountGoodsorderExportVO.getPayMoney()); |
| | | discountGoodsorderExportVOList.add(discountGoodsorderExportVO); |
| | | } |
| | | ExcelExporter.build(DiscountGoodsorderExportVO.class).exportWithFirstAndEnd(discountGoodsorderExportVOList, "订åå表_"+System.currentTimeMillis(),"订åå表_"+ DateUtil.getPlusTime2(DateUtil.getCurrentDate()),null, response); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation("æ¶æ¬¾æç»ï¼å¾®ä¿¡å¯¹è´¦æç»ï¼_å页æ¥è¯¢") |
| | | @PostMapping("/pageAccountDetail") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | |
| | | return ApiResponse.success(goodsorderService.getGoodsorderDetailDTO(id)); |
| | | } |
| | | |
| | | @ApiOperation("订å详æ
-å¥é¤å¡") |
| | | @GetMapping("/discountOrderDetail") |
| | | @RequiresPermissions("business:goodsorder:query") |
| | | public ApiResponse<GoodsorderDetailVO> discountOrderDetail(@RequestParam String id) { |
| | | return ApiResponse.success(goodsorderService.getGoodsorderDetailForDisCount(id)); |
| | | } |
| | | |
| | | /** |
| | | * 强å¶ç»ç®è®¢å |
| | |
| | | |
| | | REFUND(2,"ç»ç®éæ¼é", "ç»ç®éæ¼é"), |
| | | |
| | | PLATFORMREFUND(3,"å¹³å°éæ¼é", "å¹³å°éæ¼é") |
| | | PLATFORM_REFUND(3,"å¹³å°é款", "å¹³å°é款"), |
| | | |
| | | DISCOUNT(4,"å¹³å°å¥é¤", "å¹³å°å¥é¤") |
| | | |
| | | ; |
| | | String name; |
| | |
| | | return dt1; |
| | | } |
| | | |
| | | public static String getXDaysAfter(Date date, Integer days){ |
| | | Timestamp currentTimestamp = new Timestamp(date.getTime()); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.setTime(currentTimestamp); |
| | | calendar.add(Calendar.DAY_OF_YEAR, days-1); // å¨å½åæ¶é´åºç¡ä¸æ·»å æå®çå¤©æ° |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); |
| | | return formatter.format(calendar.getTime()); |
| | | } |
| | | |
| | | /** |
| | | * @author Pablo Descrption:ȡ�õ�ǰ����getgetg get Date format |
| | | * Exampleï¼2008-05-15 |
| | |
| | | /** |
| | | * å¾åºä¸¤ä¸ªæ¥æä¹é´çé´éå¤©æ° |
| | | * |
| | | * @param strFromDate |
| | | * @param smallDate |
| | | * æ ¼å¼ä¸ºyyyy-MM-dd |
| | | * @param strToDate |
| | | * @param bigDate |
| | | * æ ¼å¼ä¸ºyyyy-MM-dd |
| | | * @return int |
| | | */ |
| | | public static long getBetweenDays(String strFromDate, String strToDate) { |
| | | public static long getBetweenDays(String smallDate, String bigDate) { |
| | | long m_intervalday = 0;// åå§åæ¶é´é´éçå¼ä¸º0 |
| | | // 使ç¨çæ¶é´æ ¼å¼ä¸ºyyyy-MM-dd |
| | | SimpleDateFormat m_simpledateformat = new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | Date fromDate = m_simpledateformat.parse(strFromDate); |
| | | Date toDate = m_simpledateformat.parse(strToDate); |
| | | Date fromDate = m_simpledateformat.parse(smallDate); |
| | | Date toDate = m_simpledateformat.parse(bigDate); |
| | | m_intervalday = toDate.getTime() - fromDate.getTime();// è®¡ç®æå¾ä¸ºå¾®ç§æ° |
| | | m_intervalday = m_intervalday / 1000 / 60 / 60 / 24;// è®¡ç®æå¾çå¤©æ° |
| | | |
| | |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | System.out.println((int)(3.222)); |
| | | |
| | | System.out.println(DateUtil.getBetweenDays("2025-02-13","2025-02-15")); |
| | | } catch (Exception ex) { |
| | | ex.printStackTrace(); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.doumee.dao.business.model.DiscountLog; |
| | | import com.github.yulichang.base.mapper.MPJJoinMapper; |
| | | |
| | | /** |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/02/17 09:43 |
| | | */ |
| | | public interface DiscountLogMapper extends BaseMapper<DiscountLog> { |
| | | public interface DiscountLogMapper extends MPJJoinMapper<DiscountLog> { |
| | | |
| | | } |
| | |
| | | private Integer bikeOrElec; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "æ¯æ¥åä»·", example = "1") |
| | | private BigDecimal dayPrice; |
| | | |
| | | |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "å¾çå
¨è·¯å¾", example = "1") |
| | | private String fullImgUrl; |
| | | } |
| | |
| | | package com.doumee.dao.business.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | |
| | | @ExcelColumn(name="å
³è订åç¼ç (å
³ègoodsorderï¼") |
| | | private String goodsorderId; |
| | | |
| | | @ApiModelProperty(value = "å建人åç§°") |
| | | @TableField(exist = false) |
| | | private String creatorName; |
| | | |
| | | } |
| | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import java.util.Date; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨æ·éªè¡å¥é¤å¡å
³è表 |
| | |
| | | @ApiModelProperty(value = "é鿝天éé¢", example = "1") |
| | | private Integer saleDayLimit; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸ 1ä½åº 2è¿ææç¨å® ", example = "1") |
| | | @ExcelColumn(name="å¥é¤ç¶æ",index = 7,width = 10,valueMapping = "0=æ£å¸¸ï¼1=ä½åºï¼2=è¿ææç¨å®") |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸ 1ä½åº 2å¾
æ¯ä»", example = "1") |
| | | @ExcelColumn(name="å¥é¤ç¶æ",index = 7,width = 10,valueMapping = "0=æ£å¸¸;1=ä½åº;2=å¾
æ¯ä»") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·ç¼ç ï¼å
³èmember)") |
| | |
| | | @ExcelColumn(name="ä½¿ç¨æ¬¡æ°",index = 4,width = 20) |
| | | @TableField(exist = false) |
| | | private Integer useTimes; |
| | | |
| | | @ApiModelProperty(value = "éªè¡è®°å½") |
| | | @TableField(exist = false) |
| | | private List<DiscountLog> discountLogList; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æä½è®°å½") |
| | | @TableField(exist = false) |
| | | private List<DiscountLog> optLogList; |
| | | } |
| | |
| | | @TableField(exist = false) |
| | | private Integer closeStatus; |
| | | |
| | | @ApiModelProperty(value = "æä½äºº") |
| | | @ExcelColumn(name="æä½äºº",index = 9,width = 10,align = HorizontalAlignment.CENTER) |
| | | @TableField(exist = false) |
| | | private String refundUserName; |
| | | |
| | | @ApiModelProperty(value = "å¥é¤åç§°", example = "2023-10-01 15:12:01") |
| | | @TableField(exist = false) |
| | |
| | | @ExcelColumn(name="交æéé¢") |
| | | private BigDecimal money; |
| | | |
| | | @ApiModelProperty(value = "交æç±»å 0ç§è½¦æ¼é 1ç»ç®å®é
æ¶è´¹ 2ç»ç®é款 3å¹³å°é款", example = "1") |
| | | @ApiModelProperty(value = "交æç±»å 0ç§è½¦æ¼é 1ç»ç®å®é
æ¶è´¹ 2ç»ç®é款 3å¹³å°é款 4è´ä¹°å¥é¤ ", example = "1") |
| | | @ExcelColumn(name="交æç±»å 0ç§è½¦æ¼é 1ç»ç®å®é
æ¶è´¹ 2ç»ç®é款 3å¹³å°é款") |
| | | private Integer type; |
| | | |
| | |
| | | @ExcelColumn(name="ç¨æ·å½åä½é¢(åï¼") |
| | | private BigDecimal balance; |
| | | |
| | | @ApiModelProperty(value = "交æå
³è对象类å 0订å 1鿬¾å", example = "1") |
| | | @ExcelColumn(name="交æå
³è对象类å 0订å 1鿬¾å") |
| | | @ApiModelProperty(value = "交æå
³è对象类å 0订å 1鿬¾å 2å¥é¤è´ä¹°", example = "1") |
| | | @ExcelColumn(name="交æå
³è对象类å 0订å 1鿬¾å 2å¥é¤è´ä¹°") |
| | | private Integer objType; |
| | | |
| | | @ApiModelProperty(value = "交æå
³è对象ç¼ç ") |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.apache.poi.ss.usermodel.HorizontalAlignment; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 订åä¿¡æ¯è¡¨ |
| | | * @author æ±è¹è¹ |
| | | * @date 2023/09/27 18:06 |
| | | */ |
| | | @Data |
| | | @ApiModel("å¥é¤è®¢å导åºå¯¹è±¡") |
| | | public class DiscountGoodsorderExportVO { |
| | | |
| | | @ApiModelProperty(value = "订åç¼ç ") |
| | | @ExcelColumn(name="订åç¼å·",width = 10,index = 1,align = HorizontalAlignment.CENTER) |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "å¥é¤å¡åç§°") |
| | | @ExcelColumn(name="å¥é¤å¡",width = 10,index = 2,align = HorizontalAlignment.CENTER) |
| | | private String discountName; |
| | | |
| | | @ApiModelProperty(value = "å计ï¼å
ï¼") |
| | | @ExcelColumn(name="å计ï¼å
ï¼",width = 10,index = 3,align = HorizontalAlignment.CENTER) |
| | | private BigDecimal money; |
| | | |
| | | @ApiModelProperty(value = "å®ä»ï¼å
ï¼") |
| | | @ExcelColumn(name="å®ä»ï¼å
ï¼",width = 10,index = 4,align = HorizontalAlignment.CENTER) |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty(value = "å·²ééé¢ï¼å
ï¼") |
| | | @ExcelColumn(name="å·²ééé¢ï¼å
ï¼",width = 10,index = 5,align = HorizontalAlignment.CENTER) |
| | | private BigDecimal refundMoney; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·openid" ) |
| | | @TableField(exist = false) |
| | | @ExcelColumn(name="ç¨æ·ä¿¡æ¯",index = 6 ,width = 10,align = HorizontalAlignment.CENTER) |
| | | private String openid; |
| | | |
| | | @ApiModelProperty(value = "æ¯ä»æ¹å¼ 0微信 1æ¯ä»å®") |
| | | @ExcelColumn(name="æ¯ä»æ¹å¼",index = 7 ,width = 10,valueMapping = "0=微信ï¼1=æ¯ä»å®ï¼",align = HorizontalAlignment.CENTER) |
| | | private Integer payWay; |
| | | |
| | | @ApiModelProperty(value = "è®¢åæ¥æº") |
| | | @ExcelColumn(name="è®¢åæ¥æº",index = 8 ,width = 10,valueMapping = "0=å°ç¨åºç«¯ï¼",align = HorizontalAlignment.CENTER) |
| | | private Integer origin; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æä½äºº") |
| | | @ExcelColumn(name="æä½äºº",index = 9,width = 10,align = HorizontalAlignment.CENTER) |
| | | private String refundUserName; |
| | | |
| | | |
| | | @ApiModelProperty(value = "å建æ¶é´") |
| | | @ExcelColumn(name="å建æ¶é´",index = 10,width = 16,dateFormat = "yyyy-MM-dd HH:mm:ss",align = HorizontalAlignment.CENTER) |
| | | private Date createDate; |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.web.request; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.doumee.core.annotation.excel.ExcelColumn; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * ç¨æ·éªè¡å¥é¤å¡å
³è表 |
| | | * @author æ±è¹è¹ |
| | | * @date 2025/02/17 09:43 |
| | | */ |
| | | @Data |
| | | public class DiscountMemberDTO { |
| | | |
| | | @ApiModelProperty(value = "ç¼ç ") |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "夿³¨") |
| | | private String info; |
| | | |
| | | @ApiModelProperty(value = "票å·") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "åç§°") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "ç¨æ·opneid") |
| | | private String openid; |
| | | |
| | | @ApiModelProperty(value = "ç¶æ 0æ£å¸¸ 1ä½åº 2è¿ææç¨å®", example = "1") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "å¢å 天æ°") |
| | | private Integer addDays; |
| | | |
| | | @ApiModelProperty(value = "é䏿°æ®") |
| | | private List<String> choseIdList; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.doumee.dao.business.web.response; |
| | | |
| | | import com.doumee.dao.business.model.DiscountMember; |
| | | import com.doumee.dao.business.model.Goodsorder; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Refund; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author T14 |
| | | */ |
| | | @Data |
| | | @ApiModel("订å详æ
") |
| | | public class GoodsorderDetailVO { |
| | | |
| | | @ApiModelProperty(value = "订åä¿¡æ¯") |
| | | private Goodsorder goodsOrder; |
| | | |
| | | @ApiModelProperty(value = "ä¹°å®¶ä¿¡æ¯") |
| | | private Member member; |
| | | |
| | | @ApiModelProperty(value = "å¥é¤ä¿¡æ¯") |
| | | private DiscountMember discountMember; |
| | | |
| | | @ApiModelProperty(value = "鿬¾è®°å½") |
| | | private List<Refund> refundList; |
| | | |
| | | } |
| | |
| | | package com.doumee.dao.business.web.response; |
| | | |
| | | import com.doumee.dao.business.model.Ad; |
| | | import com.doumee.dao.business.model.Discount; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | @ApiModelProperty(value = "ç§èµé¡»ç¥") |
| | | private String leaseNotice; |
| | | |
| | | |
| | | @ApiModelProperty(value = "æ¼éç¶æï¼0=æªæ¯ä»æ¼éï¼1=å·²æ¯ä»æ¼é; 2=鿬¾ä¸") |
| | | private Integer depositStatus = 0; |
| | | |
| | |
| | | @ApiModelProperty(value = "广åä¿¡æ¯") |
| | | private List<Ad> adList; |
| | | |
| | | @ApiModelProperty(value = "çéå¥é¤") |
| | | private List<Discount> discountList; |
| | | |
| | | } |
| | |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.dao.business.model.DiscountMember; |
| | | import com.doumee.dao.business.web.request.DiscountMemberDTO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | DiscountMember findById(String id); |
| | | |
| | | DiscountMember getDetail(String id); |
| | | /** |
| | | * æ¡ä»¶æ¥è¯¢åæ¡è®°å½ |
| | | * |
| | |
| | | * @return long |
| | | */ |
| | | long count(DiscountMember discountMember); |
| | | |
| | | void cancel(DiscountMemberDTO model); |
| | | |
| | | void adjust(DiscountMemberDTO model); |
| | | } |
| | |
| | | */ |
| | | PageData<Discount> findPage(PageWrap<Discount> pageWrap); |
| | | |
| | | void dealPrice(Discount discount); |
| | | /** |
| | | * æ¡ä»¶ç»è®¡ |
| | | * |
| | |
| | | import com.doumee.dao.business.web.request.BackElecBikeRequest; |
| | | import com.doumee.dao.business.web.request.GoodsorderBackDTO; |
| | | import com.doumee.dao.business.web.request.GoodsorderCanBanlanceDTO; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailVO; |
| | | import com.doumee.dao.business.web.response.HomeResponse; |
| | | import com.doumee.dao.business.web.response.GoodsorderDetailDTO; |
| | | import com.doumee.dao.business.web.response.RidesDetailResponse; |
| | |
| | | */ |
| | | Object createGoodsOrderPay(String memberId); |
| | | |
| | | /** |
| | | * å¥é¤è´ä¹° |
| | | * @param discountId |
| | | * @param memberId |
| | | * @return |
| | | */ |
| | | Object createDiscountOrderPay(String discountId,String memberId); |
| | | |
| | | /** |
| | | * æ¼éæ¯ä»åè°ä¸å¡ |
| | | * æ¯ä»åè°ä¸å¡ |
| | | * @param preOrderId |
| | | * @return |
| | | */ |
| | |
| | | */ |
| | | GoodsorderDetailDTO getGoodsorderDetailDTO(String id); |
| | | |
| | | |
| | | /** |
| | | * å¥é¤å¡è®¢å详æ
|
| | | * @param id |
| | | * @return |
| | | */ |
| | | GoodsorderDetailVO getGoodsorderDetailForDisCount(String id); |
| | | /** |
| | | * 强å¶ç»ç®è®¢å |
| | | * @param id |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DiscountLogMapper; |
| | | import com.doumee.dao.business.DiscountMemberMapper; |
| | | import com.doumee.dao.business.join.DiscountMemberJoinMapper; |
| | | import com.doumee.dao.business.model.Discount; |
| | | import com.doumee.dao.business.model.DiscountLog; |
| | | import com.doumee.dao.business.model.DiscountMember; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.web.request.DiscountMemberDTO; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.DiscountMemberService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * ç¨æ·éªè¡å¥é¤å¡å
³è表Serviceå®ç° |
| | |
| | | |
| | | @Autowired |
| | | private DiscountMemberJoinMapper discountMemberJoinMapper; |
| | | |
| | | @Autowired |
| | | private DiscountLogMapper discountLogMapper; |
| | | |
| | | |
| | | @Override |
| | | public String create(DiscountMember discountMember) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public DiscountMember getDetail(String id) { |
| | | DiscountMember discountMember = discountMemberMapper.selectById(id); |
| | | if(Objects.isNull(discountMember)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | List<DiscountLog> discountLogList = discountLogMapper.selectJoinList(DiscountLog.class,new MPJLambdaWrapper<DiscountLog>() |
| | | .selectAll(DiscountLog.class) |
| | | .selectAs(SystemUser::getRealname,DiscountLog::getCreatorName) |
| | | .eq(DiscountLog::getDiscountMemberId,discountMember.getId()) |
| | | .eq(DiscountLog::getIsdeleted,Constants.ZERO) |
| | | .orderByDesc(DiscountLog::getId) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(discountLogList)){ |
| | | discountMember.setDiscountLogList(discountLogList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList())); |
| | | discountMember.setOptLogList(discountLogList.stream().filter(i->!Constants.equalsInteger(i.getType(),Constants.ZERO)).collect(Collectors.toList())); |
| | | discountMember.setUseTimes(discountMember.getDiscountLogList().size()); |
| | | } |
| | | return discountMember; |
| | | } |
| | | |
| | | @Override |
| | | public DiscountMember findOne(DiscountMember discountMember) { |
| | | QueryWrapper<DiscountMember> wrapper = new QueryWrapper<>(discountMember); |
| | | return discountMemberMapper.selectOne(wrapper); |
| | |
| | | return PageData.from(discountMemberJoinMapper.selectJoinPage(page, DiscountMember.class,queryWrapper)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void cancel(DiscountMemberDTO model){ |
| | | LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | MPJLambdaWrapper<DiscountMember> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(DiscountMember.class) |
| | | .leftJoin(Member.class,Member::getId,DiscountMember::getMemberId) |
| | | .eq(DiscountMember::getStatus,Constants.ZERO) |
| | | .like(StringUtils.isNotBlank(model.getCode()),DiscountMember::getCode,model.getCode()) |
| | | .like(StringUtils.isNotBlank(model.getName()),DiscountMember::getName,model.getName()) |
| | | .like(StringUtils.isNotBlank(model.getOpenid()),Member::getOpenid,model.getOpenid()) |
| | | .eq(Objects.nonNull(model.getId()),DiscountMember::getId,model.getId()) |
| | | .in(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(model.getChoseIdList()) |
| | | ,DiscountMember::getId,model.getChoseIdList()) |
| | | .orderByDesc(DiscountMember::getId); |
| | | List<DiscountMember> list = discountMemberJoinMapper.selectJoinList(DiscountMember.class,queryWrapper); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°å¯æ¥åºçå¥é¤å¡ä¿¡æ¯"); |
| | | } |
| | | for (DiscountMember discountMember:list) { |
| | | discountMemberMapper.update(null,new UpdateWrapper<DiscountMember>().lambda() |
| | | .set(DiscountMember::getStatus,Constants.ONE) |
| | | .eq(DiscountMember::getId,discountMember.getId()) |
| | | ); |
| | | //æä½æ¥å¿ |
| | | DiscountLog discountLog = new DiscountLog(); |
| | | discountLog.setIsdeleted(Constants.ZERO); |
| | | discountLog.setCreator(principal.getId()); |
| | | discountLog.setCreateDate(new Date()); |
| | | discountLog.setDiscountMemberId(discountMember.getId()); |
| | | discountLog.setType(Constants.ONE); |
| | | discountLog.setInfo(model.getInfo()); |
| | | discountLog.setEditInfo("éè´§éå¡"); |
| | | discountLog.setGoodsorderId(discountMember.getGoodsorderId()); |
| | | discountLogMapper.insert(discountLog); |
| | | } |
| | | //鿬¾æä½ |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void adjust(DiscountMemberDTO model){ |
| | | if(Objects.isNull(model) |
| | | || Objects.isNull(model.getAddDays())){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | LoginUserInfo principal = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | MPJLambdaWrapper<DiscountMember> queryWrapper = new MPJLambdaWrapper<>(); |
| | | queryWrapper.selectAll(DiscountMember.class) |
| | | .leftJoin(Member.class,Member::getId,DiscountMember::getMemberId) |
| | | .eq(DiscountMember::getStatus,Constants.ZERO) |
| | | .like(StringUtils.isNotBlank(model.getCode()),DiscountMember::getCode,model.getCode()) |
| | | .like(StringUtils.isNotBlank(model.getName()),DiscountMember::getName,model.getName()) |
| | | .like(StringUtils.isNotBlank(model.getOpenid()),Member::getOpenid,model.getOpenid()) |
| | | .eq(Objects.nonNull(model.getId()),DiscountMember::getId,model.getId()) |
| | | .in(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(model.getChoseIdList()) |
| | | ,DiscountMember::getId,model.getChoseIdList()) |
| | | .orderByDesc(DiscountMember::getId); |
| | | List<DiscountMember> list = discountMemberJoinMapper.selectJoinList(DiscountMember.class,queryWrapper); |
| | | if(CollectionUtils.isEmpty(list)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"æªæ¥è¯¢å°å¯è°æ´çå¥é¤å¡ä¿¡æ¯"); |
| | | } |
| | | for (DiscountMember discountMember:list) { |
| | | if(!Constants.equalsInteger(discountMember.getStatus(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ã"+discountMember.getCode()+"ãå¥é¤å¡å·²ä½åºï¼æ æ³è¿è¡è¯¥æä½"); |
| | | } |
| | | String useEndDate = DateUtil.getXDaysAfter(discountMember.getUseEndDate(),model.getAddDays()); |
| | | discountMemberMapper.update(null,new UpdateWrapper<DiscountMember>().lambda() |
| | | //.setSql(" use_end_date = use_end_date::date + " + model.getAddDays() ) |
| | | .set(DiscountMember::getUseEndDate,useEndDate) |
| | | .eq(DiscountMember::getId,discountMember.getId()) |
| | | ); |
| | | //æä½æ¥å¿ |
| | | DiscountLog discountLog = new DiscountLog(); |
| | | discountLog.setIsdeleted(Constants.ZERO); |
| | | discountLog.setCreator(principal.getId()); |
| | | discountLog.setCreateDate(new Date()); |
| | | discountLog.setDiscountMemberId(discountMember.getId()); |
| | | discountLog.setType(Constants.TWO); |
| | | discountLog.setGoodsorderId(discountMember.getGoodsorderId()); |
| | | discountLog.setEditInfo(model.getInfo()); |
| | | discountLog.setEditDays(model.getAddDays()); |
| | | discountLogMapper.insert(discountLog); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(DiscountMember discountMember) { |
| | | QueryWrapper<DiscountMember> wrapper = new QueryWrapper<>(discountMember); |
| | |
| | | import com.doumee.core.model.LoginUserInfo; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DiscountMapper; |
| | | import com.doumee.dao.business.join.BikeRepairJoinMapper; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | discount.setIsdeleted(Constants.ZERO); |
| | | discount.setCreateDate(new Date()); |
| | | discount.setCreator(userInfo.getId()); |
| | | if(Constants.equalsInteger(discount.getUseType(),Constants.ZERO)){ |
| | | discount.setUseDays((int) (DateUtil.getBetweenDays(DateUtil.dateToString(discount.getUseStartDate(),"yyyy-MM-dd"),DateUtil.dateToString(discount.getUseEndDate(),"yyyy-MM-dd")))); |
| | | } |
| | | discountMapper.insert(discount); |
| | | return discount.getId(); |
| | | } |
| | |
| | | || StringUtils.isBlank(discount.getName()) |
| | | || Objects.isNull(discount.getType()) |
| | | || Objects.isNull(discount.getLimitType()) |
| | | || (discount.getLimitTime()==Constants.ONE && Objects.isNull(discount.getLimitTime())) |
| | | || Objects.isNull(discount.getPrice()) |
| | | || (Constants.equalsInteger(discount.getLimitTime(),Constants.ONE) && Objects.isNull(discount.getLimitTime())) |
| | | || Objects.isNull(discount.getPrice()) || discount.getPrice().compareTo(BigDecimal.ZERO) <= Constants.ZERO |
| | | || Objects.isNull(discount.getChannel()) |
| | | || Objects.isNull(discount.getStartDate()) |
| | | || Objects.isNull(discount.getEndDate()) |
| | | || Objects.isNull(discount.getUseType()) |
| | | || (discount.getUseType()==Constants.ZERO && ( Objects.isNull(discount.getUseStartDate()) || Objects.isNull(discount.getUseEndDate()) )) |
| | | || (discount.getUseType()==Constants.ONE && Objects.isNull(discount.getUseDays())) |
| | | || (discount.getUseType()==Constants.TWO && ( Objects.isNull(discount.getUseStartDate()) || Objects.isNull(discount.getUseDays()) )) |
| | | || (Constants.equalsInteger(discount.getUseType(),Constants.ZERO) && ( Objects.isNull(discount.getUseStartDate()) || Objects.isNull(discount.getUseEndDate()) )) |
| | | || (Constants.equalsInteger(discount.getUseType(),Constants.ONE) && Objects.isNull(discount.getUseDays())) |
| | | || (Constants.equalsInteger(discount.getUseType(),Constants.TWO) && ( Objects.isNull(discount.getUseStartDate()) || Objects.isNull(discount.getUseDays()) )) |
| | | || (Objects.isNull(discount.getUseHoliday()) || Objects.isNull(discount.getUseWorkday()) ) |
| | | || (Objects.isNull(discount.getIsbike()) || Objects.isNull(discount.getIselecbike()) ) |
| | | ){ |
| | |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"é宿¶æ®µä¿¡æ¯é误"); |
| | | } |
| | | //åºå®æ¥æçæ |
| | | if(discount.getUseType()==Constants.ZERO && |
| | | if(Constants.equalsInteger(discount.getUseType(),Constants.ZERO) && |
| | | ( discount.getUseStartDate().getTime()>discount.getUseEndDate().getTime() || |
| | | discount.getUseStartDate().getTime() < discount.getStartDate().getTime() || |
| | | discount.getUseEndDate().getTime() > discount.getEndDate().getTime() |
| | | ) ){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"ä½¿ç¨æ¶æ®µä¿¡æ¯é误"); |
| | | } |
| | | |
| | | //æå®æ¥æçæ |
| | | if(discount.getUseType()==Constants.TWO && |
| | | if(Constants.equalsInteger(discount.getUseType(),Constants.TWO) && |
| | | ( discount.getUseStartDate().getTime()<discount.getStartDate().getTime() || |
| | | discount.getUseStartDate().getTime() > discount.getEndDate().getTime() |
| | | ) ){ |
| | |
| | | } |
| | | discountMapper.update(null,new UpdateWrapper<Discount>().lambda().set(Discount::getStatus,discount.getStatus()).eq(Discount::getId,discount.getId())); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | |
| | | if(Objects.isNull(discount)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY); |
| | | } |
| | | this.dealPrice(discount); |
| | | if(StringUtils.isNotBlank(discount.getImgurl())){ |
| | | String path =systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode()+ |
| | | systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.DISCOUNT).getCode(); |
| | |
| | | .eq(Objects.nonNull(modele.getBikeOrElec()) && Constants.equalsInteger(modele.getBikeOrElec(),Constants.TWO),Discount::getIselecbike, Constants.ONE) |
| | | .eq(Discount::getIsdeleted, Constants.ZERO) |
| | | .eq( pageWrap.getModel().getStatus() !=null,BikeRepair::getStatus,pageWrap.getModel().getStatus()); |
| | | queryWrapper.orderByDesc(Discount::getCreateDate); |
| | | return PageData.from(discountJoinMapper.selectJoinPage(page, Discount.class,queryWrapper)); |
| | | queryWrapper.orderByDesc(Discount::getCreateDate); |
| | | PageData<Discount> pageData = PageData.from(discountJoinMapper.selectJoinPage(page, Discount.class,queryWrapper)); |
| | | for (Discount discount:pageData.getRecords()) { |
| | | dealPrice(discount); |
| | | } |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void dealPrice(Discount discount){ |
| | | if(Objects.isNull(discount) |
| | | || Objects.isNull(discount.getUseEndDate()) |
| | | || Objects.isNull(discount.getUseStartDate()) |
| | | || Objects.isNull(discount.getPrice()) |
| | | || discount.getPrice().compareTo(BigDecimal.ZERO)==0 |
| | | ){ |
| | | discount.setDayPrice(BigDecimal.ZERO); |
| | | return; |
| | | } |
| | | discount.setDayPrice(discount.getPrice().divide(new BigDecimal(Long.toString(discount.getUseDays())),2)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public long count(Discount discount) { |
| | | QueryWrapper<Discount> wrapper = new QueryWrapper<>(discount); |
| | |
| | | import com.doumee.dao.business.web.response.*; |
| | | import com.doumee.dao.business.join.MemberRidesJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.business.GoodsorderService; |
| | | import com.doumee.service.business.MemberRidesService; |
| | | import com.doumee.service.business.PricingRuleService; |
| | |
| | | import org.apache.shiro.SecurityUtils; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | |
| | | @Autowired |
| | | private DiscountLogMapper discountLogMapper; |
| | | @Autowired |
| | | private DiscountMapper discountMapper; |
| | | |
| | | @Autowired |
| | | GoodsorderJoinMapper goodsorderJoinMapper; |
| | |
| | | if (Objects.nonNull(model.getEndDate())){ |
| | | queryWrapper.le( Goodsorder::getPayDate, Utils.Date.getEnd(model.getEndDate())); |
| | | } |
| | | |
| | | // queryWrapper.eq(model.getPayStatus() !=null,Goodsorder::getPayStatus,model.getPayStatus()); |
| | | // queryWrapper.like(model.getCode() !=null,Goodsorder::getCode,model.getCode()); |
| | | // queryWrapper.like(model.getId() !=null,Goodsorder::getId,model.getId()); |
| | | // queryWrapper.eq(model.getStatus() !=null,Goodsorder::getStatus,model.getStatus()); |
| | | // queryWrapper.like(model.getOnlineOrderid() !=null,Goodsorder::getOnlineOrderid,model.getOnlineOrderid()); |
| | | // queryWrapper.like(model.getOpenid() !=null,Member::getOpenid,model.getOpenid()); |
| | | queryWrapper.eq(Goodsorder::getIsdeleted,Constants.ZERO); |
| | | queryWrapper.eq(Goodsorder::getPayStatus,Constants.ONE); |
| | | queryWrapper.orderByAsc(Goodsorder::getPayDate); |
| | |
| | | queryWrapper.eq(Objects.nonNull(pageWrap.getModel().getType()),Goodsorder::getType,pageWrap.getModel().getType()); |
| | | queryWrapper.select("(select sum(er.discount_price) from member_rides er where er.ordre_id=t.id and er.isdeleted=0) as discountMoney," + |
| | | "(select er.status from member_rides er where er.ordre_id=t.id order by er.create_date desc limit 1) as memberRidesStatus"); |
| | | queryWrapper.select("( select s.realname from refund r left join system_user s on r.creator = s.id where r.obj_id = t.id order by r.id desc limit 1 ) ",Goodsorder::getRefundUserName); |
| | | if(Objects.nonNull(pageWrap.getModel().getCloseStatus()) && pageWrap.getModel().getCloseStatus().equals(Constants.ZERO)){ |
| | | queryWrapper.ne(Goodsorder::getStatus,Constants.GOODSORDER_STATUS.CLOSE.getKey()); |
| | | } |
| | |
| | | .eq("status",Constants.ZERO) |
| | | .orderByAsc("sortnum") |
| | | ));; |
| | | homeResponse.setDiscountList( |
| | | discountMapper.selectList(new QueryWrapper<Discount>().lambda() |
| | | .eq(Discount::getIsdeleted,Constants.ZERO) |
| | | .eq(Discount::getStatus,Constants.ZERO) |
| | | .orderByDesc(Discount::getId) |
| | | .last(" limit 3 ") |
| | | ) |
| | | ); |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(homeResponse.getDiscountList())){ |
| | | for (Discount discount:homeResponse.getDiscountList()) { |
| | | discount.setDayPrice(discount.getPrice().divide(new BigDecimal(Integer.toString(discount.getUseDays())),2)); |
| | | } |
| | | } |
| | | if(!Objects.isNull(homeResponse.getAdList())&&homeResponse.getAdList().size()>Constants.ZERO){ |
| | | homeResponse.getAdList().forEach(i->{ |
| | | i.setImgfullurl(fullPath + i.getImgurl()); |
| | |
| | | |
| | | @Override |
| | | public GoodsorderDetailDTO getGoodsorderDetailDTO(String id) { |
| | | |
| | | List<PayOrderDTO> payOrderDTOList = new ArrayList<>(); |
| | | Goodsorder goodsorder = goodsorderMapper.selectById(id); |
| | | if(goodsorder == null){ |
| | |
| | | goodsorderDetailDTO.setModel(goodsorder);//订å对象 |
| | | return goodsorderDetailDTO; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public GoodsorderDetailVO getGoodsorderDetailForDisCount(String id){ |
| | | GoodsorderDetailVO goodsorderDetailVO = new GoodsorderDetailVO(); |
| | | Goodsorder goodsorder = goodsorderMapper.selectById(id); |
| | | if(goodsorder == null){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY ); |
| | | } |
| | | if(Constants.equalsInteger(goodsorder.getType(),Constants.ZERO)){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED); |
| | | } |
| | | goodsorderDetailVO.setGoodsOrder(goodsorder); |
| | | Member member = memberMapper.selectById(goodsorder.getMemberId()); |
| | | if(Objects.nonNull(member)){ |
| | | goodsorderDetailVO.setMember(member); |
| | | } |
| | | //æ¥è¯¢ååä¿¡æ¯ |
| | | DiscountMember discountMember = discountMemberMapper.selectById(goodsorder.getObjId()); |
| | | if(Objects.nonNull(discountMember)){ |
| | | goodsorderDetailVO.setDiscountMember(discountMember); |
| | | } |
| | | //æ¥è¯¢æææéæ¬¾è®°å½ |
| | | List<Refund> refunds = refundJoinMapper.selectJoinList(Refund.class, |
| | | new MPJLambdaWrapper<Refund>() |
| | | .selectAll(Refund.class) |
| | | .selectAs(SystemUser::getRealname,Refund::getCreatorName) |
| | | .leftJoin(SystemUser.class,SystemUser::getId,Refund::getCreator) |
| | | .eq(Refund::getObjId,goodsorder.getId()) |
| | | .orderByDesc(Refund::getId) |
| | | ); |
| | | goodsorderDetailVO.setRefundList(refunds); |
| | | |
| | | return goodsorderDetailVO; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public void forceCloseGoodsorder(String orderId) { |
| | | //æ¥è¯¢è®¢å ä¿¡æ¯ |
| | |
| | | goodsorder.setCreateDate(new Date()); |
| | | goodsorder.setIsdeleted(Constants.ZERO); |
| | | goodsorder.setCode(goodsorder.getId()); |
| | | goodsorder.setType(Constants.ZERO); |
| | | goodsorder.setMemberId(memberId); |
| | | goodsorder.setMoney(new BigDecimal(systemDictDataBiz.queryByCode(Constants.MINI_PROGRAMME,Constants.RENT_DEPOSIT).getCode()).multiply(new BigDecimal(100))); |
| | | goodsorder.setStatus(Constants.goodsorderStatus.waitPay); |
| | |
| | | } catch (Exception e) { |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼åèµ·æ¯ä»å¤±è´¥~"); |
| | | } |
| | | |
| | | return response; |
| | | } |
| | | |
| | | private Object getWxPayResponse(Goodsorder goodsorder,String openid) throws Exception { |
| | | |
| | | @Override |
| | | public Object createDiscountOrderPay(String memberId,String discountId){ |
| | | Member member = memberMapper.selectById(memberId); |
| | | if(Objects.isNull(member)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°ç¨æ·å¯¹è±¡ä¿¡æ¯"); |
| | | } |
| | | Discount discount = discountMapper.selectById(discountId); |
| | | this.checkDiscountSaleDate(discount); |
| | | String discountMemberId = Constants.getUUID(); |
| | | String goodsorderId = Constants.getUUID(); |
| | | DiscountMember discountMember = new DiscountMember(); |
| | | BeanUtils.copyProperties(discount,discountMember); |
| | | discountMember.setCreator(null); |
| | | discountMember.setId(discountMemberId); |
| | | discountMember.setCreateDate(new Date()); |
| | | discountMember.setEditDate(new Date()); |
| | | discountMember.setEditor(null); |
| | | discountMember.setMemberId(memberId); |
| | | discountMember.setStatus(Constants.TWO); |
| | | discountMember.setGoodsorderId(goodsorderId); |
| | | discountMemberMapper.insert(discountMember); |
| | | |
| | | Goodsorder goodsorder = new Goodsorder(); |
| | | goodsorder.setId(goodsorderId); |
| | | goodsorder.setCreateDate(new Date()); |
| | | goodsorder.setIsdeleted(Constants.ZERO); |
| | | goodsorder.setCode(goodsorder.getId()); |
| | | goodsorder.setMemberId(memberId); |
| | | goodsorder.setType(Constants.ONE); |
| | | goodsorder.setMoney(discount.getPrice().multiply(new BigDecimal(100))); |
| | | goodsorder.setStatus(Constants.goodsorderStatus.waitPay); |
| | | goodsorder.setPreOrderid(goodsorder.getId()); |
| | | goodsorder.setPayStatus(Constants.goodsorderPayStatus.waitPay); |
| | | goodsorder.setPayWay(Constants.ZERO); |
| | | goodsorder.setObjType(Constants.ZERO); |
| | | goodsorder.setObjId(discount.getId()); |
| | | this.goodsorderMapper.insert(goodsorder); |
| | | //è°èµ·æ¯ä» |
| | | Object response = null; |
| | | Object response = null; |
| | | try { |
| | | response = getWxPayResponse(goodsorder,member.getOpenid()); |
| | | } catch (Exception e) { |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(),"对ä¸èµ·ï¼åèµ·æ¯ä»å¤±è´¥~"); |
| | | } |
| | | return response; |
| | | |
| | | } |
| | | |
| | | public void checkDiscountSaleDate(Discount discount){ |
| | | if(Objects.isNull(discount)){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"æªæ¥è¯¢å°å¥é¤ä¿¡æ¯"); |
| | | } |
| | | if(!(Constants.equalsInteger(discount.getIsdeleted(),Constants.ZERO) |
| | | ||Constants.equalsInteger(discount.getStatus(),Constants.ZERO))){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"å¥é¤å·²ä¸æ¶ï¼æ æ³è¿è¡è´ä¹°ï¼è¯·å·æ°æ¥ç"); |
| | | } |
| | | if(!(discount.getStartDate().getTime() < System.currentTimeMillis() |
| | | && Utils.Date.getEnd(discount.getEndDate()).getTime() > System.currentTimeMillis() )){ |
| | | throw new BusinessException(ResponseStatus.DATA_EMPTY.getCode(),"å¥é¤å¼æ¾æ¶é´æªå°,æ æ³è¿è¡è´ä¹°"); |
| | | } |
| | | //éªè¯æ¯å¦è¶
è¿ä»æ¥å¯å®åæ°é |
| | | if(Objects.nonNull(discount.getSaleDayLimit())){ |
| | | if(goodsorderMapper.selectCount(new QueryWrapper<Goodsorder>().lambda() |
| | | .eq(Goodsorder::getType,Constants.ONE) |
| | | .eq(Goodsorder::getObjId,discount.getId()) |
| | | .in(Goodsorder::getStatus,Constants.ZERO,Constants.ONE) |
| | | .apply(" EXTRACT(DAY FROM create_date) = EXTRACT(DAY FROM CURRENT_DATE) ") |
| | | )>=discount.getSaleDayLimit()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å¥é¤ä»æ¥åè¡éå·²å®ç½ï¼è¯·ææ¥æ¥çï¼"); |
| | | } |
| | | } |
| | | if(Objects.nonNull(discount.getSaleLimit())){ |
| | | if(goodsorderMapper.selectCount(new QueryWrapper<Goodsorder>().lambda() |
| | | .eq(Goodsorder::getType,Constants.ONE) |
| | | .eq(Goodsorder::getObjId,discount.getId()) |
| | | .in(Goodsorder::getStatus,Constants.ZERO,Constants.ONE) |
| | | .apply(" EXTRACT(YEAR FROM create_date) = EXTRACT(YEAR FROM CURRENT_DATE) ") |
| | | )>=discount.getSaleDayLimit()){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"å¥é¤åè¡éå·²å®ç½ï¼"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | private Object getWxPayResponse(Goodsorder goodsorder,String openid){ |
| | | //è°èµ·æ¯ä» |
| | | Object response = null; |
| | | PrepayRequest request = new PrepayRequest(); |
| | | request.setAttach("createGoodsOrder"); |
| | | request.setDescription("森æå
¬åèªè¡è½¦éªè¡æ¼éæ¯ä»"); |
| | | request.setDescription(Constants.equalsInteger(goodsorder.getType(),Constants.ZERO)?"森æå
¬åèªè¡è½¦éªè¡æ¼éæ¯ä»":"森æå
¬åèªè¡è½¦è´ä¹°éªè¡å¥é¤æ¯ä»"); |
| | | request.setSpMchid(WxMiniConfig.wxProperties.getMchId()); |
| | | request.setSpAppid(WxMiniConfig.wxProperties.getAppId()); |
| | | request.setSubMchid(WxMiniConfig.wxProperties.getSubMchId()); |
| | |
| | | // è·ä¹åä¸å示ä¾ä¸æ ·ï¼å¡«å
é¢ä¸ååæ° |
| | | PrepayWithRequestPaymentResponse resParam = WxMiniConfig.jsapiExtService.prepayWithRequestPayment(request,WxMiniConfig.wxProperties.getSubAppId()); |
| | | response =resParam; |
| | | |
| | | return response; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | return ("å¤çæå!"); |
| | | } |
| | | goodsorder.setOnlineOrderid(paymentNo); |
| | | if(Constants.equalsInteger(goodsorder.getType(),Constants.ZERO)){ |
| | | this.dealGoodsOrderCallBack(goodsorder); |
| | | }else{ |
| | | this.dealDiscountOrderCallBack(goodsorder); |
| | | } |
| | | return ("å¤çæå!"); |
| | | } |
| | | |
| | | public void dealDiscountOrderCallBack(Goodsorder goodsorder){ |
| | | goodsorder.setPayStatus(Constants.goodsorderPayStatus.pay); |
| | | goodsorder.setStatus(Constants.goodsorderStatus.pay); |
| | | goodsorder.setPayDate(new Date()); |
| | | goodsorder.setEditDate(new Date()); |
| | | goodsorderMapper.updateById(goodsorder); |
| | | |
| | | DiscountMember discountMember = discountMemberMapper.selectOne(new QueryWrapper<DiscountMember>().lambda() |
| | | .eq(DiscountMember::getGoodsorderId,goodsorder.getId()).last(" limit 1 ")); |
| | | discountMemberMapper.update(null,new UpdateWrapper<DiscountMember>().lambda() |
| | | .set(DiscountMember::getStatus,Constants.ZERO) |
| | | .eq(DiscountMember::getId,discountMember.getId()) |
| | | ); |
| | | Constants.TRANSACTIONS_TYPE discountConstants = Constants.TRANSACTIONS_TYPE.DISCOUNT; |
| | | //åå¨äº¤ææµæ°´è¡¨ |
| | | Transactions transactions = new Transactions(); |
| | | transactions.setMemberId(goodsorder.getMemberId()); |
| | | transactions.setCreateDate(new Date()); |
| | | transactions.setIsdeleted(Constants.ZERO); |
| | | transactions.setOrderId(goodsorder.getId()); |
| | | transactions.setMoney(goodsorder.getMoney()); |
| | | transactions.setType(discountConstants.getKey()); |
| | | transactions.setPreOrderid(goodsorder.getPreOrderid()); |
| | | transactions.setOnlineOrderid(goodsorder.getOnlineOrderid()); |
| | | transactions.setDoneDate(new Date()); |
| | | transactions.setTitle(discountConstants.getName()); |
| | | transactions.setContent(discountConstants.getInfo()); |
| | | //transactions.setContent(discountMember.getName() +" æææ" + DateUtil.dateToString(discountMember.getUseStartDate(),"yyyy-MM-dd") +"-"+DateUtil.dateToString(discountMember.getUseEndDate(),"yyyy-MM-dd")); |
| | | transactions.setBalance(goodsorder.getMoney()); |
| | | transactions.setObjId(discountMember.getId()); |
| | | transactions.setObjType(Constants.TWO); |
| | | transactionsMapper.insert(transactions); |
| | | } |
| | | |
| | | |
| | | public void dealGoodsOrderCallBack(Goodsorder goodsorder){ |
| | | goodsorder.setPayStatus(Constants.goodsorderPayStatus.pay); |
| | | goodsorder.setStatus(Constants.goodsorderStatus.pay); |
| | | goodsorder.setPayDate(new Date()); |
| | |
| | | transactions.setObjId(goodsorder.getId()); |
| | | transactions.setObjType(Constants.ZERO); |
| | | transactionsMapper.insert(transactions); |
| | | return ("å¤çæå!"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | package com.doumee.service.business.impl; |
| | | |
| | | import com.doumee.core.constants.Constants; |
| | | import com.doumee.core.model.PageData; |
| | | import com.doumee.core.model.PageWrap; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.Utils; |
| | | import com.doumee.dao.business.DiscountMemberMapper; |
| | | import com.doumee.dao.business.RefundMapper; |
| | | import com.doumee.dao.business.TransactionsMapper; |
| | | import com.doumee.dao.business.model.DiscountMember; |
| | | import com.doumee.dao.business.model.Transactions; |
| | | import com.doumee.service.business.TransactionsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * äº¤ææµæ°´è¡¨Serviceå®ç° |
| | |
| | | |
| | | @Autowired |
| | | private TransactionsMapper transactionsMapper; |
| | | |
| | | @Autowired |
| | | private DiscountMemberMapper discountMemberMapper; |
| | | |
| | | @Autowired |
| | | private RefundMapper refundMapper; |
| | | |
| | | |
| | | @Override |
| | | public String create(Transactions transactions) { |
| | |
| | | Utils.MP.blankToNull(pageWrap.getModel()); |
| | | queryWrapper.lambda().eq(Transactions::getMemberId, memberId); |
| | | queryWrapper.orderByDesc("create_date"); |
| | | return PageData.from(transactionsMapper.selectPage(page, queryWrapper)); |
| | | PageData<Transactions> pageData = PageData.from(transactionsMapper.selectPage(page, queryWrapper)); |
| | | for (Transactions transactions:pageData.getRecords()) { |
| | | if(Constants.equalsInteger(transactions.getType(),Constants.TRANSACTIONS_TYPE.DISCOUNT.getKey())){ |
| | | //è´ä¹°å¥é¤ å¤çå
容 |
| | | DiscountMember discountMember = discountMemberMapper.selectById(transactions.getObjId()); |
| | | if(Objects.nonNull(discountMember)){ |
| | | transactions.setContent(discountMember.getName() +" æææ" + DateUtil.dateToString(discountMember.getUseStartDate(),"yyyy-MM-dd") +"-"+DateUtil.dateToString(discountMember.getUseEndDate(),"yyyy-MM-dd")); |
| | | } |
| | | }else if(Constants.equalsInteger(transactions.getType(),Constants.TRANSACTIONS_TYPE.PLATFORM_REFUND.getKey())){ |
| | | DiscountMember discountMember = discountMemberMapper.selectOne( |
| | | new QueryWrapper<DiscountMember>().lambda().eq(DiscountMember::getGoodsorderId, transactions.getOrderId()).last("limit 1")); |
| | | if(Objects.nonNull(discountMember)){ |
| | | transactions.setContent(discountMember.getName() +" æææ" + DateUtil.dateToString(discountMember.getUseStartDate(),"yyyy-MM-dd") +"-"+DateUtil.dateToString(discountMember.getUseEndDate(),"yyyy-MM-dd")); |
| | | } |
| | | } |
| | | } |
| | | return pageData; |
| | | } |
| | | |
| | | |
| | |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.dao.business.web.request.BackElecBikeRequest; |
| | | import com.doumee.dao.business.web.request.RepairRequest; |
| | | import com.doumee.dao.business.web.response.HomeResponse; |
| | | import com.doumee.dao.business.web.response.MemberRidesDetailResponse; |
| | | import com.doumee.dao.business.web.response.RidesDetailResponse; |
| | | import com.doumee.dao.system.model.SystemDictData; |
| | |
| | | @Autowired |
| | | private SystemDictDataBiz systemDictDataBiz; |
| | | |
| | | @Autowired |
| | | private DiscountService discountService; |
| | | |
| | | @PreventRepeat |
| | | @LoginRequired |
| | | @ApiOperation(value = "æ¼éæ¯ä»", notes = "å°ç¨åºç«¯") |
| | |
| | | public ApiResponse<Object> createGoodsOrderPay() { |
| | | return ApiResponse.success("æä½æå",goodsorderService.createGoodsOrderPay(getMemberId())); |
| | | } |
| | | |
| | | @PreventRepeat |
| | | @LoginRequired |
| | | @ApiOperation(value = "å¥é¤è´ä¹°", notes = "å°ç¨åºç«¯") |
| | | @GetMapping("/createDiscountOrderPay") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true), |
| | | @ApiImplicitParam(paramType = "query", dataType = "String", name = "discountId", value = "å¥é¤ä¸»é®", required = true) |
| | | }) |
| | | public ApiResponse<Object> createDiscountOrderPay(@RequestParam String discountId) { |
| | | return ApiResponse.success("æä½æå",goodsorderService.createDiscountOrderPay(discountId,getMemberId())); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "éªè¡æç»", notes = "å°ç¨åºç«¯") |
| | |
| | | return ApiResponse.success(transactionsService.findPageForMini(pageWrap,getMemberId())); |
| | | } |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation(value = "çéå¥é¤", notes = "çéå¥é¤") |
| | | @GetMapping("/discountPage") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(paramType = "header", dataType = "String", name = "token", value = "ç¨æ·tokenå¼", required = true) |
| | | }) |
| | | public ApiResponse<PageData<Discount>> discountPage (@RequestBody PageWrap<Discount> pageWrap) { |
| | | Discount discount = new Discount(); |
| | | discount.setStatus(Constants.ZERO); |
| | | pageWrap.setModel(discount); |
| | | return ApiResponse.success(discountService.findPage(pageWrap)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @LoginRequired |
| | | @ApiOperation("åºç¡é
ç½®æ°æ®") |
| | | @GetMapping("/baseParamList") |
| | |
| | | HomeResponse homeResponse = goodsorderService.getHome(getMemberId()); |
| | | return ApiResponse.success("æ¥è¯¢æå",homeResponse); |
| | | } |
| | | |
| | | @ApiOperation(value = "æµè¯çµæ± æ§å¶", notes = "æµè¯çµæ± æ§å¶") |
| | | @PostMapping("/testControl") |
| | | public ApiResponse<APIResult<T0201_0500>> testControl(@RequestBody T8500 param) { |