WXL
2023-12-11 dc3d15dfe0c4a4a85bc5b4df7959b84a02beb064
src/comp/smartor3/dwo/dw_query_pat_archive.vue
@@ -2,88 +2,90 @@
      <field name="patid" label=" 自增ID "/>
      <field name="name" label=" 姓名 "/>
      <field name="sex" label=" 性别   1:男  2:女"/>
      <field name="iccardno" label=" 证件号码 "/>
      <field name="idno" label=" 证件号码 "/>
      <field name="birthdate" label=" 生日 "/>
</dw>
   <script>
   import { listpat_archive, getpat_archive, delpat_archive, addpat_archive, updatepat_archive } from "@/api/smartor3/pat_archive";
   export default {
      name: "dw_query_pat_archive",
      dicts: ['sys_user_sex', 'sys_patientfrom'],
      data() {
         return {
         parent:null,
         // 遮罩层
         loading: true, //false,
         // 选中数组
         ids: [],
         // 非单个禁用
         single: true,
         // 非多个禁用
         multiple: true,
         // 显示搜索条件
         showSearch: false,
         // 总条数
         total: 0,
         // 表格数据
         dataList: [],
         // 弹出层标题
         title: "",
         // 是否显示弹出层
         open: false,
         // 查询参数
         queryParams: {
            pageNum: 1,
            pageSize: 10,
            name: null,
            iccardno: null,
            source: null,
            telcode: null,
            orgid: null,
            isupload: null,
            uploadTime: null
         },
       // 表单参数
         form: {},
      // 表单校验
          rules: {
          }
         };
      },
      created() {
         //this.getList();
      },
      methods: {
         getList() {
            this.loading = true;
            listpat_archive(this.queryParams).then(response => {
              this.dataList = response.rows;
              this.total = response.total;
              this.loading = false;
            });
           },
          handleSelectionChange(selection) {
            this.ids = selection.map(item => item.patid)
            this.single = selection.length !== 1
            this.multiple = !selection.length
            //alert("selections:"+this.ids[0])
            //this.$parent.selectionChanged(this.ids[0])
         },
         handleAdd()
         {
            this.$parent.HandleCmdDefault("bill.new",this.ids[0])
         },
         handleUpdate()
         {
            this.$parent.HandleCmdDefault("bill.open",this.ids[0])
         },
         rowChanged(row){
           //alert(row.patid)
           //console.log(row)
           //this.$parent.selectionChanged(row.patid)
           this.$parent.patid = row.patid
         }
      }
   }
   </script>
<script>
import {
  listpat_archive,
  getpat_archive,
  delpat_archive,
  addpat_archive,
  updatepat_archive,
} from "@/api/smartor3/pat_archive";
export default {
  name: "dw_query_pat_archive",
  dicts: ["sys_user_sex", "sys_patientfrom"],
  data() {
    return {
      parent: null,
      // 遮罩层
      loading: true, //false,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: false,
      // 总条数
      total: 0,
      // 表格数据
      dataList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        name: null,
        idno: null,
        source: null,
        telcode: null,
        orgid: null,
        isupload: null,
        uploadTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  created() {
    //this.getList();
  },
  methods: {
    getList() {
      this.loading = true;
      listpat_archive(this.queryParams).then((response) => {
        this.dataList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.patid);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
      //alert("selections:"+this.ids[0])
      //this.$parent.selectionChanged(this.ids[0])
    },
    handleAdd() {
      this.$parent.HandleCmdDefault("bill.new", this.ids[0]);
    },
    handleUpdate() {
      this.$parent.HandleCmdDefault("bill.open", this.ids[0]);
    },
    rowChanged(row) {
      //alert(row.patid)
      //console.log(row)
      //this.$parent.selectionChanged(row.patid)
      this.$parent.patid = row.patid;
    },
  },
};
</script>