Browse Source

增加用途必填

wuhb 1 month ago
parent
commit
31b3806379
1 changed files with 8 additions and 0 deletions
  1. 8 0
      pages/apply/applyNew.uvue

+ 8 - 0
pages/apply/applyNew.uvue

@@ -685,6 +685,10 @@ const selectMeasure = (item: UTSJSONObject): void => {
 		}
 		// 构建申请单数据
 		const applyData = buildApplyData('PREPARE')
+		if (applyData['remark'].length === 0) {
+			uni.showToast({ title: '请输入用途', icon: 'none'})
+			return
+		}
 		savePurchaseApply(applyData).then((res: any) => {
 		    uni.showToast({ title: '保存成功', icon: 'success'})
 		    // 清空已选列表
@@ -728,6 +732,10 @@ const selectMeasure = (item: UTSJSONObject): void => {
 		}
 		// 构建申请单数据
 		const applyData = buildApplyData('CONFIRMED')
+		if (applyData['remark'].length === 0) {
+			uni.showToast({ title: '请输入用途', icon: 'none'})
+			return
+		}
 		savePurchaseApply(applyData).then((res: any) => {
 			uni.showToast({ title: '确认申请成功', icon: 'success'})
 			// 清空已选列表