Ver código fonte

重新选择车型完善

祁鹏飞 2 meses atrás
pai
commit
5882a0f765
1 arquivos alterados com 17 adições e 9 exclusões
  1. 17 9
      src/views/insurancePolicy/index.vue

+ 17 - 9
src/views/insurancePolicy/index.vue

@@ -976,7 +976,7 @@
                                     :value="item.value"></el-option>
                                     :value="item.value"></el-option>
                                 </el-select>
                                 </el-select>
                                 <span v-if="props.row.kindName == '乘客责任险'">*{{ insurancePolicyForm.seatCount - 1
                                 <span v-if="props.row.kindName == '乘客责任险'">*{{ insurancePolicyForm.seatCount - 1
-                                }}/座</span>
+                                  }}/座</span>
                               </div>
                               </div>
                             </template>
                             </template>
                           </el-table-column>
                           </el-table-column>
@@ -1046,7 +1046,7 @@
                           <el-table-column label="产品名称" prop="productName" align="center">
                           <el-table-column label="产品名称" prop="productName" align="center">
                             <template #default="props">
                             <template #default="props">
                               <el-button link type="primary" @click="getJYXDetail(props.row)">{{ props.row.productName
                               <el-button link type="primary" @click="getJYXDetail(props.row)">{{ props.row.productName
-                              }}</el-button>
+                                }}</el-button>
                             </template>
                             </template>
                           </el-table-column>
                           </el-table-column>
                           <el-table-column label="数量" align="center">
                           <el-table-column label="数量" align="center">
@@ -3335,6 +3335,13 @@ let loading = ref(false)  // 提交加载状态
  * @param scope 当前行作用域
  * @param scope 当前行作用域
  */
  */
 const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope: any) => {
 const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope: any) => {
+  if (!Number(insurancePolicyForm.value.purchasePrice)) {
+    ElMessage({
+      message: '请重新选择车型',
+      type: 'warning'
+    })
+    return
+  }
   const valid = await validateForm(InsurancePolicyRefs)
   const valid = await validateForm(InsurancePolicyRefs)
   if (!valid) {
   if (!valid) {
     ElMessage({
     ElMessage({
@@ -3370,6 +3377,13 @@ const handleSubmit = async (InsurancePolicyRefs: FormInstance | undefined, scope
  * 批量报价
  * 批量报价
  */
  */
 const batchQuotes = async (InsurancePolicyRefs: FormInstance | undefined) => {
 const batchQuotes = async (InsurancePolicyRefs: FormInstance | undefined) => {
+  if (!Number(insurancePolicyForm.value.purchasePrice)) {
+    ElMessage({
+      message: '请重新选择车型',
+      type: 'warning'
+    })
+    return
+  }
   const valid = await validateForm(InsurancePolicyRefs)
   const valid = await validateForm(InsurancePolicyRefs)
   if (!valid) {
   if (!valid) {
     ElMessage({
     ElMessage({
@@ -3506,13 +3520,7 @@ const paramValidate = () => {
 }
 }
 // 统一报价
 // 统一报价
 const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
 const quoteInsurance = async (companyId: any, companyIndex: any, val: any) => {
-  if(!insurancePolicyForm.value.purchasePrice){
-    ElMessage({
-      message: '请重新选择车型',
-      type: 'warning'
-    })
-    return
-  }
+
   quoteData.value[companyIndex].loading = true
   quoteData.value[companyIndex].loading = true
   let company = quoteData.value[companyIndex]
   let company = quoteData.value[companyIndex]
   let product = company.projectList?.find((v, i) => val.productIndex === i)
   let product = company.projectList?.find((v, i) => val.productIndex === i)