|
@@ -5,7 +5,7 @@ import { View } from '@element-plus/icons-vue'
|
|
|
import { ref, reactive } from 'vue'
|
|
|
import TableBase from '@/components/TableBase/index.vue'
|
|
|
import type { ColumnProps } from '@/components/TableBase/interface/index'
|
|
|
-import { StockIn_ListProducts } from '@/api/storehouse/index'
|
|
|
+import { StockIn_ListProducts,StockinExcel } from '@/api/storehouse/index'
|
|
|
import { depotHooks } from '@/hooks/useDepot'
|
|
|
|
|
|
const router = useRouter()
|
|
@@ -48,9 +48,10 @@ const initParam = reactive({
|
|
|
T_end_date: '',
|
|
|
T_start_date: '',
|
|
|
T_depot_id: '',
|
|
|
+ T_product_name: '',
|
|
|
+ T_product_model: '',
|
|
|
T_name: '',
|
|
|
})
|
|
|
-
|
|
|
const searchHandle = () => {
|
|
|
initParam.T_end_date = T_date.value ? T_date.value[1] : ''
|
|
|
initParam.T_start_date = T_date.value ? T_date.value[0] : ''
|
|
@@ -58,6 +59,17 @@ const searchHandle = () => {
|
|
|
}
|
|
|
// 拿到仓库列表
|
|
|
const { options } = depotHooks()
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * Excel
|
|
|
+ */
|
|
|
+ const onclickExcel = async ()=>{
|
|
|
+ const result:any = await StockinExcel(initParam)
|
|
|
+ console.log('导出',result)
|
|
|
+
|
|
|
+ if (result.Code === 200)window.open(result.Data)
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -67,17 +79,25 @@ const { options } = depotHooks()
|
|
|
<template #table-header>
|
|
|
<div class="input-suffix">
|
|
|
<el-row :gutter="20" style="margin-bottom: 0">
|
|
|
- <el-col :xl="6" :lg="6" :md="6" style="display: flex">
|
|
|
+ <el-col :xl="4" :lg="4" :md="4" style="display: flex">
|
|
|
<span class="inline-flex items-center">关键字:</span>
|
|
|
<el-input v-model="initParam.T_name" placeholder="入库单号,备注搜索" />
|
|
|
</el-col>
|
|
|
- <el-col :xl="6" :lg="6" :md="6" style="display: flex">
|
|
|
+ <el-col :xl="4" :lg="4" :md="4" style="display: flex">
|
|
|
<span class="inline-flex items-center">入库日期:</span>
|
|
|
<el-date-picker v-model="T_date" type="daterange" range-separator="~"
|
|
|
start-placeholder="开始时间" end-placeholder="结束时间" format="YYYY-MM-DD"
|
|
|
value-format="YYYY-MM-DD" />
|
|
|
</el-col>
|
|
|
- <el-col :xl="6" :lg="6" :md="6" style="display: flex">
|
|
|
+ <el-col :xl="4" :lg="4" :md="4" style="display: flex">
|
|
|
+ <span class="inline-flex items-center">产品名称:</span>
|
|
|
+ <el-input v-model="initParam.T_product_name" placeholder="产品名称" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :xl="4" :lg="4" :md="4" style="display: flex">
|
|
|
+ <span class="inline-flex items-center">产品型号:</span>
|
|
|
+ <el-input v-model="initParam.T_product_model" placeholder="产品型号" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :xl="4" :lg="4" :md="4" style="display: flex">
|
|
|
<span class="inline-flex items-center">仓库:</span>
|
|
|
<el-select v-model="initParam.T_depot_id" clearable placeholder="请选择仓库~">
|
|
|
<el-option v-for="item in options" :key="item.Id" :label="item.T_name"
|
|
@@ -85,7 +105,11 @@ const { options } = depotHooks()
|
|
|
</el-select>
|
|
|
<el-button type="primary" @click="searchHandle">搜索</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :xl="4" :lg="4" :md="4" style="display: flex">
|
|
|
+ <el-button type="primary" icon="Download" @click="onclickExcel">导出</el-button>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #T_product_relation_sn="{ row }">
|