diff --git a/src/components/createCom/XhFiles.vue b/src/components/createCom/XhFiles.vue index 0e65fc504b3abc6f0490730aa8471fabc8cd9474..024d9b342f6df628ab79e4e81114f13987c0a48c 100644 --- a/src/components/createCom/XhFiles.vue +++ b/src/components/createCom/XhFiles.vue @@ -28,13 +28,8 @@ </view> </view> <slot></slot> - <!-- <view class="img-list"> - <u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image> - </view> --> </view> - <!-- <u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet> --> </view> - <!-- <take-photo v-if="takeStatus" @close="closeTake" :upload="false" :currentItem="currentItemDate"></take-photo> --> </view> </template> @@ -98,7 +93,6 @@ export default { .map((img) => { return { src: img ? img : '' } }) - this.setValue() } }, methods: { @@ -120,102 +114,7 @@ export default { delFile(index) { this.imgList.splice(index, 1) this.setValue() - }, - /* - selectUpload(){ - if (this.imgList.length === 10) { - return this.$refs.uToast.show({ - title: '图片已超出最大数é‡', - type: 'error', - }) - } - // 弹窗展示 - this.maskShow = true - }, - uploadSelect(index) { - if (index === 0) { - this.uploadFile('photo') - } else { - this.uploadFile() - } - }, - async uploadFile(type){ - const self = this - if(type&&type==='photo'){ - // 直接打开相册 - let options = { - sourceType:['album'],//['album', 'camera'] - count: 3, - sizeType: ['compressed'] - } - const value = await this.chooseImg(options) - self.setTmpValue(value) - //await this.chooseImage('qiniu',config) - //self.setValue() - return - } - // 使用æ‹ç…§å·¥å…·æ‹æ‘„ - this.photograph() - this.getWatermark() - }, - closeTake(val) { - if(val && val.length > 0){ - // val.forEach(item=>{ - // this.imgList.push(item) - // }) - // const files = val.map(v => { - // return { path: v.path } - // }) - const files = val.map(v => v.path) - this.uploadTakeImg(files) - // this.setValue() - } - this.takeStatus = false - }, - async uploadTakeImg(files) { - const value = await this.saveToTask(files) - this.setTmpValue(value) - // const options = { - // files:files, // å¿…å¡« 临时文件路径 æ ¼å¼: [{path: "图片地å€"}] - // load: false, //(默认 true è¯´æ˜Žï¼šæœ¬æŽ¥å£æ˜¯å¦æç¤ºåŠ è½½åŠ¨ç”»ï¼‰ - // maxSize: 300000, //(默认 æ— è¯´æ˜Žï¼šä¸Šä¼ çš„æ–‡ä»¶æœ€å¤§å—节数é™åˆ¶ï¼Œé»˜è®¤ä¸é™åˆ¶ï¼‰ - // onEachUpdate: res => { - // const value = [uploader.qiniuTokenObj.visitPrefix + res.url] - // this.valueChange(value) - // }, - // Update: res => { - // } - // } - // uploader.qnFileUpload(options) - }, - photograph(){// èŽ·å–æ‹ç…§è§„èŒƒæŽ¥å£ - let self = this - let param = {"partnerCompanyId":self.partnerCompanyId, - "categoryId":self.categoryId, - "brandId":self.brandId, - "fieldName":self.item.fieldsName} - this.$u.api.orderStandardItem(param).then((res)=>{ - if (res.code == 200 && res.data.length>0) { - self.currentItemDate = res.data[0] - }else{ - console.log("获å–完工项的æ‹ç…§æ ‡å‡†å¼‚常",res.data.message) - } - self.takeStatus = true - }) - }, - getWatermark(){ - if(getApp().globalData.photo.waterSetting){ - return - } - var data={partnerCompanyId:this.partnerCompanyId} - this.$u.api.getWatermark(data).then((res) => { - if (res.code == 200) { - getApp().globalData.photo.waterSetting = res.data - } else { - console.log("èŽ·å–æ°´å°å¤‡æ³¨å¼‚常",res.data.message) - } - }); - }*/ + } }, } </script> @@ -263,17 +162,4 @@ export default { transform: rotate(90deg); } } -// .list { -// display: flex; - -// .txt { -// color: #666; -// padding: 10rpx; - -// &.active { -// background-color: red; -// color: #fff; -// } -// } -// } </style> diff --git a/src/pages/order/complete.vue b/src/pages/order/complete.vue index 6159d06a8e49df7aff48e5da58624bdd55c37e84..fbb76d0c3f44858329a88372ed742e544671dd4f 100644 --- a/src/pages/order/complete.vue +++ b/src/pages/order/complete.vue @@ -39,6 +39,7 @@ style="height: 100%" scroll-y scroll-with-animation + scroll-anchoring class="right-box" @scroll="rightScroll" :scroll-into-view="itemId" @@ -97,7 +98,7 @@ > </xh-input> <xh-multi-input - v-else-if="item.formType === 'multiinput'" + v-if="item.formType === 'multiinput'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -107,7 +108,7 @@ > </xh-multi-input> <xh-radio - v-else-if="item.formType === 'radio'" + v-if="item.formType === 'radio'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -117,7 +118,7 @@ > </xh-radio> <xh-checkbox - v-else-if="item.formType === 'checkbox'" + v-if="item.formType === 'checkbox'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -127,7 +128,7 @@ > </xh-checkbox> <xh-select - v-else-if="item.formType === 'select'" + v-if="item.formType === 'select'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -137,7 +138,7 @@ > </xh-select> <xh-specifications - v-else-if="item.formType === 'select-new-page'" + v-if="item.formType === 'select-new-page'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -146,7 +147,7 @@ @value-change="fieldValueChange" > </xh-specifications> - <view v-else-if="item.formType === 'file'"> + <view v-if="item.formType === 'file'"> <xh-files :ref="`fileChild${groupIndex}${itemIndex}`" :groupIndex="groupIndex" @@ -180,7 +181,7 @@ </view> <xh-location - v-else-if="item.formType === 'location'" + v-if="item.formType === 'location'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -190,7 +191,7 @@ > </xh-location> <xh-scan - v-else-if="item.formType === 'scan'" + v-if="item.formType === 'scan'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -200,7 +201,7 @@ > </xh-scan> <xh-service-measure - v-else-if="item.formType === 'servicemeasure'" + v-if="item.formType === 'servicemeasure'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -214,7 +215,7 @@ > </xh-service-measure> <xh-time - v-else-if="item.formType === 'time'" + v-if="item.formType === 'time'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -224,7 +225,7 @@ > </xh-time> <xh-service-more - v-else-if="item.formType === 'form'" + v-if="item.formType === 'form'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -235,7 +236,7 @@ > </xh-service-more> <xh-label - v-else-if="item.formType === 'label'" + v-if="item.formType === 'label'" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" @@ -244,7 +245,7 @@ </xh-label> <xh-parts ref="fileChildParts" - v-else-if="item.formType === 'parts'" + v-if="item.formType === 'parts'" :categoryId="categoryId" :brandId="brandId" :order-id="orderId" @@ -332,13 +333,11 @@ import XhLocation from '@/components/createCom/XhLocation.vue' import XhScan from '@/components/createCom/XhScan.vue' import XhTime from '@/components/createCom/XhTime.vue' import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue' -import XhServiceMore from '../../components/createCom/XhServiceMore' -import XhLabel from '../../components/createCom/XhLabel' +import XhServiceMore from '@/components/createCom/XhServiceMore' +import XhLabel from '@/components/createCom/XhLabel' import XhParts from '@/components/createCom/XhParts' import takePhoto from '@/components/take/index.vue' import baseFile from '@/components/upload/index' -import Detail from '@/components/order/detail.vue' -import returnPartsVue from '../parts/returnParts.vue' // 表å•类型map const formType = new Map([ @@ -468,9 +467,7 @@ export default { arr: [], scrollRightTop: 0, // å³è¾¹æ ç›®scroll-view的滚动æ¡é«˜åº¦ timer: null, // 定时器 - form: { - // ä¸€ç»´è¡¨å• - }, + form: {}, submitBtnStatus: false, completeCheck: { status: false, @@ -517,13 +514,9 @@ export default { XhServiceMore, XhLabel, XhParts, - Detail, 'take-photo': takePhoto, }, mixins: [baseFile], - created() { - // console.log(allComponents,'allComponents') - }, onLoad(option) { getApp().trackPage('订å•完工信æ¯é¡µ') if (option) { @@ -539,12 +532,6 @@ export default { this.auditResults = option?.auditResults ? option?.auditResults.split(',') : [] - // this.showTab =item.partnerCompanyName == '挚达充电桩' - } else { - this.orderId = 11880091 - this.categoryId = 1100000214 - this.orderServiceType = '安装' - this.inGuaranteePeriod = 'Y' } this.getCompleteData() }, @@ -639,8 +626,9 @@ export default { }, initData(res) { this.form = res.data.value || {} - this.initFormData() - const list = res.data.config.sort((a, b) => a.order - b.order) + this.loadOrderDetail() + const data = Object.create(res.data.config, {}) + const list = data.sort((a, b) => a.order - b.order) if (this.readOnly) this.tabIndex = 0 list.forEach((item, index) => { if (this.maintainStep === item.panelFieldsName && !this.readOnly) { @@ -689,13 +677,10 @@ export default { } this.checkCompleteError(list) } else { - this.list = list + this.list = Object.freeze(list) } uni.hideLoading() }, - initFormData() { - this.loadOrderDetail() - }, loadOrderDetail() { if ( !this.$u.test.isEmpty(this.form) && @@ -764,7 +749,7 @@ export default { panelName: '异常处ç†', items: result, } - this.list = list + this.list = Object.freeze(list) this.tabIndex = index }, @@ -1337,7 +1322,7 @@ export default { return } } - }, 10) + }, 100) }, handleTouchstart() { // 防æ¢è¾“å…¥å…‰æ ‡æ»šåŠ¨å‡ºçŽ°é”™ä¹± diff --git a/src/pages/photo/list.vue b/src/pages/photo/list.vue index 85fb26e1403a1a974d64a63ceefdb25ac003451a..72aaa8b7d6789c62ba3ae8266fd58c2626b05ee9 100644 --- a/src/pages/photo/list.vue +++ b/src/pages/photo/list.vue @@ -23,7 +23,7 @@ <!-- <text class="rightContent u-m-t-14 u-m-l-30 u-p-b-30">{{item.describe}}</text> --> </view> <view class="rightImageView" v-if="item.orderImages && item.orderImages.length > 0"> - <u-image class="rightImage" v-for="(image, index) in item.orderImages" :src="image + '?imageView2/1/w/100/h/100/q/75'" + <u-image class="rightImage" v-for="(image, index) in item.orderImages" :src="image" :key="index" @tap.stop="handleClickImage(item, index)" width="116" height="116"> <view slot="error" style="font-size: 24rpx;">ä¸Šä¼ ä¸</view> </u-image>