更新
This commit is contained in:
parent
4923dde629
commit
da394abd70
5
App.vue
5
App.vue
@ -88,6 +88,11 @@
|
|||||||
console.error('获取用户信息失败', err)
|
console.error('获取用户信息失败', err)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// #ifdef APP-PLUS
|
||||||
|
plus.screen.lockOrientation('portrait-primary'); //锁死屏幕方向为竖屏
|
||||||
|
plus.navigator.setFullscreen(false);
|
||||||
|
// #endif
|
||||||
},
|
},
|
||||||
onShow: function() {
|
onShow: function() {
|
||||||
console.log('App Show')
|
console.log('App Show')
|
||||||
|
|||||||
@ -241,6 +241,7 @@
|
|||||||
* 接单
|
* 接单
|
||||||
*/
|
*/
|
||||||
openFile(orderId) {
|
openFile(orderId) {
|
||||||
|
console.log('执行');
|
||||||
this.$emit('getOrder', orderId);
|
this.$emit('getOrder', orderId);
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
|
|||||||
8
main.js
8
main.js
@ -1,6 +1,12 @@
|
|||||||
import App from './App'
|
import App from './App'
|
||||||
import uView from "uview-ui";
|
import uView from "uview-ui";
|
||||||
import config from '@/config'
|
import config from '@/config';
|
||||||
|
import {
|
||||||
|
checkPermi,
|
||||||
|
checkRole
|
||||||
|
} from './utils/permission'
|
||||||
|
Vue.prototype.checkPermi = checkPermi
|
||||||
|
Vue.prototype.checkRole = checkRole
|
||||||
const baseUrl = config.baseUrl
|
const baseUrl = config.baseUrl
|
||||||
Vue.prototype.$baseUrl = baseUrl;
|
Vue.prototype.$baseUrl = baseUrl;
|
||||||
const baseImageUrl = config.baseImageUrl
|
const baseImageUrl = config.baseImageUrl
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<image src="/static/images/j2.png" mode=""></image>
|
<image src="/static/images/j2.png" mode=""></image>
|
||||||
<view class="">业务管理</view>
|
<view class="">业务管理</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="jg_box" v-if="checkPermi(['repair_statistics_show'])">
|
<view class="jg_box" v-if="checkPermi(['repair_statistics_show'])" @click="goToPage(3)">
|
||||||
<image src="/static/images/j3.png" mode=""></image>
|
<image src="/static/images/j3.png" mode=""></image>
|
||||||
<view class="">数据统计</view>
|
<view class="">数据统计</view>
|
||||||
</view>
|
</view>
|
||||||
@ -70,23 +70,24 @@
|
|||||||
<view class="three1">
|
<view class="three1">
|
||||||
<view class="">
|
<view class="">
|
||||||
<view class="t_size">进厂数</view>
|
<view class="t_size">进厂数</view>
|
||||||
<view class="t_num">{{ bossNum.inCompanyNum }}</view>
|
<view class="t_num">{{ bossNum.newOrderNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/t1.png" mode=""></image>
|
<image src="/static/images/t1.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="three2">
|
<view class="three2">
|
||||||
<view class="" @click="viewOrder('wxz')">
|
<view class="">
|
||||||
<view class="t_size">维修中</view>
|
<view class="t_size">维修中</view>
|
||||||
<view class="t_num">{{ bossNum.workingNum }}</view>
|
<view class="t_num">{{ bossNum.workingNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/t2.png" mode=""></image>
|
<image src="/static/images/t2.png" mode=""></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="three3">
|
<view class="three3">
|
||||||
<view class="" @click="viewOrder('yjg')">
|
<view class="">
|
||||||
<view class="t_size">已竣工</view>
|
<view class="t_size">已竣工</view>
|
||||||
<view class="t_num">{{ bossNum.overNum }}</view>
|
<view class="t_num">{{ bossNum.overNum }}</view>
|
||||||
</view>
|
</view>
|
||||||
<image src="/static/images/t3.png" mode=""></image>
|
<image src="/static/images/t3.png" mode="">
|
||||||
|
</image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="db_" style="margin: 30rpx auto; " v-if="checkRole(['repair_staff'])">
|
<view class="db_" style="margin: 30rpx auto; " v-if="checkRole(['repair_staff'])">
|
||||||
@ -423,6 +424,11 @@
|
|||||||
url: '/pages-business/businessManage/businessManage' // 3. 建议使用单引号
|
url: '/pages-business/businessManage/businessManage' // 3. 建议使用单引号
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 3: // 2. 补上冒号
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages-business/statistics/statistics' // 3. 建议使用单引号
|
||||||
|
});
|
||||||
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages-home/msg/message' // 3. 建议使用单引号
|
url: '/pages-home/msg/message' // 3. 建议使用单引号
|
||||||
|
|||||||
@ -57,28 +57,34 @@
|
|||||||
配件申请表
|
配件申请表
|
||||||
</view>
|
</view>
|
||||||
<view class="repairItem">
|
<view class="repairItem">
|
||||||
<image
|
<image v-for="(url, index) in imageUrls" :key="index" :src="imgUrlPrex+url" class="image-item"
|
||||||
v-for="(url, index) in imageUrls"
|
@click="prviewImage(imageUrls,index)" />
|
||||||
:key="index"
|
</view>
|
||||||
:src="imgUrlPrex+url"
|
</view>
|
||||||
class="image-item"
|
<view class="repairInfo" v-if="info && info.remark">
|
||||||
@click="prviewImage(imageUrls,index)"
|
<view class="header">
|
||||||
/>
|
配件备注
|
||||||
|
</view>
|
||||||
|
<view class="repairItem">
|
||||||
|
{{info.remark}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="repairInfo">
|
<view class="repairInfo">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
配件信息
|
配件信息
|
||||||
<view v-if="canOperate" style="float: right; color: #0174F6" @click="addWares">添加配件</view>
|
<view v-if="canOperate" style="float: right; color: #0174F6" @click="addWares">添加配件</view>
|
||||||
<view v-if="canOperate" style="float: right; color: #0174F6;margin-right: 1rem" @click="handleSetting">移交保险公司</view>
|
<view v-if="canOperate" style="float: right; color: #0174F6;margin-right: 1rem"
|
||||||
|
@click="handleSetting">移交保险公司</view>
|
||||||
</view>
|
</view>
|
||||||
<uni-collapse ref="collapse">
|
<uni-collapse ref="collapse">
|
||||||
<uni-collapse-item v-for="(groupItem, index) in repairList" :key="groupItem.groupId"
|
<uni-collapse-item v-for="(groupItem, index) in repairList" :key="groupItem.groupId"
|
||||||
:title="groupItem.groupName+'(合计:'+groupItem.typeNums+'种'+groupItem.nums+'个配件'">
|
:title="groupItem.groupName+'(合计:'+groupItem.typeNums+'种'+groupItem.nums+'个配件'">
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view @click="changeChoose(item)" v-for="item in groupItem.twItemList" :key="item.id" class="repairItem" >
|
<view @click="changeChoose(item)" v-for="item in groupItem.twItemList" :key="item.id"
|
||||||
|
class="repairItem">
|
||||||
<view class="repairName">
|
<view class="repairName">
|
||||||
<radio v-if="canOperate && item.waresStatus === ''" :value="item.id" :checked="item.selected"/>
|
<radio v-if="canOperate && item.waresStatus === ''" :value="item.id"
|
||||||
|
:checked="item.selected" />
|
||||||
{{ item.waresName }}×{{ item.waresCount }}{{ item.unitText }}
|
{{ item.waresName }}×{{ item.waresCount }}{{ item.unitText }}
|
||||||
</view>
|
</view>
|
||||||
<view class="grid">
|
<view class="grid">
|
||||||
@ -92,7 +98,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<view style="grid-area: c" class="girdItem">
|
<view style="grid-area: c" class="girdItem">
|
||||||
<text class="label">状态</text>
|
<text class="label">状态</text>
|
||||||
<text :class="getWaresStatusClass(item.waresStatus)">{{ getWaresStatus(item.waresStatus) }}</text>
|
<text
|
||||||
|
:class="getWaresStatusClass(item.waresStatus)">{{ getWaresStatus(item.waresStatus) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="item.handleName" style="grid-area: d" class="girdItem">
|
<view v-if="item.handleName" style="grid-area: d" class="girdItem">
|
||||||
<text class="label">审核人</text>
|
<text class="label">审核人</text>
|
||||||
@ -153,7 +160,10 @@
|
|||||||
<script>
|
<script>
|
||||||
import VNavigationBar from "@/components/VNavigationBar.vue";
|
import VNavigationBar from "@/components/VNavigationBar.vue";
|
||||||
import request from '@/utils/request';
|
import request from '@/utils/request';
|
||||||
import {getDictTextByCodeAndValue, formatTimestampCustom} from "@/utils/utils";
|
import {
|
||||||
|
getDictTextByCodeAndValue,
|
||||||
|
formatTimestampCustom
|
||||||
|
} from "@/utils/utils";
|
||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -294,8 +304,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async getTicketById(id) {
|
async getTicketById(id) {
|
||||||
const res = await request({
|
const res = await request({
|
||||||
url: '/admin-api/repair/tickets/get?id=' + id,
|
url: '/admin-api/repair/tickets/get',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
|
params: {
|
||||||
|
id: id,
|
||||||
|
ifApp: true
|
||||||
|
}
|
||||||
})
|
})
|
||||||
this.info.carBrandName = res.data.carBrandName
|
this.info.carBrandName = res.data.carBrandName
|
||||||
},
|
},
|
||||||
@ -386,7 +400,9 @@ export default {
|
|||||||
dataObj.items = []
|
dataObj.items = []
|
||||||
this.repairList.map((groupItem) => {
|
this.repairList.map((groupItem) => {
|
||||||
groupItem.twItemList.map((item) => {
|
groupItem.twItemList.map((item) => {
|
||||||
dataObj.items.push({id: item.id})
|
dataObj.items.push({
|
||||||
|
id: item.id
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -406,10 +422,18 @@ export default {
|
|||||||
}, 700)
|
}, 700)
|
||||||
}
|
}
|
||||||
this.subLoading = false
|
this.subLoading = false
|
||||||
|
}).catch((e) => {
|
||||||
|
// 错误情况(全局拦截器处理过的也可能不抛)
|
||||||
|
console.error(e)
|
||||||
|
}).finally(() => {
|
||||||
|
this.subLoading = false
|
||||||
|
this.canClick = true
|
||||||
})
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.subLoading = false
|
this.subLoading = false
|
||||||
this.canClick = true
|
this.canClick = true
|
||||||
|
} finally {
|
||||||
|
this.subLoading = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -547,7 +571,8 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 30rpx 32rpx;
|
padding: 30rpx 32rpx;
|
||||||
|
|
||||||
.yes, .no {
|
.yes,
|
||||||
|
.no {
|
||||||
width: 310rpx;
|
width: 310rpx;
|
||||||
height: 76rpx;
|
height: 76rpx;
|
||||||
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
border-radius: 38rpx 38rpx 38rpx 38rpx;
|
||||||
@ -581,7 +606,8 @@ export default {
|
|||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
margin-right: 10rpx; /* 增加右边距,使图片之间有间隔 */
|
margin-right: 10rpx;
|
||||||
|
/* 增加右边距,使图片之间有间隔 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-container {
|
.fullscreen-container {
|
||||||
@ -598,12 +624,17 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.fullscreen-image {
|
.fullscreen-image {
|
||||||
max-width: 90vw; /* 最大宽度为视口宽度的90% */
|
max-width: 90vw;
|
||||||
max-height: 90vh; /* 最大高度为视口高度的90% */
|
/* 最大宽度为视口宽度的90% */
|
||||||
object-fit: contain; /* 保持宽高比 */
|
max-height: 90vh;
|
||||||
|
/* 最大高度为视口高度的90% */
|
||||||
|
object-fit: contain;
|
||||||
|
/* 保持宽高比 */
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 0 20rpx; /* 增加左右边距,使图片距离屏幕边缘有一定距离 */
|
margin: 0 20rpx;
|
||||||
|
/* 增加左右边距,使图片距离屏幕边缘有一定距离 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-content {
|
.popup-content {
|
||||||
width: 80%;
|
width: 80%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
@ -612,19 +643,23 @@ export default {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-title {
|
.popup-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-form-item {
|
.uni-form-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-label {
|
.uni-label {
|
||||||
width: 20rem;
|
width: 20rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.uni-input {
|
.uni-input {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
@ -633,12 +668,15 @@ export default {
|
|||||||
height: 2rem;
|
height: 2rem;
|
||||||
width: 26rem;
|
width: 26rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.popup-footer {
|
.popup-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
.confirm-btn, .cancel-btn {
|
|
||||||
|
.confirm-btn,
|
||||||
|
.cancel-btn {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@ -646,10 +684,12 @@ export default {
|
|||||||
border: none;
|
border: none;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.confirm-btn {
|
.confirm-btn {
|
||||||
background-color: #0174F6;
|
background-color: #0174F6;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cancel-btn {
|
.cancel-btn {
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
color: #666;
|
color: #666;
|
||||||
|
|||||||
@ -25,8 +25,8 @@
|
|||||||
汇报内容
|
汇报内容
|
||||||
</view>
|
</view>
|
||||||
<!-- <u--textarea v-if="type != 'look'" v-model="report.reportContent" placeholder="请输入内容"></u--textarea> -->
|
<!-- <u--textarea v-if="type != 'look'" v-model="report.reportContent" placeholder="请输入内容"></u--textarea> -->
|
||||||
<textarea auto-height v-model="report.reportContent" placeholder="请输入内容"></textarea>
|
<textarea maxlength="-1" auto-height v-model="report.reportContent" placeholder="请输入内容"></textarea>
|
||||||
<view class="x_"></view>
|
<!-- <view class="x_"></view> -->
|
||||||
<view class="d_b" @click="handleUpload" v-if="type != 'look'">
|
<view class="d_b" @click="handleUpload" v-if="type != 'look'">
|
||||||
<view class="">附件</view>
|
<view class="">附件</view>
|
||||||
<view class="lan_">上传附件
|
<view class="lan_">上传附件
|
||||||
|
|||||||
@ -233,7 +233,7 @@
|
|||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center">
|
<!-- <view style="display: flex;align-items: center">
|
||||||
<view class="infoItem" style="flex: 1" v-if="cusFromList && cusFromList.length>0">
|
<view class="infoItem" style="flex: 1" v-if="cusFromList && cusFromList.length>0">
|
||||||
<text class="label">客户来源</text>
|
<text class="label">客户来源</text>
|
||||||
<picker @change="cusFromChange" :value="cusFromIndex" :range="cusFromList"
|
<picker @change="cusFromChange" :value="cusFromIndex" :range="cusFromList"
|
||||||
@ -248,6 +248,12 @@
|
|||||||
<view class="uni-input">{{ busiFromList[busiFromIndex].label}}</view>
|
<view class="uni-input">{{ busiFromList[busiFromIndex].label}}</view>
|
||||||
</picker>
|
</picker>
|
||||||
</view>
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view style="display: flex;align-items: center">
|
||||||
|
<text class="label">渠道/来源</text>
|
||||||
|
<uni-data-picker :localdata="busiAndCusList" v-model='busIAndCusValue'
|
||||||
|
popup-title="请选择渠道和来源" :map="{text:'name',value:'name'}"
|
||||||
|
@change="onBusiAndCuschange"></uni-data-picker>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center">
|
<view style="display: flex;align-items: center">
|
||||||
<view class="infoItem" style="flex: 1">
|
<view class="infoItem" style="flex: 1">
|
||||||
@ -392,7 +398,8 @@
|
|||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
import {
|
import {
|
||||||
formatTimestamp,
|
formatTimestamp,
|
||||||
formatTimestampCustom
|
formatTimestampCustom,
|
||||||
|
handleTree
|
||||||
} from "@/utils/utils";
|
} from "@/utils/utils";
|
||||||
import upload from "@/utils/upload";
|
import upload from "@/utils/upload";
|
||||||
import {
|
import {
|
||||||
@ -424,6 +431,7 @@
|
|||||||
cusFromIndex: 0,
|
cusFromIndex: 0,
|
||||||
busiFromList: [],
|
busiFromList: [],
|
||||||
busiFromIndex: 0,
|
busiFromIndex: 0,
|
||||||
|
busiAndCusList: [],
|
||||||
partDisposals: [],
|
partDisposals: [],
|
||||||
partDisposalIndex: 0,
|
partDisposalIndex: 0,
|
||||||
formData: {
|
formData: {
|
||||||
@ -479,6 +487,7 @@
|
|||||||
ticketNo: '',
|
ticketNo: '',
|
||||||
//前一个页面传过来的参数
|
//前一个页面传过来的参数
|
||||||
pageData: {},
|
pageData: {},
|
||||||
|
busIAndCusValue: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -543,6 +552,7 @@
|
|||||||
this.initDict("repair_type")
|
this.initDict("repair_type")
|
||||||
this.initDict("cus_data_from")
|
this.initDict("cus_data_from")
|
||||||
this.initDict("repair_part_disposal")
|
this.initDict("repair_part_disposal")
|
||||||
|
this.queryBusiAndCus()
|
||||||
},
|
},
|
||||||
onShow() {},
|
onShow() {},
|
||||||
methods: {
|
methods: {
|
||||||
@ -588,8 +598,6 @@
|
|||||||
this.partDisposalIndex = newIndex;
|
this.partDisposalIndex = newIndex;
|
||||||
this.formData.partDisposal = this.partDisposals[newIndex].value;
|
this.formData.partDisposal = this.partDisposals[newIndex].value;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
async initDict(dictCode) {
|
async initDict(dictCode) {
|
||||||
let dictArray = getStorageWithExpiry(dictCode);
|
let dictArray = getStorageWithExpiry(dictCode);
|
||||||
console.log(dictArray, "partDisposals")
|
console.log(dictArray, "partDisposals")
|
||||||
@ -652,6 +660,24 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 获取业务来源和渠道
|
||||||
|
*/
|
||||||
|
queryBusiAndCus() {
|
||||||
|
request({
|
||||||
|
url: `/admin-api/business/list`,
|
||||||
|
method: 'GET',
|
||||||
|
params: {
|
||||||
|
systemCode: 'repair'
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
this.busiAndCusList = handleTree(res.data, 'id', 'pid')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onBusiAndCuschange(e) {
|
||||||
|
this.formData.busiFrom = e.detail.value[0].value
|
||||||
|
this.formData.cusFrom = e.detail.value[1].value
|
||||||
|
},
|
||||||
buildRepairType() {
|
buildRepairType() {
|
||||||
if (this.pageData.repairType) {
|
if (this.pageData.repairType) {
|
||||||
this.repairTypes.map((item, index) => {
|
this.repairTypes.map((item, index) => {
|
||||||
@ -708,7 +734,8 @@
|
|||||||
* 创建工单前上传图片
|
* 创建工单前上传图片
|
||||||
*/
|
*/
|
||||||
submitUpload() {
|
submitUpload() {
|
||||||
if (this.userInfo === null || this.carList.length === 0 || this.selectedProj.length === 0) {
|
if (this.userInfo === null || this.carList.length === 0 || this.selectedProj.length === 0 || !this.formData
|
||||||
|
.busiFrom || !this.formData.cusFrom) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请完善信息',
|
title: '请完善信息',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
@ -721,12 +748,12 @@
|
|||||||
//新增工单
|
//新增工单
|
||||||
submit() {
|
submit() {
|
||||||
let fileStr = this.fileList.map(item => item.url.replace(config.baseImageUrl, "")).join(",")
|
let fileStr = this.fileList.map(item => item.url.replace(config.baseImageUrl, "")).join(",")
|
||||||
if (!this.formData.busiFrom) {
|
// if (!this.formData.busiFrom) {
|
||||||
this.formData.busiFrom = this.busiFromList[this.busiFromIndex].value
|
// this.formData.busiFrom = this.busiFromList[this.busiFromIndex].value
|
||||||
}
|
// }
|
||||||
if (!this.formData.cusFrom) {
|
// if (!this.formData.cusFrom) {
|
||||||
this.formData.cusFrom = this.cusFromList[this.cusFromIndex].value
|
// this.formData.cusFrom = this.cusFromList[this.cusFromIndex].value
|
||||||
}
|
// }
|
||||||
const data = {
|
const data = {
|
||||||
userId: this.userInfo.id,
|
userId: this.userInfo.id,
|
||||||
ticketNo: this.ticketNo,
|
ticketNo: this.ticketNo,
|
||||||
@ -798,9 +825,20 @@
|
|||||||
method: 'GET',
|
method: 'GET',
|
||||||
params: params
|
params: params
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data.records.length > 0) {
|
if (res.data.records.length == 1) {
|
||||||
this.userInfo = res.data.records[0]
|
this.userInfo = res.data.records[0]
|
||||||
this.getCarList()
|
this.getCarList()
|
||||||
|
} else if (res.data.records.length != 0) {
|
||||||
|
uni.showActionSheet({
|
||||||
|
title: '选择客户',
|
||||||
|
itemList: res.data.records.map(m => m.cusName + m.phoneNumber),
|
||||||
|
success: ({
|
||||||
|
tapIndex
|
||||||
|
}) => {
|
||||||
|
this.userInfo = res.data.records[tapIndex]
|
||||||
|
this.getCarList()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -55,14 +55,15 @@
|
|||||||
class="carImage" mode="aspectFit"></image>
|
class="carImage" mode="aspectFit"></image>
|
||||||
<view class="carHeaderRight">
|
<view class="carHeaderRight">
|
||||||
<text class="carNumber">{{ ticketInfo.carNo }}</text>
|
<text class="carNumber">{{ ticketInfo.carNo }}</text>
|
||||||
<text class="carType">{{ ticketInfo.carBrandName+" " }} <text
|
<text class="carType">{{ ticketInfo.carBrandName+" " }} <span
|
||||||
v-if="ticketInfo.carInfo && ticketInfo.carInfo.carModel"> -
|
v-if="ticketInfo.carInfo && ticketInfo.carInfo.carModel"> -
|
||||||
{{ticketInfo.carInfo.carModel}}</text></text>
|
{{ticketInfo.carInfo.carModel}}</span></text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
<view class="carBody">
|
<view class="carBody">
|
||||||
<view style="display: flex;flex-direction: column;">
|
<view style="display: flex;flex-direction: column;">
|
||||||
|
<view v-if="checkPermi(['repair:user:look'])">
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">车主</view>
|
<view class="label">车主</view>
|
||||||
<view class="value">{{ ticketInfo.userName }}</view>
|
<view class="value">{{ ticketInfo.userName }}</view>
|
||||||
@ -92,6 +93,8 @@
|
|||||||
<text class="value">{{ ticketInfo.busiFrom }}</text>
|
<text class="value">{{ ticketInfo.busiFrom }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="line"></view>
|
<view class="line"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">车架号</view>
|
<view class="label">车架号</view>
|
||||||
<view class="value">{{ ticketInfo.carVin }}</view>
|
<view class="value">{{ ticketInfo.carVin }}</view>
|
||||||
@ -102,50 +105,64 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">车辆注册日期</view>
|
<view class="label">车辆注册日期</view>
|
||||||
<view class="value">{{ ticketInfo.carRegisterDate }}</view>
|
<view class="value">{{ formatDate(ticketInfo.carInfo.carRegisterDate) }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">车龄(年)</view>
|
<view class="label">车龄(年)</view>
|
||||||
<view class="value">{{ ticketInfo.carInfo.carYear }}</view>
|
<view class="value">{{ ticketInfo.carInfo.carYear }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">年检到期时间</view>
|
<view class="label">当前表显里程</view>
|
||||||
<view class="value">{{ ticketInfo.nextInspectionDate}}</view>
|
<view class="value">{{ ticketInfo.carInfo.mileageTraveled}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="infoItem">
|
||||||
|
<view class="label">下次年检时间</view>
|
||||||
|
<view class="value">{{ formatDate(ticketInfo.carInfo.nextInspectionDate)}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">保险到期时间</view>
|
<view class="label">保险到期时间</view>
|
||||||
<view class="value">{{ ticketInfo.insuranceExpiryDate}}</view>
|
<view class="value">{{ formatDate(ticketInfo.carInfo.insuranceExpiryDate)}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<!-- <view class="infoItem">
|
||||||
<view class="label">承保险种</view>
|
<view class="label">承保险种</view>
|
||||||
<view class="value">{{ ticketInfo.insuranceType}}</view>
|
<view class="value">{{ ticketInfo.insuranceType}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">上年保费</view>
|
<view class="label">上年保费</view>
|
||||||
<view class="value">交:{{ ticketInfo.jiaoqiang}} 商:{{ ticketInfo.shangye}}</view>
|
<view class="value">交:{{ ticketInfo.jiaoqiang}} 商:{{ ticketInfo.shangye}}</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="infoItem">
|
||||||
|
<view class="label">下次保养里程</view>
|
||||||
|
<view class="value">{{ ticketInfo.carInfo.nextMaintenanceMileage}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">最近保养日期</view>
|
<view class="label">最近保养日期</view>
|
||||||
<view class="value">{{ ticketInfo.maintenanceDate}}</view>
|
<view class="value">{{ ticketInfo.maintenanceDate}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="infoItem">
|
|
||||||
<view class="label">表显里程</view>
|
|
||||||
<view class="value">{{ ticketInfo.mileageTraveled}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="infoItem">
|
<view class="infoItem">
|
||||||
<view class="label">最近保养公里数</view>
|
<view class="label">最近保养公里数</view>
|
||||||
<view class="value">{{ ticketInfo.maintenanceMileage}}</view>
|
<view class="value">{{ ticketInfo.maintenanceMileage}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="infoItem" style="display: block;">
|
||||||
|
<view class="label">档案资料</view>
|
||||||
|
<view class="value">
|
||||||
<view class="projList">
|
<view class="projList">
|
||||||
<view class="projImg" v-if="carImgList.length>0">
|
<view class="projImg" v-if="carImgList.length>0">
|
||||||
<image v-for="(img, imgIndex) in carImgList"
|
<image v-for="(img, imgIndex) in carImgList"
|
||||||
@click="prviewImage(carImgList,imgIndex)" :key="imgIndex"
|
@click="prviewImage(carImgList,imgIndex)" :key="imgIndex"
|
||||||
:src="imgUrlPrex + img.image" class="projImgItem"></image>
|
:src="img.image" class="projImgItem"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="infoItem" v-if="checkPermi(['tickets:car:edit'])">
|
||||||
|
<view class="label" style="color: rgb(41, 121, 255);" @click="showCarPopup">点击编辑车辆信息
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 维修工时项目-编辑 -->
|
<!-- 维修工时项目-编辑 -->
|
||||||
<view
|
<view
|
||||||
@ -456,6 +473,32 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
<uni-popup ref="carPopup" type="center" border-radius="10px 10px 10px 10px" background-color="#fff">
|
||||||
|
<view class="car-popup-out">
|
||||||
|
<uni-forms ref="baseForm" :modelValue="carFormData">
|
||||||
|
<uni-forms-item label="下次年检日期" required>
|
||||||
|
<picker mode="date" :value="carFormData.nextInspectionDate" :start="startDate" :end="endDate"
|
||||||
|
@change="bindnextInspectionDateChange">
|
||||||
|
<view class="uni-input">
|
||||||
|
{{ carFormData.nextInspectionDate ? carFormData.nextInspectionDate : '选择日期' }}
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</uni-forms-item>
|
||||||
|
<uni-forms-item label="下次保养里程" required>
|
||||||
|
<uni-easyinput v-model="carFormData.nextMaintenanceMileage" placeholder="请输入" />
|
||||||
|
</uni-forms-item>
|
||||||
|
<uni-forms-item label="保险到期时间" required>
|
||||||
|
<picker mode="date" :value="carFormData.insuranceExpiryDate" :start="startDate" :end="endDate"
|
||||||
|
@change="bindInsuranceExpiryDateChange">
|
||||||
|
<view class="uni-input">
|
||||||
|
{{ carFormData.insuranceExpiryDate ? carFormData.insuranceExpiryDate : '选择日期' }}
|
||||||
|
</view>
|
||||||
|
</picker>
|
||||||
|
</uni-forms-item>
|
||||||
|
</uni-forms>
|
||||||
|
<button @click="submitCarForm">确定</button>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
<view>
|
<view>
|
||||||
<u-modal :show="show" :title="title" confirmText="电话" cancelText="短信" showCancelButton @cancel="message"
|
<u-modal :show="show" :title="title" confirmText="电话" cancelText="短信" showCancelButton @cancel="message"
|
||||||
@confirm="phone " closeOnClickOverlay @close="show = false">
|
@confirm="phone " closeOnClickOverlay @close="show = false">
|
||||||
@ -487,7 +530,10 @@
|
|||||||
setStorageWithExpiry,
|
setStorageWithExpiry,
|
||||||
getStorageWithExpiry
|
getStorageWithExpiry
|
||||||
} from '@/utils/auth'
|
} from '@/utils/auth'
|
||||||
import config from '@/config'
|
import config from '@/config';
|
||||||
|
import {
|
||||||
|
fixScreen
|
||||||
|
} from '@/utils/fixScreen.js';
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
VNavigationBar,
|
VNavigationBar,
|
||||||
@ -526,10 +572,29 @@
|
|||||||
repairItemId: "",
|
repairItemId: "",
|
||||||
itemName: "",
|
itemName: "",
|
||||||
},
|
},
|
||||||
|
// 补充车辆信息
|
||||||
|
carFormData: {
|
||||||
|
nextInspectionDate: undefined,
|
||||||
|
insuranceExpiryDate: undefined,
|
||||||
|
nextMaintenanceMileage: undefined,
|
||||||
|
mileageTraveled: undefined,
|
||||||
|
},
|
||||||
//是否可以授权给客户看
|
//是否可以授权给客户看
|
||||||
canOpenCus: false,
|
canOpenCus: false,
|
||||||
//是否可以看见钱
|
//是否可以看见钱
|
||||||
canSeeMoney: false,
|
canSeeMoney: false,
|
||||||
|
listStyles: {
|
||||||
|
// 是否显示边框
|
||||||
|
border: false,
|
||||||
|
// 是否显示分隔线
|
||||||
|
dividline: false,
|
||||||
|
// 线条样式
|
||||||
|
borderStyle: {
|
||||||
|
width: 1,
|
||||||
|
color: 'blue',
|
||||||
|
radius: 2
|
||||||
|
}
|
||||||
|
},
|
||||||
//当前选择的操作:working-维修期间|done_half-阶段完成|done-全部完成递交下一维修班组选人维修
|
//当前选择的操作:working-维修期间|done_half-阶段完成|done-全部完成递交下一维修班组选人维修
|
||||||
nowChooseOperate: "",
|
nowChooseOperate: "",
|
||||||
carInfo: {},
|
carInfo: {},
|
||||||
@ -555,7 +620,8 @@
|
|||||||
activeProjTabKey: 0,
|
activeProjTabKey: 0,
|
||||||
activePartTabKey: 0,
|
activePartTabKey: 0,
|
||||||
processList: [{}, {}],
|
processList: [{}, {}],
|
||||||
carImgList: []
|
carImgList: [],
|
||||||
|
cararchivesPhotos: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -587,8 +653,20 @@
|
|||||||
this.refreshData(false)
|
this.refreshData(false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onShow() {
|
||||||
|
// 调用修复方法
|
||||||
|
fixScreen();
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
startDate() {
|
||||||
|
return this.getDate('start');
|
||||||
|
},
|
||||||
|
endDate() {
|
||||||
|
return this.getDate('end');
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
formatDate,
|
||||||
chooseProjTab(index) {
|
chooseProjTab(index) {
|
||||||
this.activeProjTabKey = index
|
this.activeProjTabKey = index
|
||||||
},
|
},
|
||||||
@ -641,6 +719,67 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 打开编辑车辆弹窗
|
||||||
|
*/
|
||||||
|
showCarPopup() {
|
||||||
|
this.carFormData = this.ticketInfo.carInfo
|
||||||
|
if (this.carFormData.insuranceExpiryDate) {
|
||||||
|
this.carFormData.insuranceExpiryDate = formatDate(this.carFormData.insuranceExpiryDate)
|
||||||
|
}
|
||||||
|
if (this.carFormData.nextInspectionDate) {
|
||||||
|
this.carFormData.nextInspectionDate = formatDate(this.carFormData.nextInspectionDate)
|
||||||
|
}
|
||||||
|
this.$refs.carPopup.open()
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* @param {Object} type获取时间
|
||||||
|
*/
|
||||||
|
getDate(type) {
|
||||||
|
const date = new Date();
|
||||||
|
let year = date.getFullYear();
|
||||||
|
let month = date.getMonth() + 1;
|
||||||
|
let day = date.getDate();
|
||||||
|
|
||||||
|
if (type === 'start') {
|
||||||
|
year = year - 10;
|
||||||
|
} else if (type === 'end') {
|
||||||
|
year = year + 10;
|
||||||
|
}
|
||||||
|
month = month > 9 ? month : '0' + month;
|
||||||
|
day = day > 9 ? day : '0' + day;
|
||||||
|
return `${year}-${month}-${day}`;
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 修改下次年检时间
|
||||||
|
* @param {Object} e
|
||||||
|
*/
|
||||||
|
bindnextInspectionDateChange(e) {
|
||||||
|
console.log('e', e);
|
||||||
|
this.carFormData.nextInspectionDate = e.detail.value
|
||||||
|
},
|
||||||
|
bindInsuranceExpiryDateChange(e) {
|
||||||
|
this.carFormData.insuranceExpiryDate = e.detail.value
|
||||||
|
},
|
||||||
|
submitCarForm() {
|
||||||
|
// 如果 nextInspectionDate 有值,并且格式是 yyyy-MM-dd,就补上时分秒
|
||||||
|
if (this.carFormData.nextInspectionDate) {
|
||||||
|
this.carFormData.nextInspectionDate = new Date(this.carFormData.nextInspectionDate).getTime()
|
||||||
|
}
|
||||||
|
// 如果 nextInspectionDate 有值,并且格式是 yyyy-MM-dd,就补上时分秒
|
||||||
|
if (this.carFormData.insuranceExpiryDate) {
|
||||||
|
this.carFormData.insuranceExpiryDate = new Date(this.carFormData.insuranceExpiryDate).getTime()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
request({
|
||||||
|
url: `/admin-api/base/carMain/update`,
|
||||||
|
method: 'PUT',
|
||||||
|
data: this.carFormData
|
||||||
|
})
|
||||||
|
|
||||||
|
this.$refs.carPopup.close()
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 监听输入框
|
* 监听输入框
|
||||||
*/
|
*/
|
||||||
@ -669,7 +808,11 @@
|
|||||||
prviewImage(imgList, index) {
|
prviewImage(imgList, index) {
|
||||||
let urls = []
|
let urls = []
|
||||||
imgList.forEach(i => {
|
imgList.forEach(i => {
|
||||||
|
if (!i.image.includes("http")) {
|
||||||
urls.push(this.imgUrlPrex + i.image)
|
urls.push(this.imgUrlPrex + i.image)
|
||||||
|
} else {
|
||||||
|
urls.push(i.image)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
uni.previewImage({
|
uni.previewImage({
|
||||||
urls: urls,
|
urls: urls,
|
||||||
@ -782,6 +925,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
afterRead(file) {
|
afterRead(file) {
|
||||||
|
console.log('文件', file);
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '正在上传中...',
|
title: '正在上传中...',
|
||||||
mask: true
|
mask: true
|
||||||
@ -1012,8 +1156,11 @@
|
|||||||
}
|
}
|
||||||
if (this.loginUser.roleCodes.includes("repair_staff")) {
|
if (this.loginUser.roleCodes.includes("repair_staff")) {
|
||||||
//维修工角色,可以提交配件申请
|
//维修工角色,可以提交配件申请
|
||||||
|
const has02 = this.ticketInfo.items.some(item => item.itemType === '02');
|
||||||
|
console.log('has02', has02);
|
||||||
this.content.push({
|
this.content.push({
|
||||||
text: '配件申请',
|
// text: '配件申请',
|
||||||
|
text: !has02 ? '是否申请配件' : '是否增加配件',
|
||||||
active: false,
|
active: false,
|
||||||
code: "apply"
|
code: "apply"
|
||||||
})
|
})
|
||||||
@ -1275,6 +1422,7 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
let resultObj = res.data
|
let resultObj = res.data
|
||||||
resultObj.statusStr = getOrderStatusText(res.data.ticketsStatus, res.data.isHandover)
|
resultObj.statusStr = getOrderStatusText(res.data.ticketsStatus, res.data.isHandover)
|
||||||
|
|
||||||
//注册日期
|
//注册日期
|
||||||
if (null != resultObj.carInfo.carRegisterDate) {
|
if (null != resultObj.carInfo.carRegisterDate) {
|
||||||
resultObj.carRegisterDate = formatDate(resultObj.carInfo.carRegisterDate)
|
resultObj.carRegisterDate = formatDate(resultObj.carInfo.carRegisterDate)
|
||||||
@ -1379,8 +1527,17 @@
|
|||||||
}
|
}
|
||||||
if (resultObj.carInfo.carLicenseImg) {
|
if (resultObj.carInfo.carLicenseImg) {
|
||||||
resultObj.carInfo.carLicenseImg.split(",").map((item) => {
|
resultObj.carInfo.carLicenseImg.split(",").map((item) => {
|
||||||
|
let url = item.includes("http") ? item : this.imgUrlPrex + item;
|
||||||
this.carImgList.push({
|
this.carImgList.push({
|
||||||
image: item
|
image: url
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
if (resultObj.carInfo.archivesPhoto) {
|
||||||
|
resultObj.carInfo.archivesPhoto.split(",").map((item) => {
|
||||||
|
this.cararchivesPhotos.push({
|
||||||
|
url: this.$baseImageUrl + item
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -1457,7 +1614,7 @@
|
|||||||
url: '/pages-order/reviewList/reviewList?formData=' + encodeURIComponent(JSON.stringify(
|
url: '/pages-order/reviewList/reviewList?formData=' + encodeURIComponent(JSON.stringify(
|
||||||
formData))
|
formData))
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -2309,4 +2466,8 @@
|
|||||||
background-color: #efefef;
|
background-color: #efefef;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.car-popup-out {
|
||||||
|
padding: 30rpx 40rpx;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -74,6 +74,10 @@
|
|||||||
<!-- 普通弹窗---拍照上传 -->
|
<!-- 普通弹窗---拍照上传 -->
|
||||||
<uni-popup ref="popup" background-color="#fff">
|
<uni-popup ref="popup" background-color="#fff">
|
||||||
<view class="popup-content" style="padding: 15px;">
|
<view class="popup-content" style="padding: 15px;">
|
||||||
|
<view class="dl-avatar-box">
|
||||||
|
<text>备注</text>
|
||||||
|
<uni-easyinput v-model="remark" placeholder="请输入备注"></uni-easyinput>
|
||||||
|
</view>
|
||||||
<view class="dl-avatar-box">
|
<view class="dl-avatar-box">
|
||||||
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
|
<uni-file-picker :value="fileList" :sizeType="sizeType" @select="afterRead" @delete="deleteFile"
|
||||||
limit="9" title="请上传配件申请单照片(最多选择9张图片)"></uni-file-picker>
|
limit="9" title="请上传配件申请单照片(最多选择9张图片)"></uni-file-picker>
|
||||||
@ -96,7 +100,9 @@
|
|||||||
} from "@/utils/auth";
|
} from "@/utils/auth";
|
||||||
import upload from "@/utils/upload";
|
import upload from "@/utils/upload";
|
||||||
import config from "@/config";
|
import config from "@/config";
|
||||||
import {data} from "uview-ui/libs/mixin/mixin";
|
import {
|
||||||
|
data
|
||||||
|
} from "uview-ui/libs/mixin/mixin";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
VNavigationBar
|
VNavigationBar
|
||||||
@ -124,6 +130,8 @@
|
|||||||
isTriggered: false,
|
isTriggered: false,
|
||||||
userInfo: null,
|
userInfo: null,
|
||||||
fileList: [],
|
fileList: [],
|
||||||
|
//备注
|
||||||
|
remark: undefined,
|
||||||
sizeType: ['compressed'],
|
sizeType: ['compressed'],
|
||||||
twId: null
|
twId: null
|
||||||
};
|
};
|
||||||
@ -396,6 +404,9 @@
|
|||||||
return item.path.replace(config.baseImageUrl, '')
|
return item.path.replace(config.baseImageUrl, '')
|
||||||
}).join(",")
|
}).join(",")
|
||||||
}
|
}
|
||||||
|
if (this.remark) {
|
||||||
|
dataObj.remark = this.remark
|
||||||
|
}
|
||||||
}
|
}
|
||||||
request({
|
request({
|
||||||
url: '/admin-api/repair/tw/update',
|
url: '/admin-api/repair/tw/update',
|
||||||
@ -608,6 +619,7 @@
|
|||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.listItem {
|
.listItem {
|
||||||
padding: 30rpx 0;
|
padding: 30rpx 0;
|
||||||
border-bottom: 2rpx solid #DDDDDD;
|
border-bottom: 2rpx solid #DDDDDD;
|
||||||
|
|||||||
12
pages.json
12
pages.json
@ -81,6 +81,13 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": ""
|
"navigationBarTitleText": ""
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "pages/white/white",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subPackages": [{
|
"subPackages": [{
|
||||||
@ -349,8 +356,7 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "详情页"
|
"navigationBarTitleText": "详情页"
|
||||||
}
|
}
|
||||||
}
|
}]
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"root": "pages-business",
|
"root": "pages-business",
|
||||||
@ -368,7 +374,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path" : "white/white",
|
"path" : "statistics/statistics",
|
||||||
"style" :
|
"style" :
|
||||||
{
|
{
|
||||||
"navigationBarTitleText" : ""
|
"navigationBarTitleText" : ""
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
## 2.0.10(2024-06-07)
|
## 2.0.12(2025-08-26)
|
||||||
- 优化 uni-app x 中,size 属性的类型
|
- 优化 uni-app x 下 size 类型问题
|
||||||
|
## 2.0.11(2025-08-18)
|
||||||
|
- 修复 图标点击事件返回
|
||||||
## 2.0.9(2024-01-12)
|
## 2.0.9(2024-01-12)
|
||||||
fix: 修复图标大小默认值错误的问题
|
fix: 修复图标大小默认值错误的问题
|
||||||
## 2.0.8(2023-12-14)
|
## 2.0.8(2023-12-14)
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
* Icons 图标
|
* Icons 图标
|
||||||
* @description 用于展示 icon 图标
|
* @description 用于展示 icon 图标
|
||||||
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
|
* @tutorial https://ext.dcloud.net.cn/plugin?id=28
|
||||||
* @property {Number,String} size 图标大小
|
* @property {Number} size 图标大小
|
||||||
* @property {String} type 图标图案,参考示例
|
* @property {String} type 图标图案,参考示例
|
||||||
* @property {String} color 图标颜色
|
* @property {String} color 图标颜色
|
||||||
* @property {String} customPrefix 自定义图标
|
* @property {String} customPrefix 自定义图标
|
||||||
|
|||||||
@ -85,8 +85,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
_onClick() {
|
_onClick(e) {
|
||||||
this.$emit('click')
|
this.$emit('click', e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "uni-icons",
|
"id": "uni-icons",
|
||||||
"displayName": "uni-icons 图标",
|
"displayName": "uni-icons 图标",
|
||||||
"version": "2.0.10",
|
"version": "2.0.12",
|
||||||
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
"description": "图标组件,用于展示移动端常见的图标,可自定义颜色、大小。",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uni-ui",
|
"uni-ui",
|
||||||
@ -11,7 +11,9 @@
|
|||||||
],
|
],
|
||||||
"repository": "https://github.com/dcloudio/uni-ui",
|
"repository": "https://github.com/dcloudio/uni-ui",
|
||||||
"engines": {
|
"engines": {
|
||||||
"HBuilderX": "^3.2.14"
|
"HBuilderX": "^3.2.14",
|
||||||
|
"uni-app": "^4.08",
|
||||||
|
"uni-app-x": "^4.61"
|
||||||
},
|
},
|
||||||
"directories": {
|
"directories": {
|
||||||
"example": "../../temps/example_temps"
|
"example": "../../temps/example_temps"
|
||||||
@ -34,54 +36,74 @@
|
|||||||
"permissions": "无"
|
"permissions": "无"
|
||||||
},
|
},
|
||||||
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
|
||||||
"type": "component-vue"
|
"type": "component-vue",
|
||||||
|
"darkmode": "x",
|
||||||
|
"i18n": "x",
|
||||||
|
"widescreen": "x"
|
||||||
},
|
},
|
||||||
"uni_modules": {
|
"uni_modules": {
|
||||||
"dependencies": ["uni-scss"],
|
"dependencies": [
|
||||||
|
"uni-scss"
|
||||||
|
],
|
||||||
"encrypt": [],
|
"encrypt": [],
|
||||||
"platforms": {
|
"platforms": {
|
||||||
"cloud": {
|
"cloud": {
|
||||||
"tcb": "y",
|
"tcb": "x",
|
||||||
"aliyun": "y",
|
"aliyun": "x",
|
||||||
"alipay": "n"
|
"alipay": "x"
|
||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"App": {
|
"uni-app": {
|
||||||
"app-vue": "y",
|
"vue": {
|
||||||
"app-nvue": "y",
|
"vue2": "√",
|
||||||
"app-uvue": "y"
|
"vue3": "√"
|
||||||
},
|
},
|
||||||
"H5-mobile": {
|
"web": {
|
||||||
"Safari": "y",
|
"safari": "√",
|
||||||
"Android Browser": "y",
|
"chrome": "√"
|
||||||
"微信浏览器(Android)": "y",
|
|
||||||
"QQ浏览器(Android)": "y"
|
|
||||||
},
|
},
|
||||||
"H5-pc": {
|
"app": {
|
||||||
"Chrome": "y",
|
"vue": "√",
|
||||||
"IE": "y",
|
"nvue": "-",
|
||||||
"Edge": "y",
|
"android": {
|
||||||
"Firefox": "y",
|
"extVersion": "",
|
||||||
"Safari": "y"
|
"minVersion": "29"
|
||||||
},
|
},
|
||||||
"小程序": {
|
"ios": "√",
|
||||||
"微信": "y",
|
"harmony": "√"
|
||||||
"阿里": "y",
|
|
||||||
"百度": "y",
|
|
||||||
"字节跳动": "y",
|
|
||||||
"QQ": "y",
|
|
||||||
"钉钉": "y",
|
|
||||||
"快手": "y",
|
|
||||||
"飞书": "y",
|
|
||||||
"京东": "y"
|
|
||||||
},
|
},
|
||||||
"快应用": {
|
"mp": {
|
||||||
"华为": "y",
|
"weixin": "√",
|
||||||
"联盟": "y"
|
"alipay": "√",
|
||||||
|
"toutiao": "√",
|
||||||
|
"baidu": "√",
|
||||||
|
"kuaishou": "-",
|
||||||
|
"jd": "-",
|
||||||
|
"harmony": "-",
|
||||||
|
"qq": "√",
|
||||||
|
"lark": "-"
|
||||||
},
|
},
|
||||||
"Vue": {
|
"quickapp": {
|
||||||
"vue2": "y",
|
"huawei": "√",
|
||||||
"vue3": "y"
|
"union": "√"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"uni-app-x": {
|
||||||
|
"web": {
|
||||||
|
"safari": "√",
|
||||||
|
"chrome": "√"
|
||||||
|
},
|
||||||
|
"app": {
|
||||||
|
"android": {
|
||||||
|
"extVersion": "",
|
||||||
|
"minVersion": "29"
|
||||||
|
},
|
||||||
|
"ios": "√",
|
||||||
|
"harmony": "√"
|
||||||
|
},
|
||||||
|
"mp": {
|
||||||
|
"weixin": "√"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -333,6 +333,9 @@ export function builderOrder(order) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function formatDate(timestamp) {
|
export function formatDate(timestamp) {
|
||||||
|
if (!timestamp) {
|
||||||
|
return ''
|
||||||
|
}
|
||||||
// 将时间戳转换为Date对象
|
// 将时间戳转换为Date对象
|
||||||
const date = new Date(timestamp);
|
const date = new Date(timestamp);
|
||||||
// 获取年月日时分秒
|
// 获取年月日时分秒
|
||||||
@ -504,3 +507,95 @@ export function formatDateCus(date) {
|
|||||||
const d = date.getDate().toString().padStart(2, '0')
|
const d = date.getDate().toString().padStart(2, '0')
|
||||||
return `${y}-${m}-${d}`
|
return `${y}-${m}-${d}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将扁平数组转换为树形结构,并支持按 sort 字段排序
|
||||||
|
* @param {Array} data 源数据
|
||||||
|
* @param {String} id 节点ID字段名,默认为 'id'
|
||||||
|
* @param {String} parentId 父节点ID字段名,默认为 'parentId'
|
||||||
|
* @param {String} children 子节点字段名,默认为 'children'
|
||||||
|
* @param {Number|String} rootId 根节点ID值,默认为最小的parentId或0
|
||||||
|
* @param {String} sortKey 排序字段名,默认为 'sort'
|
||||||
|
* @returns {Array} 树形结构数据
|
||||||
|
*/
|
||||||
|
export function handleTree(data, id, parentId, children, rootId, sortKey) {
|
||||||
|
// 参数默认值处理
|
||||||
|
id = id || 'id';
|
||||||
|
parentId = parentId || 'parentId';
|
||||||
|
children = children || 'children';
|
||||||
|
sortKey = sortKey || 'sort';
|
||||||
|
|
||||||
|
// 自动计算根节点ID(取最小的parentId,若无则用0)
|
||||||
|
rootId = rootId || Math.min(...data.map(item => item[parentId])) || 0;
|
||||||
|
|
||||||
|
// 深拷贝源数据以避免污染原数组
|
||||||
|
const cloneData = JSON.parse(JSON.stringify(data));
|
||||||
|
|
||||||
|
// 先对所有数据进行排序(确保父节点在前)
|
||||||
|
cloneData.sort((a, b) => {
|
||||||
|
const aSort = a[sortKey] ?? 0; // 使用空值合并运算符处理undefined
|
||||||
|
const bSort = b[sortKey] ?? 0;
|
||||||
|
return aSort - bSort; // 升序排序
|
||||||
|
});
|
||||||
|
|
||||||
|
// 构建哈希表加速查找
|
||||||
|
const nodeMap = {};
|
||||||
|
cloneData.forEach(item => {
|
||||||
|
nodeMap[item[id]] = item;
|
||||||
|
item[children] = []; // 初始化children数组
|
||||||
|
});
|
||||||
|
|
||||||
|
// 构建树形结构
|
||||||
|
const tree = [];
|
||||||
|
cloneData.forEach(item => {
|
||||||
|
if (item[parentId] === rootId) {
|
||||||
|
// 根节点直接加入结果
|
||||||
|
tree.push(item);
|
||||||
|
} else {
|
||||||
|
// 非根节点找到父节点并插入
|
||||||
|
const parent = nodeMap[item[parentId]];
|
||||||
|
parent?.[children]?.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 递归排序所有子节点
|
||||||
|
const sortChildren = (nodes) => {
|
||||||
|
nodes.forEach(node => {
|
||||||
|
if (node[children]?.length) {
|
||||||
|
node[children].sort((a, b) => {
|
||||||
|
const aSort = a[sortKey] ?? 0;
|
||||||
|
const bSort = b[sortKey] ?? 0;
|
||||||
|
return aSort - bSort;
|
||||||
|
});
|
||||||
|
sortChildren(node[children]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
sortChildren(tree);
|
||||||
|
|
||||||
|
return tree.length ? tree : data; // 空树时返回原数据
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将树形结构数据转成 uniapp multiSelector picker 可用的二维数组
|
||||||
|
* @param {Array} tree 树形结构数据
|
||||||
|
* @param {String} labelKey 节点显示字段,默认为 'name'
|
||||||
|
* @param {String} childrenKey 子节点字段,默认为 'children'
|
||||||
|
* @returns {Array} picker二维数组,例如 [[一级], [二级], [三级]...]
|
||||||
|
*/
|
||||||
|
export function toPickerData(tree, labelKey = 'name', childrenKey = 'children') {
|
||||||
|
const result = []
|
||||||
|
|
||||||
|
function buildColumns(nodes, level = 0) {
|
||||||
|
if (!nodes || !nodes.length) return
|
||||||
|
// 当前层级的所有 name
|
||||||
|
result[level] = nodes.map(n => n[labelKey])
|
||||||
|
// 默认取第一个子节点继续递归
|
||||||
|
if (nodes[0][childrenKey] && nodes[0][childrenKey].length) {
|
||||||
|
buildColumns(nodes[0][childrenKey], level + 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buildColumns(tree, 0)
|
||||||
|
return result
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user