|
@@ -1,6 +1,77 @@
|
|
|
<template>
|
|
|
- <div class="hc-layout-box">
|
|
|
- 材料进场
|
|
|
+ <div class="hc-page-box">
|
|
|
+ <HcCard>
|
|
|
+ <template #header>
|
|
|
+ <HcTooltip keys="tentative_material_approach_add">
|
|
|
+ <el-button type="primary" hc-btn>
|
|
|
+ <HcIcon name="add-circle"/>
|
|
|
+ <span>新增</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ <HcTooltip keys="tentative_material_approach_edit">
|
|
|
+ <el-button hc-btn>
|
|
|
+ <HcIcon name="edit"/>
|
|
|
+ <span>编辑</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ <HcTooltip keys="tentative_material_approach_copy">
|
|
|
+ <el-button hc-btn>
|
|
|
+ <HcIcon name="file-copy-2"/>
|
|
|
+ <span>复制</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ <HcTooltip keys="tentative_material_approach_del">
|
|
|
+ <el-button hc-btn>
|
|
|
+ <HcIcon name="delete-bin-2"/>
|
|
|
+ <span>删除</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ <HcTooltip keys="tentative_material_approach_printer">
|
|
|
+ <el-button hc-btn>
|
|
|
+ <HcIcon name="printer"/>
|
|
|
+ <span>打印</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ <HcTooltip keys="tentative_material_approach_import">
|
|
|
+ <el-button hc-btn>
|
|
|
+ <HcIcon name="folder-upload"/>
|
|
|
+ <span>导入</span>
|
|
|
+ </el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ </template>
|
|
|
+ <template #search>
|
|
|
+ <div class="w-40">
|
|
|
+ <el-select v-model="searchForm.type" placeholder="请选择材料类型" clearable>
|
|
|
+ <el-option v-for="item in typeData" :key="item.value" :label="item['label']" :value="item['value']"/>
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="w-64 ml-2">
|
|
|
+ <HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate"/>
|
|
|
+ </div>
|
|
|
+ <div class="w-72 ml-2">
|
|
|
+ <el-input v-model="searchForm.queryValue" placeholder="请输入名称、规格、材料编号进行查询" clearable @keyup="keyUpEvent"/>
|
|
|
+ </div>
|
|
|
+ <div class="ml-2">
|
|
|
+ <el-button type="primary" @click="searchClick">
|
|
|
+ <HcIcon name="search-2"/>
|
|
|
+ <span>搜索</span>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <HcTable ref="tableRef" :column="tableColumn" :datas="tableData" :loading="tableLoading" isCheck @selection-change="tableSelection">
|
|
|
+ <template #action="{row}">
|
|
|
+ <HcTooltip keys="tentative_material_approach_annex">
|
|
|
+ <el-button type="primary" size="small" plain>附件</el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ <HcTooltip keys="tentative_material_approach_sampling">
|
|
|
+ <el-button type="primary" size="small" plain>取样记录</el-button>
|
|
|
+ </HcTooltip>
|
|
|
+ </template>
|
|
|
+ </HcTable>
|
|
|
+ <template #action>
|
|
|
+ <HcPages :pages="searchForm" @change="pageChange"/>
|
|
|
+ </template>
|
|
|
+ </HcCard>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -19,12 +90,79 @@ const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId);
|
|
|
const contractId = ref(useAppState.getContractId);
|
|
|
|
|
|
-</script>
|
|
|
|
|
|
-<style lang="scss" scoped>
|
|
|
+const typeData = ref([
|
|
|
+ {label: '水泥', value: '1'}
|
|
|
+])
|
|
|
|
|
|
-</style>
|
|
|
+//搜索表单
|
|
|
+const searchForm = ref({type: null, betweenTime: null, queryValue: null, current: 1, size: 20, total: 0})
|
|
|
+
|
|
|
+//日期时间被选择
|
|
|
+const betweenTime = ref(null)
|
|
|
+const betweenTimeUpdate = ({arr,query}) => {
|
|
|
+ betweenTime.value = arr
|
|
|
+ searchForm.value.betweenTime = query
|
|
|
+}
|
|
|
+
|
|
|
+//回车搜索
|
|
|
+const keyUpEvent = (e) => {
|
|
|
+ if (e.key === "Enter") {
|
|
|
+ searchForm.value.current = 1;
|
|
|
+ getTableData()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//搜索
|
|
|
+const searchClick = () => {
|
|
|
+ searchForm.value.current = 1;
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
+
|
|
|
+//分页被点击
|
|
|
+const pageChange = ({current, size}) => {
|
|
|
+ searchForm.value.current = current
|
|
|
+ searchForm.value.size = size
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+//表格数据
|
|
|
+const tableRef = ref(null)
|
|
|
+const tableColumn = ref([
|
|
|
+ {key:'key1', name: '材料编号'},
|
|
|
+ {key:'key2', name: '进场日期'},
|
|
|
+ {key:'key3', name: '材料名称'},
|
|
|
+ {key:'key4', name: '材料类型'},
|
|
|
+ {key:'key5', name: '规格型号'},
|
|
|
+ {key:'key6', name: '供应商单位'},
|
|
|
+ {key:'key7', name: '材料单价'},
|
|
|
+ {key:'key8', name: '材料数量'},
|
|
|
+ {key:'key9', name: '计算单位'},
|
|
|
+ {key:'key10', name: '生产批号'},
|
|
|
+ {key:'key11', name: '生产地/厂家'},
|
|
|
+ {key:'key12', name: '拟用部位'},
|
|
|
+ {key:'key13', name: '记录人'},
|
|
|
+ {key:'action', name: '操作', width: 200},
|
|
|
+])
|
|
|
+
|
|
|
+//获取数据
|
|
|
+const tableLoading = ref(false)
|
|
|
+const tableData = ref([
|
|
|
+ {}
|
|
|
+])
|
|
|
+const getTableData = async () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//多选
|
|
|
+const tableCheckedKeys = ref([]);
|
|
|
+const tableSelection = (rows) => {
|
|
|
+ tableCheckedKeys.value = rows.filter((item) => {
|
|
|
+ return (item??'') !== '';
|
|
|
+ })
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
|
|
|
</style>
|