<template>
   <div>
      <SearchBox ref="SearchBoxRef" formName="selectTop" :formData="query" @showPop="showPop" @reset="reset"></SearchBox>
      <ButtonBox @search="handleSearch" @add="insertDialog" @start="start('0')" @remove="shutdwon('1')"></ButtonBox>
   </div>

</template>

<script setup>
import ButtonBar from '@/components/ButtonBar.vue'

import {getCurrentInstance, onMounted, reactive, ref} from 'vue'
import tools from '@/tools'
import Attachment from '@/components/Attachment.vue'
import ButtonBox from "@/components/ButtonBox.vue";
import SearchBox from "@/components/SearchBox.vue";
import SelectorComponent from "@/views/sal/components/Selector_component.vue";

const {
  proxy
} = getCurrentInstance()

const cardBodyStyle = ref(tools.style.card)
const inputStyle = ref(tools.style.input)



const PopupMenuTreeRef = ref(null)
const showPop = () => {
  console.log('showPop')
  PopupMenuTreeRef.value.show()
}
const url = ref('sto/Config/query')
const pageType = ref(true)

var now = new Date();
const query = ref({
  wareName: '',
  stackName: '',
  materialName: '',
  materialStandard: '',
  startDtm: new Date(now.getFullYear(), now.getMonth(), now.getDate()),
  endDtm: new Date(now.getFullYear(), now.getMonth(), now.getDate()+1),
  ownerCompany: '',
  receivingCompany: '',
  CustomerCompany: '',
  prodNo: '',
  carNo: '',
  orderNo: '',
  contractNo: ''
})


const tableData = ref([])
const TableBoxRef = ref(null)
const handleSearch = () => {
  // TableBoxRef.value.search()
  getTableData()
}
</script>