kongdeqiang
2023-03-27 1dfede5acec9f6bb97b8769f55501b67262316e0
src/views/your/area-manage/areaManage.vue
@@ -13,9 +13,9 @@
          openTip ? "关闭提示" : "开启提示"
        }}</Button>
        <Input
          v-model="searchForm.name"
          v-model="searchForm2.name"
          suffix="ios-search"
          @on-change="getDataList"
          @on-change="getDataList2"
          placeholder="输入配送地区搜索"
          clearable
          style="width: 250px"
@@ -324,6 +324,14 @@
      modalTitle3: "",
      carList:[],
      searchForm: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
        sort: "createTime", // 默认排序字段
        order: "desc", // 默认排序方式
        key: "",
      },
      searchForm2: {
        // 搜索框初始化对象
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
@@ -700,6 +708,16 @@
        }
      });
    },
    getDataList2() {
      this.loading = true;
      getArea(this.searchForm2).then((res) => {
        this.loading = false;
        if (res.success) {
          this.data = res.result.records;
          this.total = res.result.total;
        }
      });
    },
    getCustList() {
      this.loading = true;
      this.searchForm.pageNumber=1;
@@ -730,6 +748,16 @@
      this.loading = true;
      this.searchForm.areaId=areaId;
      getAreaSection(this.searchForm).then((res) => {
        this.loading = false;
        if (res.success) {
          this.data2 = res.result.records;
        }
      });
    },
    getAreaSectionList2(areaId) {
      this.loading = true;
      this.searchForm2.areaId=areaId;
      getAreaSection(this.searchForm2).then((res) => {
        this.loading = false;
        if (res.success) {
          this.data2 = res.result.records;
@@ -780,6 +808,9 @@
      }
      if(this.areaForm.description==undefined){
        this.areaForm.description="";
      }
      if(this.areaForm.carId==undefined){
        this.areaForm.carId="";
      }
      this.$refs.areaForm.validate((valid) => {
        if (valid) {
@@ -893,7 +924,7 @@
    },
    equipment(row) {
      this.areaId = row.id
      this.getAreaSectionList(row.id);
      this.getAreaSectionList2(row.id);
      this.modalType = 0;
      this.modalTitle2 = "片区段信息";
      this.$refs.areaForm.resetFields();
@@ -1329,4 +1360,4 @@
    this.init();
  },
};
</script>
</script>