Browse Source

部分需求更改

cz 1 year ago
parent
commit
f12c05f9b3

+ 23 - 4
src/components/selectCity/index.vue

@@ -1,7 +1,17 @@
 <template>
 <template>
   <div class="select-city">
   <div class="select-city">
-    <el-select clearable filterable allow-create :placeholder="placeholder" @change="getCityData" v-model="showModel" style="width: 100%">
-      <el-option v-for="item in data" :label="item.name" :value="item.id"> </el-option>
+    <el-select
+      clearable
+      filterable
+      allow-create
+      :placeholder="placeholder"
+      @change="getCityData"
+      v-model="showModel"
+      :disabled="disabled"
+      style="width: 100%"
+    >
+      <el-option v-for="item in data" :label="item.name" :value="item.id">
+      </el-option>
     </el-select>
     </el-select>
   </div>
   </div>
 </template>
 </template>
@@ -34,16 +44,25 @@ defineProps({
     type: Array,
     type: Array,
     default: false,
     default: false,
   },
   },
+  disabled: {
+    type: Boolean,
+    default: false,
+  },
 });
 });
 //监听modelValue的变化
 //监听modelValue的变化
 watch(
 watch(
   formData.value,
   formData.value,
   (val) => {
   (val) => {
     // console.log(formData.value[proxy.addressId || 'provinceId'],formData.value[proxy.addressName || 'provinceName'])
     // console.log(formData.value[proxy.addressId || 'provinceId'],formData.value[proxy.addressName || 'provinceName'])
-    if (!formData.value[proxy.addressId || "provinceId"] && !formData.value[proxy.addressName || "provinceName"]) {
+    if (
+      !formData.value[proxy.addressId || "provinceId"] &&
+      !formData.value[proxy.addressName || "provinceName"]
+    ) {
       showModel.value = "";
       showModel.value = "";
     } else {
     } else {
-      showModel.value = formData.value[proxy.addressId || "provinceId"] || formData.value[proxy.addressName || "provinceName"];
+      showModel.value =
+        formData.value[proxy.addressId || "provinceId"] ||
+        formData.value[proxy.addressName || "provinceName"];
     }
     }
   },
   },
   {
   {

+ 10 - 0
src/views/WDLY/outInBound/waitOutBound/index.vue

@@ -41,6 +41,7 @@
               v-model="formData.data.countryId"
               v-model="formData.data.countryId"
               placeholder="国家"
               placeholder="国家"
               @change="(val) => getCityData(val, '20', true)"
               @change="(val) => getCityData(val, '20', true)"
+              :disabled="submitType == 4"
             >
             >
               <el-option
               <el-option
                 v-for="item in countryData"
                 v-for="item in countryData"
@@ -61,6 +62,7 @@
               addressName="provinceName"
               addressName="provinceName"
               v-model="formData.data"
               v-model="formData.data"
               :data="provinceData"
               :data="provinceData"
+              :disabled="submitType == 4"
             >
             >
             </selectCity>
             </selectCity>
           </div>
           </div>
@@ -74,6 +76,7 @@
               addressName="cityName"
               addressName="cityName"
               v-model="formData.data"
               v-model="formData.data"
               :data="cityData"
               :data="cityData"
+              :disabled="submitType == 4"
             >
             >
             </selectCity>
             </selectCity>
           </div>
           </div>
@@ -435,12 +438,14 @@ const configData = computed(() => [
       prop: "countryId",
       prop: "countryId",
       label: "收货信息",
       label: "收货信息",
       itemWidth: 33.33,
       itemWidth: 33.33,
+      disabled: true,
     },
     },
     {
     {
       type: "slot",
       type: "slot",
       slotName: "provinceId",
       slotName: "provinceId",
       label: " ",
       label: " ",
       itemWidth: 33.33,
       itemWidth: 33.33,
+      disabled: true,
     },
     },
     {
     {
       type: "slot",
       type: "slot",
@@ -448,11 +453,13 @@ const configData = computed(() => [
       prop: "cityId",
       prop: "cityId",
       label: " ",
       label: " ",
       itemWidth: 33.33,
       itemWidth: 33.33,
+      disabled: true,
     },
     },
     {
     {
       type: "input",
       type: "input",
       itemType: "textarea",
       itemType: "textarea",
       prop: "areaDetail",
       prop: "areaDetail",
+      disabled: true,
     },
     },
     {
     {
       type: "title",
       type: "title",
@@ -789,6 +796,9 @@ const outBound = (row) => {
         res.cityId = res.purchaseBackInfo.cityId
         res.cityId = res.purchaseBackInfo.cityId
           ? res.purchaseBackInfo.cityId
           ? res.purchaseBackInfo.cityId
           : "";
           : "";
+        res.areaDetail = res.purchaseBackInfo.detailedAddress
+          ? res.purchaseBackInfo.detailedAddress
+          : "";
       }
       }
       formData.data = res;
       formData.data = res;
       getCityData(formData.data.countryId, "20");
       getCityData(formData.data.countryId, "20");

+ 3 - 0
src/views/WDLY/purchaseManage/alreadyPurchase/index.vue

@@ -769,6 +769,9 @@ let rulesTwo = ref({
   phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
   phone: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
   quantity: [{ required: true, message: "请输入退货数量", trigger: "blur" }],
   quantity: [{ required: true, message: "请输入退货数量", trigger: "blur" }],
+  detailedAddress: [
+    { required: true, message: "请输入详细地址", trigger: "blur" },
+  ],
 });
 });
 
 
 const { proxy } = getCurrentInstance();
 const { proxy } = getCurrentInstance();