linweizeng před 3 roky
rodič
revize
7a8c2d7ba2

+ 98 - 72
components/uni-section/uni-section.vue

@@ -1,16 +1,20 @@
 <template>
 	<view class="uni-section">
-		<view class="uni-section-header" nvue>
-			<view v-if="type" class="uni-section__head">
-				<view :class="type" class="uni-section__head-tag" />
+		<view class="uni-section-header" @click="onClick">
+			<view class="uni-section-header__decoration" v-if="type" :class="type" />
+			<slot v-else name="decoration"></slot>
+
+			<view class="uni-section-header__content">
+				<text :style="{'font-size':titleFontSize,'color':titleColor}" class="uni-section__content-title" :class="{'distraction':!subTitle}">{{ title }}</text>
+				<text v-if="subTitle" :style="{'font-size':subTitleFontSize,'color':subTitleColor}" class="uni-section-header__content-sub">{{ subTitle }}</text>
 			</view>
-			<view class="uni-section__content">
-				<text :class="{'distraction':!subTitle}" :style="{color:color}"
-					class="uni-section__content-title">{{ title }}</text>
-				<text v-if="subTitle" class="uni-section__content-sub">{{ subTitle }}</text>
+
+			<view class="uni-section-header__slot-right">
+				<slot name="right"></slot>
 			</view>
 		</view>
-		<view :style="{padding: padding ? '10px' : ''}">
+
+		<view class="uni-section-content" :style="{padding: _padding}">
 			<slot />
 		</view>
 	</view>
@@ -20,11 +24,17 @@
 	/**
 	 * Section 标题栏
 	 * @description 标题栏
-	 * @property {String} type = [line|circle] 标题装饰类型
+	 * @property {String} type = [line|circle|square] 标题装饰类型
 	 * 	@value line 竖线
 	 * 	@value circle 圆形
+	 * 	@value square 正方形
 	 * @property {String} title 主标题
+	 * @property {String} titleFontSize 主标题字体大小
+	 * @property {String} titleColor 主标题字体颜色
 	 * @property {String} subTitle 副标题
+	 * @property {String} subTitleFontSize 副标题字体大小
+	 * @property {String} subTitleColor 副标题字体颜色
+	 * @property {String} padding 默认插槽 padding
 	 */
 
 	export default {
@@ -37,9 +47,14 @@
 			},
 			title: {
 				type: String,
+				required: true,
 				default: ''
 			},
-			color: {
+			titleFontSize: {
+				type: String,
+				default: '14px'
+			},
+			titleColor: {
 				type: String,
 				default: '#333'
 			},
@@ -47,13 +62,27 @@
 				type: String,
 				default: ''
 			},
+			subTitleFontSize: {
+				type: String,
+				default: '12px'
+			},
+			subTitleColor: {
+				type: String,
+				default: '#999'
+			},
 			padding: {
-				type: Boolean,
+				type: [Boolean, String],
 				default: false
 			}
 		},
-		data() {
-			return {}
+		computed: {
+			_padding() {
+				if (typeof this.padding === 'string') {
+					return this.padding
+				}
+
+				return this.padding ? '10px' : ''
+			}
 		},
 		watch: {
 			title(newVal) {
@@ -69,75 +98,72 @@
 		}
 	}
 </script>
-<style lang="scss" scoped>
+<style lang="scss">
 	$uni-primary: #2979ff !default;
 
 	.uni-section {
 		background-color: #fff;
-		// overflow: hidden;
-		margin-top: 10px;
-		border-radius: 15rpx;
-	}
 
-	.uni-section-header {
-		position: relative;
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: row;
-		align-items: center;
-		padding: 12px 10px;
-		// height: 50px;
-		font-weight: normal;
-	}
+		.uni-section-header {
+			position: relative;
+			/* #ifndef APP-NVUE */
+			display: flex;
+			/* #endif */
+			flex-direction: row;
+			align-items: center;
+			padding: 12px 10px;
+			font-weight: normal;
 
-	.uni-section__head {
-		flex-direction: row;
-		justify-content: center;
-		align-items: center;
-		margin-right: 10px;
-	}
+			&__decoration {
+				margin-right: 6px;
+				background-color: $uni-primary;
 
-	.line {
-		height: 12px;
-		background-color: $uni-primary;
-		border-radius: 10px;
-		width: 4px;
-	}
+				&.line {
+					width: 4px;
+					height: 12px;
+					border-radius: 10px;
+				}
 
-	.circle {
-		width: 8px;
-		height: 8px;
-		border-top-right-radius: 50px;
-		border-top-left-radius: 50px;
-		border-bottom-left-radius: 50px;
-		border-bottom-right-radius: 50px;
-		background-color: $uni-primary;
-	}
+				&.circle {
+					width: 8px;
+					height: 8px;
+					border-top-right-radius: 50px;
+					border-top-left-radius: 50px;
+					border-bottom-left-radius: 50px;
+					border-bottom-right-radius: 50px;
+				}
 
-	.uni-section__content {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		flex-direction: column;
-		flex: 1;
-		color: #333;
-	}
+				&.square {
+					width: 8px;
+					height: 8px;
+				}
+			}
 
-	.uni-section__content-title {
-		font-size: 14px;
-		color: $uni-primary;
-	}
+			&__content {
+				/* #ifndef APP-NVUE */
+				display: flex;
+				/* #endif */
+				flex-direction: column;
+				flex: 1;
+				color: #333;
 
-	.distraction {
-		flex-direction: row;
-		align-items: center;
-	}
+				.distraction {
+					flex-direction: row;
+					align-items: center;
+				}
+
+				&-sub {
+					margin-top: 2px;
+				}
+			}
 
-	.uni-section__content-sub {
-		font-size: 12px;
-		color: #999;
-		line-height: 16px;
-		margin-top: 2px;
+			&__slot-right {
+				font-size: 14px;
+			}
+		}
+
+		.uni-section-content {
+			font-size: 14px;
+		}
 	}
-</style>
+</style>

+ 42 - 50
pages/jiance/jindu.vue

@@ -14,50 +14,17 @@
 			</view>
 		</view>
 
-		<view v-for="(item,i) in resdata" :key="i" style="margin: 10rpx 20rpx;position: relative;" :style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
-			<!-- 新增 -->
-			<view>
-				检测委托单位:{{item.wei_tuo_dan_wei_}}
-			</view>
 
-			<uni-section :title="'合同编号:'+item.he_tong_ming_cheng_" :subTitle="'检测委托单号:'+item.wei_tuo_bian_hao_" type="line" padding>
-				<view style=" display: flex; width: 100%; justify-content: space-between; ">
-					<view>
-						<view style="display: flex;align-items: center;">
-							<view>委托日期:</view>
-							<view>{{item.wei_tuo_ri_qi_}} </view>
-						</view>
-						<view style="display: flex;">
-							<view>委托进度:</view>
-							<view style="color: #5E00FF;"> {{item.zhuangtai}} </view>
-						</view>
-						<view style="display: flex;">
-							<view>付款状态:</view>
-							<view v-if="item.fu_kuan_zhuang_ta=='已结清'">
-								<view style="color: #7349ff;"> 已结清 </view>
-							</view>
-							<view v-else>
-								<view style="color: #7349ff;"> 未结清 </view>
-							</view>
-						</view>
-					</view>
-				</view>
+		<view v-for="(item,index) in withdrawList" :key="item.id_" style="margin: 10rpx 20rpx;position: relative;" :style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
+			<jinduChild :item="item" :type="1" @editOrder="editOrder" @repulse="repulse"></jinduChild>
+		</view>
 
-				<view style=" width: 100%; text-align: right; padding-top: 5rpx;padding-bottom: 0rpx;">
-					<u-button class="m-r-15" type="error" size="mini" @click="repulse(item.id_,item.xiu_gai_bei_zhu_)" v-if="(item.wei_tuo_zhuang_ta == '待审核' || item.wei_tuo_zhuang_ta == '待审批') && item.shi_fou_guo_shen_ != '已退回'">
-						撤回申请
-					</u-button>
-					<u-button class="m-r-15" type="success" size="mini" @click="editOrder(item.id_,item.he_tong_bian_hao_,'1', 'edit',item.bao_gao_bian_zhi_)" v-if="item.wei_tuo_zhuang_ta == '待编制' || item.shi_fou_guo_shen_ == '已退回'">修改</u-button>
-					<u-button class="m-r-15 btn-back-color" type="primary" size="mini" style="" @click="editOrder(item.id_,item.he_tong_bian_hao_,'0', 'detail',item.bao_gao_bian_zhi_)">明细
-					</u-button>
-					<!-- <u-button type="warning" size="mini" class="m-r-15" @click="getTag(item.id_)">样品标签</u-button>
-					<u-button type="warning" size="mini" @click="goto(item.id_)">查看报告</u-button> -->
-				</view>
-			</uni-section>
+		<view v-for="(item,i) in resdata" :key="i" style="margin: 10rpx 20rpx;position: relative;" :style="[{top:'calc('+ CustomBar + 'px + 20rpx)'}]">
+			<jinduChild :item="item" :type="2" @editOrder="editOrder" @repulse="repulse"></jinduChild>
 		</view>
 
 
-		<view v-if="resdata.length==0">
+		<view v-if="withdrawList.length == 0 && resdata.length == 0">
 			<uni-card is-full :is-shadow="false">
 				<text class="">暂无数据</text>
 			</uni-card>
@@ -72,6 +39,7 @@
 
 <script>
 	import apply from '../jiance/list/apply.vue'
+	import jinduChild from '../jiance/order/jinduChild.vue'
 	import {
 		ACCESS_TOKEN,
 		USER_NAME,
@@ -82,7 +50,8 @@
 
 	export default {
 		components: {
-			apply
+			apply,
+			jinduChild
 		},
 		// 初始化
 		data() {
@@ -90,6 +59,7 @@
 				id: '',
 				CustomBar: this.CustomBar,
 				resdata: [],
+				withdrawList: [],
 				current: 0,
 				total: 10,
 				pageSize: 10,
@@ -103,14 +73,12 @@
 		},
 		// 页面加载
 		onLoad: function() {
-			this.getData(this.keyword)
+			this.search()
 			// this.getData(this.current, this.pageSize, this.total);
 		},
 		// 下拉刷新
 		onPullDownRefresh() {
-			this.current = 0
-			this.resdata = []
-			this.getData(this.keyword)
+			this.search()
 		},
 		// 上拉加载
 		onReachBottom() {
@@ -128,15 +96,15 @@
 			search() {
 				this.current = 0
 				this.resdata = []
+				this.withdrawList = []
 				this.getData(this.keyword)
+				this.getWithdrawList(this.keyword)
 			},
 			/**
 			 * 清除搜索框里面信息回调
 			 */
 			clear() {
-				this.current = 0
-				this.resdata = []
-				this.getData(this.keyword)
+				this.search()
 			},
 
 			/**
@@ -150,6 +118,30 @@
 					url: `/pages/jiance/order?id=${editId}&buttonFlag=${buttonFlag}&heTongBianHao=${heTongBianHao}&type=${type}&baoGaoBianZhi=${bao_gao_bian_zhi_}`
 				})
 			},
+			getWithdrawList(keyworks) {
+				let info = uni.getStorageSync(USER_INFO);
+				let useId = info.user.id
+
+
+				let sql =
+					`select tl.*,td.he_tong_bian_hao_ as he_tong_ming_cheng_ from t_lhwtsqb tl left join t_bjd td on tl.he_tong_id_ = td.id_ where (tl.create_by_ = '${useId}' or td.ke_hu_zhang_hao_ = '${useId}') and tl.wei_tuo_lei_xing_ = '客户委托' and  tl.shi_fou_guo_shen_ = '已退回' and tl.wei_tuo_bian_hao_ like '%${keyworks}%' ORDER BY tl.create_time_ desc`
+				let requestData = this.$sig(sql)
+
+
+				this.$http.post("/ibps/business/v3/sys/universal/inputSqlSelectData", requestData).then(res => {
+					if (res.data.state == 200) {
+						const data = res.data.variables.data
+						// this.resdata.push(...data)
+						data.forEach((item, index) => {
+							this.getZhuangtai(item.wei_tuo_bian_hao_, (result) => {
+								this.$set(item, 'zhuangtai', result)
+							})
+						})
+						this.withdrawList = data
+						uni.hideLoading()
+					}
+				})
+			},
 
 			// 拉取委托列表数据
 			getData(keyworks) {
@@ -169,7 +161,7 @@
 				}
 
 				let sql =
-					`select tl.*,td.he_tong_bian_hao_ as he_tong_ming_cheng_ from t_lhwtsqb tl left join t_bjd td on tl.he_tong_id_ = td.id_ where tl.create_by_ = '${useId}' or td.ke_hu_zhang_hao_ = '${useId}' and tl.wei_tuo_lei_xing_ = '客户委托' and tl.wei_tuo_bian_hao_ like '%${keyworks}%' ORDER BY tl.create_time_ desc LIMIT ${page},10`
+					`select tl.*,td.he_tong_bian_hao_ as he_tong_ming_cheng_ from t_lhwtsqb tl left join t_bjd td on tl.he_tong_id_ = td.id_ where (tl.create_by_ = '${useId}' or td.ke_hu_zhang_hao_ = '${useId}') and tl.wei_tuo_lei_xing_ = '客户委托' and tl.shi_fou_guo_shen_ != '已退回' and tl.wei_tuo_bian_hao_ like '%${keyworks}%' ORDER BY tl.create_time_ desc LIMIT ${page},10`
 				let requestData = this.$sig(sql)
 
 
@@ -295,8 +287,8 @@
 		color: black;
 	}
 
-	/deep/ .uni-section__content-sub {
+	/* /deep/ .uni-section__content-sub {
 		color: rgb(51, 51, 51);
 		font-size: 28rpx;
-	}
+	} */
 </style>

+ 1 - 1
pages/jiance/list.vue

@@ -210,7 +210,7 @@
 	}
 </script>
 
-<style>
+<style scoped lang="scss">
 	.chat-custom-right {
 		flex: 1;
 		/* #ifndef APP-NVUE */

+ 68 - 0
pages/jiance/order/jinduChild.vue

@@ -0,0 +1,68 @@
+<template>
+	<view>
+		<!-- 新增 -->
+		<view>
+			检测委托单位:{{item.wei_tuo_dan_wei_}}
+		</view>
+
+		<uni-section :title="'合同编号:'+item.he_tong_ming_cheng_" :subTitle="'检测委托单号:'+item.wei_tuo_bian_hao_" type="line" padding :titleColor="type == 1 ? '#FF0000' : ''" :subTitleColor="type == 1 ? '#FF0000' : 'rgb(51, 51, 51)'" subTitleFontSize="14px">
+			<view style=" display: flex; width: 100%; justify-content: space-between; ">
+				<view>
+					<view style="display: flex;align-items: center;">
+						<view>委托日期:</view>
+						<view>{{item.wei_tuo_ri_qi_}} </view>
+					</view>
+					<view style="display: flex;">
+						<view>委托进度:</view>
+						<view style="color: #5E00FF;"> {{item.zhuangtai}} </view>
+					</view>
+					<view style="display: flex;">
+						<view>付款状态:</view>
+						<view v-if="item.fu_kuan_zhuang_ta=='已结清'">
+							<view style="color: #7349ff;"> 已结清 </view>
+						</view>
+						<view v-else>
+							<view style="color: #7349ff;"> 未结清 </view>
+						</view>
+					</view>
+				</view>
+			</view>
+
+			<view style=" width: 100%; text-align: right; padding-top: 5rpx;padding-bottom: 0rpx;">
+				<u-button class="m-r-15" type="error" size="mini" @click="repulse(item.id_,item.xiu_gai_bei_zhu_)" v-if="(item.wei_tuo_zhuang_ta == '待审核' || item.wei_tuo_zhuang_ta == '待审批') && item.shi_fou_guo_shen_ != '已退回' && type == '2'">
+					撤回申请
+				</u-button>
+				<u-button class="m-r-15" type="success" size="mini" @click="editOrder(item.id_,item.he_tong_bian_hao_,'1', 'edit',item.bao_gao_bian_zhi_)" v-if="(item.wei_tuo_zhuang_ta == '待编制' || item.shi_fou_guo_shen_ == '已退回') && type == '1'">修改</u-button>
+				<u-button class="m-r-15 btn-back-color" type="primary" size="mini" style="" @click="editOrder(item.id_,item.he_tong_bian_hao_,'0', 'detail',item.bao_gao_bian_zhi_)">明细
+				</u-button>
+			</view>
+		</uni-section>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			item: {
+				type: Object,
+				default: () => ({})
+			},
+			type: {
+				type: Number,
+				default: 1
+			}
+		},
+		methods: {
+			editOrder(editId, heTongBianHao, buttonFlag, type, bao_gao_bian_zhi_) {
+				this.$emit('editOrder', editId, heTongBianHao, buttonFlag, type, bao_gao_bian_zhi_)
+			},
+			repulse(id, content) {
+				this.$emit('repulse', id, content)
+			}
+		}
+
+	}
+</script>
+
+<style scoped lang="scss">
+</style>

+ 1 - 1
pages/jiance/order/meth.js

@@ -42,7 +42,7 @@ export default {
 		}
 		let form = {
 			weiTuoLeiXing: item.wei_tuo_lei_xing_,
-			weiTuoDanLaiYuan: item.wei_tuo_lei_xing_,
+			weiTuoDanLaiYuan: item.wei_tuo_dan_lai_y,
 			weiTuoBianHao: item.wei_tuo_bian_hao_,
 			heTongId: item.he_tong_id_,
 			heTongBianHao: item.he_tong_bian_hao_,