瀏覽代碼

售后需求 提交接口对接

8521520123jsy 1 年之前
父節點
當前提交
cefd268af7

+ 38 - 0
api/salesServiceManagement/demandList/index.js

@@ -39,3 +39,41 @@ export async function saveSalesDemand(data) {
 	}
 	return Promise.reject(new Error(res.message));
 }
+
+// 修改
+export async function updateSalesDemand(data) {
+	const res = await putJ(Vue.prototype.apiUrl + `/eom/afterSalesDemand/update`, data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+//撤回
+export async function revokeSalesDemand(data) {
+	const res = await postJ(Vue.prototype.apiUrl + `/eom/afterSalesDemand/retract`, data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+//审核
+export async function auditSalesDemand(data) {
+	const res = await postJ(Vue.prototype.apiUrl + `/eom/afterSalesDemand/audit`, data);
+	if (res.code == 0) {
+		return res.data;
+	}
+	return Promise.reject(new Error(res.message));
+}
+
+//根据id查询详情
+export async function getSalesDemandById(id) {
+	const data = await get(
+		Vue.prototype.apiUrl + `/eom/afterSalesDemand/getById/${id}`, {}
+	);
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}

+ 13 - 8
pages/maintenanceWorkorder/detail/detail.vue

@@ -66,6 +66,12 @@
 					{{ timeInterval(worksheetInfo.acceptTime, worksheetInfo.finishTime) }}
 				</view>
 
+				<!-- *** 新增 照片列表 -->
+				<view class="kd-cell">
+					<text class="kd-label">照片列表:</text>
+					<PreviewPhoto type="view" :imageList="worksheetInfo.workOrderImg" />
+				</view>
+
 				<view class="zxpg-wrap" v-if="orderType == 1 && repairInfo.repairUserId == userId && ParentIndex !=4">
 					<template v-if="repairInfo.orderStatus == 0">
 						<!-- <view class="zx-btn btns" @click="handleExecute">开始执行</view> -->
@@ -327,6 +333,7 @@
 </template>
 
 <script>
+	import PreviewPhoto from '@/pages/maintenance/check/components/PreviewPhoto.vue'
 	import {
 		startExecuting
 	} from '@/api/myTicket/index.js'
@@ -356,6 +363,7 @@
 	import SearchPopup from '@/pages/pda/components/searchPopup.vue'
 	export default {
 		components: {
+			PreviewPhoto,
 			Step,
 			StepItem,
 			Assign,
@@ -452,18 +460,14 @@
 			}
 		},
 		onLoad(options) {
-			console.log('options---------')
-			console.log(options)
 			this.id = options.id
 			this.workOrderCode = options.code
 			this.planId = options.planId
 			this.orderType = options.orderType
 			this.ParentIndex = options.ParentIndex
-			console.log(this.ParentIndex, '协助工单')
 			let userInfo = uni.getStorageSync('userInfo')
 			// 当前登录人id
 			this.userId = userInfo.userId
-			console.log(this.userId)
 			// this.isApproval = options.type === 'approval'
 			// this.myHandleId = options.myHandleId
 		},
@@ -504,14 +508,12 @@
 			},
 			// 获取历史维修记录
 			getHistoryRepairList(deviceId) {
-				console.log('historyRepairList----------------')
 				historyRepairList({
 					id: deviceId,
 					pageNum: 1,
 					size: 999
 				}).then(data => {
 					this.repairHistoryList = data.list
-					console.log(this.repairHistoryList, '\this.repairHistoryList')
 				})
 			},
 			// 获取设备信息
@@ -531,6 +533,11 @@
 			},
 			getInfo() {
 				getWorkOrderDetail(this.workOrderCode).then(data => {
+					// *** 新增 照片数据接收
+					if(data.ticketsInfoResponse.workOrderImg){
+						data.ticketsInfoResponse.workOrderImg = JSON.parse(data.ticketsInfoResponse.workOrderImg);
+					}
+					console.log(data, '看看数据')
 					this.worksheetInfo = data.ticketsInfoResponse
 					this.repairInfo = data.repairRequestResponse
 					this.getDeviceInfo(this.worksheetInfo.deviceId)
@@ -546,8 +553,6 @@
 							}
 						}) : []
 					this.repairInfoLogs = repairInfoLogs.reverse()
-					console.log('repairInfoLogs----------------------')
-					console.log(repairInfoLogs)
 				})
 				// get(this.apiUrl + '/repair/info/getWorkOrderDetail/' + this.workOrderCode).then(res => {
 				// 	if (res.success) {

+ 2 - 1
pages/maintenanceWorkorder/submitted_ministry/submitted_ministry.vue

@@ -240,12 +240,13 @@
 			},
 			// 提交
 			async submit() {
+				let workOrderImg = JSON.stringify(this.form.photoList);
 				signingWork({
 					id: this.worksheetInfo.id,
 					remark: this.form.repairReportExplain,
 					attachments: this.form.attachments,
 					// workOrderImg: this.form.workOrderImg.join(',')
-					photoList: this.form.photoList
+					workOrderImg: workOrderImg
 				}).then(() => {
 					uni.showToast({
 						title: '报工成功',

+ 17 - 12
pages/repair/repair/index.vue

@@ -88,7 +88,7 @@
 		<view class="gzms-wrap">
 			<view class="photo_btn" @click="chooseImage">拍照</view>
 			<view class="photo_list">
-				<PreviewPhoto type="add" @imagedelete="imagedelete" :imageList="form.repairsImg" />
+				<PreviewPhoto type="add" @imagedelete="imagedelete" :imageList="form.images" />
 			</view>
 		</view>
 		<!-- <view class="sc-wrap">
@@ -162,7 +162,9 @@
 					// 接收人
 					receiveUserList: [],
 					// 工单id
-					workCenterId: ''
+					workCenterId: '',
+					// 照片列表
+					images: []
 				},
 				// 选择的图片
 				FileImgList: [],
@@ -193,7 +195,14 @@
 			// *** 新增拍照
 			chooseImage() {
 				const _this = this
-				if (_this.form.repairsImg.length >= 9) {
+				if (!_this.addForm.name) {
+					_this.$refs.uToast.show({
+						type: "warning",
+						message: "请先选择设备",
+					})
+					return
+				}
+				if (_this.form.images.length >= 9) {
 					_this.$refs.uToast.show({
 						type: "warning",
 						message: "最多上传9张照片",
@@ -216,10 +225,10 @@
 									'/main/file/getFile?objectName=' + item.storePath +
 									'&fullfilename=' + fileNames[fileNames.length -
 										1]
-								let repairsImg = _this.form.repairsImg;
+								let images = _this.form.images;
 								// 不能存储超过 9 张
-								if (repairsImg.length < 9) {
-									_this.form.repairsImg.push(url);
+								if (images.length < 9) {
+									_this.form.images.push(url);
 								}
 							})
 							uni.hideLoading()
@@ -254,7 +263,7 @@
 			},
 			// 图片删除
 			imagedelete(index) {
-				this.form.repairsImg.splice(index, 1);
+				this.form.images.splice(index, 1);
 			},
 
 			// ***
@@ -281,7 +290,7 @@
 					leaderDeptId: this.addForm.leaderDeptId,
 					leaderUserId: this.addForm.leaderUserId,
 					leaderName: this.addForm.leaderName,
-					repairsImg: this.form.repairsImg,
+					images: this.form.images,
 				}
 				save(params)
 					.then(res => {
@@ -405,10 +414,6 @@
 						deptName: n.deptName
 					}
 				})
-				// let repairsImg = param.repairsImg.map(n => {
-				// 	return n.url
-				// })
-				// param.repairsImg = repairsImg.join(',')
 				param.expectedTime = this.showTime
 				postJ(this.apiUrl + '/repair/info/saveOrEdit', param).then(res => {
 					if (res.success) {

+ 102 - 43
pages/salesServiceManagement/demandList/add.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="">
-		<uni-nav-bar background-color="#157A2C" color="#fff" fixed="true" statusBar="true" left-icon="back" title="新增需求"
-			@clickLeft="back">
+		<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">
@@ -14,50 +14,52 @@
 			</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="请输入" border="surround" v-model="form.name">
+					<u--input style="flex:1" :disabled="!isDisable" placeholder="请输入" 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 style="flex:1" placeholder="请选择" border="surround" @click.native="selectContactShow"
-						v-model="form.contactName">
+					<u--input :disabled="!isDisable" style="flex:1" placeholder="请选择" border="surround"
+						@click.native="selectContactShow" 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 style="flex:1" placeholder="请选择" border="surround" @click.native="invoiceDialogOpen"
-						v-model="form.orderCode">
+					<u--input :disabled="!isDisable" style="flex:1" placeholder="请选择" border="surround"
+						@click.native="invoiceDialogOpen" v-model="form.orderCode">
 					</u--input>
 				</view>
 			</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="请输入" border="surround" v-model="form.contactAddress">
+					<u--input :disabled="!isDisable" style="flex:1" placeholder="请输入" border="surround"
+						v-model="form.contactAddress">
 					</u--input>
 				</view>
 			</u-cell>
 			<u-cell title="故障等级" arrow-direction="down">
-				<uni-data-picker v-model="form.faultLevel" slot="value" placeholder="请选择" :localdata="fault_level"
-					@change="sourceCodeOnchange">
+				<uni-data-picker :readonly="!isDisable" v-model="form.faultLevel" slot="value" placeholder="请选择"
+					:localdata="fault_level" @change="sourceCodeOnchange">
 				</uni-data-picker>
 			</u-cell>
 			<u-cell title="期望解决时间" arrow-direction="down">
-				<uni-datetime-picker type="date" slot="value" v-model="form.expectedTime">
+				<uni-datetime-picker :disabled="!isDisable" type="date" slot="value" v-model="form.expectedTime">
 				</uni-datetime-picker>
 			</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="请输入" border="surround" v-model="form.repairName">
+					<u--input style="flex:1" placeholder="请输入" disabled border="surround" v-model="createUserName">
 					</u--input>
 				</view>
 			</u-cell>
 		</u-cell-group>
-		<AfterSales ref="salesRef" v-show="current == 1" :itemList="form.tableList" />
+		<AfterSales ref="salesRef" :type="type" v-show="current == 1" :itemList="form.productDetail" />
 		<!-- 联系人 -->
-		<ContactList ref="contactRef" v-show="current == 2" :itemList="form.contactInfoVOS" />
-		<view class="footerButton">
+		<ContactList ref="contactRef" :type="type" v-show="current == 2" :itemList="form.contactInfoVOS" />
+		<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>
@@ -73,7 +75,9 @@
 		contactDetail
 	} from '@/api/saleManage/contact/index.js'
 	import {
-		saveSalesDemand
+		saveSalesDemand,
+		updateSalesDemand,
+		getSalesDemandById
 	} from '@/api/salesServiceManagement/demandList/index.js'
 	import AfterSales from './components/AfterSales.vue'
 	import ContactList from './components/contactList.vue'
@@ -82,38 +86,55 @@
 			AfterSales,
 			ContactList
 		},
+		computed: {
+			isDisable() {
+				let flag = this.type != 'view'
+				return flag;
+			}
+		},
 		data() {
 			return {
 				form: {
 					code: '',
 					name: '',
 					contactName: '',
-					repairName: '',
 					expectedTime: '',
 					faultLevel: '',
 					contactAddress: '',
 					orderCode: '',
+					productDetail: [],
+					contactInfoVOS: [],
+					contactCode: '',
 				},
+				createUserName: '',
 				list: ['基本信息', '售后对象', '联系人'],
 				current: 0,
-				fault_level: []
+				fault_level: [],
+				title: '新增需求',
+				type: 'add'
 			}
 		},
 		created() {
-			this.getByCode();
-			const userInfo = uni.getStorageSync('userInfo');
-			this.$set(this.form, 'repairName', userInfo.name);
+
 		},
-		onLoad(data) {
+		onLoad(params) {
+			this.type = params.type;
+			if (params.id) {
+				this.title = params.type == 'view' ? '需求详情' : '修改需求'
+				this.getDetails(params.id);
+			} else {
+				const userInfo = uni.getStorageSync('userInfo');
+				this.createUserName = userInfo.name;
+				this.getByCode();
+			}
 			// 客户数据
 			uni.$off('setSelectList')
 			uni.$on('setSelectList', (data) => {
 				if (data && data.length > 0) {
 					let res = data[0]
-					console.log(res, 'res')
 					this.$set(this.form, 'contactId', res.id);
 					this.$set(this.form, 'contactName', res.name);
-					this.contactDetail(res.id);
+					this.contactDetail(res.id)
 					// this.$forceUpdate();
 				}
 			})
@@ -128,7 +149,7 @@
 					(el) =>
 					(el.measureQuantity = el.measureQuantity ? el.measureQuantity : 1)
 				);
-				this.$set(this.form, 'tableList', list);
+				this.$set(this.form, 'productDetail', list);
 			})
 		},
 		onUnload() {
@@ -139,6 +160,36 @@
 
 		},
 		methods: {
+			// 查询详情
+			async getDetails(id) {
+				this.getByCode();
+				const res = await getSalesDemandById(id);
+				// this.form.tableList = res.productDetail;
+				// this.form.contactInfoVOS = res.contactInfoVOS;
+				// this.form.code = res.code;
+				// this.form.contactName = res.contactName;
+				// this.form.contactCode = res.contactCode;
+				// this.form.contactId = res.contactId;
+				// this.form.contactAddress = res.contactAddress;
+				// this.form.expectedTime = res.expectedTime;
+				// this.createUserName = res.createUserName;
+				// this.form.orderCode = res.orderCode;
+				// this.form.orderId = res.orderId;
+				// this.form.name = res.name;
+				// this.form.createUserId = res.createUserId;
+				// this.form.id = res.id;
+				// this.form.processInstanceId = res.processInstanceId;
+				let data = JSON.parse(JSON.stringify(res));
+				this.form = data;
+				this.createUserName = data.createUserName;
+				let obj = this.fault_level.find(el => el.value == res.faultLevel)
+				this.sourceCodeOnchange({
+					"detail": {
+						"value": [obj]
+					}
+				});
+			},
+
 			sectionChange(index) {
 				this.current = index;
 			},
@@ -148,11 +199,11 @@
 				})
 			},
 			//客户回调
-			async contactDetail(id, type) {
-				if (!id) {
-					this.contractInfo = {};
-					return;
-				}
+			async contactDetail(id) {
+				// if (!id) {
+				// 	this.contractInfo = {};
+				// 	return;
+				// }
 				let {
 					base,
 					other,
@@ -168,7 +219,7 @@
 				}
 				// this.$set(this.form, 'contractInfo', base);
 				this.form.contactCode = base.code;
-				if (type != 'init') {
+				if (this.type != 'view') {
 					this.$set(this.form, 'contactAddress', addressName);
 					this.$set(
 						this.form,
@@ -183,13 +234,13 @@
 					// 清空发货单的数据 *** 初次进来不清空
 					this.$set(this.form, 'orderCode', '');
 					this.$set(this.form, 'orderId', '');
-					this.$set(this.form, 'tableList', []);
+					this.$set(this.form, 'productDetail', []);
 				}
 			},
 			sourceCodeOnchange(e) {
 				const value = e.detail.value;
 				this.form.faultLevel = value[0].value;
-				console.log(value, '赋值')
+				console.log(e, '赋值')
 				// this.form.sourceCode = value.map(item => item.value).toString()
 				// this.form.sourceName = value.map(item => item.text).toString()
 			},
@@ -219,9 +270,7 @@
 			},
 			save() {
 				let data = JSON.parse(JSON.stringify(this.form));
-				delete data.tableList;
-				delete data.code;
-				console.log(data, 'form ---')
+				delete data.productDetail;
 				try {
 					if (!data.name) {
 						this.$refs.uToast.show({
@@ -271,16 +320,26 @@
 					data.contactInfoVOS = contactInfoVOS;
 					// 售后对象数据
 					let productDetail = this.$refs.salesRef.getTabData();
-					data.productDetail = productDetail;
-					uni.showLoading({
-						title: '加载中'
-					})
-					console.log(data, 'data');
-					saveSalesDemand(data).then((res) => {
+					data.productDetail = productDetail.map((item) => {
+							item['produceTime'] = item['produceTime'] || null;
+							return item;
+						}),
+
+						uni.showLoading({
+							title: '加载中'
+						})
+
+					let requestname =
+						this.type === 'add' ? saveSalesDemand : updateSalesDemand;
+					requestname(data).then((res) => {
 						uni.hideLoading()
 						this.back()
+						this.$refs.uToast.show({
+							type: "success",
+							message: "操作成功",
+						})
 					}).catch((e) => {
-						console.log(e,'报错了')
+						console.log(e, '报错了')
 						uni.hideLoading()
 					})
 				} catch (error) {

+ 13 - 3
pages/salesServiceManagement/demandList/components/AfterSales.vue

@@ -8,7 +8,7 @@
 			<view>发货时间:{{ fieldRow('shipmentDate') }}</view>
 			<view>质保有效期:{{ fieldRow('guaranteePeriodDeadline') }}</view>
 			<view>计量数量:{{ fieldRow('measureQuantity') }}</view>
-			<view class="action">
+			<view class="action" v-if="type != 'view'">
 				<text class="text">
 					操作:
 				</text>
@@ -20,7 +20,7 @@
 		</view>
 		<view v-for="(item, index) in faultDetails" :key="index" style="position: relative;">
 			<myCard @edit="goProblem('edit',index,item)" @del="delProblem(index)" :item="item" :index="index+1"
-				:columns="columns" :btnList="btnList">
+				:columns="columns" :btnList="btnData">
 			</myCard>
 		</view>
 	</view>
@@ -37,6 +37,10 @@
 			itemList: {
 				type: Array,
 				default: () => []
+			},
+			type: {
+				type: String,
+				default: 'edit'
 			}
 		},
 		watch: {
@@ -64,6 +68,12 @@
 					if (this.tableList.length == 0) return '';
 					return this.tableList[0][field]
 				}
+			},
+			btnData(){
+				if(this.type == 'view'){
+					return []
+				}
+				return this.btnList;
 			}
 		},
 		data() {
@@ -107,7 +117,7 @@
 					[{
 						label: '操作:',
 						prop: 'action',
-						type: 'action',
+						type: this.type !='view' ? 'action' : '',
 						className: 'perce100',
 					}],
 				],

+ 18 - 6
pages/salesServiceManagement/demandList/components/contactList.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="after_sales">
-		<view class="bth_oper">
+		<view class="bth_oper" v-if="type != 'view'">
 			<view class="btn add" @click="goContact('add')">添加</view>
 			<view class="btn del" @click="batchDelete">删除</view>
 			<text class="reserve">请至少保留一条联系人数据</text>
@@ -10,7 +10,7 @@
 				<label>
 					<view class="listBox">
 						<view class="listBox-sel">
-							<checkbox :value="item.id" color="#fff" :disabled="item.disabled" :checked="item.checked" />
+							<checkbox v-if="type != 'view'" :value="item.id" color="#fff" :disabled="item.disabled" :checked="item.checked" />
 						</view>
 						<view class="listBox-con">
 							<view class="listBox-bottom">
@@ -26,9 +26,9 @@
 									<text class="text">
 										操作:
 									</text>
-									<u-button @click="goContact('edit',index,item)" :plain="true" :hairline="true"
+									<u-button v-if="type != 'view'" @click="goContact('edit',index,item)" :plain="true" :hairline="true"
 										size='mini' type="default" text="编辑"></u-button>
-									<u-button @click="del" :plain="true" :hairline="true" size='mini' type="default"
+									<u-button v-if="type != 'view'" @click="del(index)" :plain="true" :hairline="true" size='mini' type="default"
 										class="delete" text="删除"></u-button>
 								</view>
 							</view>
@@ -38,6 +38,7 @@
 			</checkbox-group>
 			<u-empty class="noDate" style="margin-top: 20vh" v-if="!contactList.length"></u-empty>
 		</u-list>
+		<u-toast ref="uToast"></u-toast>
 	</view>
 
 </template>
@@ -52,6 +53,10 @@
 			itemList: {
 				type: Array,
 				default: () => []
+			},
+			type:{
+				type:String,
+				default:''
 			}
 		},
 		watch: {
@@ -84,9 +89,7 @@
 				} else {
 					this.$set(this.contactList, index, data);
 				}
-
 			})
-
 		},
 		methods: {
 			// 勾选数据
@@ -112,6 +115,15 @@
 			},
 			// 批量删除
 			batchDelete() {
+				let list = this.contactList.filter(item=> item.checked);
+				console.log(list,'list')
+				if (list.length == 0) {
+					this.$refs.uToast.show({
+						type: "warning",
+						message: "至少选择一条数据进行删除",
+					})
+					return;
+				}
 				uni.showModal({
 					title: '确认删除',
 					content: '确定要删除所选联系人数据吗?',

+ 118 - 0
pages/salesServiceManagement/demandList/components/submission.vue

@@ -0,0 +1,118 @@
+<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>
+		<u-cell-group>
+			<u-cell title="审核结果" arrow-direction="down">
+				<uni-data-picker v-model="examForm.approvalResult" slot="value" placeholder="请选择"
+					:localdata="auditResultOptions" @change="handleAuditResultChange">
+				</uni-data-picker>
+			</u-cell>
+			<u-cell title="审核意见" arrow-direction="down">
+				<u--textarea slot="value" placeholder="请输入" border="surround"
+					v-model="examForm.rejectCause"></u--textarea>
+			</u-cell>
+			<view class="footerButton">
+				<u-button type="default" text="返回" @click="back"></u-button>
+				<u-button type="primary" @click="save" text="">确认</u-button>
+			</view>
+		</u-cell-group>
+		<u-toast ref="uToast"></u-toast>
+	</view>
+</template>
+
+<script>
+	import {
+		auditSalesDemand
+	} from '@/api/salesServiceManagement/demandList/index.js'
+	export default {
+		components: {},
+		data() {
+			return {
+				examForm: {
+					approvalResult: '',
+					rejectCause: '',
+					id: ''
+				},
+				auditResultOptions: [{
+						value: 0,
+						text: '驳回'
+					},
+					{
+						value: 1,
+						text: '同意'
+					}
+				],
+			}
+		},
+		onLoad(data) {
+			this.examForm.id = data.id;
+			console.log(data, '00')
+		},
+		methods: {
+			handleAuditResultChange(e) {
+				console.log(e, 'e')
+			},
+			async save() {
+				if (!this.examForm.approvalResult) {
+					if (this.examForm.approvalResult != '0') {
+						this.$refs.uToast.show({
+							type: "warning",
+							message: "请选择审核结果",
+						})
+						return
+					}
+				}
+				const data = uni.getStorageSync('userInfo');
+				let pdata = {
+					...this.examForm,
+					approvalUserId: data.userId,
+					approvalUserName: data.name
+				};
+				console.log(pdata, 'pdata')
+				const res = await auditSalesDemand(pdata);
+				if (res) {
+					this.back()
+				}
+				// this.back()
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	/deep/.u-cell__body__content {
+		flex: none;
+		margin-right: 16rpx;
+	}
+
+	.mainBox {
+		padding-bottom: 84rpx;
+	}
+
+	.footerButton {
+		width: 100%;
+		height: 84rpx;
+		display: flex;
+		position: fixed;
+		bottom: 0;
+
+		/deep/.u-button {
+			height: 100%;
+		}
+
+		>view {
+			flex: 1;
+
+		}
+	}
+
+	// /deep/.u-button {
+	// 	height: 100%;
+	// }
+
+	/deep/.u-subsection__item__text {
+		font-size: 28rpx !important;
+	}
+</style>

+ 97 - 23
pages/salesServiceManagement/demandList/index.vue

@@ -14,7 +14,9 @@
 		<view class="wrapper">
 			<u-list @scrolltolower="scrolltolower" class="listContent">
 				<view v-for="(item, index) in tableList" :key="index" style="position: relative;">
-					<myCard @del="del(item)" @edit="add('edit')" @details="add('view')" :item="item" :index="index+1" :columns="columns" :btnList="btnList">
+					<myCard @del="del(item)" @handleAudit="handleAudit(item)" @handleRevoke="handleRevoke(item)"
+						@edit="add('edit',item.id)" @details="add('view',item.id)" :item="item" :index="index+1"
+						:columns="columns" :btnList="btnList">
 					</myCard>
 				</view>
 			</u-list>
@@ -23,9 +25,36 @@
 			<u-empty iconSize='150' textSize='32' text='暂无数据'>
 			</u-empty>
 		</view>
-		<view class="add" @click="add('add')">
+		<view class="add" @click="add('add','')">
 			<u-icon name="plus" color="#fff"></u-icon>
 		</view>
+		<uni-popup ref="popup" type="center" :mask-closable="false">
+			<view class="popup-content">
+				<view class="popup-header">
+					<text>审核</text>
+					<view class="close-icon" @click="hidePopup">×</view>
+				</view>
+				<form @submit="handleSubmit">
+					<view class="form-item">
+						<label class="form-label">*审核结果</label>
+						<!-- 		<uni-data-picker v-model="examForm.auditResult" slot="value" placeholder="请选择"
+							:localdata="auditResultOptions" @change="handleAuditResultChange">
+						</uni-data-picker> -->
+						<!-- 		<uni-data-picker name="auditResult" :localdata="auditResultOptions"
+							v-model="examForm.auditResult" @change="handleAuditResultChange">
+						</uni-data-picker> -->
+					</view>
+					<view class="form-item">
+						<label class="form-label">审核意见</label>
+						<textarea name="auditOpinion" placeholder="请输入" v-model="examForm.auditOpinion"></textarea>
+					</view>
+					<view class="button-group">
+						<button formType="submit" type="primary">确认</button>
+						<button @click="hidePopup">取消</button>
+					</view>
+				</form>
+			</view>
+		</uni-popup>
 		<u-toast ref="uToast"></u-toast>
 
 	</view>
@@ -37,6 +66,7 @@
 	} from '@/api/saleManage/businessOpportunity/index.js'
 	import {
 		getTableList,
+		revokeSalesDemand
 	} from '@/api/salesServiceManagement/demandList/index.js'
 	import myCard from '@/pages/saleManage/components/myCard.vue'
 	export default {
@@ -52,19 +82,25 @@
 				size: 10,
 				isEnd: false,
 				current: {},
+				examForm: {
+					auditOpinion: '',
+					auditResult: '',
+					id: ''
+				},
+
 				btnList: [{
 						name: '详情',
 						apiName: 'details',
 						btnType: 'primary',
-						type: '1',
-						pageUrl: '/pages/saleManage/businessOpportunity/components/drawer',
+						type: '2',
+						pageUrl: '',
 
 					}, {
 						name: '修改',
-						apiName: '',
+						apiName: 'edit',
 						btnType: 'primary',
-						type: '1',
-						pageUrl: '/pages/saleManage/businessOpportunity/add',
+						type: '2',
+						pageUrl: '',
 						judge: [{
 							authorities: '',
 						}, {
@@ -87,9 +123,9 @@
 						}],
 					}, {
 						name: '提交',
-						apiName: '',
+						apiName: 'handleAudit',
 						btnType: 'primary',
-						type: '1',
+						type: '2',
 						pageUrl: '',
 						judge: [{
 							authorities: '',
@@ -100,9 +136,9 @@
 					},
 					{
 						name: '撤回',
-						apiName: '',
+						apiName: 'handleRevoke',
 						btnType: 'primary',
-						type: '1',
+						type: '2',
 						pageUrl: '',
 						judge: [{
 							authorities: '',
@@ -193,7 +229,6 @@
 				uni.showLoading({
 					title: '加载中'
 				})
-
 				let data = {
 					pageNum: this.page,
 					size: this.size,
@@ -214,9 +249,41 @@
 					uni.hideLoading()
 				})
 			},
-			add(type) {
+			hidePopup() {
+				this.$refs.popup.close();
+				this.examForm = {
+					auditOpinion: '',
+					auditResult: '',
+					id: ''
+				};
+			},
+			// 撤回
+			async handleRevoke(row) {
+				const res = await uni.showModal({
+					title: '确认撤回',
+					content: '确定要撤回该条数据吗?',
+					confirmText: '撤回',
+					confirmColor: '#FF4D4F',
+				});
+				console.log(res, 'res ----')
+				if (res[1].confirm) {
+					const data = await revokeSalesDemand({
+						id: row.id
+					});
+					if (!data) return
+					this.$refs.uToast.show({
+						type: "success",
+						message: "操作成功",
+					})
+					this.doSearch();
+				} else if (res.cancel) {
+					console.log('用户取消删除');
+				}
+
+			},
+			add(type, id) {
 				uni.navigateTo({
-					url: `/pages/salesServiceManagement/demandList/add?type=${type}`
+					url: `/pages/salesServiceManagement/demandList/add?type=${type}&id=${id}`
 				})
 			},
 			scrolltolower() {
@@ -226,17 +293,24 @@
 				this.getList();
 			},
 			del(item) {
-				deleteInformation([item.id]).then(res => {
-					this.isEnd = false
-					this.page = 1
-					this.$refs.uToast.show({
-						type: "success",
-						message: "操作成功",
-					})
-					this.getList(this.where)
-				})
+				console.log(item, 'item ---')
+				// deleteInformation([item.id]).then(res => {
+				// 	this.isEnd = false
+				// 	this.page = 1
+				// 	this.$refs.uToast.show({
+				// 		type: "success",
+				// 		message: "操作成功",
+				// 	})
+				// 	this.getList(this.where)
+				// })
 			},
 
+			handleAudit(item) { 
+				console.log(item,'iitem --')
+				uni.navigateTo({ 
+					url: `/pages/salesServiceManagement/demandList/components/submission?id=${item.id}`
+				})
+			},
 		}
 	}
 </script>