Browse Source

change: indent计价导出Export_PDF_City默认值调整.

peter 2 months ago
parent
commit
e1f02b9b67
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/pages/indent-manage/indent/components/calcPrice/index.vue

+ 7 - 1
src/pages/indent-manage/indent/components/calcPrice/index.vue

@@ -45,7 +45,7 @@
               v-model="formData.cal_city.local_city"
               style="width: 120px; margin-right: 12px"
               size="small"
-              @change="($e) => (exportForm.pdf_city = $e)"
+              @change="onCityChange"
             >
               <el-option
                 v-for="city in cityList"
@@ -1036,6 +1036,12 @@ let initForm = (switchStatus = [] as any[], useOldFormData = true) => {
     generateStep3Form(true)
   }
 }
+
+const onCityChange = (str: string) => {
+  // 没保存计价之前, 切换城市会改变pdf_city. 保存之后, 再怎么切换也用保存的数据做默认数据, 除非手动更改pdf_city
+  exportForm.value.pdf_city = productInfo.value.save_cal.pdf_city || str ||cityList.value[0]
+} 
+
 let reGenerateFormAfterCityChange = () => {
   const temp: any[] = formList.value.map((i, index) => {
     const result: any = {}