bug修复

This commit is contained in:
bb_pan 2025-05-28 17:44:43 +08:00
parent 7984bf3a0a
commit 4e5ba7dc9c
7 changed files with 59 additions and 11 deletions

View File

@ -13,7 +13,7 @@
"type" : "uniCloud" "type" : "uniCloud"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

View File

@ -499,7 +499,7 @@ const fix = {
}, },
async fixCrew (data = {} , header = {}){ async fixCrew (data = {} , header = {}){
return await Http.get( return await Http.get(
HttpConfig.basePath, HttpConfig.systemPath,
HttpConfig.serviceUrl.fix.fixCrew, HttpConfig.serviceUrl.fix.fixCrew,
data, data,
header header

View File

@ -2,9 +2,13 @@
<view> <view>
<view class="form-area"> <view class="form-area">
<view class="upper-ipt"> <view class="upper-ipt">
<!-- <uni-easyinput style="margin-bottom: 15rpx;" v-model="carCode" placeholder="请输入车牌号"></uni-easyinput> -->
<uni-easyinput suffixIcon="search" v-model="codeVal" placeholder="请输入编码" @iconClick="searchCode"></uni-easyinput> <uni-easyinput suffixIcon="search" v-model="codeVal" placeholder="请输入编码" @iconClick="searchCode"></uni-easyinput>
</view> </view>
<view class="car-info" v-show="infoList.length != 0">
<h4>是否有车牌号</h4>
<u-switch v-model="isCarCode" size="22" @change="() => isCarCode ? carCode = '' : carCode = '无车牌'"></u-switch>
</view>
<uni-easyinput v-show="infoList.length != 0" style="margin-bottom: 15rpx;" v-model="carCode" placeholder="请输入车牌号" :disabled="!isCarCode" @blur="checkCarCode"></uni-easyinput>
<view <view
class="info-area" class="info-area"
v-for="(item, index) in infoList" v-for="(item, index) in infoList"
@ -51,6 +55,7 @@
export default { export default {
data() { data() {
return { return {
isCarCode: true,
carCode: '', carCode: '',
codeVal: '', codeVal: '',
typeId: '', typeId: '',
@ -63,6 +68,19 @@
} }
}, },
methods: { methods: {
//
checkCarCode () {
if (this.carCode) {
const reg = /^[\u4E00-\u9FA5]{1}[A-Z]{1}[A-Z0-9]{5,6}$/
if (!reg.test(this.carCode)) {
uni.showToast({
icon: 'none',
title: '车牌号格式不正确!'
})
this.carCode = this.$set(this, 'carCode', '')
}
}
},
searchCode () { searchCode () {
let that = this let that = this
that.infoList = [] that.infoList = []
@ -93,6 +111,13 @@
title: '机具类型不匹配!' title: '机具类型不匹配!'
}) })
} else { } else {
if (!that.carCode && that.isCarCode) {
uni.showToast({
icon: 'none',
title: '请输入车牌号!'
})
return
}
that.subList = { that.subList = {
parentId: that.parentId, parentId: that.parentId,
typeId: that.typeId, typeId: that.typeId,
@ -100,7 +125,7 @@
taskId: that.taskId, taskId: that.taskId,
maId: that.infoList[0].maId, maId: that.infoList[0].maId,
outNum: 1, outNum: 1,
// carCode: that.carCode, carCode: that.carCode,
companyId: uni.getStorageSync('userInfo').sysUser.companyId companyId: uni.getStorageSync('userInfo').sysUser.companyId
} }
console.log(that.subList); console.log(that.subList);
@ -140,6 +165,20 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.car-info{
margin-bottom: 15rpx;
display: flex;
align-items: center;
h4{
font-weight: normal;
color: #989898;
font-size: 14px;
width: 35%;
}
span{
font-size: 14px;
}
}
.form-area{ .form-area{
width: 90%; width: 90%;
margin: 40rpx auto; margin: 40rpx auto;

View File

@ -199,6 +199,7 @@
that.submitList.companyId = that.submitList.companyId =
that.submitList.backApplyDetails[0].companyId; that.submitList.backApplyDetails[0].companyId;
that.submitList.taskId = that.taskId; that.submitList.taskId = that.taskId;
this.submitList.agreementId = this.agreementId
console.log(that.submitList); console.log(that.submitList);
that.$api.exitMaterial that.$api.exitMaterial
.subExitMaterial(that.submitList) .subExitMaterial(that.submitList)

View File

@ -253,12 +253,12 @@ import form from '../../uni_modules/uview-ui/libs/config/props/form';
onShow() { onShow() {
let that = this let that = this
// //
that.$api.fix.fixCrew().then(res => { that.$api.fix.fixCrew({ roleIds: [133, 134] }).then(res => {
console.log(res); console.log('🚀 ~ 维修人员.fixCrew ~ res:', res)
if (res.data.code == 200) { if (res.data.code == 200) {
that.repairerRange = res.data.data.map((item) => { that.repairerRange = res.data.data.map((item) => {
return { return {
text: item['nickName'], text: item['userName'],
value: item['userId'] value: item['userId']
} }
}) })

View File

@ -150,6 +150,8 @@
}, },
methods: { methods: {
searchKeyword () { searchKeyword () {
this.pageNum = 1
this.pageSize = 10
this.fetchPreCrashList(this.preIpt) this.fetchPreCrashList(this.preIpt)
}, },
fetchPreCrashList (keyword) { fetchPreCrashList (keyword) {
@ -161,8 +163,12 @@
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {
that.pageTotal = res.data.total if (keyword) {
that.preCrashList = [...that.preCrashList, ...res.data.rows] that.preCrashList = res.data.rows
} else {
that.pageTotal = res.data.total
that.preCrashList = [...that.preCrashList, ...res.data.rows]
}
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
@ -197,7 +203,7 @@
}, },
onReachBottom() { onReachBottom() {
if (this.preCrashList.length >= this.pageTotal) return; if (this.preCrashList.length >= this.pageTotal) return;
this.pageNum++ this.pageSize += 10
this.fetchPreCrashList(this.preIpt) this.fetchPreCrashList(this.preIpt)
} }
} }

View File

@ -77,7 +77,9 @@
getListDetail (taskId) { getListDetail (taskId) {
let that = this let that = this
that.$api.serviceCenterExam.fetchCenterDetail({ that.$api.serviceCenterExam.fetchCenterDetail({
taskId taskId,
pageNum: 1,
pageSize: 99999
}).then(res => { }).then(res => {
console.log(res); console.log(res);
if (res.data.code == 200) { if (res.data.code == 200) {