cz пре 2 година
родитељ
комит
5bc20cdcb6

+ 20 - 0
src/components/WDLY/product/SelectGoods.vue

@@ -136,6 +136,9 @@ const config = computed(() => {
         label: "单位",
         prop: "unit",
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -348,6 +351,23 @@ const searchItemSelct = () => {
   table.value.searchItemSelct(selectConfig[0].data[0], selectConfig[0]);
 };
 
+const productUnit = ref([]);
+const productType = ref([]);
+
+const getDict = () => {
+  proxy.getDictOne(["unit", "product_type"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+    productType.value = res["product_type"];
+    selectConfig.value[0].data = productType.value.map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+getDict()
 onMounted(() => {
   searchItemSelct();
 });

+ 15 - 10
src/components/product/SelectProduct.vue

@@ -190,6 +190,9 @@ const config = computed(() => {
         label: "单位",
         prop: "unit",
       },
+      render(unit) {
+        return proxy.dictValueLabel(unit, productUnit.value);
+      },
     },
     {
       attrs: {
@@ -284,16 +287,7 @@ const formConfig = computed(() => {
       prop: "unit",
       label: "单位",
       required: true,
-      data: [
-        {
-          label: "个",
-          id: "个",
-        },
-        {
-          label: "双",
-          id: "双",
-        },
-      ],
+      data: productUnit.value,
     },
     {
       type: "slot",
@@ -469,6 +463,17 @@ const handleClickFile = (file) => {
 const handleSelect = (row) => {
   proxy.$emit("handleSelect", toRaw(row));
 };
+
+const productUnit = ref([]);
+const getDict = () => {
+  proxy.getDictOne(["unit"]).then((res) => {
+    productUnit.value = res["unit"].map((x) => ({
+      label: x.dictValue,
+      value: x.dictKey,
+    }));
+  });
+};
+getDict();
 </script>
   
 <style lang="scss" scoped>

+ 73 - 69
src/views/WDLY/basic/supplier/index.vue

@@ -43,65 +43,48 @@
         :rules="rules"
         ref="byform"
       >
-        <template #address>
-          <el-row :gutter="10" style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  @change="(val) => getCityData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                    :key="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="provinceId">
-                <el-select
-                  v-model="formData.data.provinceId"
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                   filterable allow-create
-                >
-                  <el-option
-                    v-for="item in provinceData"
-                    :label="item.name"
-                    :value="item.id"
-                    :key="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="cityId">
-                <el-select v-model="formData.data.cityId" placeholder="城市"  filterable allow-create>
-                  <el-option
-                    v-for="item in cityData"
-                    :label="item.name"
-                    :value="item.id"
-                    :key="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="areaDetail">
-                <el-input v-model="formData.data.areaDetail" type="textarea">
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+        <template #countryId>
+          <div>
+            <el-select
+              v-model="formData.data.countryId"
+              placeholder="国家"
+              @change="(val) => getCityData(val, '20', true)"
+            >
+              <el-option
+                v-for="item in countryData"
+                :label="item.chineseName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+
+        <template #provinceId>
+          <div>
+            <selectCity
+              placeholder="省/洲"
+              @change="(val) => getCityData(val, '30', true)"
+              addressId="provinceId"
+              addressName="provinceName"
+              v-model="formData.data"
+              :data="provinceData"
+            >
+            </selectCity>
+          </div>
+        </template>
+
+        <template #cityId>
+          <div>
+            <selectCity
+              placeholder="城市"
+              addressId="cityId"
+              addressName="cityName"
+              v-model="formData.data"
+              :data="cityData"
+            >
+            </selectCity>
+          </div>
         </template>
 
         <template #contactNumber>
@@ -168,6 +151,7 @@ import byForm from "@/components/byForm/index";
 import FileUpload from "@/components/FileUpload/index";
 import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
+import selectCity from "@/components/selectCity/index.vue";
 
 const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
 const headers = ref({ Authorization: "Bearer " + getToken() });
@@ -202,8 +186,8 @@ let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
   type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
-  cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
+  // provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
+  // cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
   // areaDetail: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
   contactPerson: [{ required: true, message: "请输入联系人", trigger: "blur" }],
   // contactNumber: [{ validator: checkContactNumber, trigger: "blur" }],
@@ -390,12 +374,29 @@ const formConfig = computed(() => {
     },
     {
       type: "slot",
-      slotName: "address",
+      slotName: "countryId",
       prop: "countryId",
       label: "地址",
-      required: true,
+      itemWidth: 33.33,
+    },
+    {
+      type: "slot",
+      slotName: "provinceId",
+      label: " ",
+      itemWidth: 33.33,
+    },
+    {
+      type: "slot",
+      slotName: "cityId",
+      prop: "cityId",
+      label: " ",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "areaDetail",
     },
-
     {
       type: "input",
       prop: "contactPerson",
@@ -512,8 +513,8 @@ const openModal = () => {
   fileList.value = [];
   fileListCopy.value = [];
   formData.data = {
-    countryId: "China",
     victoriatouristJson: {},
+    countryId: "44",
   };
   getCityData(formData.data.countryId, "20");
 };
@@ -621,18 +622,21 @@ const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
 
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+const getCityData = (id, type, flag) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
     if (type === "20") {
       provinceData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.provinceId = "";
+        formData.data.provinceName = "";
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else if (type === "30") {
       cityData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else {
       countryData.value = res;

+ 77 - 79
src/views/WDLY/outInBound/jdOrderReceive/index.vue

@@ -59,74 +59,48 @@
             </el-autocomplete>
           </div>
         </template>
-        <template #address>
-          <el-row style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  @change="(val) => getCityData(val, '20', true)"
-                  :disabled="true"
-                  filterable allow-create
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="provinceId">
-                <el-select
-                  v-model="formData.data.provinceId"
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                  :disabled="true"
-                   filterable allow-create
-                >
-                  <el-option
-                    v-for="item in provinceData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="cityId">
-                <el-select
-                  v-model="formData.data.cityId"
-                  placeholder="城市"
-                  :disabled="true"
-                   filterable allow-create
-                >
-                  <el-option
-                    v-for="item in cityData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="detailedAddress">
-                <el-input
-                  v-model="formData.data.detailedAddress"
-                  type="textarea"
-                  :disabled="true"
-                >
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+        <template #countryId>
+          <div>
+            <el-select
+              v-model="formData.data.countryId"
+              placeholder="国家"
+              @change="(val) => getCityData(val, '20', true)"
+            >
+              <el-option
+                v-for="item in countryData"
+                :label="item.chineseName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+
+        <template #provinceId>
+          <div>
+            <selectCity
+              placeholder="省/洲"
+              @change="(val) => getCityData(val, '30', true)"
+              addressId="provinceId"
+              addressName="provinceName"
+              v-model="formData.data"
+              :data="provinceData"
+            >
+            </selectCity>
+          </div>
+        </template>
+
+        <template #cityId>
+          <div>
+            <selectCity
+              placeholder="城市"
+              addressId="cityId"
+              addressName="cityName"
+              v-model="formData.data"
+              :data="cityData"
+            >
+            </selectCity>
+          </div>
         </template>
         <template #products>
           <div style="width: 100%">
@@ -198,6 +172,7 @@ import { ElMessage, ElMessageBox } from "element-plus";
 import byTable from "@/components/byTable/index";
 import byForm from "@/components/byForm/index";
 import OrderDetails from "@/components/WDLY/order/details";
+import selectCity from "@/components/selectCity/index.vue";
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -374,7 +349,7 @@ const config = computed(() => {
       attrs: {
         label: "接收时间",
         prop: "inTime",
-        width:160
+        width: 160,
       },
     },
     {
@@ -477,17 +452,37 @@ const formConfig = reactive([
     type: "input",
     prop: "contactNumber",
     label: " ",
-    itemWidth: 30,
+    itemWidth: 80,
     placeholder: "收货电话",
     disabled: true,
+    style: {
+      width: "30%",
+    },
   },
   {
     type: "slot",
-    slotName: "address",
+    slotName: "countryId",
     prop: "countryId",
     label: "详细地址",
-    required: true,
-    disabled: true,
+    itemWidth: 33.33,
+  },
+  {
+    type: "slot",
+    slotName: "provinceId",
+    label: " ",
+    itemWidth: 33.33,
+  },
+  {
+    type: "slot",
+    slotName: "cityId",
+    prop: "cityId",
+    label: " ",
+    itemWidth: 33.33,
+  },
+  {
+    type: "input",
+    itemType: "textarea",
+    prop: "detailedAddress",
   },
   {
     type: "title",
@@ -517,7 +512,7 @@ const openModal = () => {
   modalType.value = "add";
   formData.data = {
     stockTransferDetailsList: [{}],
-    countryId: "China",
+    countryId: "44",
   };
   getCityData(formData.data.countryId, "20");
 };
@@ -561,7 +556,7 @@ const submitForm = () => {
           type: "info",
         });
       }
-      if (e.inQuantity+e.alQuantity > e.quantity) {
+      if (e.inQuantity + e.alQuantity > e.quantity) {
         return ElMessage({
           message: "接收数量加已接收数量不能大于调仓数量!",
           type: "info",
@@ -604,18 +599,21 @@ const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
 
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+const getCityData = (id, type, flag) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
     if (type === "20") {
       provinceData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.provinceId = "";
+        formData.data.provinceName = "";
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else if (type === "30") {
       cityData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else {
       countryData.value = res;

+ 1 - 1
src/views/WDLY/outInBound/logistics/index.vue

@@ -576,7 +576,7 @@ const handleArrival = (row) => {
         productCode: x.code,
         bussinessId: x.productId,
         purchaseDetailId: x.purchaseDetailId,
-        deliverGoodsDetailsId: x.deliverGoodsId,
+        deliverGoodsDetailsId: x.id,
         transitQuantity: x.transitQuantity,
         deliverGoodsQuantity: x.deliverGoodsQuantity,
       })),

+ 77 - 69
src/views/WDLY/salesMange/afterSale/index.vue

@@ -42,65 +42,48 @@
         :rules="rules"
         ref="byform"
       >
-        <template #address>
-          <el-row style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  @change="(val) => getCityData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="provinceId">
-                <el-select
-                  v-model="formData.data.provinceId"
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                   filterable allow-create
-                >
-                  <el-option
-                    v-for="item in provinceData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="cityId">
-                <el-select v-model="formData.data.cityId" placeholder="城市" filterable allow-create>
-                  <el-option
-                    v-for="item in cityData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="detailedAddress">
-                <el-input
-                  v-model="formData.data.detailedAddress"
-                  type="textarea"
-                >
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+        <template #countryId>
+          <div>
+            <el-select
+              v-model="formData.data.countryId"
+              placeholder="国家"
+              @change="(val) => getCityData(val, '20', true)"
+            >
+              <el-option
+                v-for="item in countryData"
+                :label="item.chineseName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+
+        <template #provinceId>
+          <div>
+            <selectCity
+              placeholder="省/洲"
+              @change="(val) => getCityData(val, '30', true)"
+              addressId="provinceId"
+              addressName="provinceName"
+              v-model="formData.data"
+              :data="provinceData"
+            >
+            </selectCity>
+          </div>
+        </template>
+
+        <template #cityId>
+          <div>
+            <selectCity
+              placeholder="城市"
+              addressId="cityId"
+              addressName="cityName"
+              v-model="formData.data"
+              :data="cityData"
+            >
+            </selectCity>
+          </div>
         </template>
         <template #products>
           <div style="width: 100%">
@@ -255,6 +238,7 @@ import { computed, defineComponent, ref } from "vue";
 import { getToken } from "@/utils/auth";
 import SelectProduct from "@/components/WDLY/product/SelectProduct";
 import useUserStore from "@/store/modules/user";
+import selectCity from "@/components/selectCity/index.vue";
 
 const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + "/common/upload"); // 上传文件服务器地址
 const headers = ref({ Authorization: "Bearer " + getToken() });
@@ -294,8 +278,8 @@ let rules = ref({
   ],
   type: [{ required: true, message: "请选择售后类型", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
-  cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
+  // provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
+  // cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
   detailedAddress: [
     { required: true, message: "请输入详细地址", trigger: "blur" },
   ],
@@ -431,7 +415,7 @@ const configData = [
       prop: "customerId",
       label: "客户名称",
       required: true,
-      itemWidth: 51,
+      itemWidth: 100,
       isLoad: {
         url: "/customer/page",
         req: {
@@ -443,13 +427,34 @@ const configData = [
         method: "post",
         resUrl: "rows",
       },
+      style: {
+        width: "51%",
+      },
     },
     {
       type: "slot",
-      slotName: "address",
+      slotName: "countryId",
       prop: "countryId",
       label: "详细地址",
-      required: true,
+      itemWidth: 33.33,
+    },
+    {
+      type: "slot",
+      slotName: "provinceId",
+      label: " ",
+      itemWidth: 33.33,
+    },
+    {
+      type: "slot",
+      slotName: "cityId",
+      prop: "cityId",
+      label: " ",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "detailedAddress",
     },
     {
       type: "input",
@@ -544,7 +549,7 @@ const openModal = (type, row = {}) => {
   if (type == "add") {
     formConfig = configData[0];
     formData.data = {
-      countryId: "China",
+      countryId: "44",
       afterSaleDetailList: [],
     };
     getCityData(formData.data.countryId, "20");
@@ -684,18 +689,21 @@ const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
 
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+const getCityData = (id, type, flag) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
     if (type === "20") {
       provinceData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.provinceId = "";
+        formData.data.provinceName = "";
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else if (type === "30") {
       cityData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else {
       countryData.value = res;

+ 92 - 82
src/views/WDLY/salesMange/jdOrder/index.vue

@@ -68,66 +68,51 @@
             </el-autocomplete>
           </div>
         </template>
-        <template #address>
-          <el-row style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  @change="(val) => getCityData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="provinceId">
-                <el-select
-                  v-model="formData.data.provinceId"
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                   filterable allow-create
-                >
-                  <el-option
-                    v-for="item in provinceData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="cityId">
-                <el-select v-model="formData.data.cityId" placeholder="城市" filterable allow-create>
-                  <el-option
-                    v-for="item in cityData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="detailedAddress">
-                <el-input
-                  v-model="formData.data.detailedAddress"
-                  type="textarea"
-                >
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+
+        <template #countryId>
+          <div>
+            <el-select
+              v-model="formData.data.countryId"
+              placeholder="国家"
+              @change="(val) => getCityData(val, '20', true)"
+            >
+              <el-option
+                v-for="item in countryData"
+                :label="item.chineseName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+
+        <template #provinceId>
+          <div>
+            <selectCity
+              placeholder="省/洲"
+              @change="(val) => getCityData(val, '30', true)"
+              addressId="provinceId"
+              addressName="provinceName"
+              v-model="formData.data"
+              :data="provinceData"
+            >
+            </selectCity>
+          </div>
         </template>
+
+        <template #cityId>
+          <div>
+            <selectCity
+              placeholder="城市"
+              addressId="cityId"
+              addressName="cityName"
+              v-model="formData.data"
+              :data="cityData"
+            >
+            </selectCity>
+          </div>
+        </template>
+
         <template #products>
           <div style="width: 100%">
             <el-button
@@ -299,6 +284,8 @@ import { computed, defineComponent, ref } from "vue";
 import useUserStore from "@/store/modules/user";
 import SelectProduct from "@/components/WDLY/product/SelectProduct";
 import OrderDetails from "@/components/WDLY/order/details";
+import selectCity from "@/components/selectCity/index.vue";
+
 import { getToken } from "@/utils/auth";
 const headers = ref({ Authorization: "Bearer " + getToken() });
 const actionUrl = import.meta.env.VITE_APP_BASE_API;
@@ -341,20 +328,20 @@ let rules = ref({
       trigger: "change",
     },
   ],
-  provinceId: [
-    {
-      required: true,
-      message: "请选择省/洲",
-      trigger: "change",
-    },
-  ],
-  cityId: [
-    {
-      required: true,
-      message: "请选择城市",
-      trigger: "change",
-    },
-  ],
+  // provinceId: [
+  //   {
+  //     required: true,
+  //     message: "请选择省/洲",
+  //     trigger: "change",
+  //   },
+  // ],
+  // cityId: [
+  //   {
+  //     required: true,
+  //     message: "请选择城市",
+  //     trigger: "change",
+  //   },
+  // ],
   code: [
     {
       required: true,
@@ -552,15 +539,36 @@ const formConfig = reactive([
     type: "input",
     prop: "contactNumber",
     label: " ",
-    itemWidth: 30,
+    itemWidth: 80,
     placeholder: "收货电话",
+    style: {
+      width: "30%",
+    },
   },
   {
     type: "slot",
-    slotName: "address",
+    slotName: "countryId",
     prop: "countryId",
     label: "详细地址",
-    required: true,
+    itemWidth: 33.33,
+  },
+  {
+    type: "slot",
+    slotName: "provinceId",
+    label: " ",
+    itemWidth: 33.33,
+  },
+  {
+    type: "slot",
+    slotName: "cityId",
+    prop: "cityId",
+    label: " ",
+    itemWidth: 33.33,
+  },
+  {
+    type: "input",
+    itemType: "textarea",
+    prop: "detailedAddress",
   },
   {
     type: "title",
@@ -589,14 +597,13 @@ const getList = async (req) => {
       loading.value = false;
     }, 200);
   });
-  
 };
 const openModal = () => {
   dialogVisible.value = true;
   modalType.value = "add";
   formData.data = {
     jdOrderDetailsList: [],
-    countryId: "China",
+    countryId: "44",
   };
   getCityData(formData.data.countryId, "20");
 };
@@ -675,18 +682,21 @@ const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
 
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+const getCityData = (id, type, flag) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
     if (type === "20") {
       provinceData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.provinceId = "";
+        formData.data.provinceName = "";
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else if (type === "30") {
       cityData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else {
       countryData.value = res;

+ 0 - 21
src/views/WDLY/salesMange/jdReGoodsInspection/index.vue

@@ -427,9 +427,7 @@ const openModal = () => {
   modalType.value = "add";
   formData.data = {
     list: [],
-    countryId: "China",
   };
-  getCityData(formData.data.countryId, "20");
 };
 
 const submitForm = () => {
@@ -508,25 +506,6 @@ const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
 
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
-    if (type === "20") {
-      provinceData.value = res;
-      if (isChange) {
-        formData.data.provinceId = "";
-        formData.data.cityId = "";
-      }
-    } else if (type === "30") {
-      cityData.value = res;
-      if (isChange) {
-        formData.data.cityId = "";
-      }
-    } else {
-      countryData.value = res;
-    }
-  });
-};
-getCityData("0");
 getList();
 getDict();
 

+ 91 - 82
src/views/WDLY/salesMange/order/index.vue

@@ -50,66 +50,50 @@
         :rules="rules"
         ref="byform"
       >
-        <template #address>
-          <el-row style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="countryId">
-                <el-select
-                  v-model="formData.data.countryId"
-                  placeholder="国家"
-                  @change="(val) => getCityData(val, '20', true)"
-                >
-                  <el-option
-                    v-for="item in countryData"
-                    :label="item.chineseName"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="provinceId">
-                <el-select
-                  v-model="formData.data.provinceId"
-                  placeholder="省/洲"
-                  @change="(val) => getCityData(val, '30', true)"
-                   filterable allow-create
-                >
-                  <el-option
-                    v-for="item in provinceData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="cityId">
-                <el-select v-model="formData.data.cityId" placeholder="城市"  filterable allow-create>
-                  <el-option
-                    v-for="item in cityData"
-                    :label="item.name"
-                    :value="item.id"
-                  >
-                  </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="detailedAddress">
-                <el-input
-                  v-model="formData.data.detailedAddress"
-                  type="textarea"
-                >
-                </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+        <template #countryId>
+          <div>
+            <el-select
+              v-model="formData.data.countryId"
+              placeholder="国家"
+              @change="(val) => getCityData(val, '20', true)"
+            >
+              <el-option
+                v-for="item in countryData"
+                :label="item.chineseName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+
+        <template #provinceId>
+          <div>
+            <selectCity
+              placeholder="省/洲"
+              @change="(val) => getCityData(val, '30', true)"
+              addressId="provinceId"
+              addressName="provinceName"
+              v-model="formData.data"
+              :data="provinceData"
+            >
+            </selectCity>
+          </div>
+        </template>
+
+        <template #cityId>
+          <div>
+            <selectCity
+              placeholder="城市"
+              addressId="cityId"
+              addressName="cityName"
+              v-model="formData.data"
+              :data="cityData"
+            >
+            </selectCity>
+          </div>
         </template>
+
         <template #products>
           <div style="width: 100%">
             <el-button
@@ -241,6 +225,7 @@ import { computed, defineComponent, ref } from "vue";
 import useUserStore from "@/store/modules/user";
 import SelectProduct from "@/components/WDLY/product/SelectProduct";
 import OrderDetails from "@/components/WDLY/order/details";
+import selectCity from "@/components/selectCity/index.vue";
 
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -280,20 +265,20 @@ let rules = ref({
       trigger: "change",
     },
   ],
-  provinceId: [
-    {
-      required: true,
-      message: "请选择省/洲",
-      trigger: "change",
-    },
-  ],
-  cityId: [
-    {
-      required: true,
-      message: "请选择城市",
-      trigger: "change",
-    },
-  ],
+  // provinceId: [
+  //   {
+  //     required: true,
+  //     message: "请选择省/洲",
+  //     trigger: "change",
+  //   },
+  // ],
+  // cityId: [
+  //   {
+  //     required: true,
+  //     message: "请选择城市",
+  //     trigger: "change",
+  //   },
+  // ],
 
   contacts: [
     {
@@ -515,15 +500,36 @@ const formConfig = reactive([
     type: "input",
     prop: "phone",
     label: " ",
-    itemWidth: 30,
+    itemWidth: 80,
     placeholder: "联系电话",
+    style: {
+      width: "30%",
+    },
   },
   {
     type: "slot",
-    slotName: "address",
+    slotName: "countryId",
     prop: "countryId",
-    label: "收件地址",
-    required: true,
+    label: "地址",
+    itemWidth: 33.33,
+  },
+  {
+    type: "slot",
+    slotName: "provinceId",
+    label: " ",
+    itemWidth: 33.33,
+  },
+  {
+    type: "slot",
+    slotName: "cityId",
+    prop: "cityId",
+    label: " ",
+    itemWidth: 33.33,
+  },
+  {
+    type: "input",
+    itemType: "textarea",
+    prop: "detailedAddress",
   },
   {
     type: "title",
@@ -558,7 +564,7 @@ const openModal = () => {
   modalType.value = "add";
   formData.data = {
     orderDetailsList: [],
-    countryId: "China",
+    countryId: "44",
   };
   getCityData(formData.data.countryId, "20");
 };
@@ -641,18 +647,21 @@ const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
 
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+const getCityData = (id, type, flag) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
     if (type === "20") {
       provinceData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.provinceId = "";
+        formData.data.provinceName = "";
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else if (type === "30") {
       cityData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else {
       countryData.value = res;

+ 1 - 0
src/views/process/processApproval/index.vue

@@ -214,6 +214,7 @@ const handleSubmit = async (_type) => {
               count: x.count,
               price: x.price,
               amount: x.amount,
+              deptId: x.deptId
             }));
             const victoriatouristJson = {
               isAgreement: data.isAgreement,

+ 163 - 81
src/views/purchaseManage/supplier/supplier/index.vue

@@ -17,51 +17,83 @@
             action: () => openModal('add'),
           },
         ]"
-        @get-list="getList">
+        @get-list="getList"
+      >
         <template #address="{ item }">
-          <div>{{ item.countryName }}, {{ item.provinceName }} , {{ item.cityName }}, {{ item.areaDetail }}</div>
+          <div>
+            {{ item.countryName }}, {{ item.provinceName }} ,
+            {{ item.cityName }}, {{ item.areaDetail }}
+          </div>
         </template>
       </byTable>
     </div>
-    <el-dialog :title="modalType == 'add' ? '添加供应商' : '编辑供应商'" v-model="dialogVisible" width="600" v-loading="loading" destroy-on-close>
-      <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="byform">
-        <template #address>
-          <el-row :gutter="10" style="width: 100%">
-            <el-col :span="8">
-              <el-form-item prop="countryId">
-                <el-select v-model="formData.data.countryId" placeholder="国家" @change="(val) => getCityData(val, '20', true)">
-                  <el-option v-for="item in countryData" :label="item.chineseName" :value="item.id"> </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="provinceId">
-                <el-select v-model="formData.data.provinceId"  filterable allow-create placeholder="省/洲" @change="(val) => getCityData(val, '30', true)">
-                  <el-option v-for="item in provinceData" :label="item.name" :value="item.id"> </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :span="8">
-              <el-form-item prop="cityId">
-                <el-select v-model="formData.data.cityId" filterable allow-create placeholder="城市">
-                  <el-option v-for="item in cityData" :label="item.name" :value="item.id"> </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-          </el-row>
-          <el-row style="margin-top: 20px; width: 100%">
-            <el-col :span="24">
-              <el-form-item prop="areaDetail">
-                <el-input v-model="formData.data.areaDetail" type="textarea"> </el-input>
-              </el-form-item>
-            </el-col>
-          </el-row>
+    <el-dialog
+      :title="modalType == 'add' ? '添加供应商' : '编辑供应商'"
+      v-model="dialogVisible"
+      width="600"
+      v-loading="loading"
+      destroy-on-close
+    >
+      <byForm
+        :formConfig="formConfig"
+        :formOption="formOption"
+        v-model="formData.data"
+        :rules="rules"
+        ref="byform"
+      >
+        <template #countryId>
+          <div>
+            <el-select
+              v-model="formData.data.countryId"
+              placeholder="国家"
+              @change="(val) => getCityData(val, '20', true)"
+            >
+              <el-option
+                v-for="item in countryData"
+                :label="item.chineseName"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
+
+        <template #provinceId>
+          <div>
+            <selectCity
+              placeholder="省/洲"
+              @change="(val) => getCityData(val, '30', true)"
+              addressId="provinceId"
+              addressName="provinceName"
+              v-model="formData.data"
+              :data="provinceData"
+            >
+            </selectCity>
+          </div>
+        </template>
+
+        <template #cityId>
+          <div>
+            <selectCity
+              placeholder="城市"
+              addressId="cityId"
+              addressName="cityName"
+              v-model="formData.data"
+              :data="cityData"
+            >
+            </selectCity>
+          </div>
         </template>
+
         <template #contact>
           <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="contactPerson">
-                <el-input v-model="formData.data.contactPerson" placeholder="联系人"> </el-input>
+                <el-input
+                  v-model="formData.data.contactPerson"
+                  placeholder="联系人"
+                >
+                </el-input>
               </el-form-item>
             </el-col>
             <el-col :span="16">
@@ -70,7 +102,8 @@
                   v-model="formData.data.contactNumber"
                   placeholder="联系电话"
                   :formatter="(val) => val.replace(/[^\d\-]/g, '')"
-                  :parser="(val) => val.replace(/[^\d\-]/g, '')">
+                  :parser="(val) => val.replace(/[^\d\-]/g, '')"
+                >
                 </el-input>
               </el-form-item>
             </el-col>
@@ -80,12 +113,22 @@
           <el-row :gutter="10" style="width: 100%">
             <el-col :span="8">
               <el-form-item prop="accountPeriod">
-                <el-input-number v-model="formData.data.accountPeriod" placeholder="请输入账期 (天)" style="width: 100%" :precision="0" :controls="false" :min="0" />
+                <el-input-number
+                  v-model="formData.data.accountPeriod"
+                  placeholder="请输入账期 (天)"
+                  style="width: 100%"
+                  :precision="0"
+                  :controls="false"
+                  :min="0"
+                />
               </el-form-item>
             </el-col>
             <el-col :span="16">
               <el-form-item prop="accountPeriodRemark">
-                <el-input v-model="formData.data.accountPeriodRemark" placeholder="请输入账期说明" />
+                <el-input
+                  v-model="formData.data.accountPeriodRemark"
+                  placeholder="请输入账期说明"
+                />
               </el-form-item>
             </el-col>
           </el-row>
@@ -98,7 +141,8 @@
               :data="uploadData"
               multiple
               :before-upload="uploadFile"
-              :on-preview="onPreviewFile">
+              :on-preview="onPreviewFile"
+            >
               <el-button>选择</el-button>
             </el-upload>
           </div>
@@ -106,7 +150,14 @@
       </byForm>
       <template #footer>
         <el-button @click="dialogVisible = false" size="large">取 消</el-button>
-        <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading"> 确 定 </el-button>
+        <el-button
+          type="primary"
+          @click="submitForm()"
+          size="large"
+          :loading="submitLoading"
+        >
+          确 定
+        </el-button>
       </template>
     </el-dialog>
   </div>
@@ -139,11 +190,13 @@ let rules = ref({
   name: [{ required: true, message: "请输入供应商名称", trigger: "blur" }],
   type: [{ required: true, message: "请选择供应商类型", trigger: "change" }],
   countryId: [{ required: true, message: "请选择国家", trigger: "change" }],
-  provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
-  cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
+  // provinceId: [{ required: true, message: "请选择省/洲", trigger: "change" }],
+  // cityId: [{ required: true, message: "请选择城市", trigger: "change" }],
   areaDetail: [{ required: true, message: "请输入详细地址", trigger: "blur" }],
   contactPerson: [{ required: true, message: "请输入联系人", trigger: "blur" }],
-  contactNumber: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
+  contactNumber: [
+    { required: true, message: "请输入联系电话", trigger: "blur" },
+  ],
 });
 const { proxy } = getCurrentInstance();
 const selectConfig = reactive([
@@ -228,11 +281,15 @@ const config = computed(() => {
             },
             el: "button",
             click() {
-              ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning",
-              }).then(() => {
+              ElMessageBox.confirm(
+                "此操作将永久删除该数据, 是否继续?",
+                "提示",
+                {
+                  confirmButtonText: "确定",
+                  cancelButtonText: "取消",
+                  type: "warning",
+                }
+              ).then(() => {
                 proxy
                   .post("/supplierInfo/delete", {
                     id: row.id,
@@ -285,10 +342,28 @@ const formConfig = computed(() => {
     },
     {
       type: "slot",
-      slotName: "address",
+      slotName: "countryId",
       prop: "countryId",
-      label: "地址",
-      required: true,
+      label: "详细地址",
+      itemWidth: 33.33,
+    },
+    {
+      type: "slot",
+      slotName: "provinceId",
+      label: " ",
+      itemWidth: 33.33,
+    },
+    {
+      type: "slot",
+      slotName: "cityId",
+      prop: "cityId",
+      label: " ",
+      itemWidth: 33.33,
+    },
+    {
+      type: "input",
+      itemType: "textarea",
+      prop: "areaDetail",
     },
     {
       type: "slot",
@@ -345,14 +420,16 @@ const formConfig = computed(() => {
 const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
-  proxy.post("/supplierInfo/page", sourceList.value.pagination).then((message) => {
-    console.log(message);
-    sourceList.value.data = message.rows;
-    sourceList.value.pagination.total = message.total;
-    setTimeout(() => {
-      loading.value = false;
-    }, 200);
-  });
+  proxy
+    .post("/supplierInfo/page", sourceList.value.pagination)
+    .then((message) => {
+      console.log(message);
+      sourceList.value.data = message.rows;
+      sourceList.value.pagination.total = message.total;
+      setTimeout(() => {
+        loading.value = false;
+      }, 200);
+    });
 };
 const openModal = () => {
   dialogVisible.value = true;
@@ -360,7 +437,7 @@ const openModal = () => {
   fileList.value = [];
   formData.data = {
     type: "sales",
-    countryId: "China",
+    countryId: "44",
   };
   getCityData(formData.data.countryId, "20");
 };
@@ -408,39 +485,44 @@ const getDtl = (row) => {
   fileList.value = [];
   modalType.value = "edit";
   proxy.post("/supplierInfo/detail", { id: row.id }).then((res) => {
-    proxy.post("/fileInfo/getList", { businessIdList: [row.id] }).then((fileObj) => {
-      if (fileObj[row.id] && fileObj[row.id].length > 0) {
-        fileList.value = fileObj[row.id].map((item) => {
-          return {
-            raw: item,
-            name: item.fileName,
-            url: item.fileUrl,
-          };
-        });
-      }
-      getCityData(res.countryId, "20");
-      getCityData(res.provinceId, "30");
-      res.type = res.type + "";
-      formData.data = res;
-      dialogVisible.value = true;
-    });
+    proxy
+      .post("/fileInfo/getList", { businessIdList: [row.id] })
+      .then((fileObj) => {
+        if (fileObj[row.id] && fileObj[row.id].length > 0) {
+          fileList.value = fileObj[row.id].map((item) => {
+            return {
+              raw: item,
+              name: item.fileName,
+              url: item.fileUrl,
+            };
+          });
+        }
+        getCityData(res.countryId, "20");
+        getCityData(res.provinceId, "30");
+        res.type = res.type + "";
+        formData.data = res;
+        dialogVisible.value = true;
+      });
   });
 };
 const countryData = ref([]);
 const provinceData = ref([]);
 const cityData = ref([]);
-const getCityData = (id, type, isChange) => {
-  proxy.post("/areaInfo/list", { parentId: id }).then((res) => {
+const getCityData = (id, type, flag) => {
+  proxy.post("/customizeArea/list", { parentId: id }).then((res) => {
     if (type === "20") {
       provinceData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.provinceId = "";
+        formData.data.provinceName = "";
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else if (type === "30") {
       cityData.value = res;
-      if (isChange) {
+      if (flag) {
         formData.data.cityId = "";
+        formData.data.cityName = "";
       }
     } else {
       countryData.value = res;