新增库存盘点

This commit is contained in:
gyq
2024-07-01 18:10:04 +08:00
parent c05707e6f0
commit d5e400d0cb
4 changed files with 253 additions and 11 deletions

View File

@@ -56,9 +56,9 @@
</div>
</template>
</el-table-column>
<el-table-column label="库存" prop="number" >
<template v-slot="scope" >
<span :class="[scope.row.stockNumber<=warnLine?'colorStyle':'']">
<el-table-column label="库存" prop="number">
<template v-slot="scope">
<span :class="[scope.row.stockNumber <= warnLine ? 'colorStyle' : '']">
{{ `${scope.row.stockNumber} ${scope.row.unitName}` }}
</span>
</template>
@@ -83,10 +83,14 @@
@change="showChangess($event, scope.row)"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" width="220">
<el-table-column label="操作" width="240px">
<template v-slot="scope">
<el-button type="text" size="mini"
@click="$refs.invoicingDetail.show(scope.row)">库存记录</el-button>
<template v-if="!scope.row.hasChildren">
<el-button type="text" size="mini" style="margin-left: 10px !important;"
@click="$refs.AddStockTakin.show(scope.row)">库存盘点</el-button>
</template>
</template>
</el-table-column>
</el-table>
@@ -112,6 +116,8 @@
<el-button type="primary" @click="sumbit()"> </el-button>
</div>
</el-dialog>
<!-- 新增库存盘点 -->
<AddStockTakin ref="AddStockTakin" @success="getTableData" />
</div>
</template>
@@ -119,12 +125,14 @@
import { stock, stockdownload, stockdoImport, stockStatewarnLine, stockStateChanges, stocks } from '@/api/invoicing'
import settings from '@/settings'
import invoicingDetail from './components/invoicingDetail'
import AddStockTakin from './components/addStockTakin'
import UploadExcel from '@/components/UploadExcel/'
import { downloadFile } from "@/utils/index";
export default {
components: {
invoicingDetail,
UploadExcel
UploadExcel,
AddStockTakin
},
data() {
return {
@@ -138,10 +146,10 @@ export default {
},
downloadLoading: false,
uploadLoading: false,
warnLine:null, // 警戒线
warnLine: null, // 警戒线
tableData: {
page: 0,
size: 10,
size: 5,
total: 0,
sort: 'id',
loading: false,
@@ -284,7 +292,7 @@ export default {
});
this.warnLine = res.warnLine
this.tableData.list = res.content
console.log(this.tableData.list);
} catch (error) {
console.log(error);
}
@@ -339,7 +347,8 @@ export default {
gap: 10px;
}
}
.colorStyle{
.colorStyle {
color: rgb(231, 42, 42);
font-weight: 700;
}