产值管理
This commit is contained in:
@ -64,7 +64,7 @@
|
||||
</el-row>
|
||||
</template>
|
||||
|
||||
<el-input v-model="batchId" placeholder="请输入批次号" @input="getBatchList" prefix-icon="Search" clearable />
|
||||
<el-input v-model="queryParams.batchNumber" placeholder="请输入批次号" @input="getBatchList" prefix-icon="Search" clearable />
|
||||
<el-tree
|
||||
ref="batchTreeRef"
|
||||
class="mt-2"
|
||||
@ -76,6 +76,13 @@
|
||||
default-expand-all
|
||||
@node-click="handleNodeClick"
|
||||
></el-tree>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getBatchList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :lg="20" :xs="24">
|
||||
@ -166,14 +173,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -267,7 +266,6 @@ const single = ref(true);
|
||||
const multiple = ref(true);
|
||||
const total = ref(0);
|
||||
const batchOptions = ref<any[]>([]);
|
||||
const batchId = ref('');
|
||||
|
||||
const queryFormRef = ref<ElFormInstance>();
|
||||
const cailiaoshebeiFormRef = ref<ElFormInstance>();
|
||||
@ -305,6 +303,7 @@ const data = reactive<PageData<CailiaoshebeiForm, CailiaoshebeiQuery>>({
|
||||
supplier: undefined,
|
||||
name: undefined,
|
||||
projectId: currentProject.value.id,
|
||||
batchNumber: undefined,
|
||||
supply: undefined,
|
||||
specification: undefined,
|
||||
signalment: undefined,
|
||||
@ -328,19 +327,15 @@ const getList = async () => {
|
||||
loading.value = true;
|
||||
const res = await listCailiaoshebei(queryParams.value);
|
||||
cailiaoshebeiList.value = res.rows;
|
||||
total.value = res.total;
|
||||
|
||||
loading.value = false;
|
||||
};
|
||||
|
||||
//查询批次列表
|
||||
const getBatchList = async () => {
|
||||
const res = await listBatch({
|
||||
pageNum: 1,
|
||||
pageSize: 1000,
|
||||
projectId: currentProject.value.id,
|
||||
batchNumber: batchId.value
|
||||
});
|
||||
const res = await listBatch(queryParams.value);
|
||||
batchOptions.value = res.rows;
|
||||
total.value = res.total;
|
||||
try {
|
||||
queryParams.value.batchId = res.rows[0].id;
|
||||
form.value.batchId = res.rows[0].id;
|
||||
|
Reference in New Issue
Block a user