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

update:update

scope:self-support
body:修改拍照页面问题、完工问题
parent 9cb25c04
const globalUrl = process.uniEnv || {}
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl
let certApiFun = function(vm){
let getCertList = async (params = {}) => await vm.$u.get(ucenterApiUrl+'/v1/settled/get-cert-list', params);
const certApi = {
getCertList
}
return certApi
}
module.exports = {
certApiFun
}
\ No newline at end of file
......@@ -64,6 +64,10 @@ let orderApiFun = function(vm){
* 获取拍照标准
*/
let orderStandard = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard', params);
/**
* 获取拍照标准单独项目
*/
let orderStandardItem = async (params = {}) => await vm.$u.get(prefix + vm.vuex_token+'/photo/standard/only', params);
/**
* 保存图片信息
......@@ -147,6 +151,7 @@ let orderApiFun = function(vm){
traceAndAppointment,
rejectOrder,
orderStandard,
orderStandardItem,
saveImage,
getWatermark,
saveWatermark,
......
......@@ -21,7 +21,7 @@
</view>
<u-action-sheet :list="list" v-model="maskShow" :cancel-btn="true" @click="uploadSelect"></u-action-sheet>
</view>
<take-photo v-else @close="closeTake"></take-photo>
<take-photo v-else @close="closeTake" :currentItem="currentItemDate"></take-photo>
</view>
</template>
......@@ -38,7 +38,11 @@
props: {
files: {
type: Array,
}
},
partnerCompanyId: {
type: String,
default: '{}'
},
},
filters:{},
data() {
......@@ -53,6 +57,7 @@
}
],
takeStatus: false,
currentItemDate:{},
}
},
computed: {
......@@ -106,6 +111,8 @@
}
// 使用拍照工具拍摄
this.takeStatus = true
this.getWatermark()
this.getPhotoStander()
},
setValue() {
const dataValue = []
......@@ -133,6 +140,50 @@
delFile(index) {
this.imgList.splice(index, 1)
this.setValue()
},
getPhotoStander(){// 获取拍照规范接口
let self = this
// this.$u.api.orderStandardItem({}).then((res)=>{
// if (res.code == 200 && res.data.length>0) {
// self.currentItemDate = res.data[0]
// }else{
// console.log("获取完工项的拍照标准异常",res.data.message)
// }
// })
self.currentItemDate = {
"id": 154,
"partnerCompanyId": 10331001475,
"categoryId": 1100000216,
"brandId": null,
"type": "勘测部分",
"name": "勘测单",
"fieldName": "06",
"images": [
"https://cloud-bak.banshouhui.com/2-勘测单.jpg"
],
"mainPoint": [
"表格清晰,文字可辨",
"表格居中,不倾斜",
"全部填写完整,不能填写的部分划横杠。",
"涉及到用户签字部分,不允许我方人员代签,由用户或用户指定人进行签字确认。",
"涉及到物业的由现场物业人员签字确认。"
],
"note": "正面拍摄,完整看到单据 4 条边",
"orderImages": null
}
},
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)
}
});
}
}
}
......
......@@ -335,7 +335,7 @@
+ "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&auditResultsId=" + Object.keys(item.auditResults)[0]
+ "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[0]:'')
})
},
handleAction(item) {
......
<template>
<view class="cert-page">
<u-navbar
back-icon-color="#000000"
:background="background"
title-color="#000"
:border-bottom="false"
title="我的证件"
title-bold="true"
></u-navbar>
<view class="content-cody">
<view class="title">{{ info.type }}</view>
<view class="content" v-for="item in info.url"><image :src="item" mode=""></image></view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {
type: "",
url: null
}
}
},
onLoad() {
var that = this;
const eventChannel = this.getOpenerEventChannel()
eventChannel.on('acceptDataFromCert', function(data) {
try{
let urlArr = data.url.split(',');
that.info.type = data.type;
that.info.url = urlArr;
console.log(urlArr);
}catch(e){}
console.log(that.info);
})
},
}
</script>
<style>
.cert-page {
font-size: 28rpx;
margin: 30rpx;
}
.content-cody {
padding-left: 30rpx;
padding-right: 30rpx;
background-color: #F4F5F7;
border-radius: 12rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
}
.content {
padding-top: 30rpx;
}
</style>
<template>
<view class="cert-page">
<u-navbar
class="navbarHeigth"
back-icon-color="#000000"
:background="background"
title-color="#000"
:border-bottom="false"
title="我的证件"
title-bold="true"
></u-navbar>
<view class="content-cody">
<u-cell-group :border="false">
<u-cell-item v-for="item in list" :title="item.name" :value="item.isUploadName" :arrow="true"
:value-style="{'color': item.color}" @click="toDetail(item.keyName)" :title-style="{'padding-left':'20rpx'}">
<u-icon slot="icon" size="32" name="checkmark-circle" :color="item.iconColor"></u-icon>
</u-cell-item>
</u-cell-group>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list: {
id_card: {
name: "身份证",
isUpload: false,
isUploadName: "",
keyName: "id_card",
color: "#999999"
},
electrician_certificate: {
name: "电工证",
isUpload: false,
isUploadName: "",
keyName: "electrician_certificate",
color: "#999999"
},
driver_license: {
name: "驾驶证",
isUpload: false,
isUploadName: "",
keyName: "driver_license",
color: "#999999"
},
driving_license: {
name: "行驶证",
isUpload: false,
isUploadName: "",
keyName: "driving_license",
color: "#999999"
},
vehicle: {
name: "车辆照",
isUpload: false,
isUploadName: "",
keyName: "vehicle",
color: "#999999"
},
high_sky_license: {
name: "高空证",
isUpload: false,
isUploadName: "",
keyName: "high_sky_license",
color: "#999999"
},
refrigeration_license: {
name: "制冷证",
isUpload: false,
isUploadName: "",
keyName: "refrigeration_license",
color: "#999999"
},
business_license: {
name: "营业执照",
isUpload: false,
isUploadName: "",
keyName: "business_license",
color: "#999999"
},
}
}
},
onLoad() {
let that = this;
this.$u.api
.getCertList()
.then((res) => {
if(res.code != 200){
return
}
for(let key in this.list){
let getData = res.data[key];
this.list[key].isUpload = getData.status;
this.list[key].isUploadName = getData.status == 1 ? '已上传' : '未上传';
this.list[key].color = getData.status == 1 ? "#999999" : "#2272FF";
this.list[key].iconColor = getData.status == 1 ? "#2272FF" : "#999999";
this.list[key].data = getData;
}
console.log(this.list);
console.log(res);
}).catch((err) => {
console.log(err);
});
},
methods: {
isUpload(typeBool) {
return typeBool ? '已上传' : '未上传'
},
toDetail(key) {
let data = this.list[key].data;
if(data.status != 1){
return;
}
wx.navigateTo({
url: '/pages/mine/cert/detail',
success: function(res) {
res.eventChannel.emit('acceptDataFromCert', data)
}
});
}
}
}
</script>
<style>
.cert-page {
font-size: 28rpx;
margin: 30rpx;
height: 100vh;
display: flex;
flex-direction: column;
}
.content-cody {
padding: 30rpx;
background-color: #ffffff;
border-radius: 12rpx;
height: 82vh;
}
.rightBlue {
color: #007AFF;
}
</style>
<template>
<view class="cus-wrap">
<w-navbar title="联系客服"></w-navbar>
<view class="content">
<u-image class="qrcode" :src="cusQrcode" width="400" mode="widthFix" @longtap="download">
<u-loading slot="loading"></u-loading>
<view slot="error" style="font-size: 24rpx;">加载失败</view>
</u-image>
<text class="desc">长按二维码保存图片添加官方客服微信</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
},
computed: {
cusQrcode() {
return process.uniEnv.qn_base_url + 'erweima-bg.png'
},
},
methods: {
download() {
let that = this;
uni.downloadFile({ //获得二维码的临时地址
url: that.erweimaImage,
success:(res)=>{
if(res.statusCode == 200){
uni.saveImageToPhotosAlbum({
filePath:res.tempFilePath,//传入临时地址
success() {
that.$u.toast('保存成功!');
},
fail() {
that.$u.toast('保存失败!');
}
})
}
}
})
}
}
}
</script>
<style lang="scss">
.cus-wrap {
background-color: #F4F5F7;
padding: 30rpx;
.content {
width: 690rpx;
height: 800rpx;
background: #FFFFFF;
border-radius: 12rpx;
display: flex;
flex-direction: column;
align-items: center;
.qrcode {
margin-top: 160rpx;
}
.desc {
margin-top: 40rpx;
font-size: 24rpx;
font-weight: 400;
color: #666666;
line-height: 24rpx;
}
}
}
</style>
<template>
<view class="wallet-view">
<u-navbar back-icon-color="#333333" background="#F4F5F7" title="我的钱包" titleColor="#333333" :border-bottom="false"></u-navbar>
<image class="header-image" mode="widthFix" :src="qianbaobeijing"></image>
<view class="survey-view">
<view class="survey-top-view">
<view class="survey-top-left">
<view>账户总资产(元)</view>
<view>{{info.totalPayAmount}}</view>
</view>
<view class="survey-top-right">
<u-button>提现</u-button>
</view>
</view>
<view class="survey-bottom-view">
<view v-for="(value, key) in items" :key="key">
<view>{{value}}</view>
<view>{{info[key]}}</view>
</view>
</view>
</view>
<view class="content-view">
<view v-for="(item, index) in lists" :class="['content-list', {'first': index==0}]" :key="index">
<view class="content-list-left">
<image class="content-list-image" :src="item.icon"></image>
<view class="content-list-text">
<view class="content-list-text-title">{{item.title}}</view>
<view>{{item.content}}</view>
</view>
</view>
<view class="content-list-right">
<text class="content-list-right-text">点击查看</text>
<u-icon name="arrow-right"></u-icon>
</view>
</view>
</view>
<view class="list-view">
</view>
</view>
</template>
<script>
export default {
data() {
return {
info: {
canApplyAmount: 0, // 可提现金额
saveApplyCount: 0, // 已申请提现的支付单数
canApplyCount: 0, // 可申请提现的支付单数
saveAndApplyAmount: 0, // 已申请提现金额
totalPayAmount: 0, // 总共收入
/* 还没对字段名 */
dairuzhang: 0, // 预计待入账
}
}
},
computed: {
lists() {
return [{
title: '结算账单',
content: '展示您已提现的账单信息',
icon: this.imageUrl + 'jiesuan.png'
},{
title: '收入流水',
content: '当前展示最近5条,点击查看全部',
icon: this.imageUrl + 'liushui.png'
}]
},
items() {
return {canApplyAmount:'可提现(元)', dairuzhang:'预计待入账(元)'}
},
imageUrl() {
return process.uniEnv.qn_base_url
},
qianbaobeijing() {
return this.imageUrl + 'qianbaobeijing.png'
},
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.wallet-view {
position: relative;
height: 100vh;
overflow: auto;
background-color: #F4F5F7;
.header-image {
position: absolute;
width: 100%;
margin-left: 4rpx;
margin-top: 10rpx;
}
.survey-view {
position: relative;
height: 400rpx;
margin: 30rpx 30rpx 10rpx 30rpx;
color: #FFFFFF;
padding: 30rpx;
.survey-top-view {
display: flex;
justify-content: space-between;
align-items: flex-end;
.survey-top-left {
}
.survey-top-right {
}
}
.survey-bottom-view {
display: flex;
justify-content: space-between;
}
}
.content-view {
position: relative;
padding: 0 30rpx;
.content-list {
height: 140rpx;
border-radius: 12rpx;
display: flex;
justify-content: space-between;
padding: 30rpx;
background-color: #FFFFFF;
&.first {
margin-bottom: 20rpx;
}
.content-list-left {
display: flex;
.content-list-image {
width: 56rpx;
height: 56rpx;
margin-top: 2rpx;
}
.content-list-text {
font-size: 24rpx;
color: #666666;
margin-left: 20rpx;
.content-list-text-title {
font-size: 32rpx;
color: #333333;
}
}
}
.content-list-right {
color: #2272FF;
font-size: 26rpx;
.content-list-right-text {
margin-right: 4rpx;
}
}
}
}
.list-view {
position: relative;
}
}
</style>
......@@ -49,7 +49,7 @@
@value-change="fieldValueChange">
</xh-select>
<xh-files v-else-if="typeToComponentType(item.fieldsType)==='file'"
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :value='form[item.fieldsName] || []'
:groupIndex="groupIndex" :itemIndex="itemIndex" :item="item" :partnerCompanyId="partnerCompanyId" :value='form[item.fieldsName] || []'
@value-change="fieldValueChange">
</xh-files>
<xh-location v-else-if="typeToComponentType(item.fieldsType)==='location'"
......@@ -122,6 +122,7 @@
categoryId:0,
orderServiceType:'',
inGuaranteePeriod:'',
partnerCompanyId:'',
auditResultsId: '',
list: [],
tabIndex: 0,
......@@ -196,6 +197,7 @@
this.categoryId = option.categoryId
this.orderServiceType = decodeURIComponent(option.orderServiceType)
this.inGuaranteePeriod = option.inGuaranteePeriod
this.partnerCompanyId = option.partnerCompanyId
this.auditResultsId = option.auditResultsId
} else {
this.orderId = 11880091
......@@ -275,26 +277,29 @@
})
this.locationCompleteItem(self.waitHandlerPanelIndex, self.waitHandlerGroupIndex, self.waitHandlerEleIndex)
},
saveComplete(){// 保存完工信息
let self = this
let param = {}
self.list.forEach((panel)=>{
handleSaveData(){
let param = {}
this.list.forEach((panel)=>{
param[panel.panelFieldsName] = []
panel.items.forEach((group) =>{
group.items.forEach((ele)=>{
if(self.form[ele.fieldsName]){
if(this.form[ele.fieldsName]){
param[panel.panelFieldsName].push({
"fieldsName": ele.fieldsName,
"fieldsType": ele.fieldsType,
"fieldsValue": self.form[ele.fieldsName],
"fieldsValue": this.form[ele.fieldsName],
"required": ele.required,
})
}
})
})
})
return param
},
saveComplete(){// 保存完工信息
let self = this
let param = self.handleSaveData()
self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{
if (res.code == 200) {
this.$refs.uToast.show({
......@@ -303,7 +308,7 @@
})
} else {
this.$refs.uToast.show({
title: res.data,
title: res.message,
type: 'error',
})
}
......@@ -368,7 +373,10 @@
let pass = this.checkCompleteItem()
if(!pass){
self.completeCheckStatus = true
}else{
}else{// 先保存完工项
let param = self.handleSaveData()
self.$u.api.saveCompleteData(param,self.orderId).then((res)=>{
if (res.code == 200) {//完工项信息保存成功再次完工工单
console.log("完工");
this.pass = pass
if(self.inGuaranteePeriod === 'Y'){
......@@ -382,6 +390,13 @@
self.completeCheckStatus = true
})
}
} else {
this.$refs.uToast.show({
title: res.message,
type: 'error',
})
}
})
}
},
tabsChange(index){
......@@ -467,6 +482,7 @@
formType = 'location'
break
case 'scan':
case 'machine_code':
formType = 'scan'
break
case 'picker':
......
......@@ -651,6 +651,7 @@
+ "&categoryId=" + this.order.categoryId
+ "&orderServiceType=" + this.order.orderServiceType
+ "&inGuaranteePeriod=" + this.order.inGuaranteePeriod
+ "&partnerCompanyId=" + this.order.partnerCompanyId
})
},
rejectOrder() { // 拒单
......
......@@ -303,6 +303,7 @@
if (res.code == 200) {
console.log("===", res.data)
this.userWatermark = res.data
getApp().globalData.photo.waterSetting = this.userWatermark
} else {
console.log("获取水印备注异常",res.data.message)
}
......
......@@ -8,20 +8,20 @@
<text class="itemTitle">保存原图</text>
<text class="itemNotice">拍照后另保存一张无水印的图片</text>
</view>
<switch class="itemSwitch" :checked="result['has_origin']" @change="handleOrigineChange" color="#007AFF" />
<switch class="itemSwitch" :checked="result['hasOrigin']" @change="handleOrigineChange" color="#007AFF" />
</view>
<view class="itemView" v-if="showTitleSwitch">
<view class="itemTitleView" @click="itemClick({},-1)">
<text class="itemTitle">水印标题</text>
<text class="itemNotice">{{result['lower_right']['title_text'] || '点击可编辑更改'}}</text>
<text class="itemNotice">{{result['lowerLeft']['title'] || '点击可编辑更改'}}</text>
</view>
<switch class="itemSwitch" disabled :checked="result['lower_right']['title_text'] != ''"
<switch class="itemSwitch" disabled :checked="result['lowerLeft']['title'] != ''"
@click="handleClickTitleSwitch" color="#007AFF" />
</view>
<view class="itemView" v-for="(item,ikey) in itemList" :key="ikey">
<view class="itemTitleView" @click="itemClick(item,ikey)">
<text class="itemTitle">{{item['watemark_text'] || '自定义' + (ikey + 1)}}</text>
<text class="itemNotice">{{item['watemark_value'] || '点击可编辑更改'}}</text>
<text class="itemTitle">{{item['watemarkText'] || '自定义' + (ikey + 1)}}</text>
<text class="itemNotice">{{item['watemarkValue'] || '点击可编辑更改'}}</text>
</view>
<switch class="itemSwitch" :checked="item['enable']" @change="itemChange(item, ikey)" color="#007AFF" />
</view>
......@@ -32,7 +32,7 @@
<view class="inputBackView">
<view class="ph-pop-left-view">
<view class="leftInputView">
<input class="leftInput" type="text" v-model="currenItem['watemark_text']"
<input class="leftInput" type="text" v-model="currenItem['watemarkText']"
@input="leftInput()" :disabled="currenItem.type === 'title_text'" placeholder="请输入"
maxlength="10" />
</view>
......@@ -41,7 +41,7 @@
<view class="ph-pop-mid-view">:</view>
<view>
<view class="rightInputView">
<input class="rightInput" type="text" v-model="currenItem['watemark_value']"
<input class="rightInput" type="text" v-model="currenItem['watemarkValue']"
@input="rightInput()" placeholder="请输入内容" maxlength="30" />
</view>
<view class="ph-pop-tip-view" v-if="showTipRight">*必填项</view>
......@@ -71,14 +71,14 @@
isPopShow: false,
icon_close_new: '',
result: {
has_origin: true,
lower_right: {
hasOrigin: true,
lowerLeft: {
body: []
}
},
currenItem: {
'watemark_text': '',
'watemark_value': ''
'watemarkText': '',
'watemarkValue': ''
},
editingItem: {},
showTipLeft: false,
......@@ -88,8 +88,8 @@
},
computed: {
itemList() {
if (this.result['lower_right']) {
var arr = this.result['lower_right']['body']
if (this.result['lowerLeft']) {
var arr = this.result['lowerLeft']['body']
return arr.filter((item) => {
return item.watemark_type === '备注'
})
......@@ -99,7 +99,7 @@
},
showTitleSwitch() {
return this.result['lower_right'].hasOwnProperty('title_text')
return this.result['lowerLeft'].hasOwnProperty('title')
},
customStyleCancel() {
return {
......@@ -164,12 +164,12 @@
//保存原图 开关
handleOrigineChange: function(e) {
this.result['has_origin'] = !this.result['has_origin']
this.result['hasOrigin'] = !this.result['hasOrigin']
this.saveUserWatermark()
},
handleClickTitleSwitch: function(e) {
var string = this.result['lower_right']['title_text'] ? '水印标题不可关闭' : '请先编辑该自定义项'
var string = this.result['lowerLeft']['title'] ? '水印标题不可关闭' : '请先编辑该自定义项'
uni.showToast({
icon: 'none',
title: string
......@@ -178,7 +178,7 @@
//自定义 开关
itemChange: function(item, ikey) {
if (item['watemark_value']) {
if (item['watemarkValue']) {
// 修改
item['enable'] = !item['enable']
this.saveUserWatermark()
......@@ -194,8 +194,8 @@
itemClick: function(item, ikey) {
if (ikey === -1) {
this.currenItem = {
'watemark_text': '水印标题',
'watemark_value': this.result['lower_right']['title_text'],
'watemarkText': '水印标题',
'watemarkValue': this.result['lowerLeft']['title'],
'type': 'title_text'
}
} else {
......@@ -210,7 +210,7 @@
//左侧输入框
leftInput: function(e) {
if (this.currenItem['watemark_text']) {
if (this.currenItem['watemarkText']) {
this.showTipLeft = false
}
......@@ -218,7 +218,7 @@
//右侧输入框
rightInput: function(e) {
if (this.currenItem['watemark_value']) {
if (this.currenItem['watemarkValue']) {
this.showTipRight = false
}
},
......@@ -227,8 +227,8 @@
popCancelClick: function() {
this.isPopShow = false
this.currenItem = {
'watemark_text': '',
'watemark_value': ''
'watemarkText': '',
'watemarkValue': ''
}
},
......@@ -239,22 +239,22 @@
//自定义弹窗 保存
popSaveClick: function() {
if (this.currenItem['watemark_text'] && this.currenItem['watemark_value']) {
if (this.currenItem['watemarkText'] && this.currenItem['watemarkValue']) {
this.isPopShow = false
if (this.currenItem.type === 'title_text') {
this.result['lower_right']['title_text'] = this.currenItem['watemark_value']
this.result['lowerLeft']['title'] = this.currenItem['watemarkValue']
} else {
this.editingItem['watemark_text'] = this.currenItem['watemark_text']
this.editingItem['watemark_value'] = this.currenItem['watemark_value']
this.editingItem['watemarkText'] = this.currenItem['watemarkText']
this.editingItem['watemarkValue'] = this.currenItem['watemarkValue']
this.editingItem['enable'] = true
}
this.saveUserWatermark()
} else {
// 提示
if (!this.currenItem['watemark_text']) {
if (!this.currenItem['watemarkText']) {
this.showTipLeft = true
}
if (!this.currenItem['watemark_value']) {
if (!this.currenItem['watemarkValue']) {
this.showTipRight = true
}
}
......
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