Parcourir la source

fix(售后需求): 修复派车类型验证和数据处理问题

liujt il y a 5 mois
Parent
commit
c2838dabcb
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10 1
      pages/salesServiceManagement/demandList/add.vue

+ 10 - 1
pages/salesServiceManagement/demandList/add.vue

@@ -87,7 +87,7 @@
 
 				</u--input>
 			</u-cell>
-			<u-cell title="派车类型" arrow-direction="down" v-if="form.isPieCar==1">
+			<u-cell title="派车类型" arrow-direction="down" class="required-mark-new" v-if="form.isPieCar==1">
 				<uni-data-picker v-if="isDisable" v-model="form.pieCarType" slot="value" placeholder="请选择"
 					:localdata="pie_car_type">
 				</uni-data-picker>
@@ -353,6 +353,7 @@
 				console.log('res', res.orderCode)
 				let data = JSON.parse(JSON.stringify(res));
 				console.log('data111', data.orderCode)
+				data.pieCarType = data.pieCarType?.toString() || '';
 				this.form = data;
 				['afterSalesType'].forEach(key => {
 					this.$set(
@@ -506,6 +507,14 @@
 						return
 					}
 
+					if (data.isPieCar==1 && !data.pieCarType) {
+						this.$refs.uToast.show({
+							type: "warning",
+							message: "请选择派车类型",
+						})
+						return
+					}
+
 					if (!data.orderCode && this.form.associationType !== '3') {
 						const message = this.form.associationType === "1" ? "请选择发货单" : "请选择销售订单"
 						this.$refs.uToast.show({