Merge remote-tracking branch 'origin/yagwly_fa_master' into yagwly_fa_master
| | |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <!-- |
| | | <!-- |
| | | <el-tooltip content="完成行程" placement="top"> |
| | | <el-link size="small" type="primary" v-if="[2].includes(row.status)" @click="handleOk(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:okOrder']" underline="never" icon="el-icon-circle-check"> |
| | |
| | | importTemplateTmsDispatchOrder, ypdddjSumbit, |
| | | tmsTmsDispatchOrderImportLog, |
| | | saveTmsFinanceDetail2, |
| | | getLastLicensePlate, |
| | | getLastLicensePlate, |
| | | } from "@/api/tms/tmsDispatchOrder"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import { computed, onMounted, onBeforeUnmount, reactive, ref, toRefs, watch, getCurrentInstance, nextTick } from "vue"; |
| | |
| | | if (res.code == 200) { |
| | | form.value.licensePlate = res.data.licensePlate; |
| | | form.value.vehicleId = res.data.vehicleId |
| | | form.value.actualVehicleType = res.data.vehicleType; |
| | | } |
| | | }).finally(() => { |
| | | data.isChanging = false; |
| | |
| | | // mainDriverName: active.driverName, |
| | | // }); |
| | | // console.log(active.driverName,'44'); |
| | | // getLastLicensePlate(active.driverName).then(res => { |
| | | // getLastLicensePlate(active.driverName).then(res => { |
| | | // console.log(res); |
| | | |
| | | // }) |
| | |
| | | console.log('App Hide') |
| | | }, |
| | | methods:{ |
| | | updateApp() { |
| | | const updateManager = uni.getUpdateManager(); |
| | | updateManager.onCheckForUpdate(function (res) { |
| | | // 请求完新版本信息的回调 |
| | | }); |
| | | updateApp() { |
| | | const updateManager = uni.getUpdateManager(); |
| | | |
| | | updateManager.onUpdateReady(function (res) { |
| | | uni.showModal({ |
| | | title: '更新提示', |
| | | content: '新版本已经准备好,是否重启应用?', |
| | | showCancel: false, |
| | | success(res) { |
| | | if (res.confirm) { |
| | | // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 |
| | | updateManager.applyUpdate(); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消,不更新'); |
| | | } |
| | | } |
| | | }); |
| | | updateManager.onCheckForUpdate(function (res) { |
| | | // 请求完新版本信息的回调 |
| | | console.log('检查更新结果:', res.hasUpdate); |
| | | if (res.hasUpdate) { |
| | | console.log('发现新版本,正在下载...'); |
| | | } else { |
| | | console.log('当前已是最新版本'); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | updateManager.onUpdateReady(function (res) { |
| | | uni.showModal({ |
| | | title: '更新提示', |
| | | content: '新版本已经准备好,是否重启应用?', |
| | | success(res) { |
| | | if (res.confirm) { |
| | | // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 |
| | | updateManager.applyUpdate(); |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | updateManager.onUpdateFailed(function (res) { |
| | | // 新的版本下载失败 |
| | | uni.showModal({ |
| | | title: '已经有新版本了哟~', |
| | | content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~', |
| | | }) |
| | | }); |
| | | updateManager.onUpdateFailed(function (res) { |
| | | // 新的版本下载失败 |
| | | uni.showModal({ |
| | | title: '更新失败', |
| | | content: '新版本下载失败,请检查网络后重试', |
| | | showCancel: false |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | |
| | |
| | | <u-number-box |
| | | v-model="localForm.odometer" |
| | | class="number-box" |
| | | :min="0" |
| | | :step="1" |
| | | button-size="28" |
| | | inputWidth="90" |
| | |
| | | data() { |
| | | return { |
| | | localForm: { |
| | | odometer: 0, |
| | | odometer: undefined, |
| | | iscc: '1' |
| | | } |
| | | } |
| | |
| | | watch: { |
| | | show(val) { |
| | | if (val) { |
| | | |
| | | // 弹窗打开时,同步父组件的数据到本地 |
| | | this.localForm = { |
| | | odometer: this.form.odometer || 0, |
| | | odometer: this.form.odometer || '', |
| | | iscc: this.form.iscc || '1' |
| | | } |
| | | console.log(this.form.odometer,this.localForm) |
| | | } |
| | | } |
| | | }, |
| | |
| | | //const host = 'https://tmsapi.ygalogisticspark.com/api/'; |
| | | const host = 'https://tmsapi.ygalogisticspark.com/api/'; |
| | | //const host = 'http://61.143.42.70:7010/cwgltest-api/'; |
| | | const host = 'http://192.168.1.92:8060/'; |
| | | //const host = 'http://192.168.1.92:8060/'; |
| | | // const host = 'https://jyjyapi.ygalogisticspark.com/api2/zhfw/api/third'; |
| | | const imageUrlYL = 'http://localhost:8080'; |
| | | const aliOssUrl = 'https://huichang-tms.oss-cn-hongkong.aliyuncs.com'; |
| | |
| | | <u--form ref="uForm" :rules="rules" :model="form" labelPosition="left"> |
| | | <u-form-item borderBottom label=" " labelWidth="0" prop="address"> |
| | | <view class="form-row" @click="getLocation"> |
| | | <view class="form-label required"> |
| | | <view class="form-label"> |
| | | <view class="label-icon"> |
| | | <u--image :showLoading="true" src="/static/bt.png" width="18" height="18" /> |
| | | </view> |
| | |
| | | <text>时间</text> |
| | | </view> |
| | | <uni-datetime-picker type="datetime" v-model="form.tripTime" class="flex-1" /> |
| | | </view> |
| | | </u-form-item> |
| | | <u-form-item borderBottom label=" " v-if="form.odometer" labelWidth="0" prop="odometer"> |
| | | <view class="form-row"> |
| | | <view class="form-label"> |
| | | <text>仪表里程</text> |
| | | </view> |
| | | <view class="form-label">{{form.odometer || 0}} KM</view> |
| | | </view> |
| | | </u-form-item> |
| | | |
| | |
| | | const ODOMETER_TYPES = Object.freeze(['3', '5', '7']) |
| | | |
| | | const INITIAL_FORM = Object.freeze({ |
| | | address: '', tripTime: '', odometer: 0, tripType: '', |
| | | address: '', tripTime: '', odometer: undefined, tripType: '', |
| | | feeType: '', currency: '', actualFeeAmount: 0, |
| | | iscc: '1', longitude: '', latitude: '' |
| | | }) |
| | |
| | | |
| | | if (type !== '1') { |
| | | if (ODOMETER_TYPES.includes(type)) { |
| | | this.form.odometer = this.tmsTripTables[0]?.odometer || 0 |
| | | this.form.odometer = this.tmsTripTables[0]?.odometer || undefined |
| | | this.form.iscc = '1' |
| | | } else { |
| | | this.form.odometer = 0 |
| | | this.form.odometer = undefined |
| | | } |
| | | this.$nextTick(() => { this.showPopup = true }) |
| | | } |
| | |
| | | // 格式化整理数据,限制范围 |
| | | format(value) { |
| | | value = this.filter(value) |
| | | if (!value){ |
| | | return value |
| | | } |
| | | // 如果为空字符串,那么设置为0,同时将值转为Number类型 |
| | | value = value === '' ? 0 : +value |
| | | // 对比最大最小值,取在min和max之间的值 |