Эх сурвалжийг харах

配件申请列表 配件回收列表 页面开发

jingshuyong 1 жил өмнө
parent
commit
fbe6aa7769

+ 30 - 0
api/salesServiceManagement/accessory/index.js

@@ -0,0 +1,30 @@
+import {
+	get,
+	put,
+	putJ,
+	postJ,
+	deleteApi
+} from "@/utils/request";
+import Vue from "vue";
+
+// 配件申请记录 表格
+export async function accessoryPage(data) {
+	const res = await get(Vue.prototype.apiUrl + `/eom/sparePartsApply/page`, {
+		params: data
+	});
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+// 配件回收记录 表格
+export async function recyclePage(data) {
+	const res = await get(Vue.prototype.apiUrl + `/eom/afterSalesAccessoryApply/page`, {
+		params: data
+	});
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}

+ 32 - 0
pages.json

@@ -2172,6 +2172,38 @@
 						"navigationStyle": "custom",
 						"navigationBarTextStyle": "white"
 					}
+				},
+				{
+					"path": "pages/salesServiceManagement/accessory/index", 
+					"style": {
+						"navigationBarTitleText": "配件申请记录",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "pages/salesServiceManagement/recycle/index", 
+					"style": {
+						"navigationBarTitleText": "配件回收记录",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "pages/salesServiceManagement/accessory/accessoryAdd", 
+					"style": {
+						"navigationBarTitleText": "配件信息",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "pages/salesServiceManagement/accessory/components/selectWork", 
+					"style": {
+						"navigationBarTitleText": "选择工单",
+						"navigationStyle": "custom",
+						"navigationBarTextStyle": "white"
+					}
 				}
 	],
 	"tabBar": {

+ 14 - 0
pages/index/index.vue

@@ -436,6 +436,20 @@
 						icon: 'icon-gongdanguanli',
 						badge: 0
 					},
+					{
+						name: '配件申请记录',
+						url: `/pages/salesServiceManagement/accessory/index`,
+						path: '/pages/salesServiceManagement/accessory/index',
+						icon: 'icon-gongdanguanli',
+						badge: 0
+					},
+					{
+						name: '配件回收记录',
+						url: `/pages/salesServiceManagement/recycle/index`,
+						path: '/pages/salesServiceManagement/recycle/index',
+						icon: 'icon-gongdanguanli',
+						badge: 0
+					},
 					// {
 					// 	name: '发货确认单',
 					// 	url: `/pages/invoiceConfirm/index`,

+ 137 - 0
pages/salesServiceManagement/accessory/accessoryAdd.vue

@@ -0,0 +1,137 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back"
+			:title="title" @clickLeft="back">
+		</uni-nav-bar>
+		<u-subsection :list="list" :current="current" @change="sectionChange"></u-subsection>
+		<u-cell-group v-show="current == 0">
+			<u-cell title="编码" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input disabled style="flex:1" border="surround" v-model="form.code">
+					</u--input>
+				</view>
+			</u-cell>
+			<u-cell title="工单名称" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input :disabled="!isDisable" @click.native="selectWorkOrder" style="flex:1" border="surround"
+						v-model="form.name">
+					</u--input>
+				</view>
+			</u-cell>
+			<u-cell title="领用部门" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input :disabled="!isDisable" style="flex:1" border="surround" v-model="form.contactName">
+					</u--input>
+				</view>
+			</u-cell>
+			<u-cell title="领用人" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input :disabled="!isDisable" style="flex:1" border="surround" v-model="form.contactName">
+					</u--input>
+				</view>
+			</u-cell>
+			<u-cell title="使用部门" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input :disabled="!isDisable" style="flex:1" border="surround" v-model="form.contactName">
+					</u--input>
+				</view>
+			</u-cell>
+			<u-cell title="使用人" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--input :disabled="!isDisable" style="flex:1" border="surround" v-model="form.contactName">
+					</u--input>
+				</view>
+			</u-cell>
+			<u-cell title="使用时间" arrow-direction="down">
+				<uni-datetime-picker :disabled="!isDisable" type="date" slot="value" v-model="form.usageTime">
+				</uni-datetime-picker>
+			</u-cell>
+			<u-cell title="用途" arrow-direction="down">
+				<view slot="value" style="display: flex;align-items: center;width: 100%;">
+					<u--textarea style="flex:1" border="surround" placeholder="请输入内容"
+						v-model="form.purpose"></u--textarea>
+				</view>
+			</u-cell>
+		</u-cell-group>
+		<view class="footerButton" v-if="isDisable">
+			<u-button type="default" text="返回" @click="back"></u-button>
+			<u-button type="primary" @click="save" text="保存"></u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		computed: {
+			isDisable() {
+				let flag = this.type != 'view'
+				return flag;
+			}
+		},
+		data() {
+			return {
+				current: 0,
+				list: ['基本信息', '配件信息'],
+				title: '',
+				type: '',
+				form: {}
+			}
+		},
+		onLoad(params) {
+			this.title = params.type == 'view' ? '配件申请详情' : params.type == 'edit' ? '配件申请修改' : '配件申请新增';
+			this.type = params.type;
+			console.log(params, 'params --')
+		},
+		created() {
+			uni.$off('updateWorkData')
+			uni.$on('updateWorkData', ({
+				data
+			}) => {
+				console.log(data, 'data');
+			})
+		},
+		methods: {
+			sectionChange(index) {
+				this.current = index;
+			},
+			save() {
+
+			},
+			selectWorkOrder() {
+				uni.navigateTo({
+					url: `/pages/salesServiceManagement/accessory/components/selectWork`
+				})
+				console.log('打开工单数据');
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	/deep/.u-subsection__item__text {
+		font-size: 28rpx !important;
+	}
+
+	/deep/.u-cell__body__content {
+		flex: none;
+		margin-right: 16rpx;
+	}
+
+	.footerButton {
+		width: 100%;
+		height: 84rpx;
+		display: flex;
+		position: fixed;
+		bottom: 0;
+		z-index: 10;
+
+		/deep/.u-button {
+			height: 100%;
+		}
+
+		>view {
+			flex: 1;
+
+		}
+	}
+</style>

+ 209 - 0
pages/salesServiceManagement/accessory/components/selectWork.vue

@@ -0,0 +1,209 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="选择工单" @clickLeft="backAdd">
+		</uni-nav-bar>
+		<view class="wapper-top">
+
+		</view>
+		<view class="wrapper">
+			<u-list @scrolltolower="scrolltolower" class="listContent">
+				<checkbox-group v-for="(item, index) in tableList" :key="index" @change="selectVal(item, index)">
+					<label>
+						<view class="listBox">
+							<view class="listBox-sel">
+								<checkbox :value="item.id" color="#fff" :checked="item.checked" />
+							</view>
+							<view class="listBox-con">
+								<view class="listBox-bottom">
+									<view>
+										<text>工单编号:</text>
+										<text class="value">{{ item.code }}</text>
+									</view>
+									<view>
+										<text>计划单号:</text>
+										<text class="value">{{ item.planCode }}</text>
+									</view>
+									<view>
+										<text>计划名称:</text>
+										<text class="value">{{ item.planName }}</text>
+									</view>
+									<view class="label-s">
+										<text>报工人:</text>
+										<text class="value">{{ item.executeUserName }}</text>
+									</view>
+									<view class="label-s">
+										<text>验收人:</text>
+										<text class="value">{{ item.accepterUserName }}</text>
+									</view>
+									<view>
+										<text>验收时间:</text>
+										<text class="value">{{ item.accepterTime }}</text>
+									</view>
+									<view>
+										<text>开始时间:</text>
+										<text class="value">{{ item.acceptTime }}</text>
+									</view>
+									<view>
+										<text>结束时间:</text>
+										<text class="value">{{ item.finishTime }}</text>
+									</view>
+									<view>
+										<text>计划完成时间:</text>
+										<text class="value">{{ item.planFinishTime }}</text>
+									</view>
+									<view>
+										<text>状态:</text>
+										<text class="value">已完成</text>
+									</view>
+								</view>
+							</view>
+						</view>
+					</label>
+				</checkbox-group>
+				<u-empty class="noDate" style="margin-top: 20vh" v-if="!tableList.length"></u-empty>
+			</u-list>
+		</view>
+		<view class="footer">
+			<u-button type="success" size="small" class="u-reset-button" @click="jumpAdd">
+				<view class="selBtn">选择( {{ checkListLen }} )</view>
+			</u-button>
+		</view>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		getSalesWorkOrder
+	} from '@/api/salesServiceManagement/workOrder/index.js'
+	export default {
+		data() {
+			return {
+				tableList: [],
+				checkData: {},
+				pageNum: 1,
+				isEnd: false,
+			}
+		},
+		computed: {
+			checkListLen() {
+				if (this.checkData.id) {
+					return 1;
+				}
+				return 0;
+			}
+		},
+		onLoad() {
+			this.doSearch();
+		},
+		methods: {
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.getList();
+			},
+			//获取列表信息
+			getList() {
+				if (this.isEnd) {
+					return;
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+				let data = {
+					pageNum: this.page,
+					size: 10,
+				}
+				getSalesWorkOrder(data).then(res => {
+					if (this.page === 1) {
+						this.tableList = res.list;
+					} else {
+						this.tableList.push(...res.list);
+					}
+					this.page += 1
+					this.isEnd = this.tableList.length >= res.count;
+					uni.hideLoading();
+				}).catch((e) => {
+					uni.hideLoading();
+				})
+			},
+			selectVal(val, index) {
+				this.$set(this.tableList[index], 'checked', !this.tableList[index].checked);
+				this.tableList.forEach((item, i) => {
+					if (item.id != val.id) {
+						this.$set(this.tableList[i], 'checked', false)
+					}
+				})
+				if (val.checked) {
+					this.checkData = val;
+				} else {
+					this.checkData = {};
+				}
+			},
+			scrolltolower() {
+				if (this.isEnd) {
+					return;
+				}
+				this.getList();
+			},
+			backAdd() {
+				this.back();
+			},
+			jumpAdd() {
+				if (!this.checkData.id) {
+					this.$refs.uToast.show({
+						type: "warning",
+						message: "请选择一条工单数据",
+					})
+					return;
+				}
+				uni.$emit('updateWorkData', {
+					data: this.checkData,
+				})
+				this.backAdd();
+			}
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	@import url('@/pages/salesServiceManagement/demandList/components/invoice.scss');
+
+	.mainBox {
+		height: 100vh;
+		display: flex;
+		flex-direction: column;
+
+		.wrapper {
+			// flex: 1;
+			height: calc(100vh - 196rpx);
+			overflow: hidden;
+		}
+	}
+
+	//底部按钮
+	.footer {
+		height: 45px;
+		position: relative;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		bottom: 0;
+		width: 100%;
+		height: 50px;
+		border-top: 1px solid #eeecec;
+		background-color: #ffffff;
+		z-index: 999;
+
+		.bottom {
+			margin-left: 10rpx;
+		}
+
+		.u-reset-button {
+			position: absolute;
+			right: 10rpx;
+			top: 20rpx;
+			width: 150rpx;
+		}
+	}
+</style>

+ 255 - 0
pages/salesServiceManagement/accessory/index.vue

@@ -0,0 +1,255 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back"
+			title="配件申请记录" @clickLeft="back">
+		</uni-nav-bar>
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+		</view>
+		<view class="wrapper">
+			<u-list @scrolltolower="scrolltolower" class="listContent" style="height: auto;">
+				<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
+					<myCard :columns="columns" :btnList="btnList" :item="item" @details="add(item,'view')"
+						@edit="add(item,'edit')">
+					</myCard>
+				</view>
+			</u-list>
+		</view>
+		<view class="add" @click="add('add','')">
+			<u-icon name="plus" color="#fff"></u-icon>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		accessoryPage,
+	} from '@/api/salesServiceManagement/accessory/index.js';
+	import myCard from '@/pages/saleManage/components/myCard.vue';
+	export default {
+		components: {
+			myCard
+		},
+		data() {
+			return {
+				columns: [
+					[{
+						label: '编号:',
+						prop: 'code',
+						type: 'title',
+						className: 'perce100',
+					}],
+					[{
+						label: '工单编码:',
+						prop: 'orderCode'
+					}],
+					[{
+						label: '物品分类:',
+						prop: 'categoryLevelName',
+						formatter: (row) => {
+							if (!row.details) return '';
+							let str = '';
+							row.details.map((el, idx) => {
+								if (idx + 1 == row.details.length) {
+									str += el.categoryLevelName;
+								} else {
+									str = el.categoryLevelName ?
+										str + '' + el.categoryLevelName + ',' :
+										str + '';
+								}
+							});
+							return str;
+						}
+					}],
+					[{
+						label: '物品名称:',
+						prop: 'categoryName',
+						formatter: (row) => {
+							if (!row.details) return '';
+							let str = '';
+							row.details.map((el, idx) => {
+								if (idx + 1 == row.details.length) {
+									str += el.categoryName;
+								} else {
+									str = str + '' + el.categoryName + ',';
+								}
+							});
+							return str;
+						}
+					}],
+					[{
+						label: '领用部门:',
+						prop: 'receivingDeptName',
+					}, {
+						label: '领用人:',
+						prop: 'recipientName',
+					}],
+					[{
+						label: '客户名称:',
+						prop: 'contactName'
+					}],
+					[{
+						label: '设备名称:',
+						prop: 'categoryName',
+						formatter: (row) => {
+							if (!row.deviceDetails) return '';
+							let str = '';
+							row.deviceDetails.map((el, idx) => {
+								if (idx + 1 == row.deviceDetails.length) {
+									str += el.categoryName;
+								} else {
+									str = str + '' + el.categoryName + ',';
+								}
+							});
+							return str;
+						}
+					}],
+					[{
+						label: '创建时间:',
+						prop: 'createTime'
+					}, {
+						label: '使用时间:',
+						prop: 'usageTime',
+					}],
+					[{
+						label: '操作:',
+						prop: 'action',
+						type: 'action',
+						className: 'perce100',
+					}],
+				],
+				btnList: [{
+					name: '详情',
+					apiName: 'details',
+					btnType: 'primary',
+					type: '2',
+					pageUrl: '',
+
+				}, {
+					name: '修改',
+					apiName: 'edit',
+					btnType: 'primary',
+					type: '2',
+					pageUrl: '',
+					judge: [{
+						authorities: '',
+					}, {
+						key: 'source',
+						value: [0],
+
+					}],
+				}],
+				page: 1,
+				size: 10,
+				isEnd: false,
+				tableList: [],
+				searchVal: ''
+			}
+		},
+		created() {
+			this.doSearch();
+		},
+		methods: {
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.getList();
+			},
+			//获取列表信息
+			getList() {
+				if (this.isEnd) {
+					return;
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+				let data = {
+					pageNum: this.page,
+					size: this.size,
+				}
+				accessoryPage(data).then(res => {
+					if (this.page === 1) {
+						this.tableList = res.list;
+					} else {
+						this.tableList.push(...res.list);
+					}
+					this.page += 1
+					this.isEnd = this.tableList.length >= res.count;
+					uni.hideLoading();
+				}).catch((e) => {
+					uni.hideLoading();
+				})
+			},
+			scrolltolower() {
+				if (this.isEnd) {
+					return;
+				}
+				this.getList();
+			},
+			add(item, type) {
+				console.log(item, 'item ---')
+				uni.navigateTo({
+					url: `/pages/salesServiceManagement/accessory/accessoryAdd?type=${type}&id=${item.id}`
+				})
+			},
+			
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
+
+	.add {
+		width: 96rpx;
+		height: 96rpx;
+		border-radius: 48rpx;
+		background: #3c9cff;
+		position: fixed;
+		bottom: 100rpx;
+		right: 24rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+</style>

+ 26 - 23
pages/salesServiceManagement/demandList/components/AfterSales.vue

@@ -18,14 +18,16 @@
 					class="delete" text="删除"></u-button>
 			</view>
 		</view>
-		<view v-for="(item, index) in faultDetails" :key="index" class="view_box" style="position: relative;">
-			<myCard @edit="goProblem('edit',index,item)" @del="delProblem(index)" :item="item" :index="index+1"
-				:columns="columns" :btnList="btnData">
-				<view class="images" slot="imageUrl">
-					<PreviewPhoto type="view" :imageList="imagesData(item)" />
-				</view>
-			</myCard>
-		</view>
+		<div class="wapper">
+			<view v-for="(item, index) in faultDetails" :key="index" class="view_box" style="position: relative;">
+				<myCard @edit="goProblem('edit',index,item)" @del="delProblem(index)" :item="item" :index="index+1"
+					:columns="columns" :btnList="btnData">
+					<view class="images" slot="imageUrl">
+						<PreviewPhoto type="view" :imageList="imagesData(item)" />
+					</view>
+				</myCard>
+			</view>
+		</div>
 	</view>
 </template>
 
@@ -234,7 +236,7 @@
 					arr = JSON.stringify(resD.imageUrl);
 					delete resD.imageUrl;
 				}
-				console.log(arr,'arr ----')
+				console.log(arr, 'arr ----')
 				let data = JSON.stringify(resD);
 				uni.navigateTo({
 					url: `/pages/salesServiceManagement/demandList/components/faultAdd?type=${type}&index=${index}&data=${data}&str=${str}&arr=${encodeURIComponent(arr)}`
@@ -260,6 +262,7 @@
 
 <style lang="scss" scoped>
 	.after_sales {
+		height: calc(100vh - 246rpx);
 		.sales_info {
 			padding: 8px 16px;
 			font-size: 13px;
@@ -288,25 +291,25 @@
 			}
 		}
 
-		.view_box {
-			/deep/ .card_box {
-				.image_url {
-					width: 110%;
-					.item_one {
-						.text {
-							display: block;
+		.wapper {
+			height: calc(100% - 338rpx);
+
+			.view_box {
+
+				/deep/ .card_box {
+					.image_url {
+						width: 110%;
+
+						.item_one {
+							.text {
+								display: block;
+								width: calc(100% - 80rpx);
+							}
 						}
 					}
 				}
 			}
 		}
-	}
 
-	.card_box {
-		.item_box {
-			.text {
-				display: block !important;
-			}
-		}
 	}
 </style>

+ 21 - 5
pages/salesServiceManagement/demandList/components/contactList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="after_sales">
 		<view class="bth_oper" v-if="type != 'view'">
-			<view class="btn add" @click="goContact('add')">添加</view>
+			<view class="btn add" v-if="btnShow" @click="goContact('add')">添加</view>
 			<view class="btn del" v-if="!isReport" @click="batchDelete">删除</view>
 			<text class="reserve" v-if="!isReport">请至少保留一条联系人数据</text>
 		</view>
@@ -10,7 +10,7 @@
 				<label>
 					<view class="listBox">
 						<view class="listBox-sel">
-							<checkbox v-if="btnOperate(item)" :value="item.id" color="#fff" :disabled="item.disabled"
+							<checkbox v-if="btnOperate(item,1)" :value="item.id" color="#fff" :disabled="item.disabled"
 								:checked="item.checked" />
 						</view>
 						<view class="listBox-con">
@@ -27,8 +27,8 @@
 									<text class="text">
 										操作:
 									</text>
-									<u-button v-if="type != 'view'" @click="goContact('edit',index,item)"
-										:plain="true" :hairline="true" size='mini' type="default" text="编辑"></u-button>
+									<u-button v-if="btnShow" @click="goContact('edit',index,item)" :plain="true"
+										:hairline="true" size='mini' type="default" text="编辑"></u-button>
 									<u-button v-if="btnOperate(item)" @click="del(index)" :plain="true" :hairline="true"
 										size='mini' type="default" class="delete" text="删除"></u-button>
 								</view>
@@ -76,15 +76,27 @@
 		},
 		computed: {
 			btnOperate() {
-				return (item) => {
+				return (item, type) => {
 					// 详情进入 不显示
 					if (this.type == 'view') return false
 					// 工单 的报工或修改进入 不能对原有数据进行操作
 					if (this.isReport && item.id) {
 						return false;
 					}
+					if (type) {
+						return false
+					}
 					return true
 				}
+			},
+			btnShow() {
+				if (this.type == 'view') {
+					return false
+				}
+				if (this.type == 'report') {
+					return false
+				}
+				return true
 			}
 		},
 		data() {
@@ -176,6 +188,10 @@
 <style lang="scss" scoped>
 	@import './invoice.scss';
 
+	.after_sales {
+		padding-bottom: 84rpx;
+	}
+
 	.bth_oper {
 		display: flex;
 		align-items: center;

+ 214 - 0
pages/salesServiceManagement/recycle/index.vue

@@ -0,0 +1,214 @@
+<template>
+	<view class="mainBox">
+		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back"
+			title="配件回收记录" @clickLeft="back">
+		</uni-nav-bar>
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput prefixIcon="search" style="width: 460rpx" v-model="searchVal" placeholder="名称">
+				</uni-easyinput>
+			</uni-section>
+			<button class="search_btn" @click="doSearch">搜索</button>
+			<image class="menu_icon" src="~@/static/pda/menu.svg"></image>
+		</view>
+		<view class="wrapper">
+			<u-list @scrolltolower="scrolltolower" class="listContent" style="height: auto;">
+				<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
+					<myCard :columns="columns" :btnList="btnList" :item="item">
+					</myCard>
+				</view>
+			</u-list>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		recyclePage,
+	} from '@/api/salesServiceManagement/accessory/index.js';
+	import myCard from '@/pages/saleManage/components/myCard.vue';
+	export default {
+		components: {
+			myCard
+		},
+		data() {
+			return {
+				columns: [
+					[{
+						label: '编号:',
+						prop: 'code',
+						type: 'title',
+						className: 'perce100',
+					}],
+					[{
+						label: '工单编码:',
+						prop: 'orderWorkCode'
+					}],
+					[{
+						label: '物品名称:',
+						prop: 'categoryName',
+						formatter: (row) => {
+							if (!row.details) return '';
+							let str = '';
+							row.details.map((el, idx) => {
+								if (idx + 1 == row.details.length) {
+									str += el.categoryName;
+								} else {
+									str = str + '' + el.categoryName + ',';
+								}
+							});
+							return str;
+						}
+					}],
+					[{
+						label: '客户名称:',
+						prop: 'contactName',
+					}],
+					[{
+						label: '设备名称:',
+						prop: 'categoryName',
+						formatter: (row) => {
+							if (!row.deviceDetails) return '';
+							let str = '';
+							row.deviceDetails.map((el, idx) => {
+								if (idx + 1 == row.deviceDetails.length) {
+									str += el.categoryName;
+								} else {
+									str = str + '' + el.categoryName + ',';
+								}
+							});
+							return str;
+						}
+					}],
+					[{
+						label: '回收部门:',
+						prop: 'recycleDeptName',
+					}, {
+						label: '回收人:',
+						prop: 'recycleName',
+					}],
+					[{
+						label: '创建时间:',
+						prop: 'createTime'
+					}, {
+						label: '回收时间:',
+						prop: 'usageTime',
+					}],
+					[{
+						label: '操作:',
+						prop: 'action',
+						type: 'action',
+						className: 'perce100',
+					}],
+				],
+				btnList: [{
+					name: '详情',
+					apiName: 'details',
+					btnType: 'primary',
+					type: '2',
+					pageUrl: '',
+
+				}, {
+					name: '修改',
+					apiName: 'edit',
+					btnType: 'primary',
+					type: '2',
+					pageUrl: '',
+					judge: [{
+						authorities: '',
+					}, {
+						key: 'orderStatus',
+						value: [1, 6],
+
+					}],
+				}],
+				page: 1,
+				size: 10,
+				isEnd: false,
+				tableList: [],
+				searchVal: ''
+			}
+		},
+		created() {
+			this.doSearch();
+		},
+		methods: {
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.getList();
+			},
+			//获取列表信息
+			getList() {
+				if (this.isEnd) {
+					return;
+				}
+				uni.showLoading({
+					title: '加载中'
+				})
+				let data = {
+					pageNum: this.page,
+					size: this.size,
+				}
+				recyclePage(data).then(res => {
+					if (this.page === 1) {
+						this.tableList = res.list;
+					} else {
+						this.tableList.push(...res.list);
+					}
+					console.log(this.tableList, 'res ____')
+					this.page += 1
+					this.isEnd = this.tableList.length >= res.count;
+					uni.hideLoading();
+				}).catch((e) => {
+					uni.hideLoading();
+				})
+			},
+			scrolltolower() {
+				if (this.isEnd) {
+					return;
+				}
+				this.getList();
+			},
+		}
+	}
+</script>
+
+<style scoped lang="scss">
+	.top-wrapper {
+		background-color: #fff;
+		display: flex;
+		width: 750rpx;
+		height: 88rpx;
+		padding: 16rpx 32rpx;
+		align-items: center;
+		gap: 16rpx;
+
+		/deep/.uni-section {
+			margin-top: 0px;
+		}
+
+		/deep/.uni-section-header {
+			padding: 0px;
+
+		}
+
+		.search_btn {
+			width: 120rpx;
+			height: 70rpx;
+			line-height: 70rpx;
+			padding: 0 24rpx;
+			background: $theme-color;
+			font-size: 32rpx;
+			color: #fff;
+			margin: 0;
+			margin-left: 26rpx;
+		}
+
+		.menu_icon {
+			width: 44rpx;
+			height: 44rpx;
+			margin-left: 14rpx;
+		}
+	}
+</style>

+ 6 - 0
pages/salesServiceManagement/workOrder/components/editPlan.vue

@@ -7,13 +7,19 @@
 			<u-subsection :list="tabs" :current="currentIndex" @change="(e)=>sectionChange(e)"></u-subsection>
 		</view>
 		<accessoryList title="配件回收清单" ref="accessoryRef" :itemList="accessList" v-show="currentValue == 2" />
+		<!-- 需求信息 -->
 		<DemandInfo :demandForm="demandForm" v-show="currentValue == 3" :itemList="productDetail" />
+		<!-- 计划信息 -->
 		<PlanInfo :planForm="planForm" v-show="currentValue == 4" />
+		<!-- 售后对象 -->
 		<AfterSales ref="salesRef" v-show="currentValue == 5" :itemList="productDetail" :type="type"
 			:isReport="isReport" />
+		<!-- 联系人列表 -->
 		<ContactList ref="contactRef" :type="type" v-show="currentValue == 6" :itemList="contactInfoVOS"
 			:isReport="isReport" />
+		<!-- 方案列表 -->
 		<SchemeList ref="schemeRef" v-show="currentValue == 7" :type='type' :itemList="costListVOS" />
+		<!-- 报工信息 -->
 		<ReportInfo ref="reportInfoRef" :form="reportForm" v-show="currentValue == 1" />
 		<view :class=" type == 'report' ? 'footerButton footer_button':'footerButton'" v-if="isDisable">
 			<u-button type="default" text="返回" @click="backAdd"></u-button>

+ 33 - 15
pages/salesServiceManagement/workOrder/components/schemeAdd.vue

@@ -39,12 +39,19 @@
 				</view>
 			</u-cell>
 			<u-cell title="仓库" arrow-direction="down">
-				<template>
-					<uni-data-picker v-if="form.typeId != '2'" v-model="form.warehouseId" slot="value"
+				<template v-if="obtain == '主数据'">
+					<!-- <uni-data-picker v-if="form.typeId != '2'" v-model="form.warehouseId" slot="value"
 						:clear-icon='false' placeholder="请选择" :localdata="warehouseList" @change="warehouseOnchange">
-					</uni-data-picker>
-					<u--input v-if="form.typeId == '2'" slot="value" placeholder="请输入" border="surround"
-						v-model="form.warehouseName"></u--input>
+					</uni-data-picker> -->
+					<uni-data-select v-if="form.typeId == '2'" slot="value" v-model="form.warehouseId"
+						@change="warehouseOnchange" :clear="false" :localdata="warehouseList">
+					</uni-data-select>
+					<u--input v-if="form.typeId != '2'" slot="value" placeholder="请输入" border="surround"
+						v-model="form.warehouseName" disabled></u--input>
+				</template>
+				<template v-else>
+					<u--input slot="value" placeholder="请输入仓库" border="surround" v-model="form.warehouseName"
+						disabled></u--input>
 				</template>
 			</u-cell>
 			<u-cell title="库存" arrow-direction="down">
@@ -86,7 +93,9 @@
 </template>
 
 <script>
-	import { getIdWarehouseList } from '@/api/salesServiceManagement/workOrder/index.js'
+	import {
+		getIdWarehouseList
+	} from '@/api/salesServiceManagement/workOrder/index.js'
 	export default {
 		data() {
 			return {
@@ -97,7 +106,7 @@
 					categoryModel: '', // 型号
 					specification: '', // 规格
 					content: '', // 详细内容
-					warehouseId: '', // 仓库
+					warehouseId: '', // 仓库id\
 					warehouseNum: '', // 库存
 					totalCount: '', // 数量
 					measureUnit: '', // 单位
@@ -132,16 +141,22 @@
 		},
 		created() {
 			uni.$off('updateScheme');
-			uni.$on('updateScheme', (data) => {
+			uni.$on('updateScheme', async (data) => {
 				this.form = {
 					...this.form,
 					...data
 				};
-				this.warehouseList = data.warehouseList.map((el) => {
-					el.text = el.warehouse_name;
-					el.value = el.warehouse_id;
-					return el;
-				});
+				console.log(this.form, 'data ----')
+				if (this.obtain == '主数据') {
+					const res = await getIdWarehouseList({
+						categoryId: ''
+					})
+					res && res.map((el) => {
+						el.text = el.warehouseName;
+						el.value = el.warehouseId;
+					})
+					this.warehouseList = res || [];
+				}
 			})
 		},
 		methods: {
@@ -167,7 +182,8 @@
 				}
 			},
 			warehouseOnchange(e) {
-
+				let name = this.warehouseList.find(item => item.warehouseId == e).warehouseName;
+				this.form.warehouseName = name;
 			},
 			selectProduct() {
 				uni.navigateTo({
@@ -190,15 +206,17 @@
 				// if (value.startsWith('0') && value.length > 1) {
 				// 	value = value.replace(/^0+/, '');
 				// }
+				console.log(123)
 				let value = '';
 				if (field == 'singlePrice') {
-					value = value.replace(/\./g, ''); // 如果不允许小数点,就移除所有小数点
+					value = e.replace(/\./g, ''); // 如果不允许小数点,就移除所有小数点
 				} else {
 					value = e.replace(/[^\d]/g, '')
 					if (value.startsWith('0') && value.length > 1) {
 						value = value.replace(/^0+/, '');
 					}
 				}
+				console.log(value, 'value')
 				this.form[field] = value;
 				let num1 = this.form.totalCount ? this.form.totalCount - 0 : 0;
 				let num2 = this.form.singlePrice ? this.form.singlePrice - 0 : 0;

+ 7 - 4
pages/salesServiceManagement/workOrder/index.vue

@@ -298,8 +298,11 @@
 			}
 		},
 		computed: {},
-		onLaunch() {
+		onLoad() {
 			this.doSearch();
+		},
+		created() {
+			
 		},
 		methods: {
 			changeChartsTab(value) {
@@ -307,9 +310,9 @@
 				this.doSearch();
 			},
 			doSearch() {
-				this.isEnd = false
-				this.page = 1
-				this.getList()
+				this.isEnd = false;
+				this.page = 1;
+				this.getList();
 			},
 			//获取列表信息
 			getList() {