Commit cd26b144 authored by 刘文虎's avatar 刘文虎

Merge branch 'master' into lwh-dev

parents a84b83c1 2c8b4198
Pipeline #3400 canceled with stages
This diff is collapsed.
This diff is collapsed.
...@@ -84,19 +84,21 @@ export default { ...@@ -84,19 +84,21 @@ export default {
if (sys.windowTop) { if (sys.windowTop) {
this.windowHeight += sys.windowTop this.windowHeight += sys.windowTop
} }
this.$nextTick(()=> {
const query = uni.createSelectorQuery().in(this)
query
.select('#_drag_button')
.boundingClientRect((data) => {
this.width = data.width
this.height = data.height
this.offsetWidth = data.width / 2
this.offsetHeight = data.height / 2
// this.left = this.windowWidth - this.width - this.edge
// this.top = this.windowHeight - this.height - this.edge
})
.exec()
})
const query = uni.createSelectorQuery().in(this)
query
.select('#_drag_button')
.boundingClientRect((data) => {
this.width = data.width
this.height = data.height
this.offsetWidth = data.width / 2
this.offsetHeight = data.height / 2
// this.left = this.windowWidth - this.width - this.edge
// this.top = this.windowHeight - this.height - this.edge
})
.exec()
this.clickedMinus() this.clickedMinus()
}, },
mounted() {}, mounted() {},
......
<template>
<u-popup v-model="show" border-radius="24" safe-area-inset-bottom mode="bottom">
<view class="unit-popup">
<view class="unit-popup-top">
<text>请选择单位</text>
<u-icon name="close" class="unit-popup-top-right" @click="close"></u-icon>
</view>
<view class="unit">
<view class="unit-item" :class="{ active: item.value == unit }" v-for="(item, index) in options" :key="index" @click="handleCheck(item)">{{ item.label }}</view>
</view>
</view>
</u-popup>
</template>
<script>
import { unitOptions } from '@/utils/options/maintain-bill/index.js';
import CheckboxGroups from '@/components/checkbox-groups/checkbox-groups.vue';
export default {
name: 'unit-popup',
components: {
CheckboxGroups
},
props: {
unit: {
type: String,
default: '箱'
}
},
data() {
return {
show: false,
options: unitOptions,
};
},
methods: {
open() {
this.show = true;
},
close() {
this.show = false;
},
handleCheck(item) {
this.$emit('change', item.value);
this.close();
}
}
};
</script>
<style lang="scss" scoped>
.unit-popup {
padding: 32upx;
}
.unit-popup-top {
margin-bottom: 42rpx;
display: flex;
align-items: center;
justify-content: space-between;
font-weight: bold;
color: #333333;
line-height: 32rpx;
&-right {
&:active {
opacity: 0.7;
}
}
}
.unit {
display: flex;
flex-wrap: wrap;
&-item {
width: 152upx;
height: 80upx;
background: #f6f7fa;
border-radius: 8upx;
font-size: 28upx;
color: #8d8d8d;
margin-right: 26upx;
margin-bottom: 24rpx;
display: flex;
align-items: center;
justify-content: center;
&:nth-child(4n) {
margin-right: 0;
}
}
.active {
background-color: $default-color;
color: #ffffff;
}
}
</style>
...@@ -76,14 +76,14 @@ export default { ...@@ -76,14 +76,14 @@ export default {
}, },
data() { data() {
return { return {
fileList: null, fileList: [],
qiniuToken: '', qiniuToken: '',
} }
}, },
computed: { computed: {
keyList() { keyList() {
let list = [] let list = []
if (this.fileList) { if (this.fileList.length) {
for (var item of this.fileList) { for (var item of this.fileList) {
if (item.key) { if (item.key) {
list.push(item.key) list.push(item.key)
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
}, },
watch: { watch: {
list(val) { list(val) {
if (val && !this.fileList) { if (val && !this.fileList.length) {
this.fileList = [] this.fileList = []
for (var item of val) { for (var item of val) {
this.fileList.push({ this.fileList.push({
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
"name" : "扳手记账", "name" : "扳手记账",
"appid" : "__UNI__EDB8C7C", "appid" : "__UNI__EDB8C7C",
"description" : "", "description" : "",
"versionName" : "1.0.1", "versionName" : "1.0.4",
"versionCode" : 101, "versionCode" : 104,
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
...@@ -25,12 +25,12 @@ ...@@ -25,12 +25,12 @@
}, },
/* 模块配置 */ /* 模块配置 */
"modules" : { "modules" : {
"Geolocation" : {},
"OAuth" : {}, "OAuth" : {},
"Payment" : {}, "Payment" : {},
"Push" : {},
"Share" : {}, "Share" : {},
"Geolocation" : {}, "Maps" : {}
"Maps" : {},
"Push" : {}
}, },
"safearea" : { "safearea" : {
"bottom" : { "bottom" : {
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
"permissions" : [ "permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>", "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
...@@ -53,12 +54,14 @@ ...@@ -53,12 +54,14 @@
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>", "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>", "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
...@@ -80,7 +83,15 @@ ...@@ -80,7 +83,15 @@
/* ios打包配置 */ /* ios打包配置 */
"ios" : { "ios" : {
"dSYMs" : false, "dSYMs" : false,
"idfa" : false "idfa" : false,
"privacyDescription" : {
"NSPhotoLibraryAddUsageDescription" : "用于保存图片",
"NSPhotoLibraryUsageDescription" : "用于选取图片",
"NSCameraUsageDescription" : "用于拍摄图片",
"NSLocationWhenInUseUsageDescription" : "用于获取位置信息及相关天气",
"NSContactsUsageDescription" : "用于保存联系人",
"NSMicrophoneUsageDescription" : "用于添加录音行程"
}
}, },
/* SDK配置 */ /* SDK配置 */
"sdkConfigs" : { "sdkConfigs" : {
...@@ -92,6 +103,7 @@ ...@@ -92,6 +103,7 @@
} }
}, },
"payment" : { "payment" : {
"appleiap" : {},
"weixin" : { "weixin" : {
"__platform__" : [ "android" ], "__platform__" : [ "android" ],
"appid" : "wxf0a780908851623f", "appid" : "wxf0a780908851623f",
...@@ -163,6 +175,11 @@ ...@@ -163,6 +175,11 @@
"iosStyle" : "storyboard", "iosStyle" : "storyboard",
"ios" : { "ios" : {
"storyboard" : "C:/启动页/扳手记账/CustomStoryboard.zip" "storyboard" : "C:/启动页/扳手记账/CustomStoryboard.zip"
},
"android" : {
"hdpi" : "C:/启动页/扳手记账/__480762.9.png",
"xhdpi" : "C:/启动页/扳手记账/__7201242.9.png",
"xxhdpi" : "C:/启动页/扳手记账/__10801882.9.png"
} }
} }
} }
......
...@@ -303,7 +303,10 @@ ...@@ -303,7 +303,10 @@
"navigationBarTitleText": "填写", "navigationBarTitleText": "填写",
"navigationStyle": "custom", "navigationStyle": "custom",
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true,
"app-plus": {
"scrollIndicator": "vertical"
}
} }
}, { }, {
"path": "particulars", "path": "particulars",
...@@ -323,7 +326,16 @@ ...@@ -323,7 +326,16 @@
"enablePullDownRefresh": false, "enablePullDownRefresh": false,
"disableScroll": true "disableScroll": true
} }
}] } ,{
"path" : "bill-style",
"style" :
{
"navigationBarTitleText": "收据样式",
"enablePullDownRefresh": false
}
}
]
}, },
{ {
"root": "pages/card", "root": "pages/card",
...@@ -370,7 +382,10 @@ ...@@ -370,7 +382,10 @@
"navigationBarTextStyle": "black", "navigationBarTextStyle": "black",
"navigationBarTitleText": "首页", "navigationBarTitleText": "首页",
"navigationBarBackgroundColor": "#F6F7FA", "navigationBarBackgroundColor": "#F6F7FA",
"backgroundColor": "#F6F7FA" "backgroundColor": "#F6F7FA",
"app-plus": {
"scrollIndicator":"none"
}
}, },
"tabBar": { "tabBar": {
"color": "#909399", "color": "#909399",
......
...@@ -56,19 +56,6 @@ export default { ...@@ -56,19 +56,6 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// @mixin scrollBarStyle() {
// &::-webkit-scrollbar {
// width: 7px;
// height: 7px;
// display: block;
// }
// &::-webkit-scrollbar-thumb {
// border-radius: 10px;
// -webkit-box-shadow: inset 0 0 5px #9b9ba3;
// // background: rgba(152, 155, 163, 0.5);
// background: red;
// }
// }
.receipt-preview { .receipt-preview {
position: relative; position: relative;
background-color: #ffffff; background-color: #ffffff;
......
...@@ -127,9 +127,9 @@ export default { ...@@ -127,9 +127,9 @@ export default {
let { value } = e.detail; let { value } = e.detail;
this.date = value + '-01'; this.date = value + '-01';
this.form.date = this.parseTime(value + '-01', '{y}年{m}月'); this.form.date = this.parseTime(value + '-01', '{y}年{m}月');
this.defaultDate = this.parseTime(value, '{y}-{m}') + '-01'; // this.defaultDate = this.parseTime(value, '{y}-{m}') + '-01';
console.log(this.date); console.log(this.date, this.form.date , this.date);
this.$nextTick(() => { this.$nextTick(() => {
// this.getMouthStatistics(); // this.getMouthStatistics();
this.reloadList() this.reloadList()
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
let params = { let params = {
current: this.current, current: this.current,
size: this.size, size: this.size,
month: this.defaultDate month: this.date
}; };
let res = await getList(params); let res = await getList(params);
if (this.current === 1) { if (this.current === 1) {
...@@ -181,8 +181,8 @@ export default { ...@@ -181,8 +181,8 @@ export default {
let last = this.list[this.list.length - 1]; let last = this.list[this.list.length - 1];
let first = records[0]; let first = records[0];
if (last.day === first.day) { if (last.day === first.day) {
last.expense=first.expense last.expense=parseFloat(last.expense)+parseFloat(first.expense)
last.income=first.income last.income=parseFloat(last.income)+parseFloat(first.income)
last.list.push(...first.list); last.list.push(...first.list);
this.list.splice(this.list.length - 1, 1,last); this.list.splice(this.list.length - 1, 1,last);
records.splice(0,1) records.splice(0,1)
...@@ -227,11 +227,12 @@ export default { ...@@ -227,11 +227,12 @@ export default {
}, },
initDate() { initDate() {
this.form.date = this.parseTime(new Date(), '{y}年{m}月'); this.form.date = this.parseTime(new Date(), '{y}年{m}月');
this.defaultDate = this.parseTime(new Date(), '{y}-{m}') + '-01'; this.date = this.parseTime(new Date(), '{y}-{m}') + '-01';
console.log('-----------defaultDate------------', this.defaultDate)
}, },
async getMouthStatistics() { async getMouthStatistics() {
try { try {
let res = await getStatistics({ month: this.defaultDate }); let res = await getStatistics({ month: this.date });
let { expense, income } = res.data; let { expense, income } = res.data;
let surplus = keepTwoDecimalFull(parseFloat(income) - parseFloat(expense)); let surplus = keepTwoDecimalFull(parseFloat(income) - parseFloat(expense));
this.statistics.expense = expense; this.statistics.expense = expense;
......
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
}; };
}, },
computed: { computed: {
...mapGetters(['userInfo', 'eyeClose', 'platform', 'canGetLocation']), ...mapGetters(['userInfo', 'eyeClose', 'platform', 'canGetLocation','isIOS']),
baseUrl() { baseUrl() {
return process.uniEnv.qn_base_url; return process.uniEnv.qn_base_url;
}, },
...@@ -280,7 +280,11 @@ export default { ...@@ -280,7 +280,11 @@ export default {
this.shareSuccessTip(); this.shareSuccessTip();
}, },
onReady() { onReady() {
if (this.platform !== '4') { if (this.platform === '4') {
if(this.isIOS){
this.getWeather();
}
}else{
this.getWeather(); this.getWeather();
} }
}, },
...@@ -326,12 +330,13 @@ export default { ...@@ -326,12 +330,13 @@ export default {
await checkOpenPermission(); await checkOpenPermission();
this.getLocation(); this.getLocation();
} catch (e) { } catch (e) {
console.log(e); console.log("getWeather:error",e);
//TODO handle the exception //TODO handle the exception
} }
} }
}, },
getLocation() { getLocation() {
console.log("===getLocation==");
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
success: res => { success: res => {
......
...@@ -26,7 +26,7 @@ import MidPopup from '@/components/mid-popup/mid-popup.vue'; ...@@ -26,7 +26,7 @@ import MidPopup from '@/components/mid-popup/mid-popup.vue';
import PlanView from './components/plan-view.vue'; import PlanView from './components/plan-view.vue';
import { tabbar } from '@/utils/settings.js'; import { tabbar } from '@/utils/settings.js';
import { getSign } from '@/api/schedule/index.js'; import { getSign } from '@/api/schedule/index.js';
import { mapGetters } from 'vuex';
export default { export default {
components: { components: {
MidPopup, MidPopup,
...@@ -48,6 +48,9 @@ export default { ...@@ -48,6 +48,9 @@ export default {
ready:false ready:false
}; };
}, },
computed: {
...mapGetters(['platform'])
},
onReady() { onReady() {
this.ready=true this.ready=true
this.date = this.parseTime(new Date(), '{y}-{m}-{d}'); this.date = this.parseTime(new Date(), '{y}-{m}-{d}');
...@@ -60,8 +63,9 @@ export default { ...@@ -60,8 +63,9 @@ export default {
this.getList(); this.getList();
this.getSignList() this.getSignList()
} }
if(this.platform==='4'){
plus.runtime.setBadgeNumber(0) plus.runtime.setBadgeNumber(0)
}
}, },
methods: { methods: {
beforeSwitch(index) { beforeSwitch(index) {
......
<template>
<view class="bill-style">
<view class="bill-style-title">请选择收据样式</view>
<view class="card-item" :class="{ active: item.type === type }" v-for="(item, index) in cardList" :key="index" @click="handleClick(item)">
<view class="card-item-icon" @click.stop="preview(item,index)"><image :src="item.icon" mode=""></image></view>
<view class="card-item-right">
<view class="card-item-right-title">
<view class="card-item-right-title-name">{{ item.title }}</view>
<view class="card-item-right-title-preview" @click.stop="preview(item,index)">
<view class="card-item-right-title-preview-icon"><image :src="previewIcon" mode=""></image></view>
<view class="card-item-right-title-preview-text">预览</view>
</view>
</view>
<view class="card-item-right-desc">{{ item.desc }}</view>
</view>
</view>
<submit-button @handleClick="submit" text="下一步"></submit-button>
</view>
</template>
<script>
import SubmitButton from '@/components/submit-button/index.vue';
import { billBaseUrl } from '@/utils/config.js';
export default {
components: {
SubmitButton
},
data() {
return {
previewIcon: billBaseUrl + 'yulanicon@3x.png',
cardList: [
{
type: '1',
icon: billBaseUrl + 'fuwuxiaopiaosuolue@3x.png',
image: billBaseUrl + 'weixiuzhangdan-1.png',
title: '服务小票',
desc: '适用个人用户的常规生活服务场景'
},
{
type: '2',
icon: billBaseUrl + 'sgoujupinzhengsuolue@3x.png',
image: billBaseUrl + 'dianzipinzheng-1.png',
title: '收据凭证',
desc: '适用企业用户的服务、售货、报销等场景'
}
],
previewImages:[billBaseUrl + 'weixiuzhangdan-1.png',billBaseUrl + 'dianzipinzheng-1.png'],
type: '1'
};
},
methods: {
handleClick(item) {
this.type = item.type;
},
preview(item,index) {
// 预览图片
uni.previewImage({
urls: this.previewImages,
current:index,
longPressActions: {
itemList: ['发送给朋友', '保存图片', '收藏'],
success: function(data) {
console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
},
fail: function(err) {
console.log(err.errMsg);
}
}
});
},
submit() {}
}
};
</script>
<style lang="scss" scoped>
.bill-style {
color: #333333;
padding: 0 24rpx;
&-title {
padding-top: 40rpx;
font-size: 32rpx;
font-weight: bold;
line-height: 32px;
}
.card-item {
margin-top: 40rpx;
padding: 24rpx;
border-radius: 16rpx;
border: 2rpx solid #ffffff;
box-shadow: 4rpx 8rpx 16rpx 0px #ffffff;
width: 100%;
display: flex;
align-items: flex-start;
background-color: #ffffff;
&-icon {
width: 240rpx;
height: 180rpx;
margin-right: 32rpx;
}
&-right {
flex: 1;
height: 100%;
padding-top: 16rpx;
&-title {
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 32rpx;
&-name {
font-size: 40rpx;
line-height: 40rpx;
font-weight: bold;
}
&-preview {
font-size: 24rpx;
color: $default-color;
line-height: 24rpx;
display: flex;
align-items: center;
&-icon {
width: 32rpx;
height: 24rpx;
margin-right: 8rpx;
}
}
}
&-desc {
font-size: 24rpx;
line-height: 32rpx;
}
}
}
.active {
border: 2rpx solid $default-color;
box-shadow: 4rpx 8rpx 16rpx 0px rgba(2, 160, 116, 0.2);
}
}
</style>
<template>
<view class="bill-count">
<view class="bill-count-item" v-for="(item, index) in list" :key="index">
<view class="bill-count-item-value ellipsis " :class="{red:detail[item.value]>0}">{{ detail[item.value] }}</view>
<view class="bill-count-item-label">{{ item.label }}</view>
<view class="bill-count-item-line" v-if="index !== list.length - 1"></view>
</view>
</view>
</template>
<script>
import { billCountOptions } from '@/utils/options/maintain-bill/index.js';
export default {
props:{
detail:{
type:Object,
default:()=>{}
}
},
data() {
return {
list: billCountOptions,
};
}
};
</script>
<style lang="scss" scoped>
.bill-count {
// height: 160upx;
display: flex;
padding-top: 32rpx;
&-item {
width: 25%;
height: 100%;
padding: 0 12upx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
&-value {
width: 100%;
text-align: center;
margin-bottom: 20upx;
line-height: 32upx;
font-size: 28upx;
font-weight: bold;
}
.red{
color: #FC524D;
}
&-label {
font-size: 24upx;
color: #8d8d8d;
}
&-line{
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 2upx;
height: 32upx;
background: #F6F7FA;
}
}
}
</style>
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<uni-popup v-model="show" ref="uniPopup" border-radius="24" :custom-style="customStyle" type="center" height="70%"> <uni-popup v-model="show" ref="uniPopup" border-radius="24" :custom-style="customStyle" type="center" height="70%">
<view class="receipt-preview"> <view class="receipt-preview">
<view class="head-background"><!-- 背景 --></view> <view class="head-background"><!-- 背景 --></view>
<view class="scroll-view"> <!-- #ifdef APP-PLUS -->
<!-- #ifdef APP-PLUS --> <scroll-view scroll-y="true" show-scrollbar class="scroll-Y">
<scroll-view scroll-y="true" show-scrollbar class="scroll-Y"> <!-- #endif -->
<!-- #endif --> <view class="scroll-view scroll-bar">
<view class="head"> <view class="head">
<view class="head-title">请根据流程选填信息,即可生成下方收据小票</view> <view class="head-title">请根据流程选填信息,即可生成下方收据小票</view>
<view class="quoted-price-step"> <view class="quoted-price-step">
...@@ -20,15 +20,16 @@ ...@@ -20,15 +20,16 @@
<view class="head-tips">以下为账单示意图,仅做参考</view> <view class="head-tips">以下为账单示意图,仅做参考</view>
</view> </view>
<view class="preview"><u-image :src="previewImage" mode="widthFix" class="preview-image"></u-image></view> <view class="preview"><u-image :src="previewImage" mode="widthFix" class="preview-image"></u-image></view>
<!-- #ifdef APP-PLUS -->
</scroll-view> <!-- <view class="scroll-scrollbar">
<!-- #endif -->
<!-- <view class="scroll-scrollbar">
<scroll-view scroll-y="true" class="scroll-scrollbar-view"> <scroll-view scroll-y="true" class="scroll-scrollbar-view">
<view class="scroll-scrollbar-view-inner"><view class="scroll-scrollbar-view-inner-box"></view></view> <view class="scroll-scrollbar-view-inner"><view class="scroll-scrollbar-view-inner-box"></view></view>
</scroll-view> </scroll-view>
</view> --> </view> -->
</view> </view>
<!-- #ifdef APP-PLUS -->
</scroll-view>
<!-- #endif -->
<view class="close" @click="close"><image :src="closeIcon" mode=""></image></view> <view class="close" @click="close"><image :src="closeIcon" mode=""></image></view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -88,6 +89,8 @@ export default { ...@@ -88,6 +89,8 @@ export default {
z-index: 2; z-index: 2;
width: 100%; width: 100%;
height: 100%; height: 100%;
}
.scroll-bar {
/* #ifndef APP-PLUS */ /* #ifndef APP-PLUS */
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<view class="maintain-create"> <view class="maintain-create">
<NavbarRight title="收据记账(开收据)" /> <NavbarRight title="收据记账(开收据)" />
<view class="content-view"> <view class="content-view">
<!-- #ifdef APP-PLUS -->
<scroll-view scroll-y="true" style="height:100%"> <scroll-view scroll-y="true" style="height:100%">
<!-- #endif -->
<required-tips @preview="preview"></required-tips> <required-tips @preview="preview"></required-tips>
<u-form :model="form" ref="uForm" label-width="180"> <u-form :model="form" ref="uForm" label-width="180">
<view class="info-view part-view"> <view class="info-view part-view">
...@@ -130,7 +132,9 @@ ...@@ -130,7 +132,9 @@
<UploadImages max-count="4" :uploading.sync="uploading" :width="144" :height="144" :list="form.attach" @on-list-change="handleListChange" /> <UploadImages max-count="4" :uploading.sync="uploading" :width="144" :height="144" :list="form.attach" @on-list-change="handleListChange" />
</view> </view>
</view> </view>
<!-- #ifdef APP-PLUS -->
</scroll-view> </scroll-view>
<!-- #endif -->
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<u-button :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">下一步</view></u-button> <u-button :custom-style="customConFirm" @click="handleClickSure" :disabled="!canConfirm" :loading="buttonLoading"><view class="confirm-view">下一步</view></u-button>
......
...@@ -25,20 +25,27 @@ ...@@ -25,20 +25,27 @@
:input-style="{ 'font-size': '26rpx', color: '#333333' }" :input-style="{ 'font-size': '26rpx', color: '#333333' }"
></u-search> ></u-search>
</view> </view>
<view class="title-view"> <view class="head">
<view class="left-view"> <view class="head-view">
<DateRangePicker ref="date-range-picker" v-model="daterange" :canReset="true" type="daterange" @change="handleClickChange"> <view class="title-view">
<view class="select-view" hover-class="u-hover-class"> <view class="left-view">
<view class="date-view">{{ dateString || '全部时段' }}</view> <DateRangePicker ref="date-range-picker" v-model="daterange" :canReset="true" type="daterange" @change="handleClickChange">
<u-icon name="arrow-down-fill" color="#8D8D8D" size="24"></u-icon> <view class="select-view" hover-class="u-hover-class">
<view class="date-view">{{ dateString || '全部时段' }}</view>
<u-icon name="arrow-down-fill" color="#8D8D8D" size="24"></u-icon>
</view>
</DateRangePicker>
</view> </view>
</DateRangePicker> <view class="right-view" hover-class="u-hover-class" @click="$u.throttle(handleSelectFilter, 500)">
</view> <view :class="['icon-view', { filter: onlyDebt }]"><u-icon name="checkbox-mark" v-if="onlyDebt" color="#02a074" size="24"></u-icon></view>
<view class="right-view" hover-class="u-hover-class" @click="$u.throttle(handleSelectFilter, 500)"> <view class="filter-view">只看欠款</view>
<view :class="['icon-view', { filter: onlyDebt }]"><u-icon name="checkbox-mark" v-if="onlyDebt" color="#02a074" size="24"></u-icon></view> </view>
<view class="filter-view">只看欠款</view> </view>
<bill-count ref="bill-count" :detail="statistics"></bill-count>
</view> </view>
</view> </view>
<view class="content-view"> <view class="content-view">
<scroll-view <scroll-view
scroll-y scroll-y
...@@ -73,8 +80,8 @@ import CellMaintainBill from '@/components/cell-maintain-bill'; ...@@ -73,8 +80,8 @@ import CellMaintainBill from '@/components/cell-maintain-bill';
import FabView from '@/components/fab-view'; import FabView from '@/components/fab-view';
import NoData from '@/components/no-data'; import NoData from '@/components/no-data';
import PopExport from '@/components/pop-export-bill'; import PopExport from '@/components/pop-export-bill';
import BillCount from './components/bill-count.vue';
import { repair } from '@/api/maintain/index.js'; import { repair } from '@/api/maintain/index.js';
import { downLoad } from '@/utils/download.js';
export default { export default {
components: { components: {
...@@ -83,7 +90,8 @@ export default { ...@@ -83,7 +90,8 @@ export default {
CellMaintainBill, CellMaintainBill,
NoData, NoData,
PopExport, PopExport,
FabView FabView,
BillCount
}, },
data() { data() {
return { return {
...@@ -99,7 +107,12 @@ export default { ...@@ -99,7 +107,12 @@ export default {
triggered: true, triggered: true,
freshing: false, freshing: false,
current: 1, current: 1,
size: 10 size: 10,
statistics:{
income:0,
expense:0,
surplus:0,
}
}; };
}, },
computed: { computed: {
...@@ -284,12 +297,21 @@ export default { ...@@ -284,12 +297,21 @@ export default {
font-size: 34rpx !important; font-size: 34rpx !important;
} }
} }
.head{
padding: 0 24rpx;
}
.head-view{
padding: 24rpx;
background: #FFFFFF;
border-radius: 16rpx;
}
.title-view { .title-view {
color: #333333; color: #333333;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 24rpx 24rpx 0 24rpx; padding-bottom: 24rpx;
border-bottom: 2rpx solid #F6F7FA;
.left-view { .left-view {
display: flex; display: flex;
align-items: center; align-items: center;
......
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
<view class="maintain-particulars"> <view class="maintain-particulars">
<NavbarRight title="服务明细" /> <NavbarRight title="服务明细" />
<view class="content-view"> <view class="content-view">
<!-- #ifdef APP-PLUS -->
<scroll-view scroll-y="true" style="height:100%"> <scroll-view scroll-y="true" style="height:100%">
<!-- #endif -->
<view class="tip-view"> <view class="tip-view">
<u-icon name="error-circle" color="#02A074" size="30"></u-icon> <u-icon name="error-circle" color="#02A074" size="30"></u-icon>
<view class="tip-text">若客户需要详细服务账单请填写</view> <view class="tip-text">若客户需要详细服务账单请填写</view>
...@@ -77,7 +79,7 @@ ...@@ -77,7 +79,7 @@
</view> </view>
<view class="list-view"> <view class="list-view">
<view v-for="(item, index) in info.expenseDetails" :key="index"> <view v-for="(item, index) in info.expenseDetails" :key="index">
<CellParticulars :showDelete="showDeleteButton" :defaultInfo="item" @change="handleChange($event, index)" @delete="handleClickDelete(index)" /> <CellParticulars :ref="'CellParticulars'+index" :showDelete="showDeleteButton" :defaultInfo="item" :index="index" @change="handleChange($event, index)" @delete="handleClickDelete(index)" @chooseUnit="chooseUnit" />
</view> </view>
<view class="add-item-view"> <view class="add-item-view">
<view class="add-item-count ellipsis-2"> <view class="add-item-count ellipsis-2">
...@@ -92,8 +94,11 @@ ...@@ -92,8 +94,11 @@
</view> </view>
</view> </view>
</view> </view>
<!-- #ifdef APP-PLUS -->
</scroll-view> </scroll-view>
<!-- #endif -->
</view> </view>
<view class="bottom-view"> <view class="bottom-view">
<view class="left-view"> <view class="left-view">
<u-button :custom-style="customSkip" @click="handleClickSkip"><view class="skip-view">跳过</view></u-button> <u-button :custom-style="customSkip" @click="handleClickSkip"><view class="skip-view">跳过</view></u-button>
...@@ -104,11 +109,29 @@ ...@@ -104,11 +109,29 @@
</view> </view>
<view class="loading-view" v-if="loading"><u-loading mode="flower"></u-loading></view> <view class="loading-view" v-if="loading"><u-loading mode="flower"></u-loading></view>
<PopNormal title="操作提醒" :visible.sync="visible" @confirm="handleClickConfirm" cancelText="取消" confirmText="确认" content="确认删除该条明细吗?" /> <PopNormal title="操作提醒" :visible.sync="visible" @confirm="handleClickConfirm" cancelText="取消" confirmText="确认" content="确认删除该条明细吗?" />
<PopNormal title="操作提醒" :visible.sync="pricePopVisible" @confirm="boforeSubmit" cancelText="修改" confirmText="忽略并保存">
<view class="price-pop">
<view>请您核对金额后再进行操作</view>
<view>
<text>明细金额:</text>
<text class="price-pop-red">
<text>¥</text>
<text>{{ expenseCount }}</text>
</text>
</view>
<view>
<text>应收金额:¥</text>
<text>{{ info.receivableAmount }}</text>
</view>
</view>
</PopNormal>
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<unit-popup ref="unit-popup" :unit="defaultUnit" @change="handleChangeUnit"></unit-popup>
</view> </view>
</template> </template>
<script> <script>
import UnitPopup from '@/components/unit-popup/unit-popup.vue';
import NavbarRight from '@/components/navbar-right'; import NavbarRight from '@/components/navbar-right';
import CellParticulars from '@/components/cell-particular'; import CellParticulars from '@/components/cell-particular';
import PopNormal from '@/components/pop-normal'; import PopNormal from '@/components/pop-normal';
...@@ -118,12 +141,14 @@ export default { ...@@ -118,12 +141,14 @@ export default {
components: { components: {
NavbarRight, NavbarRight,
CellParticulars, CellParticulars,
PopNormal PopNormal,
UnitPopup
}, },
data() { data() {
return { return {
billId: '', billId: '',
visible: false, visible: false,
pricePopVisible: false,
info: { info: {
expenseDetails: [], expenseDetails: [],
faultRecord: {} faultRecord: {}
...@@ -131,7 +156,10 @@ export default { ...@@ -131,7 +156,10 @@ export default {
showRecord: false, showRecord: false,
currentIndex: 0, currentIndex: 0,
buttonLoading: false, buttonLoading: false,
faultRecord: {} // 存储临时值 faultRecord: {}, // 存储临时值
defaultUnit:'',
defaultIndex:0,
}; };
}, },
computed: { computed: {
...@@ -205,10 +233,10 @@ export default { ...@@ -205,10 +233,10 @@ export default {
}, },
expenseCount() { expenseCount() {
if (this.info.expenseDetails && this.info.expenseDetails.length) { if (this.info.expenseDetails && this.info.expenseDetails.length) {
let num=0 let num = 0;
this.info.expenseDetails.map(item=>{ this.info.expenseDetails.map(item => {
num+=parseFloat(item.total) num += parseFloat(item.total);
}) });
return num; return num;
} }
return 0; return 0;
...@@ -289,7 +317,8 @@ export default { ...@@ -289,7 +317,8 @@ export default {
{ {
repairRecordId: this.billId, repairRecordId: this.billId,
name: '', name: '',
number: '1', number: 1,
unit: '',
unitPrice: '', unitPrice: '',
total: '' total: ''
} }
...@@ -302,6 +331,14 @@ export default { ...@@ -302,6 +331,14 @@ export default {
handleClickConfirm() { handleClickConfirm() {
this.info.expenseDetails.splice(this.currentIndex, 1); this.info.expenseDetails.splice(this.currentIndex, 1);
}, },
chooseUnit(item){
this.defaultUnit=item.unit
this.defaultIndex=item.index
this.$refs['unit-popup'].open()
},
handleChangeUnit(e) {
this.$refs['CellParticulars'+this.defaultIndex][0].unit=e
},
editeRepair() { editeRepair() {
this.buttonLoading = true; this.buttonLoading = true;
let params = JSON.parse(JSON.stringify(this.info)); let params = JSON.parse(JSON.stringify(this.info));
...@@ -347,8 +384,16 @@ export default { ...@@ -347,8 +384,16 @@ export default {
handleClickSkip(date) { handleClickSkip(date) {
this.toPage(); this.toPage();
}, },
handleClickSure() { boforeSubmit() {
this.editeRepair(); this.editeRepair();
},
handleClickSure() {
let receivableAmount = parseFloat(this.info.receivableAmount);
if (receivableAmount != this.expenseCount) {
this.pricePopVisible = true;
} else {
this.editeRepair();
}
} }
} }
}; };
...@@ -435,16 +480,14 @@ export default { ...@@ -435,16 +480,14 @@ export default {
line-height: 56rpx; line-height: 56rpx;
font-size: 24rpx; font-size: 24rpx;
&-red { &-red {
color: #fc524d; // color: #fc524d;
color: $default-color;
} }
} }
.add-item-button { .add-item-button {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 240rpx;
height: 88rpx;
color: #02a074; color: #02a074;
font-weight: bold; font-weight: bold;
font-size: 28rpx; font-size: 28rpx;
...@@ -493,5 +536,13 @@ export default { ...@@ -493,5 +536,13 @@ export default {
left: 0; left: 0;
position: fixed; position: fixed;
} }
.price-pop {
font-size: 32rpx;
line-height: 64rpx;
text-align: center;
.price-pop-red {
color: #fc524d;
}
}
} }
</style> </style>
This diff is collapsed.
This diff is collapsed.
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
</template> </template>
<script> <script>
// import CampTabs from '@/components/camp-tabs';
import SubscribeCard from './components/subscribe-card.vue'; import SubscribeCard from './components/subscribe-card.vue';
import SubscribeItem from './components/subscribe-item.vue'; import SubscribeItem from './components/subscribe-item.vue';
import SubscribeMessage from './components/subscribe-message.vue'; import SubscribeMessage from './components/subscribe-message.vue';
...@@ -41,7 +40,6 @@ import { getList } from '@/api/mine/subscribe.js'; ...@@ -41,7 +40,6 @@ import { getList } from '@/api/mine/subscribe.js';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
export default { export default {
components: { components: {
// CampTabs,
SubscribeCard, SubscribeCard,
SubscribeItem, SubscribeItem,
SubscribeMessage SubscribeMessage
......
...@@ -156,9 +156,19 @@ export default { ...@@ -156,9 +156,19 @@ export default {
// }, // },
gotoSetting() { gotoSetting() {
// if (this.isIOS) { // if (this.isIOS) {
permision.gotoAppPermissionSetting() // permision.gotoAppPermissionSetting()
// } // }
uni.showModal({
title: '通知开关',
content: '跳转到手机设置页面修改?',
success(res) {
if (res.confirm) {
permision.gotoAppPermissionSetting()
} else if (res.cancel) {
}
}
});
} }
} }
}; };
......
...@@ -56,6 +56,8 @@ $default-color: #02a074; ...@@ -56,6 +56,8 @@ $default-color: #02a074;
// -webkit-box-shadow: inset 0 0 10rpx #9b9ba3; // -webkit-box-shadow: inset 0 0 10rpx #9b9ba3;
// background: #9b9ba3; // background: #9b9ba3;
// } // }
&::-webkit-scrollbar { &::-webkit-scrollbar {
/* 隐藏默认的滚动条 */ /* 隐藏默认的滚动条 */
-webkit-appearance: none; -webkit-appearance: none;
......
## 0.0.2(2021-04-16)
- 修改插件package信息
## 0.0.1(2021-03-15)
- 初始化项目
{
"id": "uni-config-center",
"displayName": "uni-config-center",
"version": "0.0.2",
"description": "uniCloud 配置中心",
"keywords": [
"配置",
"配置中心"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"category": [
"uniCloud",
"云函数模板"
],
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"directories": {
"example": "../../../scripts/dist"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}
This diff is collapsed.
{
"name": "uni-config-center",
"version": "0.0.2",
"description": "配置中心",
"main": "index.js",
"keywords": [],
"author": "DCloud",
"license": "Apache-2.0"
}
\ No newline at end of file
## 1.3.5(2022-01-24)
- 优化 size 属性可以传入不带单位的字符串数值
## 1.3.4(2022-01-24)
- 优化 size 支持其他单位
## 1.3.3(2022-01-17)
- 修复 nvue 有些图标不显示的bug,兼容老版本图标
## 1.3.2(2021-12-01)
- 优化 示例可复制图标名称
## 1.3.1(2021-11-23)
- 优化 兼容旧组件 type 值
## 1.3.0(2021-11-19)
- 新增 更多图标
- 优化 自定义图标使用方式
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-icons](https://uniapp.dcloud.io/component/uniui/uni-icons)
## 1.1.7(2021-11-08)
## 1.2.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.5(2021-05-12)
- 新增 组件示例地址
## 1.1.4(2021-02-05)
- 调整为uni_modules目录规范
This diff is collapsed.
This diff is collapsed.
## Icons 图标
> **组件名:uni-icons**
> 代码块: `uIcons`
用于展示 icons 图标 。
### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-icons)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
## 1.0.13(2022-07-21)
- 修复 创建token时未传角色权限信息生成的token不正确的bug
## 1.0.12(2022-07-15)
- 提升与旧版本uni-id的兼容性(补充读取配置文件时回退平台app-plus、h5),但是仍推荐使用新平台名进行配置(app、web)
## 1.0.11(2022-07-14)
- 修复 部分情况下报`read property 'reduce' of undefined`的错误
## 1.0.10(2022-07-11)
- 将token存储在用户表的token字段内,与旧版本uni-id保持一致
## 1.0.9(2022-07-01)
- checkToken兼容token内未缓存角色权限的情况,此时将查库获取角色权限
## 1.0.8(2022-07-01)
- 修复clientDB默认依赖时部分情况下获取不到uni-id配置的Bug
## 1.0.7(2022-06-30)
- 修复config文件不合法时未抛出具体错误的Bug
## 1.0.6(2022-06-28)
- 移除插件内的数据表schema
## 1.0.5(2022-06-27)
- 修复使用多应用配置时报`Cannot read property 'appId' of undefined`的Bug
## 1.0.4(2022-06-27)
- 修复使用自定义token内容功能报错的Bug [详情](https://ask.dcloud.net.cn/question/147945)
## 1.0.2(2022-06-23)
- 对齐旧版本uni-id默认配置
## 1.0.1(2022-06-22)
- 补充对uni-config-center的依赖
## 1.0.0(2022-06-21)
- 提供uni-id token创建、校验、刷新接口,简化旧版uni-id公共模块
This diff is collapsed.
# uni-id-common
文档请参考:[uni-id-common](https://uniapp.dcloud.net.cn/uniCloud/uni-id-common.html)
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
export const version = "1.0.17" export const version = "1.0.21"
export const baseURL = "/baseapi" export const baseURL = "/baseapi"
export const token = "TOKEN" export const token = "TOKEN"
export const PHONENUMBER = "PHONENUMBER" export const PHONENUMBER = "PHONENUMBER"
......
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