前端问题修改
This commit is contained in:
parent
369b8f08b0
commit
54c25d1997
|
|
@ -0,0 +1,500 @@
|
|||
<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="keyword">
|
||||
<el-input
|
||||
v-model="queryParams.keyword"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<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="工程名称">
|
||||
<el-select v-model="queryParams.proId" filterable clearable placeholder="请选择工程名称">
|
||||
<el-option
|
||||
v-for="item in proList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="出库状态" prop="leaseStatus">
|
||||
<el-select v-model="queryParams.leaseStatus" placeholder="请选择出库状态" clearable>
|
||||
<el-option
|
||||
v-for="item in statusList" filterable
|
||||
:key="item.id" :label="item.name" :value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</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-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="leaseList" @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="code" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料申请单位" align="center" prop="unitName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="领料申请工程" align="center" prop="proName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="申请数量" align="center" prop="" :show-overflow-tooltip="true">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="申请时间" align="center" prop="createTimes" :show-overflow-tooltip="true">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="已出库数量" align="center" prop="" :show-overflow-tooltip="true">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="出库状态" align="center" prop="" :show-overflow-tooltip="true">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="primary"
|
||||
@click="handle(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="warning"
|
||||
@click="handleOut(scope.row)"
|
||||
>出库</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 出库弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openOut" width="600px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="类型名称:" prop="typeName">
|
||||
<el-input v-model="form.typeName" placeholder="请输入类型名称" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="modelName">
|
||||
<el-input v-model="form.modelName" placeholder="请输入规格型号" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="在库数量" prop="zkNum">
|
||||
<el-input v-model="form.zkNum" placeholder="请输入在库数量" disabled/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="出库数量" prop="num">
|
||||
<el-input v-model="form.num" placeholder="请输入出库数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="班组名称" prop="teamName">
|
||||
<el-input v-model="form.teamName" placeholder="请输入班组名称" maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="领用人员" prop="leaseMan">
|
||||
<el-input v-model="form.leaseMan" placeholder="请输入领用人员" maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入联系电话" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="submitForm(1)">确 定</el-button>
|
||||
<el-button @click="openOut=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 进库弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openIn" width="600px" append-to-body :close-on-click-modal="false">
|
||||
<el-form ref="nform" :model="nform" :rules="nrules" label-width="120px">
|
||||
<el-form-item label="类型名称:" prop="typeName">
|
||||
<el-input v-model="nform.typeName" placeholder="请输入类型名称" disabled/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="modelName">
|
||||
<el-input v-model="nform.modelName" placeholder="请输入规格型号" disabled/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="退库数量" prop="num">
|
||||
<el-input v-model="nform.num" placeholder="请输入退库数量"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="班组名称" prop="teamName">
|
||||
<el-input v-model="nform.teamName" placeholder="请输入班组名称" maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退库人员" prop="leaseMan">
|
||||
<el-input v-model="nform.leaseMan" placeholder="请输入退库人员" maxlength="50" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input v-model="nform.phone" placeholder="请输入联系电话" maxlength="11" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer" style="text-align: center">
|
||||
<el-button type="primary" @click="submitForm(2)">确 定</el-button>
|
||||
<el-button @click="openIn=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 记录弹窗 -->
|
||||
<el-dialog :title="title" :visible.sync="openRecord" width="1200px" append-to-body>
|
||||
<el-form :model="dialogQuery" ref="dialogQuery" size="small" :inline="true" label-width="80px">
|
||||
<el-form-item label="记录时间" prop="startTime">
|
||||
<el-date-picker
|
||||
v-model="dialogQuery.startTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="date"
|
||||
placeholder="记录时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="typeName">
|
||||
<el-input
|
||||
v-model="dialogQuery.typeName"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格型号" prop="modelName">
|
||||
<el-input v-model="dialogQuery.modelName" disabled />
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleDialogQuery">查询</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetDialogQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="dialogList">
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<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="startTime" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="操作类型" align="center" prop="" :show-overflow-tooltip="true" />
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="dialogTotal>0"
|
||||
:total="dialogTotal"
|
||||
:page.sync="dialogQuery.pageNum"
|
||||
:limit.sync="dialogQuery.pageSize"
|
||||
@pagination="getDialogList"
|
||||
/>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { operate,getRecords } from "@/api/claimAndRefund/secondStore";
|
||||
import { getUnitData,getProData,getLeaseAuditListAll } 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 {
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 表格数据
|
||||
leaseList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
openOut: false,
|
||||
openIn: false,
|
||||
// 日期范围
|
||||
dateRange: [],
|
||||
// 单位数据
|
||||
unitList: [],
|
||||
proList:[], //工程集合
|
||||
statusList:[{id:'0',name:'未出库'},{id:'1',name:'出库中'},{id:'2',name:'已出库'}], //工程集合
|
||||
//搜索下拉数据
|
||||
typeList: [],
|
||||
equipmentTypeList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
|
||||
unitId: undefined,
|
||||
modelId: undefined,
|
||||
typeId: undefined
|
||||
},
|
||||
// 表单参数 出库
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
num: [
|
||||
{ required: true, message: "出库数量不能为空", trigger: "blur" }
|
||||
],
|
||||
teamName: [
|
||||
{ required: true, message: "班组名称不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
// 表单参数 退库
|
||||
nform:{},
|
||||
nrules: {
|
||||
num: [
|
||||
{ required: true, message: "退库数量不能为空", trigger: "blur" }
|
||||
],
|
||||
teamName: [
|
||||
{ required: true, message: "班组名称不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
//记录弹窗
|
||||
openRecord:false,
|
||||
dialogQuery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
startTime: undefined,
|
||||
unitId: undefined,
|
||||
modelId: undefined,
|
||||
typeId: undefined
|
||||
},
|
||||
dialogList:[],
|
||||
queryType:1,
|
||||
dialogTotal: 0,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getTypeList();
|
||||
this.getUnitList();
|
||||
this.getProList()
|
||||
this.equipmentType();
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//获取单位
|
||||
getUnitList(){
|
||||
getUnitData().then(response => {
|
||||
this.unitList = response.data;
|
||||
})
|
||||
},
|
||||
//获取单位
|
||||
getProList(){
|
||||
getProData().then(response => {
|
||||
this.proList = 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;
|
||||
getLeaseAuditListAll(this.queryParams).then(response => {
|
||||
this.leaseList = response.data.rows;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.openOut = false;
|
||||
this.openIn = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
|
||||
};
|
||||
this.resetForm("form");
|
||||
this.nform = {
|
||||
|
||||
};
|
||||
this.resetForm("nform");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleDialogQuery() {
|
||||
this.dialogQuery.pageNum = 1;
|
||||
this.getDialogList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
resetDialogQuery() {
|
||||
this.resetForm("dialogQuery");
|
||||
this.handleDialogQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.dictId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 按钮操作 */
|
||||
handleOut(row) {//1
|
||||
this.reset();
|
||||
// this.form = row;
|
||||
console.log(row)
|
||||
this.$set(this.form,'unitId',row.unitId)
|
||||
this.$set(this.form,'typeId',row.typeId)
|
||||
this.$set(this.form,'unitName',row.unitName)
|
||||
this.$set(this.form,'typeName',row.typeName)
|
||||
this.$set(this.form,'modelName',row.modelName)
|
||||
this.$set(this.form,'zkNum',row.zkNum)
|
||||
console.log(this.form)
|
||||
this.openOut = true;
|
||||
this.title = "出库";
|
||||
},
|
||||
handleIn(row) {//2
|
||||
this.reset();
|
||||
// this.nform = row;
|
||||
this.$set(this.nform,'unitId',row.unitId)
|
||||
this.$set(this.nform,'typeId',row.typeId)
|
||||
this.$set(this.nform,'unitName',row.unitName)
|
||||
this.$set(this.nform,'typeName',row.typeName)
|
||||
this.$set(this.nform,'modelName',row.modelName)
|
||||
this.openIn = true;
|
||||
this.title = "退库";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
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();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//查看记录
|
||||
openRecords(row,type){
|
||||
this.openRecord = true;
|
||||
this.queryType = type
|
||||
this.dialogQuery.typeName = row.typeName;
|
||||
this.dialogQuery.modelName = row.modelName;
|
||||
this.dialogQuery.unitId = row.unitId;
|
||||
this.dialogQuery.typeId = row.typeId;
|
||||
|
||||
this.getDialogList();
|
||||
},
|
||||
/** 查询列表 */
|
||||
getDialogList() {
|
||||
this.dialogQuery.queryType = this.queryType;
|
||||
getRecords(this.dialogQuery).then(response => {
|
||||
this.dialogList = response.rows;
|
||||
this.dialogTotal = response.total;
|
||||
}
|
||||
);
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.downloadJson('material/secondaryWarehouse/exportList',JSON.stringify(this.queryParams), `二级库_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
}
|
||||
};
|
||||
</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>
|
||||
|
|
@ -433,6 +433,16 @@
|
|||
width="200"
|
||||
prop="num"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model.number="scope.row.num"
|
||||
placeholder="请输入退料数量"
|
||||
type="number"
|
||||
min="1"
|
||||
clearable @input="checkNum(scope.row)"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
|
@ -730,6 +740,14 @@ export default {
|
|||
},
|
||||
/** 提交按钮 同意 */
|
||||
submitForm() {
|
||||
const isNum = this.loadingList.some(
|
||||
(item) => item.num == '' || item.num == undefined
|
||||
);
|
||||
if (isNum) {
|
||||
this.$message.error('退料数量不能为空!');
|
||||
return;
|
||||
}
|
||||
|
||||
let params = {
|
||||
ids: this.rowObj.id
|
||||
}
|
||||
|
|
@ -742,6 +760,13 @@ export default {
|
|||
},
|
||||
/** 提交按钮 拒绝 */
|
||||
submitForm2() {
|
||||
const isNum = this.loadingList.some(
|
||||
(item) => item.num == '' || item.num == undefined
|
||||
);
|
||||
if (isNum) {
|
||||
this.$message.error('退料数量不能为空!');
|
||||
return;
|
||||
}
|
||||
let params = {
|
||||
ids: this.rowObj.id
|
||||
}
|
||||
|
|
@ -771,6 +796,13 @@ export default {
|
|||
return false
|
||||
}
|
||||
},
|
||||
checkNum(row){
|
||||
if(row.num>=0){
|
||||
row.num = row.num
|
||||
}else{
|
||||
row.num = 0
|
||||
}
|
||||
},
|
||||
handleExam() {
|
||||
let params = {
|
||||
ids: this.ids.join(',')
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
},
|
||||
created () {
|
||||
this.openNewWindow()
|
||||
this.$tab.closePage().then(() => { });
|
||||
},
|
||||
methods: {
|
||||
openNewWindow() {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@
|
|||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
v-show="scope.row.status==0"
|
||||
v-show="scope.row.checkNum<scope.row.purchaseNum"
|
||||
@click="handleCheck(scope.row)"
|
||||
>验收</el-button>
|
||||
<!-- <el-button
|
||||
|
|
|
|||
|
|
@ -661,7 +661,12 @@ export default {
|
|||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
if(response.code==200){
|
||||
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||
}else{
|
||||
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + '导入失败' + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||
}
|
||||
|
||||
this.getList();
|
||||
},
|
||||
// 提交上传文件
|
||||
|
|
|
|||
Loading…
Reference in New Issue