This commit is contained in:
LiJianZhao 2025-05-15 16:11:58 +08:00
parent 3fb54390ef
commit 15d62eaa32
2 changed files with 17 additions and 15 deletions

View File

@ -111,6 +111,12 @@
{{ getTypeName(scope.row.type) }}<span v-if="scope.row.cateName">/{{ scope.row.cateName }}</span> {{ getTypeName(scope.row.type) }}<span v-if="scope.row.cateName">/{{ scope.row.cateName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="100">
<template #default="scope">
<el-tag type="success" v-if="scope.row.saleStatus">售卖中</el-tag>
<el-tag type="danger" v-else>已停售</el-tag>
</template>
</el-table-column>
<el-table-column label="库存数量" width="150"> <el-table-column label="库存数量" width="150">
<template #default="scope"> <template #default="scope">
{{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }} {{ scope.row.inventoryWholeNumber }}{{ scope.row.packagingUnit }}
@ -266,7 +272,7 @@ const searchGoods = () => {
maxInterestRate: parseFloat(searchModel.value.maxInterestRate) || null, // maxInterestRate: parseFloat(searchModel.value.maxInterestRate) || null, //
interestRateIntervalList: [] as { min: number; max: number }[], // interestRateIntervalList: [] as { min: number; max: number }[], //
inventoryNumber: inventoryNumber.value ? 0 : '', inventoryNumber: inventoryNumber.value ? 0 : '',
status: status.value ? true : '', saleStatus: status.value ? status.value: null,
} }
searchModel.value.curProfitCate.forEach((item) => { searchModel.value.curProfitCate.forEach((item) => {
for (const cate of profitCategory) { for (const cate of profitCategory) {

View File

@ -5,10 +5,14 @@
<div class="left"> <div class="left">
<el-form :inline="true" :model="searchModel"> <el-form :inline="true" :model="searchModel">
<el-form-item> <el-form-item>
<el-input v-model="searchModel.code" placeholder="请输入单号" style="width: 180px;height: 42px" <el-input v-model="searchModel.keyword" placeholder="名称/联系人/联系方式" style="width: 250px;height: 42px"
:prefix-icon="Search"></el-input> :prefix-icon="Search"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select v-model="searchModel.turn" placeholder="启用状态" style="width: 120px;height: 42px" clearable>
<el-option label="启用中" :value="1"></el-option>
<el-option label="已禁用" :value="0"></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
@ -31,7 +35,7 @@
<el-table :data="tableData" style="width: 100%;height: 100%" @row-click="editSupplier" :header-cell-style="{ backgroundColor: '#F1F5FB' }"> <el-table :data="tableData" style="width: 100%;height: 100%" @row-click="editSupplier" :header-cell-style="{ backgroundColor: '#F1F5FB' }">
<el-table-column label="供应商名称" prop="name" width="250"> <el-table-column label="供应商名称" prop="name" width="250">
</el-table-column> </el-table-column>
<el-table-column label="启用状态" prop="turn" width="80"> <el-table-column label="启用状态" prop="turn" width="150">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="scope.row.turn ==1">启用中</el-tag> <el-tag type="success" v-if="scope.row.turn ==1">启用中</el-tag>
<el-tag type="info" v-else>已禁用</el-tag> <el-tag type="info" v-else>已禁用</el-tag>
@ -69,6 +73,7 @@ const getSupplier = () => {
const query = { const query = {
page: page.value, page: page.value,
pageSize: 20, pageSize: 20,
...searchModel.value,
} }
post("inventory/supplier/list", {query: query}, null).then( post("inventory/supplier/list", {query: query}, null).then(
(res: any) => { (res: any) => {
@ -101,24 +106,15 @@ let changePage = (value: number) => {
getSupplier() getSupplier()
} }
const searchModel = ref({ const searchModel = ref({
code: null, keyword: null,
name: null,
turn: null, turn: null,
licenseCode: null,
contactName: null,
contactTel: null,
reamark: null,
}) })
const resetSearch = () => { const resetSearch = () => {
searchModel.value = { searchModel.value = {
code: null, keyword: null,
name: null,
turn: null, turn: null,
licenseCode: null,
contactName: null,
contactTel: null,
reamark: null,
} }
getSupplier()
} }
</script> </script>