| | |
| | | <div class="list"> |
| | | <div class="list_search"> |
| | | <div class="list_search_left"> |
| | | <el-input v-model="form.code" style="width: 200px; margin-right: 10px;" placeholder="请输入物料名称/编码"></el-input> |
| | | <el-input v-model="form.materialCode" style="width: 200px; margin-right: 10px;" placeholder="请输入物料名称/编码"></el-input> |
| | | <el-select v-model="form.status" style="width: 150px; margin-right: 10px;" placeholder="盘点状态"> |
| | | <el-option label="已盘" :value="1"></el-option> |
| | | <el-option label="未盘" :value="0"></el-option> |
| | | <el-option label="未盘" :value="2"></el-option> |
| | | </el-select> |
| | | <el-select v-model="form.type" style="width: 150px; margin-right: 10px;" placeholder="盘点结果"> |
| | | <el-option label="账实相符" :value="0"></el-option> |
| | |
| | | </el-select> |
| | | <el-button type="primary" @click="getList">查询</el-button> |
| | | <el-button @click="clear">清空</el-button> |
| | | <el-button>导出</el-button> |
| | | <el-button @click="exportExcel">导出</el-button> |
| | | </div> |
| | | <div class="list_search_right"> |
| | | <span>已盘:{{info.finishAmount || 0}}</span> |
| | |
| | | </div> |
| | | <div style="width: 100%; margin: 20px 0;"> |
| | | <el-table :data="list" stripe> |
| | | <el-table-column prop="materialCode" label="资产编码" show-overflow-tooltip /> |
| | | <el-table-column prop="materialName" label="资产名称" show-overflow-tooltip /> |
| | | <el-table-column prop="materialCode" label="物料编码" show-overflow-tooltip /> |
| | | <el-table-column prop="materialName" label="物料名称" show-overflow-tooltip /> |
| | | <el-table-column prop="materialQrcode" label="条码" show-overflow-tooltip /> |
| | | <el-table-column prop="materialBrand" label="品牌" show-overflow-tooltip /> |
| | | <el-table-column prop="materialAttr" label="规格型号" show-overflow-tooltip /> |
| | | <el-table-column prop="materialUnitName" label="单位" show-overflow-tooltip /> |
| | | <el-table-column prop="warehouseName" label="所在仓库" show-overflow-tooltip /> |
| | | <el-table-column prop="stock" label="账面数量" show-overflow-tooltip /> |
| | | <el-table-column prop="actStock" label="盘点数量" show-overflow-tooltip /> |
| | | <el-table-column label="盘点数量" show-overflow-tooltip> |
| | | <template slot-scope="{row}"> |
| | | <span style="color: green;" v-if="row.type === 1">{{row.actStock}}</span> |
| | | <span style="color: red;" v-else-if="row.type === 2">{{row.actStock}}</span> |
| | | <span v-else>{{row.actStock}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" label="备注" show-overflow-tooltip /> |
| | | </el-table> |
| | | </div> |
| | |
| | | <script> |
| | | import GlobalWindow from '@/components/common/GlobalWindow' |
| | | import BaseOpera from '@/components/base/BaseOpera' |
| | | import { ywStocktakingRecordPage, getById } from '@/api/ywStocktaking' |
| | | import { ywStocktakingRecordPage, getById, exportExcel } from '@/api/ywStocktaking' |
| | | export default { |
| | | name: "inventoryDetails", |
| | | components: { |
| | |
| | | info: {}, |
| | | list: [], |
| | | form: { |
| | | code: '', |
| | | materialCode: '', |
| | | status: '', |
| | | type: '' |
| | | }, |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | exportExcel () { |
| | | this.$dialog.exportConfirm('确认导出吗?') |
| | | .then(() => { |
| | | exportExcel({ |
| | | page: this.page, |
| | | capacity: 1000000, |
| | | model: { |
| | | ...this.form, |
| | | stocktakingId: this.id |
| | | } |
| | | }) |
| | | .then(response => { |
| | | this.download(response) |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | }, |
| | | handleSizeChange(size) { |
| | | this.pageSize = size |
| | | this.getList() |
| | |
| | | this.form.name = '' |
| | | this.form.status = '' |
| | | this.form.type = '' |
| | | this.form.materialCode = '' |
| | | this.page = 1 |
| | | this.getList() |
| | | }, |
| | |
| | | page: this.page, |
| | | model: { |
| | | stocktakingId: this.id, |
| | | code: this.form.code, |
| | | materialCode: this.form.materialCode, |
| | | status: this.form.status, |
| | | type: this.form.type |
| | | } |
| | | }).then(res => { |
| | | this.list = res.records |
| | | this.total = res.total |
| | | }) |
| | | } |
| | | } |