wsx пре 11 месеци
родитељ
комит
c6dac21157

+ 3 - 6
api/salesServiceManagement/accessory/index.js

@@ -1,5 +1,6 @@
 import {
 import {
 	get,
 	get,
+	getJ,
 	put,
 	put,
 	putJ,
 	putJ,
 	postJ,
 	postJ,
@@ -9,9 +10,7 @@ import Vue from "vue";
 
 
 // 配件申请记录 表格
 // 配件申请记录 表格
 export async function accessoryPage(data) {
 export async function accessoryPage(data) {
-	const res = await get(Vue.prototype.apiUrl + `/eom/sparePartsApply/page`, {
-		params: data
-	});
+	const res = await get(Vue.prototype.apiUrl + `/eom/sparePartsApply/page`, data);
 	if (res.code == 0) {
 	if (res.code == 0) {
 		return res.data;
 		return res.data;
 	}
 	}
@@ -20,9 +19,7 @@ export async function accessoryPage(data) {
 
 
 // 配件回收记录 表格
 // 配件回收记录 表格
 export async function recyclePage(data) {
 export async function recyclePage(data) {
-	const res = await get(Vue.prototype.apiUrl + `/eom/afterSalesAccessoryApply/page`, {
-		params: data
-	});
+	const res = await get(Vue.prototype.apiUrl + `/eom/afterSalesAccessoryApply/page`, data);
 	if (res.code == 0) {
 	if (res.code == 0) {
 		return res.data;
 		return res.data;
 	}
 	}

+ 15 - 0
api/wt/index.js

@@ -49,6 +49,21 @@ export async function getTodoTaskPage(query, loding = true) {
 	}
 	}
 	return Promise.reject(new Error(res.message));
 	return Promise.reject(new Error(res.message));
 }
 }
+
+export async function getTodoList(query, loding = true) {
+	const res = await postJ(
+		Vue.prototype.apiUrl + `/bpm/task/todo-page`, query, loding
+	);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+
+
+
+
 //获取已办事项列表
 //获取已办事项列表
 export async function getDoneTaskPage(query) {
 export async function getDoneTaskPage(query) {
 	const res = await get(
 	const res = await get(

+ 5 - 7
components/ServerSetting/index.vue

@@ -79,11 +79,12 @@
 			},
 			},
 
 
 			serverCheck() {
 			serverCheck() {
-				
+
 			},
 			},
 			handleTest() {
 			handleTest() {
 				this.setServerStatus = false
 				this.setServerStatus = false
 				this.$refs.formRef.validate().then(res => {
 				this.$refs.formRef.validate().then(res => {
+					console.log(res);
 					uni.showLoading({
 					uni.showLoading({
 						mask: true
 						mask: true
 					})
 					})
@@ -93,6 +94,7 @@
 						url: `${this.formData.protocal}${this.formData.hostname}:${this.formData.port}/api/main/connection/getConnectionTest`,
 						url: `${this.formData.protocal}${this.formData.hostname}:${this.formData.port}/api/main/connection/getConnectionTest`,
 						method: 'get',
 						method: 'get',
 						success: res => {
 						success: res => {
+							console.log(res);
 							this.url = res.data.code
 							this.url = res.data.code
 							if (res.data.code == 0) {
 							if (res.data.code == 0) {
 								uni.$u.toast('连接成功!')
 								uni.$u.toast('连接成功!')
@@ -101,15 +103,11 @@
 								uni.$u.toast('连接失败!')
 								uni.$u.toast('连接失败!')
 							}
 							}
 						},
 						},
-						finally: f => {
+						fail: f => {
+							uni.$u.toast('连接失败!')
 							uni.hideLoading()
 							uni.hideLoading()
 						}
 						}
 					})
 					})
-
-
-
-
-
 				})
 				})
 			},
 			},
 			handleCheck() {
 			handleCheck() {

+ 4 - 19
pages/home/components/navigation.vue

@@ -10,7 +10,7 @@
 
 
 <script>
 <script>
 	import {
 	import {
-		getTodoTaskPage,
+		getTodoList,
 		getUnreadNotifyMessageCountAPI
 		getUnreadNotifyMessageCountAPI
 	} from '@/api/wt/index.js'
 	} from '@/api/wt/index.js'
 	export default {
 	export default {
@@ -84,25 +84,10 @@
 			},
 			},
 
 
 			async getCount() {
 			async getCount() {
-				// Promise.all(
-				//   [
-				//     '/myMessage/getMyMessageMenuCount',
-				//     '/myHandle/getMyHandleMenuCount',
-				//     '/workOrder/getMyWorkOrderMenuCount'
-				//   ].map(url => postJ(this.apiUrl + url, null, null, false))
-				// ).then(result => {
-				//   if (result) {
-				//     this.workList[0].badge = result[2].data.menuCount
-				//     this.workList[1].badge = result[0].data.menuCount
-				//     this.workList[2].badge = result[1].data.waitHandleCount
-				//     // this.workList[3].badge = result[1].data.doneCount
-				//   }
-				// })
-
-				const res = await getTodoTaskPage({}, false)
-				this.workList[2].badge = res.count
+				const res = await getTodoList({}, false)
+				this.workList[0].badge = res.count
 				const messageCount = await getUnreadNotifyMessageCountAPI()
 				const messageCount = await getUnreadNotifyMessageCountAPI()
-				this.workList[1].badge = Number(messageCount)
+				this.workList[2].badge = Number(messageCount)
 			}
 			}
 		}
 		}
 	}
 	}

+ 21 - 12
pages/saleManage/components/myCard.vue

@@ -3,31 +3,29 @@
 	<view class="card_box">
 	<view class="card_box">
 
 
 
 
-		<view class="item_box rx-bc" v-for="(_item,i) in columns" :key="i" >
+		<view class="item_box rx-bc" v-for="(_item,i) in columns" :key="i">
 			<view class="perce50" :class="val.className" :style="val.style" v-for="(val) in _item" :key="val.prop">
 			<view class="perce50" :class="val.className" :style="val.style" v-for="(val) in _item" :key="val.prop">
 				<view class="item_box rx-sc" v-if="val.type=='title'">
 				<view class="item_box rx-sc" v-if="val.type=='title'">
 					<view class="round" v-if='index'>{{index}}</view>
 					<view class="round" v-if='index'>{{index}}</view>
 					<view class="orderId" :style="{marginLeft: index?'16rpx':''}">{{item[val.prop]||''}} </view>
 					<view class="orderId" :style="{marginLeft: index?'16rpx':''}">{{item[val.prop]||''}} </view>
 				</view>
 				</view>
+
 				<view class="item_one rx-sc" v-else-if="val.type=='action'">
 				<view class="item_one rx-sc" v-else-if="val.type=='action'">
 					<view class="lable">{{val.label}}</view>
 					<view class="lable">{{val.label}}</view>
 					<view class="text">
 					<view class="text">
-						
 						<template v-for="(btn,bI) in btnList">
 						<template v-for="(btn,bI) in btnList">
-							
 							<u-button :plain="true" :hairline="true" size='mini' :type="btn.btnType" v-if="judge(btn)"
 							<u-button :plain="true" :hairline="true" size='mini' :type="btn.btnType" v-if="judge(btn)"
-								:text="btn.name" @click="action(btn)"  :key="bI"></u-button>
+								:text="btn.name" @click="action(btn)" :key="bI"></u-button>
 						</template>
 						</template>
-						
+
 					</view>
 					</view>
 
 
 				</view>
 				</view>
-				<view class="item_one rx-sc" v-else>
+				<view class="item_one rx-sc kk" v-else>
 					<view class="lable">{{val.label}}</view>
 					<view class="lable">{{val.label}}</view>
 					<view class="text" v-if="val.formatter">{{val.formatter(item)||''}}</view>
 					<view class="text" v-if="val.formatter">{{val.formatter(item)||''}}</view>
 					<view class="text" v-else-if="val.slot">
 					<view class="text" v-else-if="val.slot">
 						<slot :name="val.slot"> </slot>
 						<slot :name="val.slot"> </slot>
-
 					</view>
 					</view>
 					<view class="text" v-else>{{item[val.prop]||''}}</view>
 					<view class="text" v-else>{{item[val.prop]||''}}</view>
 				</view>
 				</view>
@@ -69,10 +67,10 @@
 							value,
 							value,
 							authorities
 							authorities
 						}) => {
 						}) => {
-							if(authorities){
-								is=this.$isAuthorities(authorities)
+							if (authorities) {
+								is = this.$isAuthorities(authorities)
 							}
 							}
-							if (value&&!value.includes(this.item[key])) {
+							if (value && !value.includes(this.item[key])) {
 								is = false
 								is = false
 							}
 							}
 						})
 						})
@@ -93,7 +91,7 @@
 			action(item) {
 			action(item) {
 				if (item.type == 1) {
 				if (item.type == 1) {
 					uni.navigateTo({
 					uni.navigateTo({
-						url: item.pageUrl + '?id=' + this.item.id+(item.query||'')
+						url: item.pageUrl + '?id=' + this.item.id + (item.query || '')
 					})
 					})
 				} else {
 				} else {
 					this.$emit(item.apiName)
 					this.$emit(item.apiName)
@@ -116,7 +114,8 @@
 		.rx-bc {
 		.rx-bc {
 			align-items: start;
 			align-items: start;
 			flex-flow: row wrap;
 			flex-flow: row wrap;
-			>view{
+
+			>view {
 				margin-top: 8rpx;
 				margin-top: 8rpx;
 			}
 			}
 		}
 		}
@@ -157,6 +156,16 @@
 				}
 				}
 			}
 			}
 
 
+
+			.kk .text {
+				overflow: hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+				word-break: break-word;
+			}
+
 			.round {
 			.round {
 				width: 40rpx;
 				width: 40rpx;
 				height: 40rpx;
 				height: 40rpx;

+ 16 - 3
pages/salesServiceManagement/accessory/index.vue

@@ -5,7 +5,8 @@
 		</uni-nav-bar>
 		</uni-nav-bar>
 		<view class="top-wrapper">
 		<view class="top-wrapper">
 			<uni-section>
 			<uni-section>
-				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchVal"
+					placeholder="名称">
 				</uni-easyinput>
 				</uni-easyinput>
 			</uni-section>
 			</uni-section>
 			<button class="search_btn" @click="doSearch">搜索</button>
 			<button class="search_btn" @click="doSearch">搜索</button>
@@ -143,7 +144,6 @@
 					}, {
 					}, {
 						key: 'source',
 						key: 'source',
 						value: [0],
 						value: [0],
-
 					}],
 					}],
 				}, {
 				}, {
 					name: '删除',
 					name: '删除',
@@ -172,6 +172,9 @@
 		onShow() {
 		onShow() {
 			this.doSearch();
 			this.doSearch();
 		},
 		},
+		onReachBottom() {
+			this.getList()
+		},
 		methods: {
 		methods: {
 			doSearch() {
 			doSearch() {
 				this.isEnd = false;
 				this.isEnd = false;
@@ -181,7 +184,11 @@
 			//获取列表信息
 			//获取列表信息
 			getList() {
 			getList() {
 				if (this.isEnd) {
 				if (this.isEnd) {
-					return;
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration:1000
+					})
+					return
 				}
 				}
 				uni.showLoading({
 				uni.showLoading({
 					title: '加载中'
 					title: '加载中'
@@ -189,6 +196,7 @@
 				let data = {
 				let data = {
 					pageNum: this.page,
 					pageNum: this.page,
 					size: this.size,
 					size: this.size,
+					keyWord: this.searchVal
 				}
 				}
 				accessoryPage(data).then(res => {
 				accessoryPage(data).then(res => {
 					if (this.page === 1) {
 					if (this.page === 1) {
@@ -232,6 +240,11 @@
 				} else if (res.cancel) {
 				} else if (res.cancel) {
 					console.log('用户取消');
 					console.log('用户取消');
 				}
 				}
+			},
+			clearSearch() {
+				console.log('清空');
+				this.searchVal = ''
+				this.doSearch()
 			}
 			}
 		}
 		}
 	}
 	}

+ 20 - 1
pages/salesServiceManagement/recycle/index.vue

@@ -5,7 +5,7 @@
 		</uni-nav-bar>
 		</uni-nav-bar>
 		<view class="top-wrapper">
 		<view class="top-wrapper">
 			<uni-section>
 			<uni-section>
-				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				<uni-easyinput  @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
 				</uni-easyinput>
 				</uni-easyinput>
 			</uni-section>
 			</uni-section>
 			<button class="search_btn" @click="doSearch">搜索</button>
 			<button class="search_btn" @click="doSearch">搜索</button>
@@ -154,6 +154,10 @@
 		onShow(){
 		onShow(){
 			this.doSearch();
 			this.doSearch();
 		},
 		},
+		onReachBottom() {
+			this.getList()
+		},
+		
 		methods: {
 		methods: {
 			doSearch() {
 			doSearch() {
 				this.isEnd = false;
 				this.isEnd = false;
@@ -163,6 +167,10 @@
 			//获取列表信息
 			//获取列表信息
 			getList() {
 			getList() {
 				if (this.isEnd) {
 				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration:1000
+					})
 					return;
 					return;
 				}
 				}
 				uni.showLoading({
 				uni.showLoading({
@@ -171,6 +179,7 @@
 				let data = {
 				let data = {
 					pageNum: this.page,
 					pageNum: this.page,
 					size: this.size,
 					size: this.size,
+					keyWord: this.searchVal
 				}
 				}
 				recyclePage(data).then(res => {
 				recyclePage(data).then(res => {
 					if (this.page === 1) {
 					if (this.page === 1) {
@@ -180,6 +189,8 @@
 					}
 					}
 					this.page += 1;
 					this.page += 1;
 					this.isEnd = this.tableList.length >= res.count;
 					this.isEnd = this.tableList.length >= res.count;
+					const height=uni.getSystemInfoSync()
+					console.log(height);
 					uni.hideLoading();
 					uni.hideLoading();
 				}).catch((e) => {
 				}).catch((e) => {
 					uni.hideLoading();
 					uni.hideLoading();
@@ -214,7 +225,13 @@
 				} else if (res.cancel) {
 				} else if (res.cancel) {
 					console.log('用户取消');
 					console.log('用户取消');
 				}
 				}
+			},
+			clearSearch() {
+				this.searchVal = ''
+				this.doSearch()
 			}
 			}
+			
+			
 		}
 		}
 	}
 	}
 </script>
 </script>
@@ -269,4 +286,6 @@
 		align-items: center;
 		align-items: center;
 		justify-content: center;
 		justify-content: center;
 	}
 	}
+	
+	
 </style>
 </style>

+ 9 - 5
pages/salesServiceManagement/workOrder/components/accessoryList.vue

@@ -4,10 +4,11 @@
 			<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
 			<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
 				<myCard :item="item" @del="del(index)" @edit="add('edit',item,index)" :index="index+1"
 				<myCard :item="item" @del="del(index)" @edit="add('edit',item,index)" :index="index+1"
 					:columns="columns" :btnList="btnData">
 					:columns="columns" :btnList="btnData">
-					<u--input placeholder="请输入" type="number" @input="(val) =>inputChange(val,'totalCount',index)"
-						slot="totalCount" v-model="item.totalCount">
+					<u--input :disabled="isDisable" placeholder="请输入" type="number"
+						@input="(val) =>inputChange(val,'totalCount',index)" slot="totalCount"
+						v-model="item.totalCount">
 					</u--input>
 					</u--input>
-					<u--input placeholder="请输入" type="number" @input="(val) =>inputChange(val,'singlePrice',index)"
+					<u--input  :disabled="isDisable"  placeholder="请输入" type="number" @input="(val) =>inputChange(val,'singlePrice',index)"
 						slot="singlePrice" v-model="item.singlePrice">
 						slot="singlePrice" v-model="item.singlePrice">
 					</u--input>
 					</u--input>
 				</myCard>
 				</myCard>
@@ -118,11 +119,14 @@
 		},
 		},
 		computed: {
 		computed: {
 			// 按钮
 			// 按钮
-			btnData(){
-				if(this.type == 'view'){
+			btnData() {
+				if (this.type == 'view') {
 					return []
 					return []
 				}
 				}
 				return this.btnList;
 				return this.btnList;
+			},
+			isDisable() {
+				return this.type === 'view'
 			}
 			}
 		},
 		},
 		created() {
 		created() {

+ 16 - 3
pages/salesServiceManagement/workOrder/index.vue

@@ -5,7 +5,8 @@
 		</uni-nav-bar>
 		</uni-nav-bar>
 		<view class="top-wrapper">
 		<view class="top-wrapper">
 			<uni-section>
 			<uni-section>
-				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				<uni-easyinput @clear="clearSearch" prefixIcon="search" style="width: 460rpx" v-model="searchVal"
+					placeholder="名称">
 				</uni-easyinput>
 				</uni-easyinput>
 			</uni-section>
 			</uni-section>
 			<button class="search_btn" @click="doSearch">搜索</button>
 			<button class="search_btn" @click="doSearch">搜索</button>
@@ -299,13 +300,16 @@
 		},
 		},
 		computed: {},
 		computed: {},
 		onLoad() {
 		onLoad() {
-			
+
 		},
 		},
 		onShow() {
 		onShow() {
 			this.doSearch();
 			this.doSearch();
 		},
 		},
 		created() {
 		created() {
-			
+
+		},
+		onReachBottom() {
+			this.getList()
 		},
 		},
 		methods: {
 		methods: {
 			changeChartsTab(value) {
 			changeChartsTab(value) {
@@ -320,6 +324,10 @@
 			//获取列表信息
 			//获取列表信息
 			getList() {
 			getList() {
 				if (this.isEnd) {
 				if (this.isEnd) {
+					this.$refs.uToast.show({
+						message: "暂无更多数据",
+						duration: 1000
+					})
 					return
 					return
 				}
 				}
 				uni.showLoading({
 				uni.showLoading({
@@ -328,6 +336,7 @@
 				let data = {
 				let data = {
 					pageNum: this.page,
 					pageNum: this.page,
 					size: this.size,
 					size: this.size,
+					keyWord: this.searchVal
 				}
 				}
 				if (this.pickTabIndex != 'all') {
 				if (this.pickTabIndex != 'all') {
 					data.orderStatus = this.pickTabIndex;
 					data.orderStatus = this.pickTabIndex;
@@ -395,6 +404,10 @@
 					})
 					})
 					this.doSearch();
 					this.doSearch();
 				}
 				}
+			},
+			clearSearch() {
+				this.searchVal = ''
+				this.doSearch()
 			}
 			}
 		}
 		}
 	}
 	}