From 20ae88664bdbb4ae21ec3b13338d906ff1b7431a Mon Sep 17 00:00:00 2001 From: 819527061@qq.com <123456> Date: 星期五, 28 六月 2024 18:02:25 +0800 Subject: [PATCH] 解决H5重置密码报错问题 --- pages/public-page/selectSpecifications/selectSpecifications.vue | 93 +++++++++++++++++++++++++++++++++------------- 1 files changed, 66 insertions(+), 27 deletions(-) diff --git a/pages/public-page/selectSpecifications/selectSpecifications.vue b/pages/public-page/selectSpecifications/selectSpecifications.vue index 9d94f7b..cefbd16 100644 --- a/pages/public-page/selectSpecifications/selectSpecifications.vue +++ b/pages/public-page/selectSpecifications/selectSpecifications.vue @@ -7,9 +7,10 @@ :errorType="'border-bottom'" :model="dataForm" ref="uForm"> - <u-form-item + <!-- <u-form-item borderBottom=true label="涓�绾у搧绫�" + v-if="!pageFlag" prop="firstClass" :borderBottom="false"> <u-cell-group> @@ -20,7 +21,7 @@ slot="right-icon" size="30"></u-icon></u-cell> </u-cell-group> - </u-form-item> + </u-form-item> --> <u-form-item borderBottom=true label="浜岀骇鍝佸悕" @@ -33,13 +34,14 @@ <u-icon name="arrow-right" slot="right-icon" size="30"></u-icon></u-cell> --> - <niceui-data-select-input + <!-- <niceui-data-select-input v-model="dataForm.secondClass" :localdata="secondClassActionsList" @change="change" :value="dataForm.secondClass" class="uni-px-5 uni-pb-5" - ></niceui-data-select-input> + ></niceui-data-select-input> --> + <uni-combox :candidates="secondClassActionsList" placeholder="璇烽�夋嫨浜岀骇鍝佸悕" v-model="dataForm.secondClass"></uni-combox> </u-cell-group> </u-form-item> <u-form-item @@ -178,7 +180,7 @@ // trigger: ['blur', 'change'] // }, 'penaltyUnitPrice':{ - required: true, + required: false, message: '璇烽�夋嫨鍊�', trigger: ['blur', 'change'] } @@ -238,7 +240,8 @@ this.unqualified = params.unqualified === "true" || false params.pageFlag ? this.pageFlag = false : this.pageFlag = true; this.showWeighCopyStorge = JSON.parse(JSON.stringify(uni.getStorageSync('showWeighCopyStorgeOther'))) - console.log(params,'paramsparamsparams'); + console.log(params, 'paramsparamsparams'); + if(params.type == 'edit'){ this.init(params) } @@ -249,21 +252,52 @@ uni.showLoading({ title: "鍔犺浇涓�" }) - this.$reqGet("getFirstCategoryName").then(res => { - if (res.code === 0) { - uni.hideLoading() - this.firstClassActionsList = res.data.filter(Boolean).map(v => { - return { - ...v, - name: v && v.firstCategoryName + // this.$reqGet("getFirstCategoryName").then(res => { + // if (res.code === 0) { + // uni.hideLoading() + // this.firstClassActionsList = res.data.filter(Boolean).map(v => { + // return { + // ...v, + // name: v && v.firstCategoryName + // } + // }) + // if(params.type !== 'edit') this.dataForm.firstClass = this.firstClassActionsList[0].firstCategoryName + // //濡傛灉鏄悎鏍肩殑闇�瑕佸洖鏄惧搧鍚嶈鏍� + // + + // } else { + // uni.hideLoading() + // this.$u.toast('鍔犺浇澶辫触') + // } + // // 鍥炴樉浜岀骇鍝佸悕 + this.$reqGet('getSecondCategoryName').then( + res => { + if (res.code === 0) { + uni.hideLoading(); + console.log(res.data,'result') + this.secondClassActionsList = res.data.map(v => { + return v.secondCategoryName + }) + // if(this.secondClassActionsList .length){ + // this.dataForm.secondClass = this.secondClassActionsList[0].value; + // } + // + // } + if(params.actionObj){ + let {breed,spec} = JSON.parse(params.actionObj); + this.secondClassActionsList.unshift(breed) + this.dataForm.specifications= spec;; + this.dataForm.secondClass= breed; + this.dataForm.firstClass= JSON.parse(params.actionObj).firstClass || ''; + console.log(this.secondClassActionsList,'secondClass') } - }) - if(params.type !== 'edit') this.dataForm.firstClass = this.firstClassActionsList[0].firstCategoryName - } else { - uni.hideLoading() - this.$u.toast('鍔犺浇澶辫触') - } - }) + + } else { + uni.hideLoading() + this.$u.toast('鍔犺浇澶辫触') + } + }) + // }) }, init(params){ let arr = this.showWeighCopyStorge[params.index]; @@ -361,15 +395,15 @@ .specifications; let tempArr = this.showWeighCopyStorge[this.index].unqualifiedBreed.split(",") let tempWeightArr = this.showWeighCopyStorge[this.index].unqualifiedWeights.split(",") - let noPinArr =this.showWeighCopyStorge[this.index].unqualifiedType.split(",") + // let noPinArr =this.showWeighCopyStorge[this.index].unqualifiedType.split(",") let noPriceArr = this.showWeighCopyStorge[this.index].penaltyUnitPrice.split(","); tempArr[this.params.indexTo] = str; tempWeightArr[this.params.indexTo] = this.dataForm.unqualifiedWeight; // noPinArr[this.params.indexTo] = this.dataForm.unqualifiedType; - noPriceArr[this.params.indexTo] = this.dataForm.penaltyUnitPrice; + noPriceArr[this.params.indexTo] = this.dataForm.penaltyUnitPrice || '0'; this.showWeighCopyStorge[this.index].unqualifiedBreed = tempArr.join(','); this.showWeighCopyStorge[this.index].unqualifiedWeights = tempWeightArr.join(','); - this.showWeighCopyStorge[this.index].unqualifiedType = noPinArr.join(','); + // this.showWeighCopyStorge[this.index].unqualifiedType = noPinArr.join(','); this.showWeighCopyStorge[this.index].penaltyUnitPrice = noPriceArr.join(','); // this.showWeighCopyStorge[this.index].breed = this.dataForm.secondClass // this.showWeighCopyStorge[this.index].spec = this.dataForm.specifications @@ -417,7 +451,7 @@ //娣诲姞涓嶅悎鏍煎崟浠� let noPrice; if(this.showWeighCopyStorge[this.index].penaltyUnitPrice){ - noPrice = this.showWeighCopyStorge[this.index].penaltyUnitPrice.split(",").filter(Boolean) + noPrice = this.showWeighCopyStorge[this.index].penaltyUnitPrice.split(","); }else{ noPrice = [] } @@ -425,7 +459,7 @@ tempWeightArr.push(this.dataForm.unqualifiedWeight); tempArr.push(str); // noPin.push(this.dataForm.unqualifiedType) - noPrice.push(this.dataForm.penaltyUnitPrice) + noPrice.push(this.dataForm.penaltyUnitPrice ? this.dataForm.penaltyUnitPrice : '0') this.showWeighCopyStorge[this.index].unqualifiedBreed = tempArr.join(',') this.showWeighCopyStorge[this.index].unqualifiedWeights = tempWeightArr.join(',') // this.showWeighCopyStorge[this.index].unqualifiedType = noPin.join(',') @@ -460,7 +494,7 @@ uni.navigateBack({ url: `/pages/driver-page/driver-index/bill-of-lading-details/weighDetail/weighDetail?dataForm=${JSON.stringify(this.dataForm)}&orderPlanId=${this.takeCoalId}&index=${this.index}&havedSubmit=${true}` }) - uni.$emit("handClick",{data:this.dataForm,tempArr:this.showWeighCopyStorge[this.index].tempArr,index:this.index}); + uni.$emit("handClick",{data:this.dataForm,tempArr:this.showWeighCopyStorge[this.index].tempArr,index:this.index,pageFlag:this.pageFlag}); }).catch(errors => { console.log(errors,'errors') uni.$u.toast('鏍¢獙澶辫触') @@ -476,7 +510,7 @@ value = parseFloat(value); value = value + ""; // 鍙樺洖涓哄瓧绗︿覆 }else{ - value = value.replace(/^(-)*(\d+)\.(\d\d).*$/,"$1$2.$3"); + value = value.replace(/^(-)*(\d+)\.(\d\d\d\d).*$/,"$1$2.$3"); } // 濡傛灉娌℃湁灏忔暟鐐癸紝棣栦綅涓嶈兘涓虹被浼间簬 01銆�02鐨勫�� this.$nextTick(()=>{ @@ -498,6 +532,10 @@ margin: 10px; position: relative; } + /deep/ .uni-combox { + z-index: 99999!important + } + .slide-fade-enter-active { transition: all 0.3s ease-out; @@ -527,4 +565,5 @@ } } } + </style> \ No newline at end of file -- Gitblit v1.9.1