Bladeren bron

commit 地址信息

xkwg 4 jaren geleden
bovenliggende
commit
13d7372499

+ 1 - 1
src/services/go/adress/index.ts

@@ -53,7 +53,7 @@ export function getAddress() {
      * @param autoid 
      */
     function getProvinceName(autoid: number) {
-        return getName(cityList.value, autoid)
+        return getName(provinceList.value, autoid)
     }
     /**
      * 获取 市 名

+ 7 - 3
src/views/information/warehouse-info/compoments/detail/index.vue

@@ -55,7 +55,7 @@
       <a-row :gutter="24">
         <a-col :span="12">
           <a-form-item label="所在地区">
-            <span class="white">{{ getAddressInfo(selectedRow.provinceid, selectedRow.cityid, selectedRow.districtid) }}</span>
+            <span class="white">{{ getProvinceName(selectedRow.provinceid) + getCityName(selectedRow.cityid) + getDistrictName(selectedRow.districtid) }}</span>
           </a-form-item>
         </a-col>
         <a-col :span="12">
@@ -86,12 +86,14 @@ export default defineComponent({
             default: {},
         },
     },
-    setup() {
+    setup(props, context) {
         const { visible, cancel } = closeModal('detail');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
+        const {getProvinceName, getCityName, getDistrictName} = getAddress();
         function submit() {
             cancel();
+            context.emit('refresh')
         }
         return {
             visible,
@@ -102,7 +104,9 @@ export default defineComponent({
             getWareHouseTypeName,
             formatValue,
             maskClosableFlag,
-            getAddressInfo
+            getProvinceName,
+            getCityName,
+            getDistrictName,
         };
     },
 });

+ 0 - 1
src/views/information/warehouse-info/setup.ts

@@ -49,7 +49,6 @@ export function getWareHouseTypeName(type: number): string {
  */
 export function getAddressInfo(provinceId: number, cityId: number, districId: number): string{
    const {getProvinceName, getCityName, getDistrictName} = getAddress();
-   debugger
    return getProvinceName(provinceId) + getCityName(cityId) + getDistrictName(districId);
 }