|
|
|
@ -39,6 +39,15 @@
|
|
|
|
|
:props="{ multiple: false, checkStrictly: true }"
|
|
|
|
|
@change="handleQueryChange"></el-cascader>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
<el-form-item label="物资关键字" prop="classNameKey" label-width="98px">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="queryParams.classNameKey"
|
|
|
|
|
placeholder="请输入单位名称"
|
|
|
|
|
clearable
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<!-- <el-form-item label="类别" prop="classSecond">
|
|
|
|
|
|
|
|
|
|
<el-cascader style="width:500px"
|
|
|
|
@ -139,14 +148,28 @@
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="类别" align="center" prop="classSecond">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{classToStr(scope.row.classSecond,1,scope.row.classFirst)}}</span>
|
|
|
|
|
<span>{{classToStr(scope.row.classSecond,1)}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="类别" align="center" prop="classSecond">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{classToStr(scope.row.classSecond,1,scope.row.classFirst)}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>-->
|
|
|
|
|
<el-table-column label="物资名称" align="center" prop="materialName" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span
|
|
|
|
|
@click="handleUpdate(scope.row,true)"
|
|
|
|
|
style="color: blue; cursor: pointer"
|
|
|
|
|
>{{classToStr(scope.row.materialName,2)}}</span
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="物资名称" align="center" prop="materialName" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{classToStr(scope.row.materialName,2,scope.row.classFirst)}}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table-column>-->
|
|
|
|
|
<el-table-column label="规格/参数" align="center" prop="materialSpecs" />
|
|
|
|
|
<el-table-column label="数量" align="center" prop="materialQuantity" />
|
|
|
|
|
<el-table-column label="待处理出库" align="center" prop="sendQuantity" />
|
|
|
|
@ -179,6 +202,77 @@
|
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="性质" prop="materialType">
|
|
|
|
|
<el-select v-model="form.materialType" placeholder="请选择性质" clearable :disabled="isReadOnly">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in materialTypeOptions"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<!--<el-form-item label="类别" prop="classSecond">
|
|
|
|
|
<el-select v-model="form.classSecond" placeholder="请选择类别">
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in curDict"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
></el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>-->
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="物资名称" prop="materialNameId" style="width:500px">
|
|
|
|
|
<!--<el-input v-model="form.materialName" placeholder="请输入物资名称" />-->
|
|
|
|
|
<el-cascader style="width:500px" :disabled="isReadOnly"
|
|
|
|
|
v-model="form.materialNameId"
|
|
|
|
|
:options="options"
|
|
|
|
|
@change="handleChange"></el-cascader>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="规格/参数" prop="materialSpecs">
|
|
|
|
|
<el-input v-model="form.materialSpecs" placeholder="请输入规格/参数" :readonly="isReadOnly"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="数量" prop="materialQuantity">
|
|
|
|
|
<el-input v-model="form.materialQuantity" placeholder="请输入数量" :readonly="isReadOnly"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="储备地点" prop="reserveLocation">
|
|
|
|
|
<el-input v-model="form.reserveLocation" placeholder="请输入储备地点" :readonly="isReadOnly"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="管理责任人" prop="managerPerson">
|
|
|
|
|
<el-input v-model="form.managerPerson" placeholder="请输入管理责任人" :readonly="isReadOnly"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label="联系电话" prop="tel">
|
|
|
|
|
<el-input v-model="form.tel" placeholder="请输入联系电话" :readonly="isReadOnly"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-form-item label="备注" prop="remark">
|
|
|
|
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :readonly="isReadOnly"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm" v-if="!isReadOnly">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<el-dialog :title="titleDetail" :visible.sync="openDetail" width="800px" append-to-body>
|
|
|
|
|
<el-table v-loading="loading" :data="ehsMaterialDetailList" @selection-change="handleSelectionChange">
|
|
|
|
@ -259,6 +353,10 @@
|
|
|
|
|
open: false,
|
|
|
|
|
// 弹出层标题
|
|
|
|
|
titleDetail: "出入库明细",
|
|
|
|
|
isReadOnly:false,
|
|
|
|
|
rules: {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
openDetail: false,
|
|
|
|
|
ehsMaterialDetailList:[],
|
|
|
|
@ -275,6 +373,9 @@
|
|
|
|
|
allDeptList: [],
|
|
|
|
|
sendQuantity:"",//发送的指令
|
|
|
|
|
materialJson:new Array(8) ,
|
|
|
|
|
form: {
|
|
|
|
|
classFirst:this.$route.query.classFirst
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
materialTypeOptions: [{
|
|
|
|
|
value: 1,
|
|
|
|
@ -297,7 +398,8 @@
|
|
|
|
|
reserveLocation: null,
|
|
|
|
|
managerPerson: null,
|
|
|
|
|
tel: null,
|
|
|
|
|
classFirst:null
|
|
|
|
|
classFirst:null,
|
|
|
|
|
classNameKey:null
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
@ -414,8 +516,9 @@
|
|
|
|
|
this.title = "添加物资信息包含";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
handleUpdate(row,isReadOnly) {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.isReadOnly = isReadOnly;
|
|
|
|
|
const materialId = row.materialId || this.ids
|
|
|
|
|
getEhsMaterial(materialId).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
@ -425,6 +528,11 @@
|
|
|
|
|
console.log(this.form.materialNameId);
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改物资信息";
|
|
|
|
|
if (isReadOnly){
|
|
|
|
|
this.title = "显示物资信息";
|
|
|
|
|
}else {
|
|
|
|
|
this.title = "修改物资信息";
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
@ -552,34 +660,16 @@
|
|
|
|
|
this.queryParams.classSecond = value[0] ;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
classToStr(value,type,classFirst) {
|
|
|
|
|
let str ="";
|
|
|
|
|
let opt = this.materialJson[classFirst-1];
|
|
|
|
|
/* if (classFirst == 1){
|
|
|
|
|
opt = material1;
|
|
|
|
|
}else if (classFirst == 2){
|
|
|
|
|
opt = material2;
|
|
|
|
|
}else if (classFirst == 3){
|
|
|
|
|
opt = material3;
|
|
|
|
|
}else if (classFirst == 4){
|
|
|
|
|
opt = material4;
|
|
|
|
|
}else if (classFirst == 5){
|
|
|
|
|
opt = material5;
|
|
|
|
|
}else if (classFirst == 6){
|
|
|
|
|
opt = material6;
|
|
|
|
|
}else if (classFirst == 7){
|
|
|
|
|
opt = material7;
|
|
|
|
|
}else if (classFirst == 8){
|
|
|
|
|
opt = material8;
|
|
|
|
|
}*/
|
|
|
|
|
classToStr(value,type) {
|
|
|
|
|
let str =value;
|
|
|
|
|
if(type==1){
|
|
|
|
|
opt.forEach(item =>{
|
|
|
|
|
this.options.forEach(item =>{
|
|
|
|
|
if(item.value==value){
|
|
|
|
|
str = item.label;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
opt.forEach(item =>{
|
|
|
|
|
this.options.forEach(item =>{
|
|
|
|
|
let v = value.split("-");
|
|
|
|
|
if(item.value==v[0]){
|
|
|
|
|
item.children.forEach(it =>{
|
|
|
|
@ -590,7 +680,7 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
//console.log(str);
|
|
|
|
|
// console.log(str);
|
|
|
|
|
return str;
|
|
|
|
|
},
|
|
|
|
|
classFirstChange(value){
|
|
|
|
|