二级库模块接口对接

This commit is contained in:
zhouzy062 2024-03-01 14:46:21 +08:00
parent 73195a84c5
commit 3c778be029
6 changed files with 420 additions and 411 deletions

View File

@ -19,6 +19,23 @@ export function getOperateList(query) {
}
// 出库/退库操作
export function operate(query) {
return request({
url: '/material/secondaryWarehouse/operate',
method: 'post',
params: query
})
}
// 获取进场、退场、场内库存记录
export function getRecords(query) {
return request({
url: '/material/secondaryWarehouse/getRecords',
method: 'get',
params: query
})
}

View File

@ -21,13 +21,13 @@
</el-form-item>
<el-form-item label="往来单位" prop="unitId">
<el-select v-model="queryParams.unitId" placeholder="请选择往来单位" clearable>
<el-option
v-for="item in unitList"
:key="item.unitId" filterable
:label="item.unitName"
:value="item.unitId"
></el-option>
</el-select>
<el-option
v-for="item in unitList"
:key="item.unitId" filterable
:label="item.unitName"
:value="item.unitId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="工程名称" prop="projectId">
<el-select v-model="queryParams.projectId" filterable placeholder="请选择工程名称" clearable>

View File

@ -1,44 +1,49 @@
<template>
<div class="app-container" id="inStoreBook">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关键字" prop="dictName">
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.dictName"
v-model="queryParams.keyword"
placeholder="请输入关键字"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单位名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入单位名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="单位名称" prop="unitId">
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
<el-option
v-for="item in unitList" filterable
:key="item.id" :label="item.name" :value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="类型名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入类型名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="类型名称" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择类型名称"
clearable filterable
style="width: 240px">
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"/>
</el-select>
</el-form-item>
<el-form-item label="规格型号" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入规格型号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="规格型号" prop="modelId">
<treeselect
v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px;"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"/>
</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>
@ -59,16 +64,16 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="dictId" />
<el-table v-loading="loading" :data="tableList" @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="unitName" :show-overflow-tooltip="true" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
<el-table-column label="退库数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="退料人员" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="退库人员" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="退库时间" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="退料人员" align="center" prop="leaseMan" :show-overflow-tooltip="true" />
<el-table-column label="退库人员" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column label="退库时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
</el-table>
<pagination
@ -83,13 +88,17 @@
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { getOperateList } from "@/api/claimAndRefund/secondStore";
import { getUnitData } from "@/api/claimAndRefund/receive.js"
import { getTypeList } from "@/api/store/warehousing";
import { equipmentTypeTree } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "InStoreBook",
dicts: ['sys_normal_disable'],
components: { Treeselect },
data() {
return {
//
@ -105,7 +114,7 @@ export default {
//
total: 0,
//
typeList: [],
tableList: [],
//
title: "",
//
@ -113,74 +122,76 @@ export default {
openIn: false,
//
dateRange: [],
//
unitList: [],
//
typeList: [],
equipmentTypeList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
},
//
form: {},
//
rules: {
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
]
},
nform:{
},
nrules: {
notice: [
{ required: true, message: "通知内容不能为空", trigger: "blur" }
]
},
type:2,
unitId: undefined,
modelId: undefined,
typeId: undefined
}
};
},
created() {
this.getTypeList();
this.getUnitList();
this.equipmentType();
this.getList();
},
methods: {
/** 查询字典类型列表 */
//
getUnitList(){
getUnitData().then(response => {
this.unitList = response.data;
})
},
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typeList = response.data;
}
)
},
//
equipmentType() {
equipmentTypeTree().then(response => {
this.equipmentTypeList = response.data;
this.equipmentTypeList.forEach((item,index)=>{
if(item.children.length>0){
item.children.forEach((item2,index2)=>{
if(item2.children.length>0){
item2.children.forEach(item3=>{
if(item3.children.length>0){
item3.children.forEach(item4=>{
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
this.$set(item4, 'purchasePrice', 0);
this.$set(item4, 'purchaseNum', 1);
})
}
})
}
})
}
})
});
},
/** 查询列表 */
getList() {
this.loading = true;
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.typeList = response.rows;
getOperateList(this.queryParams).then(response => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
//
cancel() {
this.openOut = false;
this.openIn = false;
this.reset();
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("form");
this.nform = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("nform");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -198,55 +209,6 @@ export default {
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictId = row.dictId || this.ids
getType(dictId).then(response => {
this.form = response.data;
this.openOut = true;
this.title = "验收";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openOut = false;
this.getList();
});
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.openOut = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleOut(row) {
this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
this.openOut = true;
this.title = "出库";
// });
},
handleIn(row) {
this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
this.openIn = true;
this.title = "进库";
// });
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {

View File

@ -1,41 +1,49 @@
<template>
<div class="app-container" id="outStoreBook">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关键字" prop="dictName">
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.dictName"
v-model="queryParams.keyword"
placeholder="请输入关键字"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单位名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入单位名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="单位名称" prop="unitId">
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
<el-option
v-for="item in unitList" filterable
:key="item.id" :label="item.name" :value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="类型名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入类型名称"
clearable
<el-form-item label="类型名称" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择类型名称"
clearable filterable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
>
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
/>
</el-select>
</el-form-item>
<el-form-item label="规格型号" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入规格型号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="规格型号" prop="modelId">
<treeselect
v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px;"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"/>
</el-form-item>
@ -59,16 +67,16 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="typeList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="dictId" />
<el-table-column label="单位名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="类型名称" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="出库数量" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="领料人员" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="出库人员" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="出库时间" align="center" prop="dictName" :show-overflow-tooltip="true" />
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
<el-table-column label="出库数量" align="center" prop="num" :show-overflow-tooltip="true" />
<el-table-column label="领料人员" align="center" prop="leaseMan" :show-overflow-tooltip="true" />
<el-table-column label="出库人员" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column label="出库时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
</el-table>
<pagination
@ -83,11 +91,16 @@
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { getOperateList } from "@/api/claimAndRefund/secondStore";
import { getOperateList } from "@/api/claimAndRefund/secondStore";
import { getUnitData } from "@/api/claimAndRefund/receive.js"
import { getTypeList } from "@/api/store/warehousing";
import { equipmentTypeTree } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "OutStoreBook",
dicts: ['sys_normal_disable'],
components: { Treeselect },
data() {
return {
//
@ -103,7 +116,7 @@ export default {
//
total: 0,
//
typeList: [],
tableList: [],
//
title: "",
//
@ -115,70 +128,69 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
},
//
form: {},
//
rules: {
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
]
},
nform:{
},
nrules: {
notice: [
{ required: true, message: "通知内容不能为空", trigger: "blur" }
]
type:1,
unitId: undefined,
modelId: undefined,
typeId: undefined
},
};
},
created() {
this.getTypeList();
this.getUnitList();
this.equipmentType();
this.getList();
},
methods: {
/** 查询字典类型列表 */
//
getUnitList(){
getUnitData().then(response => {
this.unitList = response.data;
})
},
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typeList = response.data;
}
)
},
//
equipmentType() {
equipmentTypeTree().then(response => {
this.equipmentTypeList = response.data;
this.equipmentTypeList.forEach((item,index)=>{
if(item.children.length>0){
item.children.forEach((item2,index2)=>{
if(item2.children.length>0){
item2.children.forEach(item3=>{
if(item3.children.length>0){
item3.children.forEach(item4=>{
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
// item4.purchasePrice = 1
// item4.purchaseNum = 1
this.$set(item4, 'purchasePrice', 0);
this.$set(item4, 'purchaseNum', 1);
})
}
})
}
})
}
})
});
},
/** 查询列表 */
getList() {
this.loading = true;
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.typeList = response.rows;
getOperateList(this.queryParams).then(response => {
this.tableList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
//
cancel() {
this.openOut = false;
this.openIn = false;
this.reset();
},
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("form");
this.nform = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("nform");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
@ -196,55 +208,6 @@ export default {
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictId = row.dictId || this.ids
getType(dictId).then(response => {
this.form = response.data;
this.openOut = true;
this.title = "验收";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openOut = false;
this.getList();
});
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.openOut = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleOut(row) {
this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
this.openOut = true;
this.title = "出库";
// });
},
handleIn(row) {
this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
this.openIn = true;
this.title = "进库";
// });
},
/** 导出按钮操作 */
handleExport() {
this.download('system/dict/type/export', {

View File

@ -1,41 +1,49 @@
<template>
<div class="app-container" id="secondStore">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="关键字" prop="dictName">
<el-form-item label="关键字" prop="keyword">
<el-input
v-model="queryParams.dictName"
v-model="queryParams.keyword"
placeholder="请输入关键字"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="单位名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入单位名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="单位名称" prop="unitId">
<el-select v-model="queryParams.unitId" placeholder="请选择单位名称" clearable>
<el-option
v-for="item in unitList" filterable
:key="item.id" :label="item.name" :value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="类型名称" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入类型名称"
clearable
<el-form-item label="类型名称" prop="typeId">
<el-select
v-model="queryParams.typeId"
placeholder="请选择类型名称"
clearable filterable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
>
<el-option
v-for="typeItem in typeList"
:key="typeItem.typeId"
:label="typeItem.typeName"
:value="typeItem.typeId"
/>
</el-select>
</el-form-item>
<el-form-item label="规格型号" prop="dictName">
<el-input
v-model="queryParams.dictName"
placeholder="请输入规格型号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
<el-form-item label="规格型号" prop="modelId">
<treeselect
v-model="queryParams.modelId"
default-expand-all :options="equipmentTypeList"
placeholder="请选择规格型号"
:disable-branch-nodes="true"
style="width: 240px;"
noChildrenText="没有数据了"
noOptionsText="没有数据"
noResultsText="没有搜索结果"/>
</el-form-item>
@ -60,12 +68,16 @@
</el-row>
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="序号" align="center" prop="dictId" />
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="单位名称" align="center" prop="unitName" :show-overflow-tooltip="true" />
<el-table-column label="类型名称" align="center" prop="typeName" :show-overflow-tooltip="true" />
<el-table-column label="规格型号" align="center" prop="modelName" :show-overflow-tooltip="true" />
<el-table-column label="进场数量" align="center" prop="jcNum" :show-overflow-tooltip="true" />
<el-table-column label="进场数量" align="center" prop="jcNum" :show-overflow-tooltip="true">
<template slot-scope="scope">
<!-- <span class="clickText" @click="openRecords">{{scope.row.jcNum}}</span> -->
</template>
</el-table-column>
<el-table-column label="退场数量" align="center" prop="tcNUm" :show-overflow-tooltip="true" />
<el-table-column label="场内库存量" align="center" prop="kcNum" :show-overflow-tooltip="true" />
<el-table-column label="已出库数量" align="center" prop="ckNum" :show-overflow-tooltip="true" />
@ -75,17 +87,13 @@
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
type="primary"
@click="handleOut(scope.row)"
v-hasPermi="['store:labelType:edit']"
>出库</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
type="warning"
@click="handleIn(scope.row)"
v-hasPermi="['store:labelType:remove']"
>退库</el-button>
</template>
</el-table-column>
@ -102,31 +110,31 @@
<!-- 出库弹窗 -->
<el-dialog :title="title" :visible.sync="openOut" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="类型名称:" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入类型名称" />
<el-form-item label="类型名称:" prop="typeName">
<el-input v-model="form.typeName" placeholder="请输入类型名称" disabled/>
</el-form-item>
<el-form-item label="规格型号" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入工程名称" />
<el-form-item label="规格型号" prop="modelName">
<el-input v-model="form.modelName" placeholder="请输入规格型号" disabled/>
</el-form-item>
<el-form-item label="在库数量" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入开始日期" />
<el-form-item label="在库数量" prop="zkNum">
<el-input v-model="form.zkNum" placeholder="请输入在库数量" disabled/>
</el-form-item>
<el-form-item label="出库数量" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入授权人" />
<el-form-item label="出库数量" prop="num">
<el-input v-model="form.num" placeholder="请输入出库数量" />
</el-form-item>
<el-form-item label="班组名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入授权人" />
<el-form-item label="班组名称" prop="teamName">
<el-input v-model="form.teamName" placeholder="请输入班组名称" />
</el-form-item>
<el-form-item label="领用人员" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入联系方式" />
<el-form-item label="领用人员" prop="leaseMan">
<el-input v-model="form.leaseMan" placeholder="请输入领用人员" />
</el-form-item>
<el-form-item label="联系电话" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入联系方式" />
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm(1)"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
@ -134,41 +142,52 @@
<!-- 进库弹窗 -->
<el-dialog :title="title" :visible.sync="openIn" width="600px" append-to-body>
<el-form ref="nform" :model="nform" :rules="nrules" label-width="120px">
<el-form-item label="类型名称:" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入类型名称" />
<el-form-item label="类型名称:" prop="typeName">
<el-input v-model="nform.typeName" placeholder="请输入类型名称" disabled/>
</el-form-item>
<el-form-item label="规格型号" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入工程名称" />
</el-form-item>
<el-form-item label="退库数量" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入开始日期" />
<el-form-item label="规格型号" prop="modelName">
<el-input v-model="nform.modelName" placeholder="请输入规格型号" disabled/>
</el-form-item>
<el-form-item label="班组名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入授权人" />
<el-form-item label="退库数量" prop="num">
<el-input v-model="nform.num" placeholder="请输入退库数量"/>
</el-form-item>
<el-form-item label="退库人员" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入联系方式" />
<el-form-item label="班组名称" prop="teamName">
<el-input v-model="nform.teamName" placeholder="请输入班组名称" />
</el-form-item>
<el-form-item label="联系电话" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入联系方式" />
<el-form-item label="退库人员" prop="leaseMan">
<el-input v-model="nform.leaseMan" placeholder="请输入退库人员" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="nform.phone" placeholder="请输入联系电话" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button type="primary" @click="submitForm(2)"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 记录弹窗 -->
<el-dialog :title="title" :visible.sync="openIn" width="600px" append-to-body>
</el-dialog>
</div>
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { secondaryWarehouseList } from "@/api/claimAndRefund/secondStore";
import { secondaryWarehouseList,operate,getRecords } from "@/api/claimAndRefund/secondStore";
import { getUnitData } from "@/api/claimAndRefund/receive.js"
import { getTypeList } from "@/api/store/warehousing";
import { equipmentTypeTree } from "@/api/store/tools";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
name: "SecondStore",
dicts: ['sys_normal_disable'],
components: { Treeselect },
data() {
return {
//
@ -183,7 +202,7 @@ export default {
showSearch: true,
//
total: 0,
//
//
deviceList: [],
//
title: "",
@ -192,40 +211,90 @@ export default {
openIn: false,
//
dateRange: [],
//
unitList: [],
//
typeList: [],
equipmentTypeList: [],
//
queryParams: {
pageNum: 1,
pageSize: 10,
dictName: undefined,
dictType: undefined,
status: undefined
unitId: undefined,
modelId: undefined,
typeId: undefined
},
//
//
form: {},
//
rules: {
dictName: [
{ required: true, message: "字典名称不能为空", trigger: "blur" }
num: [
{ required: true, message: "出库数量不能为空", trigger: "blur" }
],
dictType: [
{ required: true, message: "字典类型不能为空", trigger: "blur" }
teamName: [
{ required: true, message: "班组名称不能为空", trigger: "blur" }
]
},
nform:{
},
// 退
nform:{},
nrules: {
notice: [
{ required: true, message: "通知内容不能为空", trigger: "blur" }
num: [
{ required: true, message: "退库数量不能为空", trigger: "blur" }
],
teamName: [
{ required: true, message: "班组名称不能为空", trigger: "blur" }
]
},
};
},
created() {
this.getTypeList();
this.getUnitList();
this.equipmentType();
this.getList();
},
methods: {
/** 查询字典类型列表 */
//
getUnitList(){
getUnitData().then(response => {
this.unitList = response.data;
})
},
getTypeList() {
getTypeList({level:'3'}).then(response => {
this.typeList = response.data;
}
)
},
//
equipmentType() {
equipmentTypeTree().then(response => {
this.equipmentTypeList = response.data;
this.equipmentTypeList.forEach((item,index)=>{
if(item.children.length>0){
item.children.forEach((item2,index2)=>{
if(item2.children.length>0){
item2.children.forEach(item3=>{
if(item3.children.length>0){
item3.children.forEach(item4=>{
item4.machineTypeName = item3.typeName
item4.specificationType = item4.typeName
// item4.purchasePrice = 1
// item4.purchaseNum = 1
this.$set(item4, 'purchasePrice', 0);
this.$set(item4, 'purchaseNum', 1);
})
}
})
}
})
}
})
});
},
/** 查询列表 */
getList() {
this.loading = true;
secondaryWarehouseList(this.queryParams).then(response => {
@ -244,19 +313,11 @@ export default {
//
reset() {
this.form = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("form");
this.nform = {
dictId: undefined,
dictName: undefined,
dictType: undefined,
status: "0",
remark: undefined
};
this.resetForm("nform");
},
@ -277,54 +338,50 @@ export default {
this.single = selection.length!=1
this.multiple = !selection.length
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const dictId = row.dictId || this.ids
getType(dictId).then(response => {
this.form = response.data;
this.openOut = true;
this.title = "验收";
});
},
/** 提交按钮 */
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.dictId != undefined) {
updateType(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.openOut = false;
this.getList();
});
} else {
addType(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
submitForm: function(type) {
if(type==1){
this.$refs["form"].validate(valid => {
if (valid) {
let param = {}
param = this.form
param.type=1
operate(param).then(response => {
this.$modal.msgSuccess("操作成功");
this.openOut = false;
this.getList();
});
}
}
});
});
}
if(type==2){
this.$refs["nform"].validate(valid => {
if (valid) {
let param = {}
param = this.nform
param.type=2
operate(param).then(response => {
this.$modal.msgSuccess("操作成功");
this.openIn = false;
this.getList();
});
}
});
}
},
/** 删除按钮操作 */
handleOut(row) {
/** 按钮操作 */
handleOut(row) {//1
this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
this.openOut = true;
this.title = "出库";
// });
this.form = row;
console.log(this.form)
this.openOut = true;
this.title = "出库";
},
handleIn(row) {
handleIn(row) {//2
this.reset();
// const dictId = row.dictId || this.ids
// getType(dictId).then(response => {
// this.form = response.data;
this.openIn = true;
this.title = "进库";
// });
this.nform = row;
this.openIn = true;
this.title = "退库";
},
/** 导出按钮操作 */
handleExport() {
@ -335,3 +392,13 @@ export default {
}
};
</script>
<style lang="scss" scoped>
::v-deep.el-table .fixed-width .el-button--mini {
width: 60px !important;
margin-bottom: 10px;
}
.clickText{
color: #02A7F0;
cursor: pointer;
}
</style>

View File

@ -3,7 +3,7 @@
<el-row :gutter="24" class="mb8">
<!-- <el-col :span="4" style="text-align:center;"><h4>新购任务信息:</h4></el-col> -->
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" >
<el-col :span="5">
<el-col :span="6">
<el-form-item label="机具类型" prop="equipmentId">
<treeselect
v-model="queryParams.equipmentId"
@ -17,7 +17,7 @@
noResultsText="没有搜索结果"/>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="出厂日期">
<el-date-picker
v-model="queryParams.productionTime"
@ -29,7 +29,7 @@
></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="5">
<el-col :span="6">
<el-form-item label="机具厂家" prop="supplierId">
<el-select
v-model="queryParams.supplierId"