193 lines
4.6 KiB
Plaintext
193 lines
4.6 KiB
Plaintext
<template>
|
|
<div class="app-container">
|
|
<el-form
|
|
:model="queryParams"
|
|
ref="queryParams"
|
|
:inline="true"
|
|
label-width="100px"
|
|
>
|
|
<el-form-item>
|
|
<el-select
|
|
clearable
|
|
size="small"
|
|
style="width: 230px"
|
|
v-model="queryParams.dictReceiveStatus"
|
|
placeholder="收货状态"
|
|
@change="getnewlist"
|
|
@clear="remove"
|
|
|
|
>
|
|
<el-option key="1" label="待收货" value="1"> </el-option>
|
|
<el-option key="3" label="已收货" value="3"> </el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-select
|
|
clearable
|
|
size="small"
|
|
style="width: 230px"
|
|
v-model="queryParams.dictInputStatus"
|
|
placeholder="入库状态"
|
|
@change="getnewDlist"
|
|
@clear="remove"
|
|
|
|
>
|
|
<el-option key="1" label="待入库" value="1"> </el-option>
|
|
<el-option key="3" label="已入库" value="3"> </el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
<!-- <el-form-item>
|
|
<el-button
|
|
type="primary"
|
|
icon="el-icon-search"
|
|
size="mini"
|
|
@click="Query"
|
|
>搜索</el-button
|
|
>
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
>重置</el-button
|
|
>
|
|
</el-form-item> -->
|
|
</el-form>
|
|
|
|
<el-table
|
|
highlight-current-row
|
|
:showOverflowTooltip="true"
|
|
:data="tableData"
|
|
border
|
|
:height="400"
|
|
>
|
|
<el-table-column type="index" align="center" label="序号" width="50">
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="materialBar" label="料箱条码" width="230">
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="materialQty" label="数量" width="200">
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="batchNo" label="批次" width="200">
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
prop="dictReceiveStatusShow"
|
|
label="收货状态"
|
|
width="200"
|
|
>
|
|
</el-table-column>
|
|
|
|
<el-table-column prop="dictInputStatusShow" label="入库状态" width="200">
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "detailIndex",
|
|
props: {
|
|
layerid: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
lydata: {
|
|
type: Object,
|
|
default: () => {
|
|
return {};
|
|
},
|
|
},
|
|
billId: {
|
|
type: Number,
|
|
default: () => {
|
|
return {};
|
|
},
|
|
},
|
|
},
|
|
mounted() {
|
|
this.initData({ billId: this.billId });
|
|
},
|
|
data() {
|
|
return {
|
|
tableData: [],
|
|
loading: false,
|
|
queryParams: {
|
|
dictInputStatus:'',
|
|
dictReceiveStatus:''
|
|
},
|
|
tableDataLast: [],
|
|
};
|
|
},
|
|
methods: {
|
|
remove() {
|
|
this.tableData = this.tableDataLast.filter((value, index) => {
|
|
if (
|
|
(this.queryParams.dictInputStatus == '' ||
|
|
this.queryParams.dictInputStatus == value.dictInputStatus) &&
|
|
(this.queryParams.dictReceiveStatus == '' ||
|
|
this.queryParams.dictReceiveStatus == value.dictReceiveStatus)
|
|
) {
|
|
return true;
|
|
}
|
|
});
|
|
// 业务逻辑
|
|
|
|
},
|
|
getnewDlist(val) {
|
|
// console.log("入库", val);
|
|
this.tableData = this.tableDataLast.filter((value, index) => {
|
|
if (
|
|
value.dictInputStatus == val &&
|
|
( this.queryParams.dictReceiveStatus == '' ||
|
|
this.queryParams.dictReceiveStatus == value.dictReceiveStatus)
|
|
) {
|
|
return true;
|
|
}
|
|
});
|
|
},
|
|
getnewlist(val) {
|
|
//收获状态
|
|
|
|
this.tableData = this.tableDataLast.filter((value, index) => {
|
|
if (
|
|
value.dictReceiveStatus == val &&
|
|
(this.queryParams.dictInputStatus == '' ||
|
|
this.queryParams.dictInputStatus == value.dictInputStatus)
|
|
) {
|
|
return true;
|
|
}
|
|
});
|
|
|
|
},
|
|
initData(params) {
|
|
this.$inputBill.getInputBillRecevingDetail(params).then((data) => {
|
|
this.tableData = data.data.data;
|
|
console.log(this.tableData);
|
|
|
|
this.tableData.forEach((value) => {
|
|
value.dictInputStatusShow = this.$dictType.getInputBillStatus(
|
|
value.dictInputStatus
|
|
);
|
|
value.dictReceiveStatusShow = this.$dictType.getReceiveStatus(
|
|
value.dictReceiveStatus
|
|
);
|
|
});
|
|
this.tableDataLast = this.tableData;
|
|
});
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
/deep/ .tableStyle {
|
|
th {
|
|
padding: 2px !important;
|
|
}
|
|
|
|
td {
|
|
padding: 2px !important;
|
|
}
|
|
}
|
|
</style>
|