空管耐用品库存管理前端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

277 lines
6.8 KiB

5 months ago
<template>
<basic-container>
4 months ago
<avue-crud
:option="option"
:table-loading="loading"
:data="data"
ref="crud"
v-model="form"
:page.sync="page"
:permission="permissionList"
@search-change="searchChange"
@search-reset="searchReset"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad"
>
<template slot-scope="scope" slot="menuLeft">
<el-button size="small" @click.stop="handleDesign()" type="primary"
>新增出库单
</el-button>
</template>
<template #menu="scope">
<el-button type="text" @click.stop="approvalProcessFn(scope.row)"
>审批流程</el-button
>
<el-button type="text" @click.stop="handleDetails(scope.row)">详情</el-button>
4 months ago
</template>
<template slot-scope="scope" slot="xuqiudanmingcheng">
<el-button
type="text"
@click.stop="purchaseFn(scope.row)"
v-if="scope.row.xuqiudanmingcheng != ''"
>{{ scope.row.xuqiudanmingcheng }}</el-button
>
<span v-else></span>
</template>
</avue-crud>
5 months ago
4 months ago
<outDialog
v-if="outDialogVisible"
:repairVisible="outDialogVisible"
:outDialogTiltle="outDialogTiltle"
:outDialogType="outDialogType"
@handleCloseDetail="handleCloseDetail"
type="二级库"
>
5 months ago
</outDialog>
4 months ago
<!-- 需求单明细 -->
<needDialog
:showDialog="purchaseOpen"
v-if="purchaseOpen"
@closeDialog="closeDialog"
:purchaseTitle="purchaseTitle"
></needDialog>
<!-- 审批流程 -->
<approvalProcessDialog
:showDialog="approvalProcessShow"
v-if="approvalProcessShow"
@closeDialog="closeDialog"
></approvalProcessDialog>
5 months ago
</basic-container>
</template>
<script>
4 months ago
import outDialog from "./components/outDialog.vue";
import needDialog from "./components/needDialog.vue";
import { getList } from "@/api/secondOrder/outbound";
import approvalProcessDialog from "./components/approvalProcessDialog.vue";
5 months ago
export default {
components: {
outDialog,
4 months ago
needDialog,
approvalProcessDialog
5 months ago
},
data() {
return {
4 months ago
purchaseOpen: false,
purchaseTitle: "",
treeData: [], //组织树
5 months ago
defaultProps: {
4 months ago
children: "children",
label: "label",
5 months ago
},
form: {},
selectionList: [],
query: {},
loading: true,
page: {
pageSize: 10,
currentPage: 1,
4 months ago
total: 0,
5 months ago
},
option: {
4 months ago
height: "auto",
5 months ago
calcHeight: 30,
tip: false,
searchShow: true,
4 months ago
searchMenuSpan: 12,
5 months ago
border: true,
index: true,
selection: true,
viewBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
5 months ago
dialogClickModal: false,
selection: false,
printBtn: false,
refreshBtn: false,
gridBtn: false,
gridBackgroundImage: false,
gridSpan: false,
filterBtn: false,
columnBtn: false,
menuAlign: "left",
searchMenuPosition: "right",
excelBtn: true,
menuWidth:140,
5 months ago
column: [
// {
// label: "需求单名称",
// prop: "xuqiudanmingcheng",
// width:180,
// },
5 months ago
{
label: "部门",
prop: "bumen",
headerAlign: "center",
align: "center",
5 months ago
},
4 months ago
// {
// label: "仓库类型",
// prop: "str1",
// },
5 months ago
{
label: "出库单号",
prop: "orderNo",
headerAlign: "center",
align: "center",
5 months ago
},
{
label: "出库时间",
prop: "outDate",
5 months ago
search: true,
type: "datetime",
headerAlign: "center",
align: "center",
5 months ago
},
4 months ago
// {
// label: "审批人",
// prop: "approvers",
// headerAlign: "center",
// align: "center",
// },
4 months ago
5 months ago
{
label: "状态",
prop: "status",
headerAlign: "center",
align: "center",
4 months ago
type: "select",
align: "center",
dicData: [
{
label: "未出库",
value:0,
},
{
label: "已出库",
value: 1,
},
{
label: "已驳回",
value: 2,
},
],
5 months ago
},
4 months ago
],
5 months ago
},
data: [],
outDialogVisible: false,
4 months ago
outDialogTiltle: "出库",
outDialogType: "",
approvalProcessShow:false,
5 months ago
};
},
4 months ago
5 months ago
methods: {
approvalProcessFn(row) {
this.approvalProcessShow = true;
},
// 详情
handleDetails(row) {
this.outDialogVisible = true
this.outDialogType = 'details'
this.outDialogTiltle = '详情'
this.id = row.id
console.log(this.id,'id')
},
4 months ago
purchaseFn(row) {
this.purchaseOpen = true;
this.purchaseTitle = row.xuqiudanmingcheng + "详情";
5 months ago
},
4 months ago
closeDialog() {
this.purchaseOpen = false;
5 months ago
},
handleDesign() {
4 months ago
this.outDialogVisible = true;
this.outDialogType = "add";
this.outDialogTiltle = "新增出库";
5 months ago
},
//
5 months ago
handleCloseDetail() {
4 months ago
this.outDialogVisible = false;
this.onLoad(this.page);
5 months ago
},
handleExport(name) {
this.$message({
type: "success",
4 months ago
message: "出库单导出成功!",
5 months ago
});
},
4 months ago
5 months ago
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
4 months ago
this.onLoad(this.page, params);
5 months ago
this.$message({
type: "success",
4 months ago
message: "操作成功!",
5 months ago
});
done();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
this.loading = true;
4 months ago
const queryParams = {
...params,
...this.query,
pageSize: page.pageSize,
pageNum: page.currentPage,
};
if (queryParams.outDate && Array.isArray(queryParams.outDate)) {
queryParams.startTime = queryParams.outDate[0];
queryParams.endTime = queryParams.outDate[1];
delete queryParams.outDate;
}
getList(page.currentPage, page.pageSize, queryParams).then((res) => {
this.data = res.data.result.list;
this.loading = false;
this.page.total = res.data.result.total;
});
5 months ago
},
4 months ago
},
5 months ago
};
</script>
<style></style>