Merge remote-tracking branch 'origin/2.0.1' into 2.0.1
| | |
| | | trim: true |
| | | }) |
| | | } |
| | | |
| | | export function tranListPost(data) { |
| | | return request.post('/business/bikes/pageCurrent', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function baseTranListPost(params) { |
| | | return request.get('/business/baseParam/baseParamList', { params }) |
| | | } |
| | | // äºç»´ç å表 |
| | | export function qrcodeBike(params) { |
| | | return request.get(`/business/locks/findBikeBase`, { params }) |
| | | } |
| | | export function qrcodeBikeList(params) { |
| | | return request.get(`/business/locks/findAllBikeBase`, { params }) |
| | | } |
| | | export function downloadImgs(data) { |
| | | return request.post(`/business/locks/exportEbikeImages`, data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | | // å建 |
| | | export function create (data) { |
| | | return request.post('/business/bikes/create', data) |
| | |
| | | export function deleteById (id) { |
| | | return request.get(`/business/bikes/delete/${id}`) |
| | | } |
| | | // å é¤ |
| | | export function deleteBatchById(params) { |
| | | return request.get(`/business/bikes/delete/batch`, { params }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function comboAddPost(data) { |
| | | return request.post('/business/discount/create', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function comboEditPost(data) { |
| | | return request.post('/business/discount/updateById', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function comboListPost(data) { |
| | | return request.post('/business/discount/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function comboDetailPost(id) { |
| | | return request.get('/business/discount/' + id, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function comboOrderPost(data) { |
| | | return request.post('/business/goodsorder/page', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | // 导åºExcel |
| | | export function comboOrderEx(data) { |
| | | return request.post('/business/goodsorder/exportExcel', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | | |
| | | export function comboReDetailPost(params) { |
| | | return request.get('/business/goodsorder/getGoodsorderCanBanlanceDTO', {params}) |
| | | } |
| | | export function comboOrderRefundPost(data) { |
| | | return request.post('/business/goodsorder/backGoodsorder', data, { |
| | | trim: true |
| | | }) |
| | | } |
| | | export function comboOrderDetailPost(params) { |
| | | return request.get('/business/goodsorder/discountOrderDetail', {params}) |
| | | } |
| | | |
| | | export function comboListOrderEx(data) { |
| | | return request.post('/business/goodsorder/discountExportExcel', data, { |
| | | trim: true, |
| | | download: true |
| | | }) |
| | | } |
| | |
| | | .primaryColor{ |
| | | color: $primary-color; |
| | | } |
| | | .red{ |
| | | color: red; |
| | | } |
| | | .pointer{ |
| | | cursor: pointer; |
| | | } |
| | |
| | | }, |
| | | close () { |
| | | this.$emit('update:visible', false) |
| | | this.$emit('close') |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | // ä¸å¡å¤±è´¥ |
| | | if (!response.data.success) { |
| | | return Promise.reject(response.data) |
| | | Message.error(response.data.message) |
| | | return null |
| | | } |
| | | if (response.data.data) { |
| | | return response.data.data |
| | | } else { |
| | | return response.data |
| | | } |
| | | |
| | | }, function (error) { |
| | | if (error.code == null) { |
| | | return Promise.reject(new Error('æå¡å¨ç¹å¿ï¼è¯·ç¨ååè¯')) |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.search() |
| | | }, |
| | | methods: { |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.searchForm.endDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 23:59:59' |
| | | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | // this.searchForm.endDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 23:59:59' |
| | | this.search() |
| | | }, |
| | | methods: { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="ç»å¶è¿è¥åºå" :visible.sync="isShowModal" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm" width="1000px"> |
| | | <div class="map_title">ç»å¶ï¼é¼ æ å·¦é®ç¹å»åç§»å¨å³å¯ç»å¶å¾å½¢ï¼ç»å¶è¿ç¨ä¸æä¸escé®å¯ä¸æè¯¥è¿ç¨</div> |
| | | <div class="map_title">é¼ æ å·¦é®åå»å³å¯ç»æå½åå¤è¾¹å½¢ç»å¶ï¼å¤è¾¹å½¢ä¼èªå¨éåï¼</div> |
| | | <div class="map_wrap"> |
| | | <div class="btns"> |
| | | <el-button plain type="primary" @click="reset">{{ polygons.length > 0 ? 'éæ°ç»å¶' : 'å¼å§ç»å¶' }}</el-button> |
| | | <!-- <el-button plain type="primary" @click="changeMode">ç»æç»å¶</el-button> --> |
| | | <!-- <el-button plain @click="reset">éæ°ç»å¶</el-button> --> |
| | | <!-- <el-button plain type="danger" @click="deleteObj">å é¤</el-button> --> |
| | | </div> |
| | | <div id="container" style="width: 100%; height: 100%"></div> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { Message } from 'element-ui' |
| | | var map // å°å¾ |
| | | // var editor // ç¼è¾å¨ |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowModal: false, |
| | | isWorking: false, |
| | | |
| | | map: null, |
| | | editor: null, |
| | | polygon: null, |
| | | polygons: [], // å卿æç»å¶çå¤è¾¹å½¢ |
| | | selectedPolygon: null, |
| | | } |
| | | }, |
| | | methods: { |
| | | initMap() { |
| | | map = new TMap.Map("container", { |
| | | zoom: 15, // 设置å°å¾ç¼©æ¾çº§å« |
| | | center: new TMap.LatLng(31.722763, 117.385480) // 设置å°å¾ä¸å¿ç¹åæ |
| | | }) |
| | | var tempList = [] |
| | | if (this.polygons.length > 0) { |
| | | tempList = [{ paths: this.polygons.map(item => new TMap.LatLng(item.lat, item.lng)) }] |
| | | } |
| | | this.polygon = new TMap.MultiPolygon({ |
| | | map: map, |
| | | id: 'polygon', |
| | | selectedStyleId: 'highlight', |
| | | styles: { |
| | | highlight: new TMap.PolygonStyle({ |
| | | color: 'rgba(255, 255, 0, 0.6)' |
| | | }) |
| | | }, |
| | | geometries: tempList |
| | | }) |
| | | this.editor = new TMap.tools.GeometryEditor({ |
| | | map, |
| | | overlayList: [{ |
| | | overlay: this.polygon, |
| | | id: 'polygon', |
| | | }], |
| | | actionMode: tempList.length > 0 ? TMap.tools.constants.EDITOR_ACTION.INTERACT : TMap.tools.constants.EDITOR_ACTION.DRAW, // ç¼è¾å¨ç工使¨¡å¼ |
| | | activeOverlayId: 'polygon', // æ¿æ´»å¾å± |
| | | snappable: true, // å¼å¯å¸é |
| | | selectable: true, |
| | | }) |
| | | |
| | | let evtList = ['delete', 'adjust', 'split', 'union'] |
| | | evtList.forEach(evtName => { |
| | | this.editor.on(evtName + '_complete', evtResult => { |
| | | // console.log(evtName, evtResult) |
| | | }) |
| | | }) |
| | | this.editor.on('draw_complete', (geometry) => { |
| | | var id = geometry.id |
| | | if (this.editor.getActiveOverlay().id === 'polygon') { |
| | | var geo = this.polygon.geometries.filter(function (item) { |
| | | return item.id === id |
| | | }) |
| | | this.polygons = geo[0].paths |
| | | // console.log('ç»å¶çå¤è¾¹å½¢åæ ï¼', geo[0].paths) |
| | | } |
| | | this.changeMode() |
| | | }) |
| | | }, |
| | | handleAgain() { |
| | | this.editor.setActionMode(TMap.tools.constants.EDITOR_ACTION.DRAW) |
| | | }, |
| | | reset() { |
| | | // this.editor.enable() |
| | | this.polygons = [] |
| | | this.polygon.setGeometries([]) |
| | | this.polygon.remove('polygon') |
| | | this.editor.setActionMode(TMap.tools.constants.EDITOR_ACTION.DRAW) |
| | | }, |
| | | changeMode() { |
| | | this.editor.setActionMode(TMap.tools.constants.EDITOR_ACTION.INTERACT) |
| | | }, |
| | | deleteObj() { |
| | | this.editor.delete() |
| | | }, |
| | | close() { |
| | | this.reset() |
| | | map.destroy() |
| | | this.isShowModal = false |
| | | }, |
| | | confirm() { |
| | | const list = this.editor.getOverlayList()[0].overlay.geometries |
| | | if (list.length == 0) return Message.warning('请å
ç»å¶è¿è¥åºå') |
| | | this.isShowModal = false |
| | | this.reset() |
| | | this.$emit('change', list[0].paths) |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .map_title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | .map_wrap { |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | position: relative; |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 10px; |
| | | transform: translate(-50%, 0); |
| | | z-index: 99999999999; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | closeMoney: '', |
| | | startDate: '', |
| | | endDate: '', |
| | | type: 0 |
| | | |
| | | }, |
| | | value1: [new Date(), new Date()] |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.search() |
| | | }, |
| | | methods: { |
| | |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.searchForm.endDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 23:59:59' |
| | | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | // this.searchForm.endDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 23:59:59' |
| | | this.search() |
| | | }, |
| | | methods: { |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:baseparam:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="form" slot="search-form" :model="form" label-width="130px" label-suffix="ï¼"> |
| | | <el-form ref="form" slot="search-form" :model="form" label-width="160px" label-suffix="ï¼"> |
| | | |
| | | <el-form-item label="主页主é¢"> |
| | | <el-input v-model="form.projectName" placeholder="请è¾å
¥ä¸»é¡µä¸»é¢"></el-input> |
| | |
| | | <el-input v-model="form.serverPhone" placeholder="请è¾å
¥æå¡çµè¯"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ¼ééé¢"> |
| | | <el-input v-model="form.rentDeposit" @change="changeVal(form.rentDeposit,1)" type="number" placeholder="请è¾å
¥æ¼ééé¢"></el-input> |
| | | <el-input v-model="form.rentDeposit" @change="changeVal(form.rentDeposit, 1)" type="number" |
| | | placeholder="请è¾å
¥æ¼ééé¢"></el-input> |
| | | <div class="tips">请è¾å
¥éè¦ç¼´çº³çæ¼ééé¢(åä½ï¼å
)</div> |
| | | </el-form-item> |
| | | <el-form-item label="è¥ä¸æ¶é´"> |
| | |
| | | v-model="form.businessEndtime"></el-time-picker> |
| | | </el-form-item> |
| | | <el-form-item label="å
è´¹éªè¡æ¶é¿"> |
| | | <el-input v-model="form.freeRentTime" type="number" @change="changeVal(form.freeRentTime,2)" placeholder="请è¾å
¥å
è´¹éªè¡æ¶é¿"></el-input> |
| | | <el-input v-model="form.freeRentTime" type="number" @change="changeVal(form.freeRentTime, 2)" |
| | | placeholder="请è¾å
¥å
è´¹éªè¡æ¶é¿"></el-input> |
| | | <div class="tips">å
è´¹éªè¡æ¶é¿ï¼åä½ï¼åé</div> |
| | | </el-form-item> |
| | | <el-form-item label="满载é¢è¦(%)" prop="name"> |
| | | <div style="display: flex;"> |
| | | ä½äº<el-input style="width: 80px;" v-model="form.warnMin" @change="changeVal(form.warnMin,3)" type="number" placeholder="æå°å¼"></el-input> |
| | | æé«äº<el-input style="width: 80px;" v-model="form.warnMax" @change="changeVal(form.warnMax,4)" type="number" placeholder="æå¤§å¼"></el-input> |
| | | ä½äº<el-input style="width: 80px;" v-model="form.warnMin" @change="changeVal(form.warnMin, 3)" type="number" |
| | | placeholder="æå°å¼"></el-input> |
| | | æé«äº<el-input style="width: 80px;" v-model="form.warnMax" @change="changeVal(form.warnMax, 4)" type="number" |
| | | placeholder="æå¤§å¼"></el-input> |
| | | 伿³éé群åéé¢è¦ |
| | | </div> |
| | | <div class="tips">å½è½¦è¾æ»¡è½½è¶
è¿ä»¥ä¸é
ç½®æ¶ï¼æç¤ºç®¡çå</div> |
| | | </el-form-item> |
| | | <el-form-item label="çµå¨è½¦ä¸´æ¶å车éå¶"> |
| | | <el-radio v-model="form.pauseBikeType" :label="0">å车ç¹å
å车</el-radio> |
| | | <el-radio v-model="form.pauseBikeType" :label="1">è¿è¥åºå
å车</el-radio> |
| | | </el-form-item> |
| | | <el-form-item label="çµå¨è½¦ä¸´æ¶èªå¨å
³é"> |
| | | <el-input v-model="form.pauseAutoCloseTime" |
| | | oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" |
| | | type="number"></el-input> |
| | | <div class="placeholder9">临åè¶
è¿é
ç½®æ¶é¿ï¼ç³»ç»ä¼èªå¨å
³éå¹¶è¿è¡ç»ç®ï¼åä½ï¼åé</div> |
| | | </el-form-item> |
| | | <el-form-item label="çµå¨è½¦çµå设置"> |
| | | <div style="display: flex;"> |
| | | ä½çµåé¢è¦å¼<el-input style="width: 80px;" |
| | | oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" |
| | | v-model="form.lowBikeVoltage" type="number"></el-input> |
| | | ä¼ï¼æ»¡çµçµå <el-input style="width: 80px;" |
| | | oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" |
| | | v-model="form.fullBikeVoltage" type="number"></el-input> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="è¿è¥åºå设置"> |
| | | <el-button type="primary" @click="handleDraw">æ¥ç/ç¼è¾</el-button> |
| | | <div class="placeholder9">ç¹å»æé®å¯æ¥ç/ç¼è¾è¿è¥åºåï¼ç¨æ·åªè½å¨è¿è¥åºåå
æ«ç éªè¡</div> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="é¢è¦éé群å°å">--> |
| | | <!-- <el-input v-model="form.warnDingdingUrl" placeholder="请è¾å
¥é¢è¦éé群å°å"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="ç§èµé¡»ç¥ä¸»å¾"> |
| | | <div style="display: flex;"> |
| | | <UploadAvatarImage |
| | | :file="{ 'imgurlfull': form.leaseNoticeUrl, 'imgurl': leaseNoticeUrl }" |
| | | <UploadAvatarImage :file="{ 'imgurlfull': form.leaseNoticeUrl, 'imgurl': leaseNoticeUrl }" |
| | | :uploadData="uploadData" tipsLabel="" @uploadSuccess="uploadOutSuccess" @uploadEnd="isUploading=false" |
| | | @uploadBegin="isUploading=true" /> |
| | | <div class="tips"> |
| | |
| | | <!-- </el-upload>--> |
| | | <div class="tips"> |
| | | <div> |
| | | <el-upload |
| | | class="upload-demo" |
| | | ref="upload" |
| | | :action="uploadImgUrl" |
| | | :show-file-list="false" |
| | | accept=".mp4" |
| | | :data="{ folder: 'bike', }" |
| | | :on-success="handleAvatarSuccess"> |
| | | <el-upload class="upload-demo" ref="upload" :action="uploadImgUrl" :show-file-list="false" accept=".mp4" |
| | | :data="{ folder: 'bike', }" :on-success="handleAvatarSuccess"> |
| | | <el-button slot="trigger" size="small" type="primary">ä¸ä¼ è§é¢</el-button> |
| | | <div slot="tip" class="el-upload__tip">åªè½ä¸ä¼ mp4æ ¼å¼ï¼å»ºè®®ä¸è¶
è¿50M</div> |
| | | </el-upload> |
| | |
| | | è³ |
| | | <el-time-picker placeholder="ç»ææ¶é´" value-format="yyyy-MM-dd HH:mm:ss" format='HH:mm' |
| | | v-model="form.stopServeEndtime"></el-time-picker> --> |
| | | <el-date-picker |
| | | v-model="value1" |
| | | type="datetimerange" |
| | | @change="selectDate" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¶é´" |
| | | end-placeholder="ç»ææ¶é´" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | ></el-date-picker> |
| | | <el-date-picker v-model="value1" type="datetimerange" @change="selectDate" range-separator="è³" |
| | | start-placeholder="å¼å§æ¶é´" end-placeholder="ç»ææ¶é´" format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> |
| | | <div class="tips">忢æå¡å¼å§æ¶é´è³ç»ææ¶é´</div> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | @click="saveSetting">ä¿åé
置项</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <AMap @change="changeMap" ref="MapRef" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import { getMiniProgrammeDTO, updateById } from '@/api/business/minproSetting' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage.vue' |
| | | import RichEditor from '@/components/common/RichEditor.vue' |
| | | import AMap from './components/Map.vue' |
| | | export default { |
| | | name: 'BaseParam', |
| | | components: { TableLayout, UploadAvatarImage, RichEditor }, |
| | | components: { TableLayout, UploadAvatarImage, RichEditor, AMap }, |
| | | data () { |
| | | return { |
| | | uploadImgUrl: process.env.VUE_APP_API_PREFIX + '/public/uploadLocal', |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | changeMap(e) { |
| | | console.log('e', e) |
| | | this.$set(this.form, 'parkLatLngList', JSON.stringify(e)) |
| | | }, |
| | | changeVal (val, type) { |
| | | if (type === 1) { |
| | | if (this.form.rentDeposit < 0) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleDraw() { |
| | | this.$refs.MapRef.isShowModal = true |
| | | this.$nextTick(() => { |
| | | if (this.form.parkLatLngList) { |
| | | this.$refs.MapRef.polygons = JSON.parse(this.form.parkLatLngList) |
| | | } |
| | | this.$refs.MapRef.initMap() |
| | | }) |
| | | }, |
| | | handleAvatarSuccess (res, file) { |
| | | console.log(res.data.url) |
| | | this.form.rentTipsVideo = res.data.url |
| | |
| | | } |
| | | }, |
| | | created () { |
| | | this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | // this.searchForm.startDate = formatDateTime(new Date(), 'yyyy-MM-dd') + ' 00:00:00' |
| | | this.search() |
| | | }, |
| | | methods: { |
| | |
| | | <div class="title_wrap"> |
| | | <div> |
| | | <span class="title">{{ detail.name }}</span> |
| | | <span class="status">{{ detail.status === '1' ? 'å·²å¯ç¨' : 'ç¦ç¨' }}</span> |
| | | <span class="status">{{ detail.status == '0' ? 'å·²å¯ç¨' : 'ç¦ç¨' }}</span> |
| | | </div> |
| | | <div class="placeholder9 mt10">æ¯æ¥éå®ééï¼{{ detail.circulationDay }}</div> |
| | | <div class="placeholder9 mt10">æ¯æ¥éå®ééï¼{{ detail.saleDayLimit }}</div> |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <div class="item"> |
| | | <div class="key">æ»åæ¾æ°é</div> |
| | | <div class="value">{{ detail.circulationAll || '-' }}</div> |
| | | <div class="value">{{ detail.saleLimit || 'ä¸éé¢' }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div class="key">å·²é宿°é</div> |
| | | <div class="value">{{ detail.sellNum }}</div> |
| | | <div class="value">{{ detail.saleNum }}</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 v-if="detail.saleLimit" class="value">{{ detail.saleLimit - detail.saleNum }}</div> |
| | | <div v-else class="value">ä¸éé¢</div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="createTime_wrap"> |
| | | <span class="item">å建æ¶é´ï¼{{ detail.createTime }}</span> |
| | | <span class="item">å建æ¶é´ï¼{{ detail.createDate }}</span> |
| | | <span class="item">å建人ï¼{{ detail.creator }}</span> |
| | | <span class="item">æåæ´æ°æ¶é´ï¼{{ detail.editTime }}</span> |
| | | <span class="item">æåæ´æ°æ¶é´ï¼{{ detail.editDate }}</span> |
| | | <span class="item">æ´æ°äººï¼{{ detail.editor }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤ç±»åï¼</div> |
| | | <div v-if="detail.mealsType == '0'" class="value">æéå¡</div> |
| | | <div v-if="detail.type == '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="key">æ¯æ¥éªè¡éå¶ï¼</div> |
| | | <div class="value"> |
| | | <div>{{ detail.content }}</div> |
| | | <span>{{ detail.limitType == 0 ? 'ä¸éå¶' : detail.limitTime + 'åé' }}</span> |
| | | </div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">å¥é¤ç®ä»ï¼</div> |
| | | <div class="value"> |
| | | <div>{{ detail.desc }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="property-title">éç¨è§å</div> |
| | | <div class="line"> |
| | | <div class="key">é宿¶é´æ®µï¼</div> |
| | | <div class="value">{{ detail.circulationAll || 'ä¸éé' }}</div> |
| | | <div class="value">{{ detail.startDate }} è³ {{ detail.endDate }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">ä½¿ç¨æ¶é´ï¼</div> |
| | | <div class="value">{{ detail.circulationDay }}</div> |
| | | <div class="value" v-if="detail.useType == 0">{{ detail.useStartDate }} è³ {{ detail.useEndDate }}</div> |
| | | <div class="value" v-if="detail.useType == 1">è´ä¹°å{{ detail.useDays }}天å
ææ</div> |
| | | <div class="value" v-if="detail.useType == 2">èª{{ detail.useStartDate }} å {{ detail.useDays }}天å
ææ</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">éç¨èå´ï¼</div> |
| | | <div class="value">{{ detail.useVenue }}</div> |
| | | <div class="value">{{ detail.useWorkday == 1 && '工使¥' }} {{ detail.useWorkday && detail.useHoliday && '|' }} {{ detail.useHoliday == 1 && 'è忥' }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">éç¨é¡¹ç®ï¼</div> |
| | | <div class="value">{{ detail.useProject }}</div> |
| | | <div class="value">{{ detail.isbike == 1 && 'èªè¡è½¦' }} {{ detail.isbike && detail.iselecbike && '|' }} {{ detail.iselecbike == 1 && 'çµå¨è½¦' }}</div> |
| | | |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ»éé¢ï¼</div> |
| | | <div class="value">{{ detail.useClassInfo || 'ä¸éå¶' }}</div> |
| | | <div class="value">{{ detail.saleLimit || 'ä¸éå¶' }}</div> |
| | | </div> |
| | | <div class="line"> |
| | | <div class="key">æ¯æ¥éé¢ï¼</div> |
| | | <div class="value">{{ detail.useTeacherInfo || 'ä¸éé¢' }}</div> |
| | | <div class="value">{{ detail.saleDayLimit || 'ä¸éé¢' }}</div> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | <script> |
| | | // import { comboDetailPost, mealsCancelUse } from '@/api' |
| | | // import dayjs from 'dayjs' |
| | | import { comboDetailPost } from '@/api/business/combo.js' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | export default { |
| | | name: '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() |
| | | }) |
| | | getDetail(id) { |
| | | comboDetailPost(id).then(res => { |
| | | console.log('res', res) |
| | | |
| | | this.detail = res |
| | | }, () => { |
| | | this.tableLoading = false |
| | | |
| | | }) |
| | | }, |
| | | tabClick(val) { |
| | |
| | | border: 1px solid $primaryColor; |
| | | color: $primaryColor; |
| | | margin-left: 10px; |
| | | padding: 0 4px; |
| | | } |
| | | } |
| | | |
| | |
| | | line-height: 1.5; |
| | | color: #333; |
| | | } |
| | | |
| | | .property-title{ |
| | | margin-bottom: 16px; |
| | | color: $primaryColor; |
| | | } |
| | | |
| | | .device-uploader { |
| | | width: 80px; |
| | | height: 80px; |
| | |
| | | <template> |
| | | <GlobalWindow :title="param.id ? 'ç¼è¾å¥é¤' : 'æ°å»ºå¥é¤'" :visible.sync="isShowModal" :confirm-working="isLoading" |
| | | width="1000px" @close="close" @confirm="confirm"> |
| | | width="900px" @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-form-item label="ç±»å" prop="type"> |
| | | <el-select class="w200" :disabled="true" v-model="param.type"> |
| | | <el-option label="æéå¡" :value="0"></el-option> |
| | | <el-option label="次å¡" :value="1"></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 class="df_ac"> |
| | | <div class="mr10"> |
| | | <el-radio @change="changeType" v-model="param.limitType" :label="0">ä¸éå¶</el-radio> |
| | | <el-radio @change="changeType" v-model="param.limitType" :label="1">éå¶æ¶é¿</el-radio> |
| | | </div> |
| | | <el-input v-if="param.limitType == 1" class="w200" v-model="param.limitTime" v-trim /> |
| | | <span v-if="param.limitType == 1" class="ml10">åé</span> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="éå®ä»·"> |
| | | <el-input class="w200" v-model="param.name" placeholder="请è¾å
¥ä»·æ ¼" v-trim /> |
| | | <el-form-item label="éå®ä»·" prop="price"> |
| | | <el-input class="w200" |
| | | oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" |
| | | v-model="param.price" placeholder="请è¾å
¥ä»·æ ¼" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="å线价"> |
| | | <el-input class="w200" v-model="param.name" placeholder="请è¾å
¥å±ç¤ºçå线价" v-trim /> |
| | | <el-input class="w200" v-model="param.linePrice" |
| | | oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" |
| | | placeholder="请è¾å
¥å±ç¤ºçå线价" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="é宿¸ é"> |
| | | <el-checkbox v-model="param.ada">å°ç¨åºç«¯</el-checkbox> |
| | | <el-form-item label="é宿¸ é" prop="channel"> |
| | | <el-checkbox v-model="param.channel" disabled :true-label="0" :false-label="1">å°ç¨åºç«¯</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" |
| | | :uploadData="{ folder: 'DISCOUNT/' }" @uploadSuccess="uploadAvatarSuccess" @uploadEnd="isUploading = false" |
| | | @uploadBegin="isUploading = true" /> |
| | | <div class="img_place"> |
| | | <div>ä¸ä¼ å¾çä¸å
许æ¶åæ¿æ²»ææä¸è²æ
;</div> |
| | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="å¥é¤ç®ä»"> |
| | | <el-input class="w400" v-model="param.name" placeholder="请è¾å
¥å¥é¤ç®ä»" v-trim /> |
| | | <el-input class="w400" v-model="param.descs" placeholder="请è¾å
¥å¥é¤ç®ä»" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="å¥é¤æè¿°"> |
| | | <RichEditor :content="{ content: param.content }" @edit="param.content = $event"></RichEditor> |
| | |
| | | <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 label="é宿¶æ®µ" prop="saleDate"> |
| | | <el-date-picker class="w400" v-model="param.saleDate" 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-form-item prop="useType" label="ä½¿ç¨æ¶é´" class="mr16"> |
| | | <el-select @change="changeUseDate" v-model="param.useType" 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-option label="æå®æ¥æçæ" :value="2"></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"> |
| | | <el-form-item v-if="param.useType == 0" label-width="80px" label="åºå®æ¥æ"> |
| | | <el-date-picker v-model="param.useDate" value-format="yyyy-MM-dd" type="daterange" range-separator=" ~ " /> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.useType == 1" label-width="60px" label="æææ"> |
| | | <el-input style="width: 130px;" oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 8)" |
| | | v-model="param.useDays" placeholder="请è¾å
¥ææå¤©æ°" v-trim /> |
| | | <span class="ml10">天</span> |
| | | </el-form-item> |
| | | <el-form-item v-if="param.useType == 2" label-width="0px"> |
| | | <div class="df_ac"> |
| | | <el-date-picker class="w200" v-model="param.dasdas" value-format="yyyy-MM-dd" type="date" /> |
| | | <el-date-picker class="w200" v-model="param.useStartDate" value-format="yyyy-MM-dd" type="date" /> |
| | | <span class="ml10 mr10">å¼å§çæï¼æææ</span> |
| | | <el-input style="width: 130px;" v-model="param.name" placeholder="请è¾å
¥ææå¤©æ°" v-trim /> |
| | | <el-input style="width: 130px;" v-model="param.useDays" |
| | | oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 8)" 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 :prop="param.useWorkday == 1 ? 'useWorkday' : 'useHoliday'" label="éç¨èå´"> |
| | | <div class="df_ac"> |
| | | <el-checkbox v-model="param.useWorkday" :true-label="1" :false-label="0" label="工使¥"></el-checkbox> |
| | | <el-checkbox v-model="param.useHoliday" :true-label="1" :false-label="0" label="è忥"></el-checkbox> |
| | | </div> |
| | | </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 :prop="param.isbike == 1 ? 'isbike' : 'iselecbike'" label="éç¨é¡¹ç®"> |
| | | <div class="df_ac"> |
| | | <el-checkbox v-model="param.isbike" :true-label="1" :false-label="0" label="èªè¡è½¦"></el-checkbox> |
| | | <el-checkbox v-model="param.iselecbike" :true-label="1" :false-label="0" label="çµå¨è½¦"></el-checkbox> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="æ»éé¢"> |
| | | <el-input class="w400" v-model="param.name" placeholder="请è¾å
¥æ»å宿°é" v-trim /> |
| | | <el-input class="w400" v-model="param.saleLimit" oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 12)" |
| | | 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 /> |
| | | <el-input class="w400" v-model="param.saleDayLimit" |
| | | oninput="value=value.replace(/^(0+)|[^\d]+/g, '').slice(0, 12)" placeholder="请è¾å
¥åæ¥å宿°é" v-trim /> |
| | | <div class="placeholder9">请è¾å
¥æ¥å宿°éï¼å½æ¥éé大äºè¯¥æ°éåï¼ä¸åæ¯æéå®ï¼ä¸ºç©ºè¡¨ç¤ºä¸éå¶</div> |
| | | </el-form-item> |
| | | |
| | |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | // import { fetchList as getStoreList } from '@/api/ywWarehouse' |
| | | // import { ywOutinboundCreate } from '@/api/store/index' |
| | | import { comboAddPost, comboEditPost, comboDetailPost } from '@/api/business/combo.js' |
| | | import UploadAvatarImage from '@/components/common/UploadAvatarImage' |
| | | import { StoreTypeOps, rules } from './config' |
| | | import { rulesCombo } from './config' |
| | | import { Message } from 'element-ui' |
| | | import RichEditor from '@/components/common/RichEditor' |
| | | // import dayjs from 'dayjs' |
| | |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | param: { checkList: [], content: '' }, |
| | | param: { |
| | | type: 0, |
| | | limitType: 0, |
| | | channel: 0, |
| | | useType: 0, |
| | | useWorkday: 1, |
| | | useHoliday: 0, |
| | | iselecbike: 0, |
| | | isbike: 1, |
| | | |
| | | checkList: [], |
| | | content: '' |
| | | }, |
| | | isShowModal: false, |
| | | isShowSel: false, |
| | | isLoading: false, |
| | | isUploading: false, |
| | | // éªè¯è§å |
| | | rules, |
| | | rules: rulesCombo, |
| | | storeList: [], |
| | | list: [], |
| | | StoreTypeOps: [], |
| | |
| | | }, |
| | | methods: { |
| | | confirm() { |
| | | const { param } = this |
| | | 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('请è¾å
¥æ£ç¡®çå
¥åºæ°é') |
| | | if (param.useDate && param.useDate.length > 0) { |
| | | param.useStartDate = param.useDate[0] |
| | | param.useEndDate = param.useDate[1] |
| | | } else { |
| | | param.useStartDate = param.useType == 2 ? param.useStartDate : null |
| | | param.useEndDate = null |
| | | } |
| | | if (param.saleDate && param.saleDate.length > 0) { |
| | | param.startDate = param.saleDate[0] |
| | | param.endDate = param.saleDate[1] |
| | | } else { |
| | | param.startDate = null |
| | | param.endDate = null |
| | | } |
| | | this.isLoading = true |
| | | ywOutinboundCreate({ |
| | | ...param, |
| | | recordList: list |
| | | let fn = param.id ? comboEditPost : comboAddPost |
| | | fn({ |
| | | ...param |
| | | }).then(res => { |
| | | this.isLoading = false |
| | | if (res) { |
| | | 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 || [] |
| | | }) |
| | | changeType() { |
| | | this.$set(this.param, 'limitTime', null) |
| | | }, |
| | | 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) |
| | | } |
| | | }) |
| | | changeUseDate() { |
| | | this.$set(this.param, 'useDate', null) |
| | | this.$set(this.param, 'useDays', null) |
| | | this.$set(this.param, 'useStartDate', null) |
| | | this.$set(this.param, 'useEndDate', null) |
| | | }, |
| | | uploadAvatarSuccess(file) { |
| | | this.$set(this.param, 'fileUrl', file.imgurl) |
| | |
| | | }) |
| | | }, |
| | | close() { |
| | | console.log('------'); |
| | | |
| | | this.isShowModal = false |
| | | this.$emit('close') |
| | | }, |
| | | getDetail(id) { |
| | | getInfoById(id).then(res => { |
| | | getDetail(id, type) { |
| | | comboDetailPost(id).then(res => { |
| | | this.param = res |
| | | this.$set(this.param, 'saleDate', [res.startDate, res.endDate]) |
| | | if (res.useStartDate && res.useEndDate) { |
| | | this.$set(this.param, 'useDate', [res.useStartDate, res.useEndDate]) |
| | | } |
| | | this.$set(this.param, id, type == 'copy' ? null : this.param.id) |
| | | }) |
| | | }, |
| | | } |
| | |
| | | margin-left: 12px; |
| | | } |
| | | } |
| | | |
| | | .img_place{ |
| | | display: flex; |
| | | flex-direction: column; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalAlertWindow title="å¥é¤å¡é款" :visible.sync="visible" :confirm-working="isWorking" width="600px" |
| | | @confirm="confirm"> |
| | | <el-descriptions title="" :column="2"> |
| | | <el-descriptions-item label="å®ä»éé¢">{{ form.goodsorderMoney }}å
</el-descriptions-item> |
| | | <!-- <el-descriptions-item label="ç»ç®éé¢">{{ form.closeMoney }}å
</el-descriptions-item> --> |
| | | <el-descriptions-item label="å·²ééé¢">{{ form.hasRefundMoney }}å
</el-descriptions-item> |
| | | <el-descriptions-item label="å¯ééé¢">{{ form.canBanlanceMoney }}å
</el-descriptions-item> |
| | | </el-descriptions> |
| | | <el-form :model="form" ref="form" :rules="rules" label-width="100px" label-suffix="ï¼"> |
| | | <el-form-item label="鿬¾ç±»å" prop="backType"> |
| | | <el-radio v-model="form.backType" :label="0">éè´§éæ¬¾</el-radio> |
| | | <el-radio v-model="form.backType" :label="1">ä»
鿬¾</el-radio> |
| | | <div class="placeholder9">鿬¾éè´§ä¼ä½åºè®¢å对åºçå¥é¤å¡</div> |
| | | </el-form-item> |
| | | <el-form-item label="鿬¾éé¢" prop="money"> |
| | | <div style="display: flex;"> |
| | | <el-input style="flex: 1;" oninput="value=value.replace(/[^\d.]/g, '').replace(/\.{2,}/g, '.').replace('.', '$#$').replace(/\./g, '').replace('$#$', '.').replace(/^(\-)*(\d+)\.(\d\d).*$/, '$1$2.$3').replace(/^\./g, '')" v-model="form.money" placeholder="请è¾å
¥é款éé¢" v-trim /> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="鿬¾åå " prop="reason"> |
| | | <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" v-model="form.reason" placeholder="请è¾å
¥é款åå " |
| | | v-trim /> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalAlertWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalAlertWindow from '@/components/common/GlobalAlertWindow' |
| | | import { comboReDetailPost, comboOrderRefundPost } from '@/api/business/combo.js' |
| | | export default { |
| | | name: 'OperaSuggestWindow', |
| | | extends: BaseOpera, |
| | | components: { GlobalAlertWindow }, |
| | | data() { |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | orderId: null, |
| | | canBanlanceMoney: '', |
| | | closeMoney: '', |
| | | goodsorderMoney: '', |
| | | hasRefundMoney: '', |
| | | |
| | | backType: 0, |
| | | money: '', |
| | | reason: '', |
| | | }, |
| | | // éªè¯è§å |
| | | rules: { |
| | | money: [{ required: true, message: '请è¾å
¥' }], |
| | | reason: [{ required: true, message: '请è¾å
¥' }], |
| | | backType: [{ required: true, message: '请è¾å
¥' }] |
| | | }, |
| | | |
| | | } |
| | | }, |
| | | created() { |
| | | |
| | | }, |
| | | methods: { |
| | | /** |
| | | * æå¼çªå£ |
| | | * @title çªå£æ é¢ |
| | | * @target ç¼è¾ç对象 |
| | | */ |
| | | open(id) { |
| | | this.visible = true |
| | | this.$nextTick(() => { |
| | | comboReDetailPost({ orderId: id }).then(res => { |
| | | if (res) { |
| | | this.form = res |
| | | this.form.backType = 0 |
| | | this.form.orderId = id |
| | | } |
| | | }) |
| | | this.form.money = null |
| | | this.form.reason = '' |
| | | this.$refs.form.clearValidate() |
| | | }) |
| | | |
| | | }, |
| | | selectReason(v) { |
| | | // console.log(item); |
| | | let item = this.reason.find(item => item.name == v) |
| | | this.backInfoRequired = item.required == 1 |
| | | }, |
| | | confirm() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) { |
| | | return |
| | | } |
| | | this.isWorking = true |
| | | comboOrderRefundPost(this.form) |
| | | .then((res) => { |
| | | if (res) { |
| | | this.visible = false |
| | | this.$tip.apiSuccess('鿬¾æå') |
| | | this.$emit('success') |
| | | } |
| | | }) |
| | | .catch(err => { |
| | | this.$tip.apiFailed(err) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | @import "@/assets/style/alertstyle.scss"; |
| | | @import "@/assets/style/variables.scss"; |
| | | |
| | | ::v-deep .el-input.is-disabled .el-input__inner { |
| | | background-color: #fff !important; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .time-style { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | cursor: pointer; |
| | | |
| | | .time-item { |
| | | margin-right: 8px; |
| | | /* margin-bottom: 8px; */ |
| | | border: #111 solid 1px; |
| | | font-size: 14px; |
| | | line-height: 14px; |
| | | padding: 5px; |
| | | border-radius: 5px; |
| | | color: #111; |
| | | } |
| | | |
| | | .time-item-sel { |
| | | border-color: $primary-color; |
| | | background-color: $primary-color; |
| | | color: #fff; |
| | | } |
| | | |
| | | .time-item-disable { |
| | | border-color: #999; |
| | | background-color: #999; |
| | | color: #111; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | export const rulesCombo = { |
| | | name: [{ required: true, message: '请è¾å
¥' }], |
| | | type: [{ required: true, message: '请è¾å
¥' }], |
| | | price: [{ required: true, message: '请è¾å
¥' }], |
| | | channel: [{ required: true, message: '请è¾å
¥' }], |
| | | saleDate: [{ required: true, message: 'è¯·éæ©' }], |
| | | useType: [{ required: true, message: 'è¯·éæ©' }], |
| | | useWorkday: [{ required: true, message: 'è¯·éæ©' }], |
| | | useHoliday: [{ required: true, message: 'è¯·éæ©' }], |
| | | isbike: [{ required: true, message: 'è¯·éæ©' }], |
| | | iselecbike: [{ required: true, message: 'è¯·éæ©' }], |
| | | |
| | | } |
| | | |
| | | export const pickerOptions = { // 精确å°ç§ |
| | | disabledDate(time) { |
| | | return time.getTime() < new Date(new Date().toLocaleDateString()).getTime() |
| | |
| | | <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> |
| | | <el-table-column prop="name" label="å¥é¤åç§°" align="center" min-width="120" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span @click="handleDetail(row)" class="primaryColor pointer">æ¥ç详æ
</span> |
| | | <span @click="handleDetail(row)" class="primaryColor pointer">{{ row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="å¥é¤ç±»å" align="center" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span v-if="row.type == 0">æéå¡</span> |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="" label="次æ°" align="center" min-width="100" show-overflow-tooltip /> --> |
| | | <el-table-column prop="useDays" label="æææ" align="center" min-width="90" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span>{{ row.useDays }}天</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="ä»·æ ¼" align="center" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="saleLimit" label="æ»åè¡æ°é" align="center" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span>{{ row.saleLimit ? row.saleLimit : 'ä¸éé¢' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="saleNum" label="å·²å®å®é" align="center" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="" label="é宿¸ é" align="center" min-width="100" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span v-if="row.channel == 0">å°ç¨åº</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" label="é宿¶æ®µ" align="center" min-width="120" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <div>èµ·ï¼{{ row.startDate }}</div> |
| | | <div>æ¢ï¼{{ row.endDate }}</div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="" fixed="right" label="ç¶æ" align="center" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <el-switch @change="changeStatus(row)" v-model="row.status" :active-value="0" :inactive-value="1" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" fixed="right" align="center" min-width="120" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <div> |
| | | <span v-if="row.status == 0" @click="handleEdit(row, 'copy')" class="primaryColor pointer">å¤å¶</span> |
| | | <span v-if="row.status == 1" @click="handleEdit(row)" class="primaryColor pointer mr10">ç¼è¾</span> |
| | | <span v-if="row.status == 1" @click="handleDetail(row)" class="red pointer">å é¤</span> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Edit from './components/Edit' |
| | | import ComboDetail from './components/ComboDetail.vue' |
| | | import { comboListPost, comboEditPost } from '@/api/business/combo.js' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | extends: BasePageTemp, |
| | | components: { |
| | |
| | | label: 'å¥é¤åç§°', |
| | | }, |
| | | { |
| | | filed: 'type', |
| | | filed: 'bikeOrElec', |
| | | type: 'select', |
| | | label: 'éç¨é¡¹ç®', |
| | | labelCode: 'name', |
| | | valueCode: 'id', |
| | | options: [] |
| | | options: [ |
| | | { name: 'èªè¡è½¦', id: 1 }, |
| | | { name: 'çµå¨è½¦', id: 2 }, |
| | | ] |
| | | }, |
| | | { |
| | | filed: 'status', |
| | | type: 'select', |
| | | label: 'ç¶æ', |
| | | options: [] |
| | | labelCode: 'name', |
| | | valueCode: 'id', |
| | | options: [ |
| | | { name: 'æ£å¸¸', id: 0 }, |
| | | { name: 'åç¨', id: 1 }, |
| | | ] |
| | | }, |
| | | ], |
| | | online: true |
| | | }, |
| | | list: [{}] |
| | | list: [] |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getList() |
| | | this.getList() |
| | | // this.initData() |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit() { |
| | | changeStatus(row) { |
| | | comboEditPost({ ...row }).then(res => { |
| | | if (res.code == 200) { |
| | | return Message.success('æ´æ°æå') |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit(row, type = 'edit') { |
| | | this.isShowEdit = true |
| | | this.$nextTick(() => { |
| | | this.$refs.EditRef.isShowModal = true |
| | | if (row && row.id) { |
| | | this.$refs.EditRef.getDetail(row.id, type) |
| | | } |
| | | }) |
| | | }, |
| | | handleDetail(row) { |
| | | this.isShowDetail = true |
| | | this.$nextTick(() => { |
| | | this.$refs.DetailRef.isShowModal = true |
| | | // this.$refs.DetailRef.getDetail(row.id) |
| | | this.$refs.DetailRef.getDetail(row.id) |
| | | }) |
| | | }, |
| | | handleEx() { |
| | |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | if (page) { pagination.page = page } |
| | | ywOutinboundPage({ |
| | | comboListPost({ |
| | | model: { |
| | | ...filters, |
| | | inOut: 0 |
| | | ...filters |
| | | }, |
| | | // 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 |
| | |
| | | <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> |
| | | <el-table-column prop="code" align="center" label="订åç¼å·" min-width="180" show-overflow-tooltip> |
| | | <template scope="{row}"> |
| | | <span class="primaryColor pointer">{{ row.orderId }}</span> |
| | | <span @click="handleDetail(row.id)" class="primaryColor pointer">{{ row.code }}</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 prop="discountName" align="center" label="å¥é¤å¡" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="money" align="center" label="å计(å
)" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="money" align="center" label="å®ä»(å
)" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="refundMoney" align="center" label="å·²ééé¢(å
)" min-width="100" show-overflow-tooltip /> |
| | | <el-table-column prop="memberId" align="center" label="ç¨æ·ä¿¡æ¯" min-width="140" show-overflow-tooltip /> |
| | | <el-table-column prop="payWay" align="center" label="æ¯ä»æ¹å¼" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span v-if="row.payWay == 0">微信æ¯ä»</span> |
| | | <span v-if="row.payWay == 1">æ¯ä»å®</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="payWay" align="center" label="è®¢åæ¥æº" min-width="80" show-overflow-tooltip> |
| | | <template v-slot="{ row }"> |
| | | <span>å°ç¨åºç«¯</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="refundUserName" align="center" label="æä½äºº" min-width="80" show-overflow-tooltip /> |
| | | <el-table-column prop="createDate" align="center" label="å建æ¶é´" min-width="140" 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> |
| | | <span @click="handleDetail(row.id)" class="primaryColor pointer">æ¥ç详æ
</span> |
| | | <span v-if="row.status == 1 && (row.refundMoney < row.money)" @click="handRefund(row.id)" class="primaryColor pointer ml10">鿬¾</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination" /> |
| | | </div> |
| | | <!-- --> |
| | | <OrderDetail v-if="isShowDetail" ref="OrderDetailRef" /> |
| | | <OrderDetail ref="OrderDetailRef" /> |
| | | <Refund ref="RefundRef" @success="getList" /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import BasePageTemp from '@/components/base/BasePageTemp' |
| | | import Breadcrumb from '@/layouts/Breadcrumb' |
| | | import OrderDetail from './components/OrderDetail.vue' |
| | | import Refund from './components/Refund' |
| | | import { |
| | | comboOrderPost, |
| | | comboListOrderEx, |
| | | comboOrderDetailPost |
| | | } from '@/api/business/combo.js' |
| | | export default { |
| | | extends: BasePageTemp, |
| | | components: { |
| | | Breadcrumb, |
| | | OrderDetail |
| | | OrderDetail, |
| | | Refund |
| | | }, |
| | | data() { |
| | | return { |
| | | loading: false, |
| | | isShowDetail: false, |
| | | queryFormConfig: { |
| | | formItems: [ |
| | | { |
| | | filed: 'orderId', |
| | | filed: 'id', |
| | | type: 'input', |
| | | label: '订åç¼å·', |
| | | }, |
| | |
| | | filed: 'status', |
| | | type: 'select', |
| | | label: '订åç¶æ', |
| | | options: [] |
| | | options: [ |
| | | { label: 'æªæ¯ä»', value: 0 }, |
| | | { label: 'å·²æ¯ä»', value: 1 }, |
| | | ] |
| | | }, |
| | | { |
| | | filed: 'time', |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | // this.getList() |
| | | this.getList() |
| | | // this.initData() |
| | | }, |
| | | methods: { |
| | | handRefund(id) { |
| | | this.$refs.RefundRef.open(id) |
| | | }, |
| | | handleDetail(id) { |
| | | getDetail(id) |
| | | comboOrderDetailPost({id}) |
| | | .then(res => { |
| | | this.$refs.OrderDetailRef.open('订å详æ
', res) |
| | | }) |
| | |
| | | this.$dialog.exportConfirm('确认导åºåï¼') |
| | | .then(() => { |
| | | this.loading = true |
| | | ywOutinboundEx({ |
| | | page: this.pagination.page, |
| | | comboListOrderEx({ |
| | | page: 1, |
| | | capacity: 1000000, |
| | | model: this.filters |
| | | }) |
| | |
| | | const { pagination, filters } = this |
| | | this.loading = true |
| | | if (page) { pagination.page = page } |
| | | ywOutinboundPage({ |
| | | comboOrderPost({ |
| | | model: { |
| | | ...filters, |
| | | inOut: 0 |
| | | type: 1 |
| | | }, |
| | | // sorts: [{ direction: 'DESC', property: 'param1' }], |
| | | capacity: pagination.pageSize, |
| | | page: page, |
| | | page: pagination.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 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow title="ç»å¶è¿è¥åºå" :visible.sync="isShowModal" :confirm-working="isWorking" @close="close" |
| | | @confirm="confirm" width="1000px"> |
| | | <div class="map_title">ç»å¶ï¼é¼ æ å·¦é®ç¹å»åç§»å¨å³å¯ç»å¶å¾å½¢ï¼ç»å¶è¿ç¨ä¸æä¸escé®å¯ä¸æè¯¥è¿ç¨</div> |
| | | <div class="map_title">é¼ æ å·¦é®åå»å³å¯ç»æå½åå¤è¾¹å½¢ç»å¶ï¼å¤è¾¹å½¢ä¼èªå¨éåï¼</div> |
| | | <div class="map_wrap"> |
| | | <div class="btns"> |
| | | <el-button plain type="primary" @click="reset">{{ polygons.length > 0 ? 'éæ°ç»å¶' : 'å¼å§ç»å¶' }}</el-button> |
| | | <!-- <el-button plain type="primary" @click="changeMode">ç»æç»å¶</el-button> --> |
| | | <!-- <el-button plain @click="reset">éæ°ç»å¶</el-button> --> |
| | | <!-- <el-button plain type="danger" @click="deleteObj">å é¤</el-button> --> |
| | | </div> |
| | | <div id="container" style="width: 100%; height: 100%"></div> |
| | | </div> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { Message } from 'element-ui' |
| | | var map // å°å¾ |
| | | // var editor // ç¼è¾å¨ |
| | | export default { |
| | | components: { |
| | | GlobalWindow |
| | | }, |
| | | data() { |
| | | return { |
| | | isShowModal: false, |
| | | isWorking: false, |
| | | row: {}, |
| | | map: null, |
| | | editor: null, |
| | | polygon: null, |
| | | polygons: [], // å卿æç»å¶çå¤è¾¹å½¢ |
| | | selectedPolygon: null, |
| | | } |
| | | }, |
| | | methods: { |
| | | initMap() { |
| | | map = new TMap.Map("container", { |
| | | zoom: 15, // 设置å°å¾ç¼©æ¾çº§å« |
| | | center: new TMap.LatLng(31.722763, 117.385480) // 设置å°å¾ä¸å¿ç¹åæ |
| | | }) |
| | | var tempList = [] |
| | | if (this.polygons.length > 0) { |
| | | tempList = [{ paths: this.polygons.map(item => new TMap.LatLng(item.lat, item.lng)) }] |
| | | } |
| | | this.polygon = new TMap.MultiPolygon({ |
| | | map: map, |
| | | id: 'polygon', |
| | | selectedStyleId: 'highlight', |
| | | styles: { |
| | | highlight: new TMap.PolygonStyle({ |
| | | color: 'rgba(255, 255, 0, 0.6)' |
| | | }) |
| | | }, |
| | | geometries: tempList |
| | | }) |
| | | this.editor = new TMap.tools.GeometryEditor({ |
| | | map, |
| | | overlayList: [{ |
| | | overlay: this.polygon, |
| | | id: 'polygon', |
| | | }], |
| | | actionMode: tempList.length > 0 ? TMap.tools.constants.EDITOR_ACTION.INTERACT : TMap.tools.constants.EDITOR_ACTION.DRAW, // ç¼è¾å¨ç工使¨¡å¼ |
| | | activeOverlayId: 'polygon', // æ¿æ´»å¾å± |
| | | snappable: true, // å¼å¯å¸é |
| | | selectable: true, |
| | | }) |
| | | |
| | | let evtList = ['delete', 'adjust', 'split', 'union'] |
| | | evtList.forEach(evtName => { |
| | | this.editor.on(evtName + '_complete', evtResult => { |
| | | // console.log(evtName, evtResult) |
| | | }) |
| | | }) |
| | | this.editor.on('draw_complete', (geometry) => { |
| | | var id = geometry.id |
| | | if (this.editor.getActiveOverlay().id === 'polygon') { |
| | | var geo = this.polygon.geometries.filter(function (item) { |
| | | return item.id === id |
| | | }) |
| | | this.polygons = geo[0].paths |
| | | // console.log('ç»å¶çå¤è¾¹å½¢åæ ï¼', geo[0].paths) |
| | | } |
| | | this.changeMode() |
| | | }) |
| | | }, |
| | | handleAgain() { |
| | | this.editor.setActionMode(TMap.tools.constants.EDITOR_ACTION.DRAW) |
| | | }, |
| | | reset() { |
| | | // this.editor.enable() |
| | | this.polygons = [] |
| | | this.polygon.setGeometries([]) |
| | | this.polygon.remove('polygon') |
| | | this.editor.setActionMode(TMap.tools.constants.EDITOR_ACTION.DRAW) |
| | | }, |
| | | changeMode() { |
| | | this.editor.setActionMode(TMap.tools.constants.EDITOR_ACTION.INTERACT) |
| | | }, |
| | | deleteObj() { |
| | | this.editor.delete() |
| | | }, |
| | | close() { |
| | | this.reset() |
| | | map.destroy() |
| | | this.isShowModal = false |
| | | }, |
| | | confirm() { |
| | | const list = this.editor.getOverlayList()[0].overlay.geometries |
| | | if (list.length == 0) return Message.warning('请å
ç»å¶è¿è¥åºå') |
| | | this.isShowModal = false |
| | | this.reset() |
| | | this.$emit('change', list[0].paths, this.row) |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .map_title { |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | margin-bottom: 6px; |
| | | } |
| | | |
| | | .map_wrap { |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | position: relative; |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | left: 50%; |
| | | top: 10px; |
| | | transform: translate(-50%, 0); |
| | | z-index: 99999999999; |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <GlobalWindow |
| | | title="æ¥çå¾ç" |
| | | :visible.sync="visible" |
| | | :confirm-working="isWorking" |
| | | confirmText="æå°äºç»´ç " |
| | | > |
| | | <div class="box" id="print-content"> |
| | | <div class="box_item" v-for="(item, index) in list" :key="index"> |
| | | <!-- <div class="box_item_title">微信</div>--> |
| | | <div class="box_item_qr"> |
| | | <img :src="item.imgurl" /> |
| | | <!-- <span>{{item.siteId}}/{{item.code}}</span>--> |
| | | </div> |
| | | <!-- <div class="box_item_footer">æ«ç å车</div>--> |
| | | </div> |
| | | </div> |
| | | <template v-slot:footer> |
| | | <!-- <el-button type="primary" v-print="'#print-content'">æå°</el-button>--> |
| | | <el-button type="primary" :loading="isWorking.export" @click="exportImages">æå
ä¸è½½</el-button> |
| | | <el-button @click="close">è¿å</el-button> |
| | | </template> |
| | | </GlobalWindow> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { downloadImgs } from '@/api/business/bikes.js' |
| | | export default { |
| | | name: 'QRcode', |
| | | extends: BaseOpera, |
| | | components: { GlobalWindow }, |
| | | data () { |
| | | return { |
| | | siteId:'', |
| | | isLoading : true, |
| | | list: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | api: '/business/sites', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | open (title, id) { |
| | | this.visible = true |
| | | }, |
| | | close () { |
| | | this.visible = false |
| | | }, |
| | | exportImages () { |
| | | downloadImgs( this.siteId) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.export = false |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .box { |
| | | width: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | /*justify-content: space-between;*/ |
| | | flex-wrap: wrap; |
| | | .box_item { |
| | | width: 152px; |
| | | height: auto; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | background: #FFFFFF; |
| | | border: 1px solid #BBBBBB; |
| | | padding: 3px 0 4px 0; |
| | | box-sizing: border-box; |
| | | margin-top: 50px; |
| | | margin-left: 35px; |
| | | .box_item_title { |
| | | font-size: 21px; |
| | | font-weight: 400; |
| | | color: #222222; |
| | | } |
| | | .box_item_qr { |
| | | width: 139px; |
| | | height: 154px; |
| | | padding: 6px 7px; |
| | | box-sizing: border-box; |
| | | background: #282828; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | img { |
| | | width: 126px; |
| | | height: 146px; |
| | | } |
| | | span { |
| | | font-size: 13px; |
| | | font-weight: 400; |
| | | color: #FFFFFF; |
| | | } |
| | | } |
| | | .box_item_footer { |
| | | font-size: 23px; |
| | | font-weight: bold; |
| | | color: #222222; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <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-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> --> |
| | | <!-- <el-form-item label="ç«ç¹ip" prop="ip"> |
| | | <el-input v-model="form.ip" placeholder="请è¾å
¥ç«ç¹ipå°å" v-trim/> |
| | | </el-form-item> |
| | |
| | | code: '', |
| | | needNotice:0, |
| | | ip: '', |
| | | port: '' |
| | | port: '', |
| | | type: 1 |
| | | |
| | | // createDate: '', |
| | | // creator: '', |
| | |
| | | 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-form-item label="车è¾ç±»å" prop="paramId"> |
| | | <el-select v-model="form.paramId" placeholder="è¯·éæ©"> |
| | | <el-option v-for="item in types" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车è¾ç¼å·" prop="code"> |
| | | <el-input v-model="form.name" placeholder="请è¾å
¥è½¦è¾ç¼å·" v-trim/> |
| | | <el-input v-model="form.code" 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 label="æ§å¶å¨SN" prop="deviceSn"> |
| | | <el-input v-model="form.deviceSn" placeholder="请è¾å
¥æ§å¶å¨SN" v-trim/> |
| | | </el-form-item> |
| | | </el-form> |
| | | </GlobalWindow> |
| | |
| | | <script> |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import { baseTranListPost } from '@/api/business/bikes.js' |
| | | export default { |
| | | name: 'OperaSitesWindow', |
| | | extends: BaseOpera, |
| | |
| | | return { |
| | | // è¡¨åæ°æ® |
| | | form: { |
| | | id: null, |
| | | name: '', |
| | | paramId: '', |
| | | code: '', |
| | | needNotice:0, |
| | | ip: '', |
| | | port: '' |
| | | |
| | | deviceSn: '', |
| | | }, |
| | | types: [], |
| | | // éªè¯è§å |
| | | rules: { |
| | | code: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ç¼å·', tigger: 'blur' }, |
| | | { required: true, message: '请è¾å
¥', tigger: 'blur' }, |
| | | ], |
| | | name: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹åç§°', tigger: 'blur' }, |
| | | paramId: [ |
| | | { required: true, message: 'è¯·éæ©', tigger: 'blur' }, |
| | | ], |
| | | ip: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ipå°å', tigger: 'blur' }, |
| | | ], |
| | | port: [ |
| | | { required: true, message: '请è¾å
¥ç«ç¹ç«¯å£å·', tigger: 'blur' }, |
| | | deviceSn: [ |
| | | { required: true, message: '请è¾å
¥', tigger: 'blur' }, |
| | | ], |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.initOp() |
| | | this.config({ |
| | | api: '/business/sites', |
| | | api: '/business/bikes', |
| | | 'field.id': 'id' |
| | | }) |
| | | }, |
| | | methods: { |
| | | initOp(){ |
| | | baseTranListPost({type: 4}).then(res => { |
| | | this.types = res |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | 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 prop="createDate" 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}"> |
| | |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaSitesWindow ref="operaSitesWindow" @success="handlePageChange" /> |
| | | <!-- æ¥çäºç»´ç --> |
| | | <AMap ref="MapRef" /> |
| | | <div id="aaa"></div> |
| | | <AMap @change="changeMap" ref="MapRef" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaSitesWindow from './components/SitesWindow' |
| | | import AMap from './components/Map.vue' |
| | | import AMap from './components/AMap.vue' |
| | | import { Message } from 'element-ui' |
| | | import { updateById } from '@/api/business/sites.js' |
| | | export default { |
| | | name: 'Sites', |
| | | extends: BaseTable, |
| | |
| | | status: '', |
| | | lockNum: '', |
| | | ip: '', |
| | | clientVersion: '' |
| | | clientVersion: '', |
| | | type: 1 |
| | | }, |
| | | isShowMap: false |
| | | } |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | handleDraw() { |
| | | changeMap(e, row) { |
| | | console.log(e); |
| | | updateById({ ...row, electronicFence: JSON.stringify(e) }).then(res => { |
| | | if (res) { |
| | | Message.success('设置æå') |
| | | this.search() |
| | | } |
| | | }) |
| | | }, |
| | | handleDraw(row) { |
| | | this.$refs.MapRef.isShowModal = true |
| | | this.$nextTick(() => { |
| | | // this.$refs.MapRef.isShowModal = true |
| | | this.$refs.MapRef.row = row |
| | | if (row.electronicFence) { |
| | | this.$refs.MapRef.polygons = JSON.parse(row.electronicFence) |
| | | } |
| | | |
| | | this.$refs.MapRef.initMap() |
| | | }) |
| | | } |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button type="primary" @click="search(1)">æç´¢</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> |
| | | <li><el-button type="primary" @click="$refs.TramEditRef.open('æ°å¢è½¦è¾')" icon="el-icon-plus" |
| | | v-permissions="['business:sites:create']">æ°å»º</el-button></li> |
| | | <li><el-button @click="handleDelAll">æ¹éå é¤</el-button></li> |
| | | <li v-permissions="['system:user:create']"> |
| | | <ImportButton text="导å
¥" template-name="çµè½¦æ¨¡æ¿.xlsx" template-path="/template/tram_import_tem.xlsx" |
| | | action="/business/bikes/importExcel" @success="search" /> |
| | | </li> |
| | | <li><el-button :loading="downLoading" @click="handleDownAll" |
| | | 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" |
| | | > |
| | | <el-table @selection-change="handleSelectionChange" v-loading="isWorking.search" :data="tableData.list" stripe |
| | | border> |
| | | <el-table-column type="selection" width="55" align="center"></el-table-column> |
| | | <el-table-column prop="code" label="车è¾ç¼ç " min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="paramName" label="车è¾ç±»å" min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="deviceSn" label="æ§å¶å¨SN" min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="voltage" label="å½åçµåå¼" sortable min-width="100px" align="center"></el-table-column> |
| | | <el-table-column label="çµéæ
åµ" width="80px" align="center"> |
| | | <template v-slot="{ row }"> |
| | | <span :class="{ red: row.lowVoltage == 1 }">{{ row.lowVoltage == 0 ? 'æ£å¸¸' : 'ä½çµé' }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="siteId" label="ç«ç¹ç¼å·" min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="siteName" label="ç«ç¹åç§°" min-width="100px" align="center"></el-table-column> |
| | | <el-table-column prop="heartDate" label="æåé讯æ¶é´" 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> |
| | | <el-button type="text" @click="handlePri(row)" 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 @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination"> |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <TramEdit ref="TramEditRef" @success="handlePageChange"/> |
| | | <!-- æ¥çäºç»´ç --> |
| | | <QRcode ref="QRcode" /> |
| | | <TramEdit ref="TramEditRef" @success="search" /> |
| | | <el-dialog title="æ¥çäºç»´ç " :visible.sync="isShowPri" width="600px"> |
| | | <div style="display: flex;align-items: center;justify-content: center;"> |
| | | <el-image style="width: 500px; height: 500px" :src="imgurl" :preview-src-list="[imgurl]"></el-image> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="isShowPri = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="isShowPri = false">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <QRcode ref="QRcodeRef" /> |
| | | <!-- <ImportWindow ref="ImportWindowRef" templateName="çµè½¦ä¿¡æ¯æ¨¡æ¿" /> --> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import TramEdit from './components/TramEdit.vue' |
| | | import QRcode from '@/components/business/QRcode' |
| | | import QRcode from './components/QRcode' |
| | | import ImportButton from '@/components/common/ImportButton' |
| | | import { tranListPost } from '@/api/business/bikes.js' |
| | | import { qrcodeBike, qrcodeBikeList, deleteBatchById } from '@/api/business/bikes.js' |
| | | import { Message } from 'element-ui' |
| | | export default { |
| | | name: 'Sites', |
| | | name: 'bikes', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, TramEdit, QRcode }, |
| | | components: { TableLayout, Pagination, TramEdit, QRcode, ImportButton }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | |
| | | status: '', |
| | | lockNum: '', |
| | | ip: '', |
| | | type: 1, |
| | | clientVersion: '' |
| | | } |
| | | }, |
| | | imgurl: '', |
| | | isShowPri: false, |
| | | downLoading: false, |
| | | |
| | | selList: [] |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'ç«ç¹ä¿¡æ¯è¡¨', |
| | | api: '/business/sites', |
| | | api: '/business/bikes', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(val) { |
| | | this.selList = val |
| | | console.log(val) |
| | | |
| | | }, |
| | | handleDelAll() { |
| | | const { selList } = this |
| | | if (selList.length == 0) return Message.warning('请å
éæ©è¦å é¤ç车è¾') |
| | | this.$confirm('æ¨ç¡®è®¤è¦å é¤éä¸ç车è¾åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }).then(() => { |
| | | deleteBatchById({ ids: selList.map(i => i.id).join() }).then(res => { |
| | | if (res) { |
| | | this.search(1) |
| | | Message.success('å 餿å') |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | handlePri(row) { |
| | | this.imgurl = null |
| | | qrcodeBike({ fouce: 0, bikeId: row.id }).then(res => { |
| | | if (res && res.imgurl) { |
| | | this.imgurl = res.imgurl |
| | | this.isShowPri = true |
| | | } |
| | | }) |
| | | }, |
| | | handleDownAll() { |
| | | this.downLoading = true |
| | | qrcodeBikeList({ fouce: 0 }).then(res => { |
| | | this.downLoading = false |
| | | this.$refs.QRcodeRef.list = res |
| | | this.$refs.QRcodeRef.visible = true |
| | | }, () => { |
| | | this.downLoading = false |
| | | }) |
| | | }, |
| | | search(pageIndex) { |
| | | this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex |
| | | this.isWorking.search = true |
| | | tranListPost({ |
| | | page: this.tableData.pagination.pageIndex, |
| | | capacity: this.tableData.pagination.pageSize, |
| | | model: this.searchForm, |
| | | sorts: this.tableData.sorts |
| | | }) |
| | | .then(data => { |
| | | this.tableData.list = data.records |
| | | this.tableData.pagination.total = data.total |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | handleSizeChange(pageSize) { |
| | | this.tableData.pagination.pageSize = pageSize |
| | | this.search() |
| | | }, |
| | | // æåº |
| | | handleSortChange(sortData) { |
| | | this.tableData.sorts = [] |
| | | if (sortData.order != null) { |
| | | this.tableData.sorts.push({ |
| | | property: sortData.column.sortBy, |
| | | direction: sortData.order === 'descending' ? 'DESC' : 'ASC' |
| | | }) |
| | | } |
| | | this.handlePageChange() |
| | | }, |
| | | // 页ç åæ´å¤ç |
| | | handlePageChange(pageIndex) { |
| | | this.tableData.pagination.pageIndex = pageIndex || this.tableData.pagination.pageIndex |
| | | this.isWorking.search = true |
| | | tranListPost({ |
| | | page: this.tableData.pagination.pageIndex, |
| | | capacity: this.tableData.pagination.pageSize, |
| | | model: this.searchForm, |
| | | sorts: this.tableData.sorts |
| | | }) |
| | | .then(data => { |
| | | this.tableData.list = data.records |
| | | this.tableData.pagination.total = data.total |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | .finally(() => { |
| | | this.isWorking.search = false |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |