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 @@
</view> -->
<view class="pics u-flex u-flex-wrap">
<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"></view>
<view class="icon-del rotate"></view>
</view>
</view>
<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>
<!-- <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>
......@@ -36,7 +36,7 @@
},
filters:{},
data() {
return {
return {
maskShow:false,
list: [
{
......@@ -52,7 +52,10 @@
computed: {
settings() {
return this.item.settings || []
}
},
uploadImage() {
return process.uniEnv.qn_base_url + 'upload-file.png'
},
},
watch: {
'takeStatus': function(val, oldVal){
......@@ -135,20 +138,22 @@
}
</script>
<style lang="scss" scoped>
.pic{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
.img-list {
position: relative;
margin: 8rpx;
border: 1px solid #eee;
width: 170rpx;
height: 170rpx;
width: 160rpx;
height: 160rpx;
.pic{
// margin-right: 15rpx;
// margin-bottom: 15rpx;
&:nth-child(3n){
margin-right: 0;
}
}
.icon-del-box {
/* #ifndef APP-NVUE */
display: flex;
......
<!-- ******************* 输入框 ******************* -->
<template>
<view>
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" placeholder-style="placeholderStyle"
custom-style="customStyle"/>
<u-input :type="type" class="input-item" v-model="dataValue" @input="valueChange" :placeholder="placeholder" :placeholder-style="placeholderStyle"
:custom-style="customStyle" :clearable="false"/>
</view>
</template>
......@@ -16,6 +16,10 @@
placeholder: {
type: String,
default: '请输入'
},
width: { // 例如:454rpx
type: String,
default: '100%'
}
},
data() {
......@@ -30,13 +34,17 @@
}
},
placeholderStyle() {
return 'color:#FFFFFF;font-size:26rpx'
return 'color:#999999;font-size:26rpx'
},
customStyle() {
return {
'background-color': '#F4F5F7',
'border-radius': '12rpx',
'color': '#ff0000'
'color': '#333333',
'padding-left': '20rpx',
'width': this.width,
'font-size':'26rpx',
'height': '76rpx'
}
}
},
......
......@@ -80,6 +80,7 @@
}
.location {
background: #F4F5F7;
padding: 10rpx;
padding: 10rpx 20rpx;
border-radius: 12rpx;
}
</style>
<!-- ******************* 单个下拉选择 ******************* -->
<template>
<view>
<u-input :value="text" readOnly @click="show=true" type="select" />
<u-action-sheet :list="settings" v-model="show" @click="actionSheetCallback"></u-action-sheet>
<view class="xh-select">
<u-input :value="text" readOnly @click="show=true" :placeholder="placeholder" :placeholder-style="placeholderStyle"
: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>
</template>
......@@ -12,7 +15,16 @@
name: 'XhSelect',
components: {},
mixins: [stringMixin],
props: {},
props: {
placeholder: {
type: String,
default: '请选择'
},
width: { // 例如:454rpx
type: String,
default: '100%'
}
},
data() {
return {
show: false
......@@ -32,7 +44,9 @@
result = settings.map(item => {
return {
text: item.label,
id: item.key
id: item.key,
color: '#333333',
fontSize: 26
}
})
return result
......@@ -40,6 +54,21 @@
text(){
let option = this.item.fieldsOptions.find(a=>{return a.key === this.dataValue})
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: {},
......@@ -54,5 +83,15 @@
}
</script>
<style>
<style lang="scss" scoped>
.xh-select {
position: relative;
.input-icon {
position: absolute;
right: 20rpx;
top: 26rpx;
color: #2272FF;
}
}
</style>
<template>
<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">
<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>
......@@ -60,8 +61,8 @@
@value-change="fieldValueChange">
</xh-picker>
<xh-service-measure v-else-if="typeToComponentType(item.fieldsType)==='servicemeasure'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :orderId="orderId" :categoryId="categoryId"
:orderServiceType="orderServiceType" :specificationId="form['specificationId'] || 0" :value="form[item.fieldsName]"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :orderId="orderId" :categoryId="categoryId"
:orderServiceType="orderServiceType" :specificationId="form['specificationId'] || 0" :value="form[item.fieldsName]"
@value-change="fieldValueChange">
</xh-service-measure>
<xh-time v-else-if="typeToComponentType(item.fieldsType)==='time'"
......@@ -76,14 +77,14 @@
</u-form>
</scroll-view>
</view>
<view class="btn-wrap flex-xc">
<view class="btn-wrap flex-xc btn-bottom">
<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 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 class="btn-submit" @click="nextStep" :custom-style="buttonStyle" v-else
type="primary" shape="circle" :hover-class="submitStatus ? '' : 'none'">
......@@ -161,7 +162,12 @@
submitBtnStatus: false,
takeStatus: false,
fileIndex: null,
files: []
files: [],
completeCheckStatus: false,
completeCheckResult: [],
waitHandlerPanelIndex: 0,
waitHandlerGroupIndex: 0,
waitHandlerEleIndex: 0,
}
},
components: {
......@@ -212,19 +218,33 @@
return this.submitBtnStatus ? {
'color': '#FFFFFF',
'background-color': '#2272FF;',
'width': '600rpx',
'width': '300rpx',
'height': '104rpx',
'font-size': '32rpx',
'font-weight': 'bold'
'font-weight': 'bold',
'margin-left': '50rpx'
} : {
'color': '#FFFFFF',
'background-color': '#D1D4D4;',
'width': '600rpx',
'width': '300rpx',
'height': '104rpx',
'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: {
getCompleteData() {//获取工单配置的完工项目
......@@ -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(){
let self = this
if(self.inGuaranteePeriod === 'Y'){
self.$u.api.inOrderFinish(self.orderId).then((res)=>{
console.log(res)
})
}else{
self.$u.api.outOrderFinish({customerPayType:'CASH'}, self.orderId).then((res)=>{
console.log(res)
})
}
let self = this
let pass = this.checkCompleteItem()
if(!pass){
self.completeCheckStatus = true
}else{
console.log("完工");
self.completeCheckStatus = true
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) {
this.takeStatus = event.status
......@@ -293,7 +371,7 @@
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
this.getMenuItemTop()
......@@ -501,10 +579,8 @@
}
.class-item {
padding: 50rpx;
margin-bottom: 30rpx;
background-color: #fff;
padding: 30rpx;
padding: 28rpx;
border-radius: 8rpx;
.title {
font-weight: bold;
......@@ -576,17 +652,18 @@
.u-tab-view {
width: 200rpx;
height: 100%;
border: 4rpx solid #F4F5F7;
}
.u-tab-item {
height: 110rpx;
background: #f6f6f6;
background: #fff;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #444;
color: #333333;
font-weight: 400;
line-height: 1;
}
......@@ -594,8 +671,6 @@
.u-tab-item-active {
position: relative;
color: #2272FF;
font-size: 30rpx;
font-weight: 600;
background: #fff;
}
......@@ -656,14 +731,18 @@
}
/*提交按钮*/
.btn-bottom {
border: 2rpx solid #F4F5F7;
}
.btn-wrap {
width: 100%;
padding: 20rpx 0 40rpx 0;
padding: 20rpx 0 44rpx 0;
display: flex;
justify-content: center;
align-items: center;
}
.btn-save {
color: #FFFFFF;
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