From c478bc1b36e38774cf01c02fd5e23858bd70a4a3 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 29 十一月 2023 13:42:46 +0800
Subject: [PATCH] #
---
pages/business/pricing/priQuote.vue | 204 ++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 195 insertions(+), 9 deletions(-)
diff --git a/pages/business/pricing/priQuote.vue b/pages/business/pricing/priQuote.vue
index 7747983..14efadb 100644
--- a/pages/business/pricing/priQuote.vue
+++ b/pages/business/pricing/priQuote.vue
@@ -14,7 +14,30 @@
<uni-icons type="arrowdown" color="#333333" size="20" />
</view>
</block>
- </uni-nav-bar>
+ </uni-nav-bar>
+
+ <!-- 鎼滅储妗� -->
+ <view class="search-bg">
+ <u-search placeholder="杈撳叆" v-model="keyword" :clearabled="true" @custom="search()" @search="search()"></u-search>
+ </view>
+
+ <view class="main-box">
+ <view class="box" v-for="item in list" @click="goDetl(item)">
+ <view style="display: flex;">
+ <view class="box-title" style="flex: 1;">{{item.planName$}}</view>
+ <view class="box-time">{{item.createTime$}}</view>
+ </view>
+ <view class="box-item">瀹㈡埛:{{item.templateName}}</view>
+ <!-- <view class="box-item">鐘舵��:{{item.businessTripDays$}}</view> -->
+ <view style="display: flex;">
+ <view class="box-item" style="flex: 1;">鏇存柊浜哄憳:{{item.updateUserId$}}</view>
+ <!-- <view class="box-item" style="flex: 1;">鍚岃浜�:{{item.businessPeers}}</view> -->
+ <view class="box-settle" :style="item.bgcolor">{{item.settle$}}</view>
+ </view>
+ </view>
+ </view>
+
+ <u-empty v-if="true" icon="../../../static/image/emptyList.png" v-show="list.length <= 0" />
</view>
</template>
@@ -23,34 +46,145 @@
export default {
data() {
return {
+ keyword: '',
user: {
username: '',
id: 0,
- type: ''
+ type: 'user_id'
},
- falg: true
+ falg: true,
+ list: [],
+ curr: 2,
+ reload: false,
+ status: 'more',
}
},
onShow() {
let that = this
uni.$on('isRefresh',function(data){
- console.log(data);
that.user.username = data.title
that.user.id = data.id
that.user.type = data.key
that.falg = false
})
- setTimeout(()=> {
- // this.getCsmtr1()
- },50)
if (this.falg) {
this.getDetail()
}
+ this.getPriQuoteList1()
+ },
+ onReachBottom() {
+ this.status = 'more';
+ this.getPriQuoteList()
},
methods: {
+ getPriQuoteList1() {
+ let _this = this
+ _this.list = []
+ uni.showLoading({})
+ let param = {curr:1,limit:8,dept_id: 0,user_id: 67}
+ if (_this.user.type == 'user_id') {
+ param = {curr:1,limit:8,user_id: _this.user.id}
+ } else if(_this.user.type == 'dept_id') {
+ param = {curr:1,limit:8,dept_id: _this.user.id}
+ } else {
+ param = {curr:1,limit:8}
+ }
+ uni.request({
+ url: `${_this.baseUrl}/priQuote/list/auth`,
+ header: { 'token': uni.getStorageSync('token') },
+ data: param,
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ for (let k of res.data.records) {
+ if (k.settle >= 2) {
+ k['bgcolor'] = 'color: #12d489'
+ } else if (k.settle == 1) {
+ k['bgcolor'] = 'color: #ffbd67'
+ } else if (k.settle == 0) {
+ k['bgcolor'] = 'color: #1e9cf0'
+ }
+ }
+ let list = res.data.records
+ _this.list = _this.reload ? list : _this.list.concat(list);
+ if (res.data.records.length == 0) {
+ _this.status = 'noMore'
+ }
+ }
+ },
+ fail(result) {
+ uni.showToast({title: '璇锋眰澶辫触'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../../login/login'
+ });
+ }, 1000);
+ },
+ complete() {
+ uni.hideLoading()
+ }
+ })
+ },
+ getPriQuoteList() {
+ let _this = this
+ uni.showLoading({})
+ let param = {curr:that.curr,limit:8,dept_id: 0,user_id: 67}
+ if (this.user.type == 'user_id') {
+ param = {curr:that.curr,limit:8,user_id: that.user.id}
+ } else if(this.user.type == 'dept_id') {
+ param = {curr:that.curr,limit:8,dept_id: that.user.id}
+ } else {
+ param = {curr:that.curr,limit:8}
+ }
+ uni.request({
+ url: `${_this.baseUrl}/priQuote/list/auth`,
+ header: { 'token': uni.getStorageSync('token') },
+ data: param,
+ success(res) {
+ res = res.data
+ if (res.code === 200) {
+ for (let k of res.data.records) {
+ if (k.settle >= 2) {
+ k['bgcolor'] = 'color: #12d489'
+ } else if (k.settle == 1) {
+ k['bgcolor'] = 'color: #ffbd67'
+ } else if (k.settle == 0) {
+ k['bgcolor'] = 'color: #1e9cf0'
+ }
+ }
+ let list = res.data.records
+ _this.list = _this.reload ? list : _this.list.concat(list);
+ _this.curr = _this.curr + 1
+ if (res.data.records.length == 0) {
+ _this.status = 'noMore'
+ }
+ }
+ },
+ fail(result) {
+ uni.showToast({title: '璇锋眰澶辫触'})
+ setTimeout(() => {
+ uni.reLaunch({
+ url: '../../login/login'
+ });
+ }, 1000);
+ },
+ complete() {
+ uni.hideLoading()
+ }
+ })
+ },
+ goDetl(e) {
+ uni.navigateTo({
+ url: '/pages/business/pricing/priQuoteDetl',
+ success: function(res) {
+ res.eventChannel.emit('priQuoteDetl', {
+ data: e
+ })
+ }
+ })
+ },
async getDetail() {
let res = await user.getDetail()
- console.log(res);
if (res.code === 200) {
this.user.username = res.data.username
this.user.id = res.data.id
@@ -80,5 +214,57 @@
</script>
<style>
-
+ .flex-row {
+ display: flex;
+ }
+
+ .flex-col {
+ display: flex;
+ flex-direction: column;
+ }
+ .main-box {
+ /* margin: 16rpx; */
+ /* background-color: #FFF; */
+ border-radius: 20rpx;
+ padding: 8rpx;
+ }
+
+ .box {
+ margin: 16rpx 8rpx;
+ /* height: 200px; */
+ box-shadow: 0 0 5px #dddddd;
+ background-color: #FFF;
+ padding: 16rpx 32rpx;
+ position: relative;
+ border-radius: 20rpx;
+ font-size: 24rpx;
+ color: #bdbdbd;
+ }
+
+ .box-flag {
+ position: absolute;
+ right: 0;
+ top: 10rpx;
+ background-color: #74B9E9;
+ padding: 6rpx;
+ font-size: 10rpx;
+ color: #FFF;
+ }
+
+ .box-time {
+ color: #bdbdbd;
+ }
+
+ .box-settle {
+ font-size: 26rpx;
+ /* font-weight: bold; */
+ }
+
+ .box-title {
+ font-size: 28rpx;
+ font-weight: bold;
+ color: #000;
+ }
+
+ .box-single-row {}
</style>
--
Gitblit v1.9.1