Commit 7954d1b2 authored by lwhqawsed123's avatar lwhqawsed123
parents 218028f3 6bd11e35
Pipeline #3777 canceled with stages
...@@ -160,6 +160,25 @@ export async function createOrUpdateService(data) { ...@@ -160,6 +160,25 @@ export async function createOrUpdateService(data) {
}) })
} }
// 获取批量结算数据
export async function batchSettleInfo(data) {
return request({
url: `/rest/repair/batchSettleInfo`,
method: 'PUT',
data,
noLoading: true
})
}
// 批量结清
export async function batchSettle(data) {
return request({
url: `/rest/repair/batchSettle`,
method: 'POST',
data,
noLoading: true
})
}
export async function getProjectMembersKnow(data) { export async function getProjectMembersKnow(data) {
return request({ return request({
...@@ -168,4 +187,5 @@ export async function getProjectMembersKnow(data) { ...@@ -168,4 +187,5 @@ export async function getProjectMembersKnow(data) {
data, data,
noLoading: true noLoading: true
}) })
} }
\ No newline at end of file
<template> <template>
<view class="cell-maintain-bill"> <view :class="['cell-maintain-bill', {select: isSelect}]">
<view <view v-if="isSelect" class="left-select-view" @click="$u.throttle(handleAction, 500)" hover-class="u-hover-class">
class="content-view" <u-icon v-if="info.selected" name="checkmark-circle-fill" color="#02A074" size="42"></u-icon>
hover-class="u-hover-class" <view v-else class="select-icon"></view>
@click.stop="$u.throttle(handleSelect, 500)" </view>
> <view class="content-view" hover-class="u-hover-class" @click.stop="$u.throttle(handleSelect, 500)">
<view class="title-view"> <view class="title-view">
<view class="left-view"> <view class="left-view">
<view class="type-view" :style="currentType.style"><text>{{currentType.name}}</text></view> <view :class="['type-view', {select: isSelect}]" :style="currentMaintainType.style">
<text>{{currentMaintainType.name}}</text></view>
<view>{{ info.id }}</view> <view>{{ info.id }}</view>
</view> </view>
<view class="status-view"> <view class="status-view">
...@@ -16,7 +17,7 @@ ...@@ -16,7 +17,7 @@
<image :src="statusSetting[info.settleState.code].image"></image> <image :src="statusSetting[info.settleState.code].image"></image>
</view> </view>
<view class="status-text">{{ <view class="status-text">{{
statusSetting[info.settleState.code].text statusSetting[info.settleState.code].text
}}</view> }}</view>
</view> </view>
<view class="item-view"> <view class="item-view">
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
<image :src="statusSetting[info.sendStatus.code].image"></image> <image :src="statusSetting[info.sendStatus.code].image"></image>
</view> </view>
<view class="status-text">{{ <view class="status-text">{{
statusSetting[info.sendStatus.code].text statusSetting[info.sendStatus.code].text
}}</view> }}</view>
</view> </view>
</view> </view>
...@@ -52,16 +53,13 @@ ...@@ -52,16 +53,13 @@
</view> </view>
<!-- <view class="line-view"></view> --> <!-- <view class="line-view"></view> -->
<view <view class="bottom-view" :style="statusSetting[info.settleState.code].style">
class="bottom-view"
:style="statusSetting[info.settleState.code].style"
>
<view v-for="(item, index) in bottoms" :key="index" class="item-view"> <view v-for="(item, index) in bottoms" :key="index" class="item-view">
<view v-if="index % 2" class="line-view"> </view> <view v-if="index % 2" class="line-view"> </view>
<template v-else> <template v-else>
<view>{{ item.title }}</view> <view>{{ item.title }}</view>
<view :style="'color:' + item.color" class="count-view">{{ <view :style="'color:' + item.color" class="count-view">{{
item.value item.value
}}</view> }}</view>
</template> </template>
</view> </view>
...@@ -77,7 +75,7 @@ export default { ...@@ -77,7 +75,7 @@ export default {
props: { props: {
info: { info: {
type: Object, type: Object,
default() { default () {
return {} return {}
}, },
}, },
...@@ -85,38 +83,45 @@ export default { ...@@ -85,38 +83,45 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
type: {
type: String,
default: 'normal'
}
}, },
data() { data () {
return {} return {}
}, },
computed: { computed: {
baseUrl() { baseUrl () {
return process.uniEnv.qn_base_url return process.uniEnv.qn_base_url
}, },
middleImage() { isSelect () {
return this.type == 'select'
},
middleImage () {
return this.baseUrl + 'fengexuxian-s@3x.png' return this.baseUrl + 'fengexuxian-s@3x.png'
}, },
locationImage() { locationImage () {
return this.baseUrl + 'weixiudizhi-l@3x.png' return this.baseUrl + 'weixiudizhi-l@3x.png'
}, },
timeImage() { timeImage () {
return this.baseUrl + 'weixiushijian-l@3x.png' return this.baseUrl + 'weixiushijian-l@3x.png'
}, },
yijieqingImage() { yijieqingImage () {
return this.baseUrl + 'yijieqing-n@3x.png' return this.baseUrl + 'yijieqing-n@3x.png'
}, },
weiquerenImage() { weiquerenImage () {
return this.baseUrl + 'weiqueren@3x.png' return this.baseUrl + 'weiqueren@3x.png'
}, },
weijieqingImage() { weijieqingImage () {
return this.baseUrl + 'weijieqing@3x.png' return this.baseUrl + 'weijieqing@3x.png'
}, },
weifasongImage() { weifasongImage () {
return this.baseUrl + 'weifasong@3x.png' return this.baseUrl + 'weifasong@3x.png'
}, },
// sendStatus WAIT:未发送;WAIT_SURE:未确定;SURE:已确定 // sendStatus WAIT:未发送;WAIT_SURE:未确定;SURE:已确定
// settleState NO:未结清;YES:已结清 // settleState NO:未结清;YES:已结清
statusSetting() { statusSetting () {
return { return {
WAIT_SURE: { text: '未确认', image: this.weiquerenImage }, WAIT_SURE: { text: '未确认', image: this.weiquerenImage },
NO: { NO: {
...@@ -135,7 +140,7 @@ export default { ...@@ -135,7 +140,7 @@ export default {
SURE: { text: '已确认', image: this.yijieqingImage }, SURE: { text: '已确认', image: this.yijieqingImage },
} }
}, },
bottoms() { bottoms () {
var result = var result =
Number(this.info['receivableAmount'] || 0) - Number(this.info['receivableAmount'] || 0) -
Number(this.info['actualAmount'] || 0) Number(this.info['actualAmount'] || 0)
...@@ -162,15 +167,15 @@ export default { ...@@ -162,15 +167,15 @@ export default {
}, },
] ]
}, },
isRefund() { isRefund () {
return this.info.type == 'refund' return this.info.type == 'refund'
}, },
types() { maintainTypes () {
return { return {
'receipt': { 'receipt': {
name: '小票', name: '小票',
style: 'background-color: #A4E9D5' style: 'background-color: #A4E9D5'
}, },
'voucher': { 'voucher': {
name: '凭证', name: '凭证',
style: 'background-color: #FFDCAF' style: 'background-color: #FFDCAF'
...@@ -185,16 +190,20 @@ export default { ...@@ -185,16 +190,20 @@ export default {
}, },
} }
}, },
currentType() { currentMaintainType () {
return this.info.type ? this.types[this.info.type] : {} return this.info.type ? this.maintainTypes[this.info.type] : {}
} }
}, },
methods: { methods: {
handleSelect() { handleSelect () {
this.$emit('select', this.info.id) this.$emit('select', this.info.id)
}, },
formatCount(count) { handleAction () {
this.info.selected = !this.info.selected
this.$emit('action', this.info.selected, this.info.id)
},
formatCount (count) {
return formatCount(count) return formatCount(count)
}, },
}, },
...@@ -202,11 +211,33 @@ export default { ...@@ -202,11 +211,33 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.cell-maintain-bill { .cell-maintain-bill {
&.select {
display: flex;
align-items: center;
}
.left-select-view {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 80rpx;
flex-shrink: 0;
.select-icon {
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 2rpx solid #cccccc;
}
}
.content-view { .content-view {
padding: 32rpx 0 0 0; padding: 32rpx 0 0 0;
background-color: #ffffff; background-color: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
overflow: hidden; overflow: hidden;
flex: 1;
.title-view { .title-view {
padding: 0 24rpx 0 0; padding: 0 24rpx 0 0;
...@@ -215,10 +246,12 @@ export default { ...@@ -215,10 +246,12 @@ export default {
align-items: center; align-items: center;
color: #333333; color: #333333;
font-size: 28rpx; font-size: 28rpx;
.left-view { .left-view {
display: flex; display: flex;
align-items: center; align-items: center;
color: #8D8D8F; color: #8D8D8F;
.type-view { .type-view {
height: 32rpx; height: 32rpx;
width: 56rpx; width: 56rpx;
...@@ -230,8 +263,13 @@ export default { ...@@ -230,8 +263,13 @@ export default {
align-items: center; align-items: center;
color: #333333; color: #333333;
font-size: 16rpx; font-size: 16rpx;
&.select {
margin-right: 8rpx;
}
} }
} }
.status-view { .status-view {
font-weight: bold; font-weight: bold;
font-size: 24rpx; font-size: 24rpx;
...@@ -239,15 +277,18 @@ export default { ...@@ -239,15 +277,18 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: flex-end; justify-content: flex-end;
.item-view { .item-view {
width: 116rpx; width: 116rpx;
height: 40rpx; height: 40rpx;
position: relative; position: relative;
.image-view { .image-view {
position: absolute; position: absolute;
width: 116rpx; width: 116rpx;
height: 40rpx; height: 40rpx;
} }
.status-text { .status-text {
position: relative; position: relative;
text-align: center; text-align: center;
...@@ -258,6 +299,7 @@ export default { ...@@ -258,6 +299,7 @@ export default {
} }
} }
} }
// .middle-view { // .middle-view {
// background-color: transparent; // background-color: transparent;
// width: 100%; // width: 100%;
...@@ -268,6 +310,7 @@ export default { ...@@ -268,6 +310,7 @@ export default {
// margin: 32rpx 24rpx; // margin: 32rpx 24rpx;
// background-color: #f6f7fa; // background-color: #f6f7fa;
padding: 32rpx 24rpx; padding: 32rpx 24rpx;
.name-view { .name-view {
font-weight: bold; font-weight: bold;
color: #333333; color: #333333;
...@@ -275,16 +318,19 @@ export default { ...@@ -275,16 +318,19 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 24rpx; margin-bottom: 24rpx;
.phone-view { .phone-view {
margin-left: 44rpx; margin-left: 44rpx;
} }
} }
.location-view { .location-view {
color: #8D8D8F; color: #8D8D8F;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
margin-bottom: 16rpx; margin-bottom: 16rpx;
.image-view { .image-view {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
...@@ -293,11 +339,13 @@ export default { ...@@ -293,11 +339,13 @@ export default {
margin-top: 4rpx; margin-top: 4rpx;
} }
} }
.time-view { .time-view {
color: #8D8D8F; color: #8D8D8F;
font-size: 28rpx; font-size: 28rpx;
display: flex; display: flex;
align-items: center; align-items: center;
.image-view { .image-view {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
...@@ -307,10 +355,11 @@ export default { ...@@ -307,10 +355,11 @@ export default {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.time-text {
} .time-text {}
} }
} }
// .line-view { // .line-view {
// height: 2rpx; // height: 2rpx;
// background-color: #f6f7fa; // background-color: #f6f7fa;
...@@ -324,11 +373,13 @@ export default { ...@@ -324,11 +373,13 @@ export default {
color: #333333; color: #333333;
font-size: 24rpx; font-size: 24rpx;
height: 92rpx; height: 92rpx;
.item-view { .item-view {
display: flex; display: flex;
align-items: center; align-items: center;
text-align: center; text-align: center;
color: #8D8D8F; color: #8D8D8F;
.count-view { .count-view {
color: #333333; color: #333333;
font-weight: bold; font-weight: bold;
...@@ -336,6 +387,7 @@ export default { ...@@ -336,6 +387,7 @@ export default {
margin-left: 16rpx; margin-left: 16rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.line-view { .line-view {
background-color: #eeeeee; background-color: #eeeeee;
width: 2rpx; width: 2rpx;
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
opacity: opacity, opacity: opacity,
left: left + 'px', left: left + 'px',
top: top + 'px', top: top + 'px',
'background-color': backgroundColor,
'box-shadow': boxShadow
}" }"
@click.stop="handleClick" @click.stop="handleClick"
> >
...@@ -45,6 +47,14 @@ export default { ...@@ -45,6 +47,14 @@ export default {
canMove: { canMove: {
type: Boolean, type: Boolean,
default: true, default: true,
},
backgroundColor: {
type: String,
default: '#02A074'
},
boxShadow: {
type: String,
default: '0px 6px 12px 0px rgba(2, 160, 116, 0.3500)'
} }
}, },
data() { data() {
...@@ -183,7 +193,7 @@ export default { ...@@ -183,7 +193,7 @@ export default {
height: 96rpx; height: 96rpx;
width: 96rpx; width: 96rpx;
border-radius: 50%; border-radius: 50%;
background-color: #02A074; // background-color: #02A074;
// background: linear-gradient(to right, #fff100, #ffde00); // background: linear-gradient(to right, #fff100, #ffde00);
z-index: 999; z-index: 999;
display: flex; display: flex;
...@@ -192,7 +202,7 @@ export default { ...@@ -192,7 +202,7 @@ export default {
color: #ffffff; color: #ffffff;
font-size: 24rpx; font-size: 24rpx;
font-weight: bold; font-weight: bold;
box-shadow: 0px 6px 12px 0px rgba(2, 160, 116, 0.3500); // box-shadow: 0px 6px 12px 0px rgba(2, 160, 116, 0.3500);
// padding-right: 4rpx; // padding-right: 4rpx;
.image-icon { .image-icon {
width: 96rpx; width: 96rpx;
......
...@@ -110,6 +110,15 @@ ...@@ -110,6 +110,15 @@
} }
}, { }, {
"path": "batch-settle/index",
"style": {
"navigationBarTitleText": "批量结清",
"navigationStyle": "custom",
"enablePullDownRefresh": false,
"disableScroll": true
}
}, {
"path": "quoted-price/quoted-price", "path": "quoted-price/quoted-price",
"style": { "style": {
"navigationBarTitleText": "查报价", "navigationBarTitleText": "查报价",
......
This diff is collapsed.
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
<view class="debit-detail" @click="toBill"> <view class="debit-detail" @click="toBill">
<view class="content"> <view class="content">
<view class="content-item"> <view class="content-item">
<text class="content-item-label">客户名称:</text> <!-- <text class="content-item-label">客户名称:</text> -->
<text class="content-item-value">{{detail.customerName}}</text> <text class="content-item-value">{{detail.customerName}}</text>
</view> </view>
<view class="content-item"> <view class="content-item">
<text class="content-item-label">联系电话:</text> <!-- <text class="content-item-label">联系电话:</text> -->
<text class="content-item-value">{{detail.customerPhone}}</text> <text class="content-item-label">{{detail.customerPhone || ''}}</text>
</view> </view>
<view class="line"> <view class="line">
...@@ -88,6 +88,7 @@ export default { ...@@ -88,6 +88,7 @@ export default {
&-item { &-item {
font-size: 28upx; font-size: 28upx;
line-height: 28upx; line-height: 28upx;
min-height: 28upx;
&:first-child{ &:first-child{
margin-bottom: 32upx; margin-bottom: 32upx;
} }
...@@ -120,9 +121,11 @@ export default { ...@@ -120,9 +121,11 @@ export default {
text-align: center; text-align: center;
&-status { &-status {
color: #8D8D8D; color: #8D8D8D;
font-size: 24rpx;
} }
&-money { &-money {
color: #FC524D; color: #FC524D;
font-size: 32rpx;
} }
} }
......
...@@ -94,6 +94,12 @@ export default { ...@@ -94,6 +94,12 @@ export default {
}, },
onLoad(options) { onLoad(options) {
this.init(); this.init();
uni.$on('debit-bill-list', res => {
this.init();
});
},
onUnload() {
uni.$off('debit-bill-list');
}, },
methods: { methods: {
changeSearch() { changeSearch() {
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<view :class="['bill-count-items', {last: ind + 1 == list.length}]" v-for="(items, ind) in list" :key="ind"> <view :class="['bill-count-items', {last: ind + 1 == list.length}]" v-for="(items, ind) in list" :key="ind">
<view class="bill-count-items-item" v-for="(item, index) in items" :key="item.value"> <view class="bill-count-items-item" v-for="(item, index) in items" :key="item.value">
<view class="bill-count-items-item-value" > <view class="bill-count-items-item-value" >
<text :style="'color:' + item.color">{{ detail[item.value] ? keepWFull(detail[item.value] || 0) : info[item.value]}}</text> <text :style="'color:' + item.color">{{ detail[item.value] ? keepWFull(detail[item.value] || 0) : (info[item.value] || 0)}}</text>
</view> </view>
<view class="bill-count-items-item-label">{{ item.label }}</view> <view class="bill-count-items-item-label">{{ item.label }}</view>
<!-- <view class="bill-count-items-item-line" v-if="(index + 1) % 4"></view> --> <!-- <view class="bill-count-items-item-line" v-if="(index + 1) % 4"></view> -->
......
...@@ -427,7 +427,7 @@ export default { ...@@ -427,7 +427,7 @@ export default {
duration: 1500, duration: 1500,
callback: () => {} callback: () => {}
}); });
uni.$emit('reloadList-maintain-bill-list'); uni.$emit('maintain-bill-list');
} }
this.loading = false; this.loading = false;
}) })
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</scroll-view> </scroll-view>
</view> </view>
<view class="loading-view" v-if="loading && !freshing"><u-loading mode="flower"></u-loading></view> <view class="loading-view" v-if="loading && !freshing"><u-loading mode="flower"></u-loading></view>
<FabView @click="handleClickFab" v-if="!customerId" /> <FabView :backgroundColor="fabStyle.backgroundColor" :boxShadow="fabStyle.boxShadow" :text="fabStyle.text" @click="handleClickFab" />
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<DateRangePicker ref="date-range-picker" v-model="daterange" :canReset="true" type="daterange" @change="handleClickChange"> <DateRangePicker ref="date-range-picker" v-model="daterange" :canReset="true" type="daterange" @change="handleClickChange">
<view style="left:200%"></view> <view style="left:200%"></view>
...@@ -156,6 +156,17 @@ export default { ...@@ -156,6 +156,17 @@ export default {
}, },
end() { end() {
return this.daterange.length > 0 && this.daterange[1] ? this.daterange[1] + ' 23:59:59' : ''; return this.daterange.length > 0 && this.daterange[1] ? this.daterange[1] + ' 23:59:59' : '';
},
fabStyle() {
return this.customerId ? {
backgroundColor: '#3383FE',
boxShadow: '0px 6px 12px 0px rgba(51, 131, 254, 0.3500)',
text: '批量结清'
} : {
backgroundColor: '#02A074',
boxShadow: '0px 6px 12px 0px rgba(2, 160, 116, 0.3500)',
text: '记账收据'
}
} }
}, },
onLoad(query) { onLoad(query) {
...@@ -177,9 +188,6 @@ export default { ...@@ -177,9 +188,6 @@ export default {
uni.$off('maintain-bill-list'); uni.$off('maintain-bill-list');
}, },
onShow() { onShow() {
uni.$on('reloadList-maintain-bill-list', res => {
this.reloadList();
});
}, },
methods: { methods: {
toDetail(item) { toDetail(item) {
...@@ -292,10 +300,20 @@ export default { ...@@ -292,10 +300,20 @@ export default {
}); });
}, },
handleClickFab() { handleClickFab() {
this.$u.route({ if (this.customerId) {
url: 'pages/maintain-bill/bill-style', this.$u.route({
params: {} url: 'pages/bill/batch-settle/index',
}); params: {
customerId: this.customerId
}
});
} else {
this.$u.route({
url: 'pages/maintain-bill/bill-style',
params: {}
});
}
}, },
handlClickRight() { handlClickRight() {
this.$u.route({ this.$u.route({
......
...@@ -433,7 +433,7 @@ ...@@ -433,7 +433,7 @@
.red-text { .red-text {
color: #FC524D; color: #FC524D;
margin-right: 8rpx; width: 24rpx
} }
.left-text { .left-text {
......
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
handleCickCell() { handleCickCell() {
if (this.isNormal) { if (this.isNormal) {
this.$emit('selectCell', {...this.member}) this.$emit('radio', {...this.member})
} }
} }
}, },
......
<template> <template>
<view class="employee-create" @click="handleClickPage"> <view class="employee-create">
<NavbarRight :title="title" /> <NavbarRight :title="title" />
<view class="content-view"> <view class="content-view">
<view class="info-view"> <view class="info-view">
<view class="part-view" id="name-input-view"> <view class="part-view" id="name-input-view">
<view class="label-view">姓名</view> <view class="label-view">姓名</view>
<view class="value-view"> <view class="value-view input-value-view">
<u-input type="text" :clearable="false" :custom-style="customStyle" :placeholder-style="placeholderStyle" <u-input type="text" :clearable="false" :custom-style="customStyle" :placeholder-style="placeholderStyle"
v-model="form.memberName" placeholder="填写成员姓名" confirm-type="next" @blur="handleBlur" @focus="handleFocus" v-model="form.memberName" placeholder="填写成员姓名" confirm-type="next" @blur="handleBlur" @focus="handleFocus"
@input="handleInput" @confirm="handleInputConfirm" /> @input="handleInput" @confirm="handleInputConfirm" />
<view class="address-book" @click="$u.throttle(handleClickAddress, 500)" hover-class="u-hover-class">
<image :src="tiaozhuantongxunluImage"></image>
</view>
</view> </view>
</view> </view>
<view class="line-view"></view> <view class="line-view"></view>
...@@ -23,7 +26,7 @@ ...@@ -23,7 +26,7 @@
<view class="setting-view"> <view class="setting-view">
<WageSetting :form="form" :fill.sync="fill" @change="handleChange" @set="handleClickSet"/> <WageSetting :form="form" :fill.sync="fill" @change="handleChange" @set="handleClickSet"/>
</view> </view>
<view class="member-view" v-if="showMember && employees && employees.length > 0"> <!-- <view class="member-view" v-if="showMember && employees && employees.length > 0">
<scroll-view scroll-y style="height:100%;width: 100%" @scrolltolower="reachBottom" scroll-anchoring> <scroll-view scroll-y style="height:100%;width: 100%" @scrolltolower="reachBottom" scroll-anchoring>
<view class="list-view"> <view class="list-view">
<view v-for="(item, index) in employees" :key="index" class="item-view"> <view v-for="(item, index) in employees" :key="index" class="item-view">
...@@ -34,7 +37,7 @@ ...@@ -34,7 +37,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
</view> </view> -->
</view> </view>
<view :class="['bottom-view', {edit: memberId}]" v-if="!showMember || !employees || employees.length <= 0"> <view :class="['bottom-view', {edit: memberId}]" v-if="!showMember || !employees || employees.length <= 0">
<u-button v-if="memberId" :custom-style="customDelete" @click="handleClickDelete" class="delete-button"> <u-button v-if="memberId" :custom-style="customDelete" @click="handleClickDelete" class="delete-button">
...@@ -90,7 +93,7 @@ export default { ...@@ -90,7 +93,7 @@ export default {
current: 1, current: 1,
size: 20, size: 20,
employees: [], employees: [],
showMember: false, // showMember: false,
platform: '', platform: '',
focus: false, focus: false,
currentPopInfo: {} currentPopInfo: {}
...@@ -106,6 +109,9 @@ export default { ...@@ -106,6 +109,9 @@ export default {
placeholderStyle () { placeholderStyle () {
return 'color:#ccc;font-size:28rpx;font-weight: bold;' return 'color:#ccc;font-size:28rpx;font-weight: bold;'
}, },
tiaozhuantongxunluImage() {
return this.baseUrl + 'tiaozhuantongxunlu-n@3x.png'
},
customStyle () { customStyle () {
return { return {
fontSize: '28rpx', fontSize: '28rpx',
...@@ -170,11 +176,13 @@ export default { ...@@ -170,11 +176,13 @@ export default {
this.getProjectSalary(); this.getProjectSalary();
} }
}); });
uni.$on('employee-selected-member', res => {
this.handleSelectCell(res)
});
}, },
onUnload () { onUnload () {
if (this.isEdit) {
uni.$off('salary-changed'); uni.$off('salary-changed');
} uni.$off('employee-selected-member');
}, },
methods: { methods: {
getProjectMemberInfo () { getProjectMemberInfo () {
...@@ -262,6 +270,16 @@ export default { ...@@ -262,6 +270,16 @@ export default {
break break
} }
}, },
handleClickAddress() {
this.$u.route({
url: '/pages/workpoint/employees/index',
type: 'navigateTo',
params: {
type: 'normal',
projectId: this.projectId
}
});
},
handleClickConfirm () { handleClickConfirm () {
this.updateProjectMember() this.updateProjectMember()
}, },
...@@ -324,16 +342,16 @@ export default { ...@@ -324,16 +342,16 @@ export default {
}, },
handleBlur () { handleBlur () {
}, },
handleClickPage () { // handleClickPage () {
this.showMember = false // this.showMember = false
}, // },
handleInputConfirm () { // handleInputConfirm () {
this.showMember = false // this.showMember = false
this.focus = true // this.focus = true
}, // },
handleFocus () { handleFocus () {
this.showMember = true // this.showMember = true
this.reloadMemberList() // this.reloadMemberList()
}, },
handleInput (value) { handleInput (value) {
this.form.memberName = value this.form.memberName = value
...@@ -425,7 +443,20 @@ export default { ...@@ -425,7 +443,20 @@ export default {
flex-shrink: 0; flex-shrink: 0;
} }
.value-view {} .value-view {
}
.input-value-view {
display: flex;
justify-content: flex-end;
align-items: center;
.address-book {
width: 44rpx;
height: 56rpx;
padding: 12rpx 0 12rpx 12rpx;
margin-left: 4rpx;
}
}
} }
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
refresher-background="#F6F7FA" @refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top> refresher-background="#F6F7FA" @refresherrefresh="onRefresh" @refresherrestore="onRestore" enable-back-to-top>
<view class="list-view" v-if="employees && employees.length > 0"> <view class="list-view" v-if="employees && employees.length > 0">
<view v-for="(item, index) in employees" :key="index" class="item-view"> <view v-for="(item, index) in employees" :key="index" class="item-view">
<CellEmployee :type="type" :member="item" @select="handleSelectCell" @action="handleEditCell" /> <CellEmployee :type="type" :member="item" @select="handleSelectCell" @action="handleEditCell" @radio="handleRadioCell"/>
</view> </view>
<view class="load-more-view" v-show="(current == 1 && !loading) || current > 1"> <view class="load-more-view" v-show="(current == 1 && !loading) || current > 1">
<u-loadmore :status="loadStatus" bgColor="#F6F7FA"></u-loadmore> <u-loadmore :status="loadStatus" bgColor="#F6F7FA"></u-loadmore>
...@@ -97,6 +97,9 @@ export default { ...@@ -97,6 +97,9 @@ export default {
isEdit () { isEdit () {
return this.type == 'edit' return this.type == 'edit'
}, },
isNormal () {
return this.type == 'normal'
},
title () { title () {
return this.isEdit ? '项目成员' : '过往合作' return this.isEdit ? '项目成员' : '过往合作'
}, },
...@@ -201,7 +204,7 @@ export default { ...@@ -201,7 +204,7 @@ export default {
loadMember () { loadMember () {
if (this.isEdit) { if (this.isEdit) {
this.getProjectMembers(); this.getProjectMembers();
} else if (this.isSelect) { } else if (this.isSelect || this.isNormal) {
this.getProjectMembersKnow() this.getProjectMembersKnow()
} }
}, },
...@@ -373,6 +376,14 @@ export default { ...@@ -373,6 +376,14 @@ export default {
} }
}, },
handleRadioCell(member) {
uni.$emit('employee-selected-member', member)
this.$u.route({
type: 'navigateBack',
params: {
}
})
},
handleClickAdd () { handleClickAdd () {
this.$u.route({ this.$u.route({
url: '/pages/workpoint/employees/index', url: '/pages/workpoint/employees/index',
......
...@@ -637,7 +637,14 @@ export function formatCount(count) { ...@@ -637,7 +637,14 @@ export function formatCount(count) {
var index = string.indexOf('.') var index = string.indexOf('.')
if (index != -1) { if (index != -1) {
string += '00' string += '00'
var num = 0
if (Number(string.substring(index + 3, index + 4) || 0) >= 5) {
num = 0.01
}
string = string.substring(0, index + 3) string = string.substring(0, index + 3)
if (num > 0) {
return formatCount(Number(string) + num)
}
} else { } else {
string += '.00' string += '.00'
} }
......
export const version = "1.0.29" export const version = "1.0.31"
export const baseURL = "/baseapi" export const baseURL = "/baseapi"
export const token = "TOKEN" export const token = "TOKEN"
export const PHONENUMBER = "PHONENUMBER" export const PHONENUMBER = "PHONENUMBER"
......
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