• 7、vue_待续


    1

    <template>
      <el-card>
        <el-row :gutter="10" align="middle" class="header">
          <el-col :span="1" class="search_lable">单位:</el-col>
          <el-col :span="3">
            <el-select v-model="queryForm.ent" placeholder="请选择单位">
              <el-option
                v-for="item in $entList"
                :key="item.entId"
                :label="item.entName"
                :value="item.entId"
              />
            </el-select>
          </el-col>
          <el-col :span="3">
            <el-select v-model="queryForm.org" placeholder="选择产品线">
              <el-option
                v-for="item in $orgList"
                :key="item.orgId"
                :label="item.orgName"
                :value="item.orgId"
              />
            </el-select>
          </el-col>
          <el-col :span="1" class="search_lable">日期: </el-col>
          <el-col :span="3">
            <el-date-picker
              v-model="queryForm.beginDates"
              type="date"
              placeholder="开始日期"
              :size="size"
            />
          </el-col>
          <el-col :span="3">
            <el-date-picker
              v-model="queryForm.endDates"
              type="date"
              placeholder="结束日期"
              :size="size"
            />
          </el-col>
          <el-col :span="1" class="search_lable">客户: </el-col>
          <el-col :span="3">
            <el-input clearable v-model="queryForm.customer"></el-input>
          </el-col>
          <el-col :span="4">
            <el-button type="success" @click="loadTable">查询</el-button></el-col
          >
        </el-row>
      </el-card>
    </template>
    
    <script setup>
    import { reactive, toRefs } from "vue";
    import { $entList, $orgList } from "../api/option";
    import { $getsale } from "../api/sale";
    
    const data = reactive({
      // 搜索区域
      queryForm: {
        ent: "", //单位
        org: "", //产品线
        beginDates: "", //开始日期
        endDates: "", //结束日期
        customer: "", //客户:模糊查询
      },
      // 表格数据
      tableData: [],
    });
    const { queryForm, tableData } = toRefs(data);
    
    // 获取列表
    const loadTable = async () => {
      // if (data.ent == "") {
      //   $msg("请选择单位!!!");
      // } else {
      const { count, data: arData } = await $getsale({
        entnameStr: data.queryForm.ent,
        orgnameStr: data.queryForm.org,
        beginDates: data.queryForm.beginDates,
        endDates: data.queryForm.endDates,
        businessnameStr: data.queryForm.customer,
      });
      console.log(arData);
      // 将后台信息绑定到控件
      data.tableData = arData;
      // data.count = count;
      // }
    };
    // 加载数据
    loadTable();
    </script>
    <style lang="scss" scoped>
    .header {
      padding-bottom: 10px;
      box-sizing: border-box;
      .search_lable {
        padding: 0px;
        text-align: right;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14px;
        color: #3a3b3d;
      }
    }
    </style>
  • 相关阅读:
    漫谈iOS程序的证书和签名机制
    (转) Xcode 7 Bitcode
    iOS: How To Make AutoLayout Work On A ScrollView
    Objective C运行时(runtime)
    如何让iOS 保持界面流畅?这些技巧你知道吗
    iPhone 6 屏幕揭秘
    用HTML和CSS实现WWDC 2015上的动画效果
    桌球歷史:削球、快攻、弧圈球
    [WPF 自定义控件]自定义控件库系列文章
    UWP 自定义控件:了解模板化控件 系列文章
  • 原文地址:https://www.cnblogs.com/shiliumu/p/16796420.html
Copyright © 2020-2023  润新知