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

图标更改为本地图标

parent 85b89380
<template>
<u-popup v-model="show" border-radius="24" safe-area-inset-bottom mode="bottom">
<u-popup v-model="show" border-radius="24" safe-area-inset-bottom mode="bottom" :duration='100'>
<view class="content">
<view class="billing">
<view class="billing-head">
......
......@@ -6,8 +6,8 @@
<view class="swiper-item">
<view class="billing-category-item" :class="{ active: item.id === checked }" v-for="(item, index) in swiper" :key="index" @click="handleCheck(item)">
<view class="billing-category-item-icon">
<image :src="billBaseUrl + item.recordSelectedIcon" mode="" v-if="item.id === checked || item.id === 'setting'"></image>
<image :src="billBaseUrl + item.recordIcon" mode="" v-else></image>
<image :src="billStaticBaseUrl + item.recordSelectedIcon" mode="" v-if="item.id === checked || item.id === 'setting'"></image>
<image :src="billStaticBaseUrl + item.recordIcon" mode="" v-else></image>
</view>
<view class="billing-category-item-text ellipsis" :class="{'billing-category-item-setting':item.id === 'setting'}">
<text>{{ item.name }}</text>
......@@ -23,7 +23,7 @@
<script>
import UniSwiperDot from '@/uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue';
import { billBaseUrl } from '@/utils/config.js';
import { billStaticBaseUrl } from '@/utils/config.js';
export default {
name: 'billing-category',
components: {
......@@ -41,7 +41,7 @@ export default {
},
data() {
return {
billBaseUrl,
billStaticBaseUrl,
duration: 500,
current: 0,
mode: 'round',
......
......@@ -31,7 +31,7 @@
</template>
<script>
import { billBaseUrl } from '@/utils/config.js'
import { billStaticBaseUrl } from '@/utils/config.js'
export default {
props: {
......@@ -53,7 +53,7 @@ export default {
},
computed: {
image() {
return billBaseUrl + this.info.classification.bookIcon
return billStaticBaseUrl + this.info.classification.bookIcon
},
beizhutuImage() {
return process.uniEnv.qn_base_url + 'beizhutu@3x.png'
......
<template>
<view class="">
<u-popup v-model="show" border-radius="24" safe-area-inset-bottom mode="bottom">
<u-popup v-model="show" border-radius="24" safe-area-inset-bottom mode="bottom" :duration='100'>
<view class="mid-popup">
<u-row gutter="16">
<u-col span="4" v-for="(item, index) in list" :key="index">
......@@ -72,7 +72,7 @@ export default {
.mid-popup {
padding: 0 20upx;
padding-top: 48upx;
padding-bottom: 144upx;
padding-bottom: 60upx;
.button-view {
display: flex;
flex-direction: column;
......
......@@ -4,7 +4,7 @@
<view class="card">
<view class="card-icon">
<view class="card-icon-image">
<image :src="billBaseUrl + detail.classification.bookDetailIcon" mode="" v-if="detail.classification && detail.classification.bookDetailIcon"></image>
<image :src="billStaticBaseUrl + detail.classification.bookDetailIcon" mode="" v-if="detail.classification && detail.classification.bookDetailIcon"></image>
</view>
</view>
<view class="card-head">
......@@ -40,7 +40,7 @@
import AbButton from '@/components/common/ab-button.vue';
import PopInput from '@/components/pop-input-view';
import BillingDetails from '@/components/billing-daily/billing-daily.vue';
import { billBaseUrl } from '@/utils/config.js';
import { billStaticBaseUrl } from '@/utils/config.js';
import { get } from '@/api/bill/index.js';
import { deleteByIds } from '@/api/bill/daily.js';
export default {
......@@ -51,7 +51,7 @@ export default {
},
data() {
return {
billBaseUrl,
billStaticBaseUrl,
showConfirm: false,
id: '',
type: '',
......
......@@ -8,7 +8,7 @@
<text>{{ detail.chargeStandard }}{{detail.unit}}</text>
</text>
<view class="collapse-body-bottom-add">
<zb-tooltip placement="top-end" ref="tooltip1" color="#7f7f7f" :visible.sync="isShow">
<zb-tooltip placement="top-end" ref="tooltip1" color="#7f7f7f" :visible.sync="showTips">
<view class="collapse-body-bottom-add-icon" @click="add">
<number-box theme-colors="#02A074" inputHeight="40" v-model="form.num" disabled-input @change="valChange"></number-box>
</view>
......@@ -25,7 +25,6 @@
<script>
import ZbTooltip from '@/components/zb-tooltip/zb-tooltip.vue';
import NumberBox from '@/components/number-box/number-box.vue';
import { mapGetters } from 'vuex';
export default {
components: {
ZbTooltip,
......@@ -39,26 +38,21 @@ export default {
detail: {
type: Object | null | String,
default: () => {}
},
showTips:{
type: Boolean,
default:false
}
},
data() {
return {
isShow: false,
form: {
num: 0
}
};
},
computed: {
...mapGetters(['quotedPriceTooltip'])
},
watch: {
quotedPriceTooltip: {
handler(val) {
this.isShow = !val;
},
immediate: true
},
detail: {
handler(val, old) {
this.form.num = val.num || 0;
......
......@@ -43,11 +43,10 @@
@add="addPrice"
v-for="(item3, index3) in item2.children"
:key="item3.classC"
:showTips="!quotedPriceTooltip&&index3===0"
></collapse-body>
</view>
</view>
</view>
<!-- <uni-collapse>
......@@ -84,7 +83,7 @@
</template>
<script>
import QuotedPriceStep from '../components/quoted-price-step.vue';
import QuotedPriceStep from '../components/quoted-price-step.vue';
import UniCollapse from '@/components/uni-collapse/uni-collapse.vue';
import UniCollapseItem from '@/components/uni-collapse-item/uni-collapse-item.vue';
import QuotedPriceTips from '../components/quoted-price-tips.vue';
......@@ -94,7 +93,7 @@ import CartPopup from './components/cart-popup.vue';
import { mapGetters } from 'vuex';
import { getOffer } from '@/api/bill/quoted-price.js';
export default {
components: { QuotedPriceStep,UniCollapse, UniCollapseItem, QuotedPriceTips, CollapseBody, ShoppingCart, CartPopup },
components: { QuotedPriceStep, UniCollapse, UniCollapseItem, QuotedPriceTips, CollapseBody, ShoppingCart, CartPopup },
data() {
return {
form: {
......@@ -129,9 +128,9 @@ export default {
this.form.prodCode = prodCode;
}
}
this.form.serviceType = 'WX';
this.form.brandCode = 'MIDEA';
this.form.prodCode = '1000';
// this.form.serviceType = 'WX';
// this.form.brandCode = 'MIDEA';
// this.form.prodCode = '1000';
},
onReady() {
/* 在非H5平台,nextTick回调后有概率获取到错误的元素高度,则添加200ms的延迟来减少BUG的产生 */
......@@ -144,18 +143,18 @@ export default {
}, 100);
},
methods: {
resetPrice(item){
let price=0
if(item.standardMin&&item.standardMax){
if(item.standardMin==item.standardMax){
price=item.standardMin
}else{
price=`${item.standardMin}-${item.standardMax}`
resetPrice(item) {
let price = 0;
if (item.standardMin && item.standardMax) {
if (item.standardMin == item.standardMax) {
price = item.standardMin;
} else {
price = `${item.standardMin}-${item.standardMax}`;
}
}else{
price=item.chargeStandard
} else {
price = item.chargeStandard;
}
return price
return price;
},
openCollapse(item) {
item.open = !item.open;
......@@ -167,8 +166,8 @@ export default {
this.setCart(params);
},
setCart(params) {
let { num, parentTitle } = params;
let item=this.deepClone(params.item)
let { num, parentTitle } = params;
let item = this.deepClone(params.item);
let flag = true;
this.shoppingCartList.forEach((target, index) => {
if (target.classC === item.classC) {
......@@ -209,24 +208,24 @@ export default {
if (this.shoppingCartList.length) {
this.shoppingCartList.forEach(item => {
this.mainData.children.forEach(data => {
data.children.map(el=>{
data.children.map(el => {
if (item.classC === el.classC) {
this.$set(el, 'num', item.num);
data.open = true;
}
})
});
});
});
}
// 当购物车中有被删除项时,通知main里面计数器变为0
if (deleted) {
this.mainData.children.forEach(data => {
data.children.map(el=>{
data.children.map(el => {
if (deleted.classC === el.classC) {
this.$set(el, 'num', 0);
data.open = true;
}
})
});
});
}
},
......@@ -257,7 +256,7 @@ export default {
// 去重
newList = this.uniqueFunc(newList, 'classA');
// 移除 "备件费"
newList.splice(newList.findIndex(item=>item.classA==='T12'),1)
newList.splice(newList.findIndex(item => item.classA === 'T12'), 1);
// 左侧列表赋值
this.leftArray = this.deepClone(newList);
// 第二层
......@@ -275,18 +274,18 @@ export default {
});
});
// 第二层去重
newList=newList.map(item=>{
let arr=this.deepClone(item.children)
item.children=this.uniqueFunc(arr, 'classB');
return item
})
newList = newList.map(item => {
let arr = this.deepClone(item.children);
item.children = this.uniqueFunc(arr, 'classB');
return item;
});
// 第三层
newList.map(el => {
el.children.map(el2 => {
data.map((item, index) => {
if (item.classB === el2.classB) {
let item1 = this.deepClone(item);
item1.num=0
item1.num = 0;
if (!el2.children) {
el2.children = [item1];
} else {
......@@ -298,10 +297,9 @@ export default {
});
// 总列表赋值
this.totalArray = newList;
console.log(this.totalArray)
console.log(this.totalArray);
// 右侧列表赋值
this.mainData = this.totalArray[this.leftIndex];
} catch (e) {
console.log(e);
//TODO handle the exception
......@@ -439,9 +437,9 @@ page {
margin-left: 24rpx;
font-size: 24rpx;
color: #fc524d;
&-icon{
&-icon {
margin-left: 12rpx;
color: #CCCCCC;
color: #cccccc;
}
}
}
......
......@@ -12,7 +12,7 @@
</picker>
</view>
<view class="bill-view">
<view class="content-view"><scroll-box ref="scroll-box" :date="defaultDate" :count="statistics"></scroll-box></view>
<view class="content-view"><scroll-box ref="scroll-box" :date="defaultDate" :count="statistics" @refresh="getMouthStatistics"></scroll-box></view>
</view>
<u-toast ref="uToast" />
<PopExport ref="pop-export-bill" :visible.sync="visible" @confirm="handleClickConfirm" />
......@@ -70,7 +70,7 @@ export default {
console.log('onShow');
if (!this.firstEnter) {
this.$refs['scroll-box'].reloadList();
this.getMouthStatistics();
// this.getMouthStatistics();
}
},
methods: {
......@@ -110,7 +110,7 @@ export default {
this.form.date = this.parseTime(value + '-01', '{y}年{m}月');
console.log(this.defaultDate);
this.$nextTick(() => {
this.getMouthStatistics();
// this.getMouthStatistics();
this.$refs['scroll-box'].reloadList();
});
},
......
......@@ -17,7 +17,7 @@
<view class="bill-count"><bill-count ref="bill-count" :detail="count"></bill-count></view>
<NoData v-if="noData" :text="noDataText" customStyle="margin-top: 0rpx;" :imageName="noDataImage" />
<view v-else>
<view class="bill-list"><BillList :list="records" @select="handleSelectCell" /></view>
<view class="bill-list"><BillList :list="list" @select="handleSelectCell" /></view>
<view class="load-more-view" v-show="(current == 0 && loaded) || current > 0"><u-loadmore :status="loadStatus" bgColor="#F6F7FA"></u-loadmore></view>
</view>
<view class="loading-view" v-if="!loaded && !freshing"><u-loading mode="flower"></u-loading></view>
......@@ -30,7 +30,7 @@
import BillList from '@/components/bill-list';
import BillCount from './bill-count.vue';
import NoData from '@/components/no-data';
import { getWeek } from '@/utils/common.js';
import { getWeek, checkToken } from '@/utils/common.js';
import { getList, getStatistics } from '@/api/bill/index.js';
export default {
components: {
......@@ -50,7 +50,7 @@ export default {
},
data() {
return {
records: [],
list: [],
loaded: false,
current: 1,
size: 10,
......@@ -65,12 +65,12 @@ export default {
},
computed: {
noData() {
return (this.records || []).length == 0 && this.loaded;
return (this.list || []).length == 0 && this.loaded;
}
},
mounted() {
this.setToday();
this.reloadList();
// this.reloadList();
this.freshing = false;
},
methods: {
......@@ -88,11 +88,14 @@ export default {
reloadList() {
this.current = 0;
this.loadStatus = 'loading';
if (!checkToken()) {
this.list = [];
}
this.getList();
this.$emit('refresh');
},
async getList() {
if (this.current == 0) {
this.records = [];
if (this.current === 0) {
this.loaded = false;
}
try {
......@@ -101,8 +104,10 @@ export default {
size: this.size,
month: this.date
};
console.log('23131');
let res = await getList(params);
if (this.current === 0) {
this.list = [];
}
let { records, total } = res.data;
if (records) {
records.forEach(item => {
......@@ -120,9 +125,9 @@ export default {
}
item.week = week;
});
this.records.push(...records);
this.list.push(...records);
// 更新底部加载状态
this.loadStatus = total > this.records.length ? 'loadmore' : 'nomore';
this.loadStatus = total > this.list.length ? 'loadmore' : 'nomore';
}
this.$nextTick(() => {
if (this.freshing) {
......@@ -139,7 +144,7 @@ export default {
this.freshing = false;
}
});
this.loadStatus='loadmore'
this.loadStatus = 'loadmore';
}
this.loaded = true;
},
......@@ -153,6 +158,7 @@ export default {
},
// 滚动底部
reachBottom(e) {
console.log("reachBottom")
this.current += 1;
if (this.loadStatus != 'loadmore') return;
this.loadStatus == 'loading';
......
......@@ -357,7 +357,7 @@ export default {
handleClickTool(item) {
if (!this.checkVip()) return
if (item.name === '日常记账') {
this.$refs['midPopup'].open()
this.$refs['midPopup'].openBillingDaily();
} else {
uni.navigateTo({
url: item.path,
......
......@@ -45,7 +45,7 @@ export default {
created() {},
methods: {
async getList(date) {
this.list=[]
this.list=[];
try {
let res = await getList({
day: date
......
......@@ -20,7 +20,7 @@
<view class="item-view">
<view class="left-view">
<view class="image-view">
<image :src="billBaseUrl+item.icon" v-if="item.icon"></image>
<image :src="billStaticBaseUrl+item.icon" v-if="item.icon"></image>
</view>
<view class="name-view">{{ item.label }}</view>
</view>
......@@ -42,7 +42,7 @@
<view class="item-view">
<view class="left-view">
<view class="image-view">
<image :src="billBaseUrl+movableViewInfo.data.icon" class="image-view" v-if="movableViewInfo.data.icon"></image>
<image :src="billStaticBaseUrl+movableViewInfo.data.icon" class="image-view" v-if="movableViewInfo.data.icon"></image>
</view>
<view class="name-view">{{ movableViewInfo.data && movableViewInfo.data.label }}</view>
</view>
......@@ -56,7 +56,7 @@
<script>
import PopInput from '@/components/pop-input-view';
import {billBaseUrl} from '@/utils/config.js'
import {billStaticBaseUrl} from '@/utils/config.js'
export default {
name: 'dragEdit',
props: ['list'],
......@@ -65,7 +65,7 @@ export default {
},
data() {
return {
billBaseUrl,
billStaticBaseUrl,
showConfirm: false,
readyDeleteIndex: null,
options: [
......
......@@ -17,6 +17,8 @@ export const billBaseUrl = process.uniEnv.qn_base_url + 'bill/'; // 七牛云对
export const planBaseUrl = process.uniEnv.qn_base_url + 'plan/'; // 七牛云对象存储图片地址-行程
export const UPLOAD_FILE_HOST = process.uniEnv.qn_asset_url; // 服务器用户上传文件地址
export const billStaticBaseUrl = '/static/image/bill/'; // 七牛云对象存储图片地址-账单
export const maintain_share_url = 'https://system.banshouhui.com/maintainqrcode' // pages/maintain-bill/show二维码地址
export const index_share_url = 'https://system.banshouhui.com/indexqrcode' // pages/index/index二维码地址
export const card_share_url = 'https://system.banshouhui.com/shareqrcode' // pages/card/share二维码地址
......
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