wjli
2024-04-09 542dcd62fa061525a00339011ff24246f03b820e
src/views/your/order-manage/orderEvaluateManage.vue
@@ -7,34 +7,49 @@
  <div class="search">
    <Card>
      <Row class="operation">
        <Input v-model="searchForm2.userName" suffix="ios-search" @on-change="getDataList2" placeholder="输入配送人" clearable style="width: 250px"/>
        <Input v-model="searchForm2.customerName" suffix="ios-search" @on-change="getDataList2" placeholder="输入商户名称" clearable style="width: 250px;margin-left: 20px"/>
        <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end" placeholder="请选择配送日期" style="width: 240px;margin-left: 20px">
        <Input v-model="searchForm2.userName" suffix="ios-search" placeholder="输入配送人"
               clearable style="width: 250px"/>
        <Input v-model="searchForm2.customerName" suffix="ios-search"
               placeholder="输入商户名称" clearable style="width: 250px;margin-left: 20px"/>
        <Date-picker clearable @on-change="time1" format="yyyy-MM-dd" type="date" placement="bottom-end"
                     placeholder="请选择配送日期" style="width: 240px;margin-left: 20px">
        </Date-picker>
        <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable>
        <Select v-model="searchForm2.status" style="width:200px;margin-left: 20px" clearable
                placeholder="请选择配送状态">
          <Option v-for="item in cityList" :value="item.value" :key="item">{{ item.label }}</Option>
        </Select>
        <Button @click="init2" icon="md-refresh">查询</Button>
        <Button @click="init2" icon="md-search" style="margin-left: 20px">查询</Button>
        <Button @click="init3" icon="md-search" style="margin-left: 20px">签收查询</Button>
      </Row>
      <Table
        :loading="loading"
        border
        :columns="columns"
        :data="data"
        ref="table"
      ></Table>
          :loading="loading"
          border
          :columns="columns"
          :data="data"
          ref="table"
      >
        <template #img="{ row, index }">
          <div v-for="(fit,index) in getImg(row.img)" :key="index">
            <img
                :src="fit"
                alt="暂无图片"
                style="width: 100px;height: 100px"
                @click="handleImageClick"/>
          </div>
        </template>
      </Table>
      <Row type="flex" justify="end" class="page">
        <Page
          :current="searchForm.pageNumber"
          :total="total"
          :page-size="searchForm.pageSize"
          @on-change="changePage"
          @on-page-size-change="changePageSize"
          :page-size-opts="[10, 20, 50]"
          size="small"
          show-total
          show-elevator
          show-sizer
            :current="searchForm.pageNumber"
            :total="total"
            :page-size="searchForm.pageSize"
            @on-change="changePage"
            @on-page-size-change="changePageSize"
            :page-size-opts="[10, 20, 50]"
            size="small"
            show-total
            show-elevator
            show-sizer
        ></Page>
      </Row>
    </Card>
@@ -47,16 +62,19 @@
import {
  findPageOrderTask2,
} from "@/api/open";
export default {
  name: "car-manage",
  data() {
    return {
      previewModal: false,
      maxHeight: 510,
      openTip: true,
      openLevel: "0",
      loading: true,
      modalTitle: "",
      modalVisible:false,
      modalVisible: false,
      searchForm: {
        pageNumber: 1, // 当前页数
        pageSize: 10, // 页面大小
@@ -68,6 +86,8 @@
        pageSize: 10, // 页面大小
        sort: "sendDate", // 默认排序字段
        order: "desc", // 默认排序方式
        customerName: '',
        sendDate: ''
      },
      submitLoading: false,
      selectList: [],
@@ -85,7 +105,7 @@
        {
          title: "商户名称",
          key: "customerName",
          ellipsis:true,
          ellipsis: true,
        },
        {
          title: "送货条数",
@@ -126,7 +146,7 @@
                  },
                }),
              ]);
            }else{
            } else {
              return h("div", [
                h("Badge", {
                  props: {
@@ -142,25 +162,33 @@
          title: "异常签收原因",
          key: "remarks",
          width: 150,
          ellipsis:true,
          ellipsis: true,
        },
        {
          title: "签收方式",
          key: "status",
          width: 150,
          render: (h, params) => {
            if (params.row.status == 1) {
              return h("div", [
                h("Badge", {
                  props: {
                    status: "success",
                    text: "指纹",
                  },
                }),
              ]);
            }
          },
        },
          title: '签收图片',
          align: "center",
          width: 200,
          slot: "img",
          // render: (h, params) => {
          //
          //   return h('div', {
          //     attrs: {
          //       style: 'width: 100px;height: 100px;'
          //     }
          //   }, [
          //     h('img', {
          //       attrs: {
          //         src: params.row.img || null,
          //         style: 'width: 100px;height: 100px;'
          //       },
          //       props: {
          //         type: 'primary',
          //         size: 'large'
          //       }
          //     })
          //   ])
          // }
        }
      ],
      data: [],
      total: 0,
@@ -181,24 +209,50 @@
    };
  },
  methods: {
    handleImageClick(e) {
      console.log(e.target.src);
    },
    getImg(html) {
      let newHtml = [];
      if (html.indexOf('http') === -1) {
        if (typeof html == 'string' && html.indexOf(',') !== -1) {
          newHtml = html.split(',').slice(0, 2);
          return newHtml;
        }
        newHtml.push(html);
        return newHtml;
      } else {
        if (typeof html == 'string' && html.indexOf(',') !== -1) {
          newHtml = html.split(',').slice(0, 2).map(v => '/xboot' + v.split('/xboot')[1])
          return newHtml;
        }
        let result = '/xboot' + html.split('/xboot')[1]
        newHtml.push(result);
        return newHtml;
      }
    },
    init() {
      this.getDataList();
    },
    init2() {
      this.getDataList2();
    },
    time1(e){
    init3() {
      this.$router.push('/your/sign-compar/index');
    },
    time1(e) {
      this.searchForm.sendDate = e;
      this.getDataList();
      this.searchForm2.sendDate = e;
    },
    changePage(v) {
      this.searchForm.pageNumber = v;
      this.getDataList();
      this.searchForm2.pageNumber = v;
      this.getDataList2();
      this.clearSelectAll();
    },
    changePageSize(v) {
      this.searchForm.pageSize = v;
      this.getDataList();
      this.searchForm2.pageSize = v;
      this.getDataList2();
    },
    getDataList() {
      this.loading = true;