Commit da0f3701 authored by Facius's avatar Facius

Merge branch 'dev-1.5.4' of https://git.banshouhui.com/lijundan/self-support into dev-1.5.4

parents 7f8f7c59 41f1f5a8
......@@ -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>
......@@ -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() {
// 防止输入光标滚动出现错乱
......
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment