Ver Fonte

售后服务

yusheng há 7 meses atrás
pai
commit
6f3e0e8234

+ 1 - 0
pages/home/wt/components/formParser/routerView.vue

@@ -34,6 +34,7 @@
 			}
 		},
 		mounted() {
+			
 			uni.$off('updateWorkData')
 			uni.$on('updateWorkData', ({
 				data

+ 169 - 9
pages/salesServiceManagement/accessory/components/selectWork.vue

@@ -4,6 +4,15 @@
 		</uni-nav-bar>
 		<view class="wapper-top">
 
+		</view>
+		<view class="top-wrapper">
+			<uni-section>
+				<uni-easyinput @clear="clearSearch" 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" @click="showSearch"></image>
 		</view>
 		<view class="wrapper">
 			<u-list @scrolltolower="scrolltolower" class="listContent">
@@ -68,6 +77,7 @@
 				<view class="selBtn">选择( {{ checkListLen }} )</view>
 			</u-button>
 		</view>
+		<MySearch :show.sync="searchShow" :formItems="formItems" @search="confirmSearch"></MySearch>
 		<u-toast ref="uToast"></u-toast>
 	</view>
 </template>
@@ -93,8 +103,80 @@
 				checkData: {},
 				pageNum: 1,
 				isEnd: false,
-				orderStatusList:'',
-				isPieCar:''
+				orderStatusList: '',
+				isPieCar: '',
+				searchForm: {},
+				searchVal: '',
+				searchShow: false,
+				formItems: [{
+						label: '工单编号:',
+						prop: 'code',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '客户名称:',
+						prop: 'contactName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '设备名称:',
+						prop: 'deviceName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '故障等级:',
+						prop: 'faultLevel',
+						component: 'MySelect',
+						props: {
+							localdata: [],
+							dataKey: 'label',
+							dataValue: 'value'
+						}
+					},
+					{
+						label: '计划单号:',
+						prop: 'planCode',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+				
+				
+					{
+						label: '计划名称:',
+						prop: 'planName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '报工人:',
+						prop: 'executeUserName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+					{
+						label: '验收人:',
+						prop: 'accepterUserName',
+						component: 'MyInput',
+						props: {
+							placeholder: '请输入内容',
+						}
+					},
+				],
 			}
 		},
 		computed: {
@@ -111,8 +193,8 @@
 			}
 		},
 		onLoad(data) {
-			this.orderStatusList=data.orderStatusList
-			this.isPieCar=data.isPieCar
+			this.orderStatusList = data.orderStatusList
+			this.isPieCar = data.isPieCar
 			this.doSearch();
 		},
 		methods: {
@@ -132,14 +214,16 @@
 				let data = {
 					pageNum: this.page,
 					size: 10,
+					keyWord: this.searchVal,
+					...this.searchForm
 				}
-				if(this.orderStatusList){
-					data.orderStatusList=this.orderStatusList
+				if (this.orderStatusList) {
+					data.orderStatusList = this.orderStatusList
 				}
-				if(this.isPieCar){
-					data.isPieCar=this.isPieCar
+				if (this.isPieCar) {
+					data.isPieCar = this.isPieCar
 				}
-				
+
 				getSalesWorkOrder(data).then(res => {
 					if (this.page === 1) {
 						this.tableList = res.list;
@@ -175,6 +259,24 @@
 			backAdd() {
 				this.back();
 			},
+			clearSearch() {
+				this.searchVal = ''
+				this.doSearch()
+			},
+			showSearch() {
+				this.searchShow = true
+			},
+			doSearch() {
+				this.isEnd = false;
+				this.page = 1;
+				this.getList();
+			},
+			confirmSearch(e) {
+				console.log(e);
+				let data = JSON.parse(JSON.stringify(e))
+				this.searchForm = data
+				this.doSearch()
+			},
 			jumpAdd() {
 				if (!this.checkData.id) {
 					this.$refs.uToast.show({
@@ -207,6 +309,43 @@
 		}
 	}
 
+	.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;
+		}
+	}
+
 	//底部按钮
 	.footer {
 		height: 45px;
@@ -232,4 +371,25 @@
 			width: 150rpx;
 		}
 	}
+
+	.listBox {
+		display: flex;
+		padding: 10px 0;
+		border-bottom: 1px solid #e5e5e5;
+	}
+
+	.listBox-con {
+		width: 100%;
+		display: flex;
+		flex-wrap: wrap;
+		justify-content: space-between;
+		align-items: center;
+		padding: 0 9px 0 0;
+	}
+
+	.listBox-sel {
+		height: 45px;
+		width: 40px;
+		text-align: center;
+	}
 </style>

+ 58 - 12
pages/salesServiceManagement/demandList/add.vue

@@ -93,7 +93,7 @@
 				</uni-data-picker>
 				<u--input v-else slot="value" style="flex:1" placeholder="请输入" disabled border="surround"
 					:value="form.pieCarType==1?'是':'否'">
-				
+
 				</u--input>
 			</u-cell>
 			<u-cell title="是否外包" arrow-direction="down">
@@ -102,27 +102,24 @@
 				</uni-data-picker>
 				<u--input v-else slot="value" style="flex:1" placeholder="请输入" disabled border="surround"
 					:value="form.isOutsource==1?'是':'否'">
-				
+
 				</u--input>
 			</u-cell>
 			<u-cell title="是否生成采购订单" arrow-direction="down">
-				<uni-data-picker v-if="isDisable" v-model="form.isCreatePurchaseOrder" slot="value"
-					placeholder="请选择" :localdata="chargeList">
+				<uni-data-picker v-if="isDisable" v-model="form.isCreatePurchaseOrder" slot="value" placeholder="请选择"
+					:localdata="chargeList">
 				</uni-data-picker>
 				<u--input v-else slot="value" style="flex:1" placeholder="请输入" disabled border="surround"
 					:value="form.isCreatePurchaseOrder==1?'是':'否'">
-				
+
 				</u--input>
 			</u-cell>
 			<u-cell title="涉及事业部门" arrow-direction="down">
-				<u--input slot="value" :disabled="!isDisable" placeholder="请选择" border="surround" v-model="form.involveDeptName"
-					@click.native="salesDeptShow"></u--input>
+				<u--input slot="value" :disabled="!isDisable" placeholder="请选择" border="surround"
+					v-model="form.involveDeptName" @click.native="salesDeptShow"></u--input>
 			</u-cell>
-			<u-cell title="报修人" arrow-direction="down">
-				<view slot="value" style="display: flex;align-items: center;width: 100%;">
-					<u--input style="flex:1" placeholder="请输入" disabled border="surround" v-model="createUserName">
-					</u--input>
-				</view>
+			<u-cell title="备注说明" arrow-direction="down">
+				<u--textarea border="surround" :disabled="!isDisable" placeholder=" " slot="value" v-model="form.remark" autoHeight ></u--textarea>
 			</u-cell>
 		</u-cell-group>
 		<AfterSales ref="salesRef" :type="type" v-show="current == 1" :afterSalesType="form.afterSalesType"
@@ -132,6 +129,9 @@
 		<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 style="height:84rpx;width:100%">
+
 		</view>
 		<u-toast ref="uToast"></u-toast>
 		<ba-tree-picker ref="treePicker" :multiple="false" @select-change="confirm" :localdata="listData" valueKey="id"
@@ -330,6 +330,9 @@
 		methods: {
 			//选择部门
 			salesDeptShow() {
+				if (!this.isDisable) {
+					return
+				}
 				this.$refs.treePicker._show()
 			},
 			// 查询详情
@@ -368,6 +371,9 @@
 				this.current = index;
 			},
 			selectContactShow() {
+				if (!this.isDisable) {
+					return
+				}
 				uni.navigateTo({
 					url: `/pages/saleManage/components/selectContact?isAll=2&type=需求`
 				})
@@ -416,6 +422,9 @@
 				this.form.orderCode = ''
 			},
 			invoiceDialogOpen() {
+				if (!this.isDisable) {
+					return
+				}
 				if (!this.form.contactId && this.form.associationType !== '3') {
 					this.$refs.uToast.show({
 						type: "warning",
@@ -506,6 +515,39 @@
 						})
 						return
 					}
+					let isMessage = [];
+					[{
+						name: '请选择是否收费',
+						key: 'isFee'
+					}, {
+						name: '请选择是否带配件',
+						key: 'isWithAccessories'
+					}, {
+						name: '请选择是否派车',
+						key: 'isPieCar'
+					}, {
+						name: '请选择是否外包',
+						key: 'isOutsource'
+					}, {
+						name: '请选择是否生成采购订单',
+						key: 'isCreatePurchaseOrder'
+					}, {
+						name: '请选择涉及事业部门',
+						key: 'involveDeptName'
+					}].forEach(item => {
+						if (data[item.key] != 1 && data[item.key] !== 0 && !isMessage.length) {
+							console.log(item, 'item')
+							isMessage.push(item)
+						}
+					})
+					if (isMessage.length) {
+						this.$refs.uToast.show({
+							type: "warning",
+							message: isMessage[0].name,
+						})
+						return
+					}
+
 
 					// 联系人数据
 					let contactInfoVOS = this.$refs.contactRef.getTabData();
@@ -559,6 +601,10 @@
 		margin-right: 16rpx;
 	}
 
+	/deep/.uni-textarea-textarea {
+		color: red;
+	}
+
 	.footerButton {
 		width: 100%;
 		height: 84rpx;

+ 4 - 4
pages/salesServiceManagement/demandList/components/itemSelect.vue

@@ -54,14 +54,13 @@
 				sectionList: [],
 			}
 		},
-		onLoad({}) {
-		},
+		onLoad({}) {},
 		methods: {
 			async getData(row, associationType) {
 				this.sectionList = [];
 				this.listData = [];
 				console.log(associationType)
-				if(associationType === '1') {
+				if (associationType === '1') {
 					let params = {
 						code: 'after_sales_product_list_source'
 					};
@@ -74,7 +73,7 @@
 				} else {
 					this.getSaleInfo(row)
 				}
-				
+
 			},
 			resetTable() {
 				this.sectionList = [];
@@ -106,6 +105,7 @@
 									categoryName: productItem.categoryName,
 									categoryCode: productItem.categoryCode,
 									categoryModel: productItem.categoryModel,
+									productCategoryName: packingItem.categoryLevelName,
 									produceTime: packingItem.produceTime || null,
 									shipmentDate: res.createTime || null,
 									guaranteePeriodDeadline: this.getTime(res.createTime)[0],

+ 1 - 1
pages/salesServiceManagement/recycle/recycleAdd.vue

@@ -72,7 +72,7 @@
 			</u-cell>
 			<u-cell title="原因" arrow-direction="down">
 				<view slot="value" style="display: flex;align-items: center;width: 100%;">
-					<u--textarea style="flex:1; min-height: 160rpx;" border="surround" placeholder="请输入内容"
+					<u--textarea :disabled="!isDisable" style="flex:1; min-height: 160rpx;" border="surround" placeholder="请输入内容"
 						v-model="form.reason"></u--textarea>
 				</view>
 			</u-cell>

+ 2 - 2
pages/salesServiceManagement/workOrder/components/accessory.vue

@@ -5,9 +5,9 @@
 		</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">
+			<u-cell title="编码" arrow-direction="down">
 				<view slot="value" style="display: flex;align-items: center;width: 100%;">
-					<u--input readonly style="flex:1" border="surround" v-model="form.code">
+					<u--input disabled style="flex:1" border="surround" v-model="form.code">
 					</u--input>
 				</view>
 			</u-cell>

+ 1 - 1
pages/salesServiceManagement/workOrder/components/demandInfo.vue

@@ -19,7 +19,7 @@
 				</u--input>
 			</view>
 		</u-cell>
-		<u-cell title="发货单" arrow-direction="down">
+		<u-cell v-if="demandForm.associationType==1||demandForm.associationType==2" :title="demandForm.associationType==1?'发货单':demandForm.associationType==2?'销售订单':''" arrow-direction="down">
 			<view slot="value" style="display: flex;align-items: center;width: 100%;">
 				<u--input style="flex:1" readonly placeholder="请选择" border="surround" v-model="demandForm.orderCode">
 				</u--input>

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

@@ -175,6 +175,7 @@
 					contactAddress: data.contactAddress,
 					expectedTime: data.expectedTime,
 					createUserName: data.createUserName,
+					associationType:data.associationType,
 					fault_level,
 				}
 			},

+ 24 - 13
pages/salesServiceManagement/workOrder/components/schemeAdd.vue

@@ -96,6 +96,9 @@
 	import {
 		getIdWarehouseList
 	} from '@/api/salesServiceManagement/workOrder/index.js'
+	import {
+		getByCode
+	} from '@/api/pda/common.js'
 	export default {
 		data() {
 			return {
@@ -113,19 +116,7 @@
 					singlePrice: '', // 单价
 					settlementPrice: '', // 合计
 				},
-				typeIdList: [{
-						text: '工时',
-						value: '1'
-					},
-					{
-						text: '零配件',
-						value: '2'
-					},
-					{
-						text: '差旅费',
-						value: '3'
-					}
-				],
+				typeIdList: [],
 				obtain: '主数据',
 				warehouseList: [], // 仓库数据
 				oldTypeId: '2', // 旧的项目选择
@@ -140,6 +131,7 @@
 			this.obtain = params.obtain || '主数据'
 		},
 		created() {
+			this.getLevelCode('after_sales_project')
 			uni.$off('updateScheme');
 			uni.$on('updateScheme', async (data) => {
 				this.form = {
@@ -160,6 +152,25 @@
 			})
 		},
 		methods: {
+			async getLevelCode(code) {
+				try {
+					const res = await getByCode(code);
+					if (res) {
+						let list = Object.values(res).map((el) => {
+							let k = Object.keys(el)[0];
+							let v = Object.values(el)[0];
+							return {
+								text: v,
+								value: k
+							};
+						});
+
+						this.typeIdList = list;
+					}
+				} catch (err) {
+
+				}
+			},
 			// 如果新的选择跟旧的一样 不做数据更改
 			typeOnchange(e) {
 				if (this.form.typeId == this.oldTypeId) {

+ 67 - 46
pages/salesServiceManagement/workOrder/components/schemeList.vue

@@ -19,6 +19,9 @@
 		getWarehouseOutStock,
 		getIdWarehouseList
 	} from '@/api/salesServiceManagement/workOrder/index.js';
+	import {
+		getByCode
+	} from '@/api/pda/common.js'
 	export default {
 		components: {
 			myCard
@@ -46,7 +49,48 @@
 		},
 		data() {
 			return {
-				columns: [
+				typeIdList: [],
+				btnList: [{
+						name: '修改',
+						apiName: 'edit',
+						btnType: 'primary',
+						type: '2',
+						pageUrl: '',
+						judge: [{
+							authorities: '',
+						}, {
+							key: 'customize',
+							value: ['5'],
+
+						}]
+					},
+					{
+						name: '删除',
+						apiName: 'del',
+						btnType: 'primary',
+						type: '2',
+						pageUrl: '',
+						judge: [{
+							authorities: '',
+						}, {
+							key: 'customize',
+							value: ['5'],
+
+						}]
+					},
+				],
+				tableList: []
+			}
+		},
+		computed: {
+			btnData() {
+				if (this.type == 'view') {
+					return [];
+				}
+				return this.btnList;
+			},
+			columns() {
+				return [
 					[{
 						label: '名称:',
 						prop: 'name',
@@ -58,12 +102,7 @@
 						prop: 'typeId',
 						formatter: (row) => {
 							let typeId = row.typeId;
-							return typeId == 1 ?
-								'工时' :
-								typeId == 2 ?
-								'零配件' :
-								typeId == 3 ?
-								'差旅费' : ''
+							return this.typeIdList.find(item => item.value == typeId)?.text
 						}
 					}],
 					[{
@@ -109,48 +148,11 @@
 						type: 'action',
 						className: 'perce100',
 					}],
-				],
-				btnList: [{
-						name: '修改',
-						apiName: 'edit',
-						btnType: 'primary',
-						type: '2',
-						pageUrl: '',
-						judge: [{
-							authorities: '',
-						}, {
-							key: 'customize',
-							value: ['5'],
-
-						}]
-					},
-					{
-						name: '删除',
-						apiName: 'del',
-						btnType: 'primary',
-						type: '2',
-						pageUrl: '',
-						judge: [{
-							authorities: '',
-						}, {
-							key: 'customize',
-							value: ['5'],
-
-						}]
-					},
-				],
-				tableList: []
-			}
-		},
-		computed: {
-			btnData() {
-				if (this.type == 'view') {
-					return [];
-				}
-				return this.btnList;
+				]
 			}
 		},
 		created() {
+			this.getLevelCode('after_sales_project')
 			uni.$off('updateInfo');
 			uni.$on('updateInfo', (data) => {
 				data.customize = '5';
@@ -167,6 +169,25 @@
 
 		},
 		methods: {
+			async getLevelCode(code) {
+				try {
+					const res = await getByCode(code);
+					if (res) {
+						let list = Object.values(res).map((el) => {
+							let k = Object.keys(el)[0];
+							let v = Object.values(el)[0];
+							return {
+								text: v,
+								value: k
+							};
+						});
+
+						this.typeIdList = list;
+					}
+				} catch (err) {
+
+				}
+			},
 			add(type, item = {}, index) {
 				if (type == 'edit') {
 					item.index = index;

+ 14 - 13
pages/salesServiceManagement/workOrder/index.vue

@@ -310,20 +310,21 @@
 						type: '2',
 						pageUrl: '',
 
-					}, {
-						name: '修改',
-						apiName: 'edit',
-						btnType: 'primary',
-						type: '2',
-						pageUrl: '',
-						judge: [{
-							authorities: '',
-						}, {
-							key: 'orderStatus',
-							value: [1, 6],
-
-						}],
 					},
+					// {
+					// 	name: '修改',
+					// 	apiName: 'edit',
+					// 	btnType: 'primary',
+					// 	type: '2',
+					// 	pageUrl: '',
+					// 	judge: [{
+					// 		authorities: '',
+					// 	}, {
+					// 		key: 'orderStatus',
+					// 		value: [1, 6],
+
+					// 	}],
+					// },
 					{
 						name: '报工',
 						apiName: 'report',