优化报修 小程序 上的部分bug

This commit is contained in:
java110 2022-06-15 11:09:12 +08:00
parent 9b849089e0
commit 0645e77bce
2 changed files with 165 additions and 138 deletions

View File

@ -1,9 +1,21 @@
<template>
<view class="select-single-resource" v-if="showModel">
<view class="cu-modal bottom-modal" :class="showModel?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white ">
<view class="action">
<text class="cuIcon-title text-orange "></text>{{productInfo.prodName}}
</view>
<view class="action">
</view>
</view>
<scroll-view scroll-y style="height: 700upx;">
<block>
<view class="select-single-resource">
<view>
<view class="cu-form-group margin-top">
<view class="title">商品类型</view>
<picker :value="goodsTypeIndex" :range="goodsTypeCloums" :range-key="'name'" @change="goodsParentTypeChange">
<picker :value="goodsTypeIndex" :range="goodsTypeCloums" :range-key="'name'"
@change="goodsParentTypeChange">
<view class="picker">
{{goodsTypeCloums[goodsTypeIndex].name}}
</view>
@ -22,7 +34,8 @@
<view v-else>
<view class="cu-form-group margin-top">
<view class="title">二级分类</view>
<picker :value="goodsSonTypeIndex" :range="goodsSonTypeCloums" :range-key="'name'" @change="goodsTypeChange">
<picker :value="goodsSonTypeIndex" :range="goodsSonTypeCloums" :range-key="'name'"
@change="goodsTypeChange">
<view class="picker">
{{goodsSonTypeCloums[goodsSonTypeIndex].name}}
</view>
@ -30,7 +43,8 @@
</view>
<view class="cu-form-group margin-top" v-if="rstId!=''">
<view class="title">商品</view>
<picker :value="goodsIndex" :range="goodsCloums" :range-key="'resName'" @change="goodsChange">
<picker :value="goodsIndex" :range="goodsCloums" :range-key="'resName'"
@change="goodsChange">
<view class="picker">
{{goodsCloums[goodsIndex].resName}}
</view>
@ -39,11 +53,15 @@
<view v-if="goodsIndex!=0">
<view class="cu-form-group margin-top" v-show="feeFlag == '1001'">
<view class="title">单价</view>
<input type="number" v-model="singlePrice" :disabled="disabledPrice" placeholder="请输入单价"></input>
<input type="number" v-model="singlePrice" :disabled="disabledPrice"
placeholder="请输入单价"></input>
</view>
<view v-show="feeFlag == '1001'">
<view class="text-right text-grey" v-if="goods.outHighPrice == goods.outLowPrice">价格:{{goods.outLowPrice}}</view>
<view class="text-right text-grey" v-else>价格范围{{goods.outLowPrice}}-{{goods.outHighPrice}}</view>
<view class="text-right text-grey"
v-if="goods.outHighPrice == goods.outLowPrice">价格:{{goods.outLowPrice}}
</view>
<view class="text-right text-grey" v-else>
价格范围{{goods.outLowPrice}}-{{goods.outHighPrice}}</view>
</view>
<view class="cu-form-group margin-top">
<view class="title">规格</view>
@ -55,7 +73,8 @@
<view class="title">数量</view>
<view class="use-num-container">
<view class="dec" @tap="numDec">-</view>
<input class="use-num-input" v-model="useNumber" disabled="disabled" @input="goodsNumChange"></input>
<input class="use-num-input" v-model="useNumber" disabled="disabled"
@input="goodsNumChange"></input>
<view class="inc" @tap="numInc">+</view>
</view>
</view>
@ -67,6 +86,11 @@
</view>
</view>
</view>
</block>
</scroll-view>
</view>
</view>
</template>
<script>
@ -77,11 +101,12 @@
queryResourceStoreResName,
queryRepairInfo
} from '../../api/repair/repair.js'
import {getCurrentCommunity} from '../../api/community/community.js'
import {
getCurrentCommunity
} from '../../api/community/community.js'
export default {
components: {
},
components: {},
data() {
return {
showModel: false,
@ -119,17 +144,13 @@
}
},
watch: {
},
watch: {},
created() {
},
created() {},
computed: {
},
computed: {},
mounted() {
},
mounted() {},
methods: {
@ -227,7 +248,9 @@
return;
}
let _data = _json.data;
_that.goodsCloums = [{resName: '请选择商品'}]
_that.goodsCloums = [{
resName: '请选择商品'
}]
_that.goodsIndex = 0;
_that.goods = '';
_that.amount = '';
@ -241,7 +264,9 @@
// change
goodsParentTypeChange: function(e) {
//
this.goodsSonTypeCloums = [{name: '请选择商品类型'}];
this.goodsSonTypeCloums = [{
name: '请选择商品类型'
}];
this.goodsSonTypeIndex = 0;
this.rstId = '';
//
@ -377,16 +402,20 @@
width: 100%;
height: 100%;
}
.use-num-container {
display: flex;
flex-direction: row;
}
.use-num-input {
width: 100rpx;
text-align: center;
padding: 0;
}
.inc,.dec{
.inc,
.dec {
border: 1px solid #000;
border-radius: 50%;
width: 40rpx;

View File

@ -389,16 +389,14 @@
wx.chooseImage({
count: 4, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
sourceType: ['camera','album'], //
success: (res) => {
that.imgList.push(res.tempFilePaths[0]);
var tempFilePaths = res.tempFilePaths[0]
//#ifdef H5
TanslateImage.translate(tempFilePaths, (url) => {
that.photos.push(url);
})
//#endif
}
});
},
@ -407,15 +405,15 @@
wx.chooseImage({
count: 4, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
sourceType: ['camera','album'], //
success: (res) => {
that.beforeRepairImgList.push(res.tempFilePaths[0]);
var tempFilePaths = res.tempFilePaths[0]
//#ifdef H5
TanslateImage.translate(tempFilePaths, (url) => {
that.beforeRepairPhotos.push(url);
})
//#endif
}
});
},
@ -424,7 +422,7 @@
wx.chooseImage({
count: 4, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album'], //
sourceType: ['camera','album'], //
success: (res) => {
that.afterRepairImgList.push(res.tempFilePaths[0]);
var tempFilePaths = res.tempFilePaths[0]