库存欠缺入库测试
This commit is contained in:
@@ -7,6 +7,14 @@ export function listOaOutWarehouse(query) {
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}// 查询仓库出库列表
|
||||
|
||||
export function outWareList(query) {
|
||||
return request({
|
||||
url: '/oa/project/outWare/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询仓库出库详细
|
||||
@@ -17,6 +25,15 @@ export function getOaOutWarehouse(id) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 查询仓库出库详细
|
||||
export function queryOutWarehouseByProjectId(id) {
|
||||
return request({
|
||||
url: '/oa/oaOutWarehouse/project/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增仓库出库
|
||||
export function addOaOutWarehouse(data) {
|
||||
return request({
|
||||
|
||||
@@ -1,25 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="项目名" prop="projectId">
|
||||
<el-input
|
||||
v-model="queryParams.projectId"
|
||||
placeholder="请输入项目名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="物料名" prop="warehouseId">
|
||||
<el-input
|
||||
v-model="queryParams.warehouseId"
|
||||
placeholder="请输入物料名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="项目名" prop="projectId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.projectId"-->
|
||||
<!-- placeholder="请输入项目名"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -59,22 +50,21 @@
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="oaOutWarehouseList" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键id" align="center" prop="id" v-if="true"/>
|
||||
<el-table-column label="出库后对应的项目id" align="center" prop="projectId" />
|
||||
<el-table-column label="出库数量" align="center" prop="amount" />
|
||||
<el-table-column label="出库备注" align="center" prop="remark" />
|
||||
<el-table-column label="出库对象id" align="center" prop="warehouseId" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="项目名" align="center" prop="projectName" />
|
||||
<el-table-column label="创建时间" align="center" prop="createtime" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
icon="el-icon-search"
|
||||
@click="handleSearch(scope.row)"
|
||||
v-hasPermi="['oa:oaOutWarehouse:remove']"
|
||||
>删除</el-button>
|
||||
>查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -97,9 +87,9 @@
|
||||
<el-select v-model="form.projectId" placeholder="请选择项目">
|
||||
<el-option
|
||||
v-for="item in projectList"
|
||||
:key="item.id"
|
||||
:key="item.projectId"
|
||||
:label="item.projectName"
|
||||
:value="item.id">
|
||||
:value="item.projectId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -145,16 +135,73 @@
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-drawer
|
||||
size="70%"
|
||||
title="我是标题"
|
||||
:visible.sync="drawer"
|
||||
:with-header="false">
|
||||
<!-- <el-form :model="query" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">-->
|
||||
<!-- <el-form-item label="项目名" prop="projectId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="query.name"-->
|
||||
<!-- placeholder="请输入物料名"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item>-->
|
||||
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- </el-form>-->
|
||||
|
||||
<el-button
|
||||
style="margin: 25px"
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['oa:oaOutWarehouse:add']"
|
||||
>新增</el-button>
|
||||
|
||||
<el-table v-loading="loading" :data="oaOutWarehouseList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="物料名" align="center" prop="warehouseName" />
|
||||
<el-table-column label="出库数量" align="center" prop="amount" />
|
||||
<el-table-column label="出库时间" align="center" prop="createTime" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oa:oaOutWarehouse:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</el-drawer>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listOaOutWarehouse, getOaOutWarehouse, delOaOutWarehouse, addOaOutWarehouse, updateOaOutWarehouse } from "@/api/oa/oaOutWarehouse";
|
||||
import { listOaOutWarehouse, getOaOutWarehouse, delOaOutWarehouse, addOaOutWarehouse, updateOaOutWarehouse, outWareList,queryOutWarehouseByProjectId} from "@/api/oa/oaOutWarehouse";
|
||||
import {listProject} from "@/api/oa/project";
|
||||
|
||||
export default {
|
||||
name: "OaOutWarehouse",
|
||||
data() {
|
||||
return {
|
||||
// 抽屉
|
||||
drawer:false,
|
||||
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
@@ -171,17 +218,19 @@ export default {
|
||||
total: 0,
|
||||
// 仓库出库表格数据
|
||||
oaOutWarehouseList: [],
|
||||
// 项目列表
|
||||
projectList:[],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 选择对象
|
||||
searchItem:{},
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
projectId: undefined,
|
||||
amount: undefined,
|
||||
warehouseId: undefined,
|
||||
projectName: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@@ -203,8 +252,8 @@ export default {
|
||||
/** 查询仓库出库列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listOaOutWarehouse(this.queryParams).then(response => {
|
||||
this.oaOutWarehouseList = response.rows;
|
||||
listProject(this.queryParams).then(response => {
|
||||
this.projectList = response.rows
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
@@ -258,12 +307,12 @@ export default {
|
||||
this.loading = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getOaOutWarehouse(id).then(response => {
|
||||
this.loading = false;
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改仓库出库";
|
||||
});
|
||||
// getOaOutWarehouse(id).then(response => {
|
||||
// this.loading = false;
|
||||
// this.form = response.data;
|
||||
// this.open = true;
|
||||
// this.title = "修改仓库出库";
|
||||
// });
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
@@ -297,8 +346,8 @@ export default {
|
||||
this.loading = true;
|
||||
return delOaOutWarehouse(ids);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
|
||||
this.handleSearch(this.searchItem);
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
@@ -339,6 +388,18 @@ export default {
|
||||
|
||||
handleSelect(item,index) {
|
||||
this.form.oaOutWarehouseList[index] = item
|
||||
},
|
||||
|
||||
// 查看出库详情
|
||||
handleSearch(item){
|
||||
this.loading = true
|
||||
this.searchItem = item;
|
||||
this.form.projectId = item.projectId
|
||||
queryOutWarehouseByProjectId(item.projectId).then(response => {
|
||||
this.oaOutWarehouseList = response.rows;
|
||||
this.drawer = true;
|
||||
this.loading = false;
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user