3.27盘点入库修改
This commit is contained in:
parent
db5a6079c0
commit
562e35a952
|
|
@ -46,6 +46,15 @@ export function inputByType(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 获取 设备树
|
||||
export function getDeviceTypeTree(params = {}){
|
||||
return request({
|
||||
url: '/system/select/getDeviceTypeTree',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container" id="devicesWarehousing">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-form-item label="关键字" label-width="auto" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
|
|
@ -60,8 +60,8 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<!-- <el-col :span="1.5">
|
||||
<!-- <el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
|
|
@ -71,29 +71,29 @@
|
|||
@click="handleAdd"
|
||||
v-hasPermi="['system:dict:add']"
|
||||
>入库审核</el-button>
|
||||
</el-col> -->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="success"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-edit"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="single"-->
|
||||
<!-- @click="handleUpdate"-->
|
||||
<!-- v-hasPermi="['system:dict:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- <el-col :span="1.5">-->
|
||||
<!-- <el-button-->
|
||||
<!-- type="danger"-->
|
||||
<!-- plain-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- size="mini"-->
|
||||
<!-- :disabled="multiple"-->
|
||||
<!-- @click="handleDelete"-->
|
||||
<!-- v-hasPermi="['system:dict:remove']"-->
|
||||
<!-- >删除</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:dict:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:dict:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
|
|
@ -104,7 +104,7 @@
|
|||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
|
||||
<el-table v-loading="loading" :data="returnList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" /> -->
|
||||
|
|
@ -153,10 +153,17 @@
|
|||
|
||||
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="codeOpen" width="95%" append-to-body>
|
||||
<!-- 编码盘点弹出层 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="codeOpen"
|
||||
width="95%"
|
||||
append-to-body
|
||||
:show-close="false"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<el-form :model="codeForm" :rules="codeFormRules" ref="codeForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="入库来源" label-width="auto" prop="codeInStoreSource">
|
||||
<el-form-item label="入库来源" label-width="150px" prop="codeInStoreSource">
|
||||
<!-- <el-input
|
||||
v-model="queryParams.dictName"
|
||||
placeholder="请输入关键字"
|
||||
|
|
@ -168,7 +175,7 @@
|
|||
v-model="codeForm.codeInStoreSource"
|
||||
placeholder="请选择入库来源"
|
||||
clearable filterable
|
||||
style="width: 160px"
|
||||
style="width: 260px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
|
|
@ -178,16 +185,27 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备/物资类型" label-width="auto" prop="codeDeviceType">
|
||||
<el-input
|
||||
<el-form-item label="设备/物资类型" label-width="150px" prop="codeDeviceType">
|
||||
<!-- <el-input
|
||||
v-model="codeForm.codeDeviceType"
|
||||
placeholder="请输入设备/物资类型"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
/> -->
|
||||
<el-cascader
|
||||
placeholder="请输入物品类型"
|
||||
:options="deviceTypeTree"
|
||||
:props="deviceTypeTreeProps"
|
||||
v-model="deviceType"
|
||||
@change="deviceTypeChange"
|
||||
ref="deviceTypeCascader"
|
||||
style="width: 320px;"
|
||||
filterable
|
||||
:disabled="cascaderDisabled"
|
||||
></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="待入库总数" label-width="auto" prop="codeWaitInSum">
|
||||
<el-form-item label="待入库总数" label-width="150px" prop="codeWaitInSum">
|
||||
<el-input
|
||||
v-model="codeForm.codeWaitInSum"
|
||||
placeholder="请输入待入库总数"
|
||||
|
|
@ -196,7 +214,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="前缀" label-width="auto" prop="codePrefix">
|
||||
<el-form-item label="前缀" label-width="150px" prop="codePrefix">
|
||||
<el-input
|
||||
v-model="codeForm.codePrefix"
|
||||
placeholder="请输入前缀"
|
||||
|
|
@ -205,11 +223,11 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="后缀范围" label-width="auto" prop="codeSuffixStart">
|
||||
<el-form-item label="后缀范围" label-width="150px" prop="codeSuffixStart">
|
||||
<el-input
|
||||
v-model="codeForm.codeSuffixStart"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
style="width: 320px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -217,11 +235,11 @@
|
|||
<el-input
|
||||
v-model="codeForm.codeSuffixEnd"
|
||||
clearable
|
||||
style="width: 260px"
|
||||
style="width: 320px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单价" label-width="auto" prop="codeSinglePrice">
|
||||
<el-form-item label="单价" label-width="150px" prop="codeSinglePrice">
|
||||
<el-input
|
||||
v-model="codeForm.codeSinglePrice"
|
||||
placeholder="请输入单价"
|
||||
|
|
@ -230,22 +248,22 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="选择厂家" label-width="auto" prop="codeFactory">
|
||||
<el-form-item label="选择厂家" label-width="150px" prop="codeFactory">
|
||||
<el-select
|
||||
v-model="codeForm.codeFactory"
|
||||
placeholder="请选择厂家"
|
||||
clearable filterable
|
||||
style="width: 160px"
|
||||
style="width: 320px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_normal_disable"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
v-for="item in supplierList"
|
||||
:key="item.supplierId"
|
||||
:label="item.supplier"
|
||||
:value="item.supplierId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="检修时间" label-width="auto" prop="codeCheckFixTime">
|
||||
<el-form-item label="检修时间" label-width="150px" prop="codeCheckFixTime">
|
||||
<el-input
|
||||
v-model="codeForm.codeCheckFixTime"
|
||||
placeholder="请输入检修时间"
|
||||
|
|
@ -254,7 +272,7 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下次检修时间" label-width="auto" prop="codeNextCheckFixTime">
|
||||
<el-form-item label="下次检修时间" label-width="150px" prop="codeNextCheckFixTime">
|
||||
<el-input
|
||||
v-model="codeForm.codeNextCheckFixTime"
|
||||
placeholder="请输入下次检修时间"
|
||||
|
|
@ -263,15 +281,15 @@
|
|||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" label-width="auto" prop="codeNote">
|
||||
<el-form-item label="备注" label-width="150px" prop="codeNote">
|
||||
<el-input
|
||||
v-model="codeForm.codeNote"
|
||||
type="textarea"
|
||||
style="width: 260px"
|
||||
style="width: 320px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-form-item style="margin-left: 200px;">
|
||||
<el-button type="primary" icon="el-icon-edit" size="mini" @click="fillCodeForm">点击填充</el-button>
|
||||
<!-- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> -->
|
||||
</el-form-item>
|
||||
|
|
@ -309,17 +327,17 @@
|
|||
<el-table v-loading="loading" :data="returnList" @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="status">
|
||||
<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="status">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -365,13 +383,21 @@
|
|||
|
||||
<script>
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
|
||||
import { getReturnOfMaterialsInfoAll,getTypeList } from "@/api/store/warehousing";
|
||||
import {
|
||||
getReturnOfMaterialsInfoAll,
|
||||
getTypeList,
|
||||
getDeviceTypeTree
|
||||
} from "@/api/store/putInStore";
|
||||
import { getInfo } from '@/api/login'
|
||||
import { supplierInfoList } from "@/api/store/tools";
|
||||
|
||||
export default {
|
||||
name: "DevicesWarehousing",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 用户信息
|
||||
user: null,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
|
|
@ -403,7 +429,34 @@ export default {
|
|||
dictType: undefined,
|
||||
status: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
// 级联框禁用
|
||||
cascaderDisabled: false,
|
||||
//机具厂家(供应商管理)
|
||||
supplierList: [],
|
||||
deviceTypeTree: [], // 设备 树结构数据
|
||||
// 设备 树显示 配置
|
||||
deviceTypeTreeProps: {
|
||||
multiple:false,
|
||||
value:'id'
|
||||
},
|
||||
// 选中的设备类型
|
||||
deviceType: null,
|
||||
// 领料集合
|
||||
leaseApplyDetails: [],
|
||||
//领料详情单条模板
|
||||
leaseApplyDetailsItem:{
|
||||
parentId:null,
|
||||
createBy: null,
|
||||
companyId: null,
|
||||
status: 0,
|
||||
typeId: null, // 树结构第4级 规格id
|
||||
typeCn:'', //显示的设备类型
|
||||
guigeCn:'', //显示的设备规格
|
||||
unitCn:'', //显示的设备 单位
|
||||
remark: '', //单条备注
|
||||
preNum: 1, //预领数量
|
||||
},
|
||||
// 表单参数:编号表单 / 数量表单
|
||||
numberForm: {},
|
||||
codeForm: {
|
||||
codeInStoreSource: undefined,
|
||||
|
|
@ -445,8 +498,16 @@ export default {
|
|||
created() {
|
||||
this.getList();
|
||||
this.getTypeList();
|
||||
this.GetDeviceTypeTree();
|
||||
this.supplierInfoList();
|
||||
},
|
||||
methods: {//
|
||||
// 获取用户信息
|
||||
async GetUserInfo(){
|
||||
const res = await getInfo()
|
||||
console.log(res, '用户信息')
|
||||
this.user = res.user
|
||||
},
|
||||
/** 查询字典类型列表 */
|
||||
getTypeList() {
|
||||
getTypeList({level:'3'}).then(response => {
|
||||
|
|
@ -470,9 +531,12 @@ export default {
|
|||
}
|
||||
);
|
||||
},
|
||||
// 取消按钮
|
||||
// 取消编码盘点按钮
|
||||
cancelCode() {
|
||||
this.codeOpen = false;
|
||||
this.cascaderDisabled = false
|
||||
this.resetCodeForm();
|
||||
this.deviceType = {}
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
|
|
@ -486,6 +550,24 @@ export default {
|
|||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
// 编码表单重置
|
||||
resetCodeForm() {
|
||||
this.codeForm = {
|
||||
codeInStoreSource: undefined,
|
||||
codeNote: undefined,
|
||||
codeDeviceType: undefined,
|
||||
codeWaitInSum: undefined,
|
||||
codePrefix: undefined,
|
||||
codeSuffixStart: undefined,
|
||||
codeSuffixEnd: undefined,
|
||||
codeSinglePrice: undefined,
|
||||
codeFactory: undefined,
|
||||
codeCheckFixTime: undefined,
|
||||
codeNextCheckFixTime: undefined,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
|
|
@ -531,7 +613,12 @@ export default {
|
|||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
this.$refs['codeForm'].validate(valid => {
|
||||
if (valid) {
|
||||
console.log(this.codeForm)
|
||||
}
|
||||
})
|
||||
/* this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.dictId != undefined) {
|
||||
updateType(this.form).then(response => {
|
||||
|
|
@ -547,7 +634,7 @@ export default {
|
|||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}); */
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
|
|
@ -571,7 +658,67 @@ export default {
|
|||
this.$modal.msgSuccess("刷新成功");
|
||||
this.$store.dispatch('dict/cleanDict');
|
||||
});
|
||||
}
|
||||
},
|
||||
// 获取 设备树结构数据
|
||||
async GetDeviceTypeTree(){
|
||||
const params = {
|
||||
level:4
|
||||
}
|
||||
const res = await getDeviceTypeTree(params)
|
||||
console.log(res)
|
||||
this.deviceTypeTree = res.data
|
||||
},
|
||||
/////// 设备类型树 切换
|
||||
deviceTypeChange(val){
|
||||
console.log(val)
|
||||
this.cascaderDisabled = true
|
||||
let nodes = null;
|
||||
nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]
|
||||
if(nodes[0].level != 4){
|
||||
return
|
||||
}
|
||||
console.log(nodes[0])
|
||||
for(let i = 0; i < this.leaseApplyDetails.length; i++) {
|
||||
if (this.leaseApplyDetails[i].typeId == nodes[0].data.id) {
|
||||
this.leaseApplyDetails.splice(i,1)
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.leaseApplyDetails.push(
|
||||
this.handelTableItemData(nodes[0])
|
||||
)
|
||||
console.log(this.leaseApplyDetails)
|
||||
// this.deviceType = {}
|
||||
},
|
||||
//// 将数据处理成 表格中需要的数据
|
||||
handelTableItemData(node){
|
||||
const template = JSON.parse(JSON.stringify(this.leaseApplyDetailsItem))
|
||||
// template.createBy = this.user.name
|
||||
console.log(node.data, node.data.id)
|
||||
this.codeForm.codeDeviceType = node.data.id
|
||||
template.num = node.data.num
|
||||
template.companyId = node.data.companyId
|
||||
template.typeId = node.data.id
|
||||
template.unitCn = node.data.unitName
|
||||
template.typeCn = node.pathLabels[2]
|
||||
template.guigeCn = node.pathLabels[3]
|
||||
|
||||
if(this.taskId){
|
||||
const index = this.leaseApplyInfoList.find(key => key.companyId == node.data.companyId)
|
||||
template.parentId = index ? index.id : ''
|
||||
}
|
||||
|
||||
console.log(template)
|
||||
|
||||
return template
|
||||
},
|
||||
/** 机具厂家 */
|
||||
supplierInfoList() {
|
||||
supplierInfoList().then(response => {
|
||||
this.supplierList = response.rows;
|
||||
}
|
||||
);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -580,4 +727,7 @@ export default {
|
|||
width: 60px !important;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
::v-deep.el-form-item__label {
|
||||
padding: 0 20px !important;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue