Commit 8eba948b authored by Morson's avatar Morson
parents 2bfd70ba dfad9e65
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": false,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": false,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"enableEngineNative": false,
"bundle": false,
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"userConfirmedBundleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"minifyWXSS": true
},
"compileType": "miniprogram",
"libVersion": "2.16.0",
"appid": "wx402a711597dddbaf",
"projectname": "miniprogram-1",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"isGameTourist": false,
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
}
}
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
</view> --> </view> -->
<view class="pics u-flex u-flex-wrap"> <view class="pics u-flex u-flex-wrap">
<view class="img-list" v-for="(item,index) in imgList" :key="index"> <view class="img-list" v-for="(item,index) in imgList" :key="index">
<u-image class="pic" width="170" height="170" :src="item.path" @click.stop="prviewImage(item.path,index)"></u-image> <u-image class="pic" width="160" height="160" :src="item.path" :border-radius="10" @click.stop="prviewImage(item.path,index)"></u-image>
<view class="icon-del-box" @click.stop="delFile(index)"> <view class="icon-del-box" @click.stop="delFile(index)">
<view class="icon-del"></view> <view class="icon-del"></view>
<view class="icon-del rotate"></view> <view class="icon-del rotate"></view>
</view> </view>
</view> </view>
<view class="img-list"> <view class="img-list">
<u-image class="pic" width="170rpx" height="170" @click="selectUpload" src="https://gitee.com/xuqu/uView/blob/master/static/uview/example/min_button.png"></u-image> <u-image class="pic" width="160rpx" height="160rpx" :border-radius="10" @click="selectUpload" :src="uploadImage"></u-image>
</view> </view>
<!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> --> <!-- <u-image class="pic" v-for="item in 6" width="170rpx" height="170" src="'https://cdn.uviewui.com/uview/example/fade.jpg"></u-image> -->
</view> </view>
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
}, },
filters:{}, filters:{},
data() { data() {
return { return {
maskShow:false, maskShow:false,
list: [ list: [
{ {
...@@ -52,7 +52,10 @@ ...@@ -52,7 +52,10 @@
computed: { computed: {
settings() { settings() {
return this.item.settings || [] return this.item.settings || []
} },
uploadImage() {
return process.uniEnv.qn_base_url + 'upload-file.png'
},
}, },
watch: { watch: {
'takeStatus': function(val, oldVal){ 'takeStatus': function(val, oldVal){
...@@ -135,20 +138,22 @@ ...@@ -135,20 +138,22 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pic{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
.img-list { .img-list {
position: relative; position: relative;
margin: 8rpx; margin: 8rpx;
border: 1px solid #eee; width: 160rpx;
width: 170rpx; height: 160rpx;
height: 170rpx;
.pic{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
.icon-del-box { .icon-del-box {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
......
<!-- ******************* 输入框 ******************* --> <!-- ******************* 输入框 ******************* -->
<template> <template>
<view> <view>
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" placeholder-style="placeholderStyle" <u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
custom-style="customStyle"/> :custom-style="customStyle" :clearable="false"/>
</view> </view>
</template> </template>
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
placeholder: { placeholder: {
type: String, type: String,
default: '请输入' default: '请输入'
},
width: { // 例如:454rpx
type: String,
default: '100%'
} }
}, },
data() { data() {
...@@ -30,13 +34,17 @@ ...@@ -30,13 +34,17 @@
} }
}, },
placeholderStyle() { placeholderStyle() {
return 'color:#FFFFFF;font-size:26rpx' return 'color:#999999;font-size:26rpx'
}, },
customStyle() { customStyle() {
return { return {
'background-color': '#F4F5F7', 'background-color': '#F4F5F7',
'border-radius': '12rpx', 'border-radius': '12rpx',
'color': '#ff0000' 'color': '#333333',
'padding-left': '20rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
} }
} }
}, },
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
} }
.location { .location {
background: #F4F5F7; background: #F4F5F7;
padding: 10rpx; padding: 10rpx 20rpx;
border-radius: 12rpx;
} }
</style> </style>
<!-- ******************* 单个下拉选择 ******************* --> <!-- ******************* 单个下拉选择 ******************* -->
<template> <template>
<view> <view class="xh-select">
<u-input :value="text" readOnly @click="show=true" type="select" /> <u-input :value="text" readOnly @click="show=true" :placeholder="placeholder" :placeholder-style="placeholderStyle"
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback"></u-action-sheet> :custom-style="customStyle" :clearable="false"></u-input>
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback" safe-area-inset-bottom></u-action-sheet>
<u-icon class="input-icon" :name="show ? 'arrow-up' : 'arrow-down'"></u-icon>
</view> </view>
</template> </template>
...@@ -12,7 +15,16 @@ ...@@ -12,7 +15,16 @@
name: 'XhSelect', name: 'XhSelect',
components: {}, components: {},
mixins: [stringMixin], mixins: [stringMixin],
props: {}, props: {
placeholder: {
type: String,
default: '请选择'
},
width: { // 例如:454rpx
type: String,
default: '100%'
}
},
data() { data() {
return { return {
show: false show: false
...@@ -32,7 +44,9 @@ ...@@ -32,7 +44,9 @@
result = settings.map(item => { result = settings.map(item => {
return { return {
text: item.label, text: item.label,
id: item.key id: item.key,
color: '#333333',
fontSize: 26
} }
}) })
return result return result
...@@ -40,6 +54,21 @@ ...@@ -40,6 +54,21 @@
text(){ text(){
let option = this.item.fieldsOptions.find(a=>{return a.key === this.dataValue}) let option = this.item.fieldsOptions.find(a=>{return a.key === this.dataValue})
return option?option.label:'' return option?option.label:''
},
placeholderStyle() {
return 'color:#999999;font-size:26rpx'
},
customStyle() {
return {
'background-color': '#F4F5F7',
'border-radius': '12rpx',
'color': '#333333',
'padding-left': '20rpx',
'padding-right': '60rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
}
} }
}, },
watch: {}, watch: {},
...@@ -54,5 +83,15 @@ ...@@ -54,5 +83,15 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
.xh-select {
position: relative;
.input-icon {
position: absolute;
right: 20rpx;
top: 26rpx;
color: #2272FF;
}
}
</style> </style>
<template> <template>
<view class="com-content"> <view class="com-content">
<complete-check :show="completeCheckStatus" :list-data="completeCheckResult" @close="closeCheckResult" @handle-problem="handerProgrom"></complete-check>
<view class="u-wrap" v-if="!takeStatus"> <view class="u-wrap" v-if="!takeStatus">
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="26" title-color="#fff" :border-bottom="false" title="完工信息"></u-navbar>
<u-tabs-swiper ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="120"></u-tabs-swiper> <u-tabs-swiper ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="120"></u-tabs-swiper>
...@@ -60,8 +61,8 @@ ...@@ -60,8 +61,8 @@
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-picker> </xh-picker>
<xh-service-measure v-else-if="typeToComponentType(item.fieldsType)==='servicemeasure'" <xh-service-measure v-else-if="typeToComponentType(item.fieldsType)==='servicemeasure'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :orderId="orderId" :categoryId="categoryId" :groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :orderId="orderId" :categoryId="categoryId"
:orderServiceType="orderServiceType" :specificationId="form['specificationId'] || 0" :value="form[item.fieldsName]" :orderServiceType="orderServiceType" :specificationId="form['specificationId'] || 0" :value="form[item.fieldsName]"
@value-change="fieldValueChange"> @value-change="fieldValueChange">
</xh-service-measure> </xh-service-measure>
<xh-time v-else-if="typeToComponentType(item.fieldsType)==='time'" <xh-time v-else-if="typeToComponentType(item.fieldsType)==='time'"
...@@ -76,14 +77,14 @@ ...@@ -76,14 +77,14 @@
</u-form> </u-form>
</scroll-view> </scroll-view>
</view> </view>
<view class="btn-wrap flex-xc"> <view class="btn-wrap flex-xc btn-bottom">
<u-button class="btn-submit" @click="saveComplete" <u-button class="btn-submit" @click="saveComplete"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :custom-style="customStyle" :hover-class="submitStatus ? '' : 'none'">
暂存 暂存
</u-button> </u-button>
<u-button class="btn-submit" @click="orderFinish" v-if="tabIndex===list.length - 1" <u-button class="btn-submit" @click="orderFinish" v-if="tabIndex===list.length - 1"
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :custom-style="buttonStyle" :hover-class="submitStatus ? '' : 'none'">
交付 完工
</u-button> </u-button>
<u-button class="btn-submit" @click="nextStep" :custom-style="buttonStyle" v-else <u-button class="btn-submit" @click="nextStep" :custom-style="buttonStyle" v-else
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'"> type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
...@@ -161,7 +162,12 @@ ...@@ -161,7 +162,12 @@
submitBtnStatus: false, submitBtnStatus: false,
takeStatus: false, takeStatus: false,
fileIndex: null, fileIndex: null,
files: [] files: [],
completeCheckStatus: false,
completeCheckResult: [],
waitHandlerPanelIndex: 0,
waitHandlerGroupIndex: 0,
waitHandlerEleIndex: 0,
} }
}, },
components: { components: {
...@@ -212,19 +218,33 @@ ...@@ -212,19 +218,33 @@
return this.submitBtnStatus ? { return this.submitBtnStatus ? {
'color': '#FFFFFF', 'color': '#FFFFFF',
'background-color': '#2272FF;', 'background-color': '#2272FF;',
'width': '600rpx', 'width': '300rpx',
'height': '104rpx', 'height': '104rpx',
'font-size': '32rpx', 'font-size': '32rpx',
'font-weight': 'bold' 'font-weight': 'bold',
'margin-left': '50rpx'
} : { } : {
'color': '#FFFFFF', 'color': '#FFFFFF',
'background-color': '#D1D4D4;', 'background-color': '#D1D4D4;',
'width': '600rpx', 'width': '300rpx',
'height': '104rpx', 'height': '104rpx',
'font-size': '32rpx', 'font-size': '32rpx',
'font-weight': 'bold' 'font-weight': 'bold',
'margin-left': '50rpx'
} }
} },
customStyle() {
return {
'background-color': '#D1D4D4',
'width': '300rpx',
'height': '104rpx',
'background-color': 'transparent',
'border': '1px solid #2272FF',
'color': '#2272FF',
'font-weight': 'bold',
'font-size': '32rpx',
}
},
}, },
methods: { methods: {
getCompleteData() {//获取工单配置的完工项目 getCompleteData() {//获取工单配置的完工项目
...@@ -272,17 +292,75 @@ ...@@ -272,17 +292,75 @@
} }
}) })
}, },
checkCompleteItem(){
let self = this
let checkResult = []
let pass = true
let first = true
self.list.forEach((panel, panelIndex)=>{
let panelResult = {label: panel.panelName, submitted: 0, required: 0, pass: true}
panel.items.forEach((group, groupIndex) =>{
group.items.forEach((ele, eleIndex)=>{
if(ele.required){
panelResult.required++
let value = self.form[ele.fieldsName]
if(value&&!Array.isArray(value)){
panelResult.submitted++
}else if(value&&Array.isArray(value)&&value.length > 0){
panelResult.submitted++
}else if(first){// 记录第一个 为空 并且需要必填的项 用于定位
first = false
self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex
self.waitHandlerEleIndex = eleIndex
}
}
})
})
panelResult.pass = panelResult.required <= panelResult.submitted
pass = pass&&panelResult.pass
checkResult.push(panelResult)
})
console.log(checkResult)
self.completeCheckResult = checkResult
return pass
},
closeCheckResult(){// 检查结果窗口取消回调
this.completeCheckStatus = false
},
handerProgrom(){// 检查结果窗口 去处理回调 定位到缺失的项
this.completeCheckStatus = false
this.locationCompleteItem(this.waitHandlerPanelIndex,this.waitHandlerGroupIndex,this.waitHandlerEleIndex)
},
locationCompleteItem(panelIndex,groupIndex,eleIndex){ // 页面定位到某一项
this.tabIndex = panelIndex
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.$nextTick(function() {
this.swichMenu(groupIndex)
})
},
orderFinish(){ orderFinish(){
let self = this let self = this
if(self.inGuaranteePeriod === 'Y'){ let pass = this.checkCompleteItem()
self.$u.api.inOrderFinish(self.orderId).then((res)=>{ if(!pass){
console.log(res) self.completeCheckStatus = true
}) }else{
}else{ console.log("完工");
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{ self.completeCheckStatus = true
console.log(res) if(self.inGuaranteePeriod === 'Y'){
}) self.$u.api.inOrderFinish(self.orderId).then((res)=>{
} console.log(res)
self.completeCheckStatus = true
})
}else{
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{
console.log(res)
self.completeCheckStatus = true
})
}
}
}, },
getTakeStatus(event) { getTakeStatus(event) {
this.takeStatus = event.status this.takeStatus = event.status
...@@ -293,7 +371,7 @@ ...@@ -293,7 +371,7 @@
this.tabIndex = index this.tabIndex = index
this.arr = [] this.arr = []
this.scrollRightTop = 0; this.scrollRightTop = 0;
this.current = 0; this.current = 0;
this.leftMenuStatus(0) this.leftMenuStatus(0)
this.$nextTick(function() { this.$nextTick(function() {
this.getMenuItemTop() this.getMenuItemTop()
...@@ -501,10 +579,8 @@ ...@@ -501,10 +579,8 @@
} }
.class-item { .class-item {
padding: 50rpx;
margin-bottom: 30rpx;
background-color: #fff; background-color: #fff;
padding: 30rpx; padding: 28rpx;
border-radius: 8rpx; border-radius: 8rpx;
.title { .title {
font-weight: bold; font-weight: bold;
...@@ -576,17 +652,18 @@ ...@@ -576,17 +652,18 @@
.u-tab-view { .u-tab-view {
width: 200rpx; width: 200rpx;
height: 100%; height: 100%;
border: 4rpx solid #F4F5F7;
} }
.u-tab-item { .u-tab-item {
height: 110rpx; height: 110rpx;
background: #f6f6f6; background: #fff;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 26rpx; font-size: 26rpx;
color: #444; color: #333333;
font-weight: 400; font-weight: 400;
line-height: 1; line-height: 1;
} }
...@@ -594,8 +671,6 @@ ...@@ -594,8 +671,6 @@
.u-tab-item-active { .u-tab-item-active {
position: relative; position: relative;
color: #2272FF; color: #2272FF;
font-size: 30rpx;
font-weight: 600;
background: #fff; background: #fff;
} }
...@@ -656,14 +731,18 @@ ...@@ -656,14 +731,18 @@
} }
/*提交按钮*/ /*提交按钮*/
.btn-bottom {
border: 2rpx solid #F4F5F7;
}
.btn-wrap { .btn-wrap {
width: 100%; width: 100%;
padding: 20rpx 0 40rpx 0; padding: 20rpx 0 44rpx 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.btn-save { .btn-save {
color: #FFFFFF; color: #FFFFFF;
background-color: #2272FF; background-color: #2272FF;
......
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