|
@@ -816,6 +816,7 @@ let getForginCityFreight = (p: any, num: number) =>
|
|
|
if (response.code === 1) {
|
|
|
forginCityFreight.value[`${num}`] = response.result
|
|
|
queryArea.value = response.result.area || ''
|
|
|
+ formData.value.cal_city.local_city = queryArea.value
|
|
|
resolve(response.result)
|
|
|
}
|
|
|
})
|
|
@@ -876,6 +877,7 @@ let resetData = () => {
|
|
|
other_notes: '',
|
|
|
saleperson: '',
|
|
|
}
|
|
|
+ currentTab.value = 0
|
|
|
}
|
|
|
|
|
|
// 总箱数. 购买数量/每箱数量.
|
|
@@ -1002,6 +1004,19 @@ let computedCityFreightParams = computed(() => {
|
|
|
return []
|
|
|
})
|
|
|
|
|
|
+/**
|
|
|
+ * 对旧的 城市数据 做一个简单的转换, 让它能对应上新的地区数据.
|
|
|
+ * @param str
|
|
|
+ */
|
|
|
+let transCity = (str: string) => {
|
|
|
+ let cityObj: any = {
|
|
|
+ SYD: 'NSW',
|
|
|
+ Melb: 'VIC',
|
|
|
+ Brisbane: 'QLD',
|
|
|
+ }
|
|
|
+
|
|
|
+ return cityObj[str] || str
|
|
|
+}
|
|
|
/**
|
|
|
* 初始化图片价格等信息, step3已保存的计价数据, step2已保存的城市/地区/邮编信息
|
|
|
*/
|
|
@@ -1046,8 +1061,11 @@ let initProductInfo = async () => {
|
|
|
// 初始化之前选择的城市
|
|
|
if (temp.save_cal.cal_city) {
|
|
|
let local_city = temp.save_cal.cal_city.local_city || areaList.value[0].label
|
|
|
- formData.value.cal_city.local_city = local_city
|
|
|
- let tempResult = areaList.value.filter((i) => i.label === local_city)
|
|
|
+
|
|
|
+ formData.value.cal_city.local_city = transCity(local_city)
|
|
|
+
|
|
|
+ let tempResult = areaList.value.filter((i) => i.label === formData.value.cal_city.local_city)
|
|
|
+
|
|
|
formData.value.cal_city.postcode =
|
|
|
temp.save_cal.cal_city.postcode ||
|
|
|
(tempResult.length ? tempResult[0].value : areaList.value[0].value)
|