Commit f104a484 authored by 李超鹏's avatar 李超鹏

type:update

scope: self
body: 完工项 工艺、材料功能
parent 9d53f76b
......@@ -78,7 +78,7 @@ let orderApiFun = function(vm){
* 获取师傅水印 or 默认水印
*/
let getWatermark = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token + '/photo/watermark', params);
/**
* 保存师傅水印
*/
......@@ -115,11 +115,16 @@ let orderApiFun = function(vm){
*/
let getMeasure= async (params = {}) => await vm.$u.get('wxh-worker-rest/rest/service/'+ vm.vuex_token+'/measure/queryMeasureItems', params);
/**
* 查询工单材信息
*/
let getOrderMaterial= async (orderId) => await vm.$u.get('/wxh-cloud-rest/rest/thirdparty/shzhida/material/' + orderId);
/**
* 保存售后记录
*/
let saveCompleteData = async (params = {},orderId) => await vm.$u.post(prefix+ vm.vuex_token+'/order/'+ orderId +'/maintain/saveMaintainInfoV2', params);
/**
* 保内工单完工
*/
......@@ -161,6 +166,7 @@ let orderApiFun = function(vm){
getSignDistance,
getCompleteConfigAndData,
getMeasure,
getOrderMaterial,
saveCompleteData,
inOrderFinish,
outOrderFinish,
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<view class="list u-flex u-row-between">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
<view class="u-m-r-20">{{item.fieldsTitle}}</view>
<view class="u-flex-1 location-name" @click="toMaterialPage">
<u-icon name="map" color="#2979ff" size="30"></u-icon>请选择
</view>
</view>
<!-- <view class="u-flex-1 location">{{valueTxt || '正在获取中...'}}</view> -->
</view>
</template>
<script>
import arrMixin from './arrMixin'
export default {
name: 'XhInput', // 新建 input
components: {},
mixins: [arrMixin],
props: {
placeholder: {
type: String,
default: '请输入'
},
orderId: {
type: String,
default: '请输入'
},
},
data() {
return {
maxlength: 140,
}
},
computed: {
mixingImage() {
return process.uniEnv.qn_base_url + 'mixing.png'
}
},
watch: {},
mounted() {},
methods: {
toMaterialPage(){
let self = this
uni.navigateTo({
url: 'pages/order/material?orderId='+this.orderId + '&fieldName='+ this.item.fieldsName,
// 接口调用成功的回调函数,即跳转到B页面 test.vue 后的回调函数
success: function(res) {
// 通过eventChannel向被打开页面传送数据
res.eventChannel.emit('showMaterialData', self.dataValue);
}
})
},
}
}
</script>
<style scoped>
.required {
padding-right: 10rpx;
font-size: 28rpx;
line-height: 40rpx;
color: #fa3534;
}
.item-image {
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
}
.location-name {
color: #2272FF;
text-align: right;
}
.location {
background: #F4F5F7;
padding: 10rpx 20rpx;
border-radius: 12rpx;
}
</style>
......@@ -24,7 +24,7 @@
<view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top"
:prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="typeToComponentType(item.fieldsType)!=='location'&&typeToComponentType(item.fieldsType)!=='form'">
<image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}}
</view>
......@@ -73,6 +73,10 @@
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange">
</xh-time>
<xh-service-more v-else-if="typeToComponentType(item.fieldsType)==='form'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :order-id="orderId" :value='form[item.fieldsName] || ""'
@value-change="fieldValueChange">
</xh-service-more>
</template>
</u-form-item>
</view>
......@@ -114,6 +118,7 @@
import XhPicker from '@/components/createCom/XhPicker.vue'
import XhTime from '@/components/createCom/XhTime.vue'
import XhServiceMeasure from '@/components/createCom/XhServiceMeasure.vue'
import XhServiceMore from "../../components/createCom/XhServiceMore";
// import XhRadio from '@/components/createCom/XhRadio.vue'
export default {
data() {
......@@ -185,7 +190,8 @@
XhScan,
XhPicker,
XhTime,
XhServiceMeasure
XhServiceMeasure,
XhServiceMore
},
created() {
// console.log(allComponents,'allComponents')
......@@ -409,6 +415,11 @@
this.getMenuItemTop()
})
},
setData(data){// 通过页面设置数据
Object.keys(data).forEach(key => {
this.$set(this.form,key,data[key])
})
},
// 字段的值更新
fieldValueChange(data) {
const groupItem = this.list[this.tabIndex].items[data.groupIndex]
......@@ -496,6 +507,9 @@
case 'date':
formType = 'time'
break
case 'form':
formType = 'form'
break
}
return formType
},
......
This diff is collapsed.
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