Browse Source

完善存放地点

zhanglei
yunuo970428 3 years ago
parent
commit
a97e0621bc
  1. 622
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue
  2. 157
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseInfo.vue

622
anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue

@ -1,15 +1,14 @@
<template>
<div>
<div class="app-container">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled"
@click="dialogStatus === 'add' ? saveAdd() : saveEdit()">保存
<el-button type="primary" size="small" :disabled="submitdisabled" @click="dialogStatus === 'add' ? saveAdd() : saveEdit()">保存
</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!--end 添加修改按钮-->
<!--end 详情按钮-->
@ -18,26 +17,26 @@
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>存放地点</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top" label-width="300px" class="formadd">
<!-- <el-row>-->
<!-- <el-col :span="18" class="specialCol">-->
<!-- <span>使用组织</span>-->
<!-- <span>{{ formobj.useOrg }}</span>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="3" class="tleftb row_first">
<el-form-item><span slot="label"><span class="icon">*</span>使用组织</span></el-form-item>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<!-- <el-row>-->
<!-- <el-col :span="18" class="specialCol">-->
<!-- <span>使用组织</span>-->
<!-- <span>{{ formobj.useOrg }}</span>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>使用组织</span>
</el-col>
<el-col :span="9" class="trightb row_first">
<el-col :span="9">
<el-form-item prop="">
<el-input v-model="formobj.useOrg" placeholder="使用组织" class="addinputw" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb row_first">
<el-form-item><span slot="label"><span class="icon">*</span>名称</span></el-form-item>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>名称</span>
</el-col>
<el-col :span="9" class="trightb row_first">
<el-col :span="9">
<el-form-item prop="warehouseName">
<el-input v-model="formobj.warehouseName" placeholder="名称" class="addinputw" clearable/>
</el-form-item>
@ -45,35 +44,43 @@
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
<el-form-item><span slot="label"><span class="icon">*</span>负责人及电话</span></el-form-item>
<span><span class="icon">*</span>负责人及电话</span>
</el-col>
<el-col :span="9" class="trightb">
<el-col :span="9">
<el-form-item prop="warehouseContract">
<el-input v-model="formobj.warehouseContract" placeholder="负责人及电话" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<el-form-item><span slot="label"><span class="icon">*</span>分组</span></el-form-item>
<span><span class="icon">*</span>分组</span>
</el-col>
<el-col :span="9" class="trightb">
<el-col :span="9">
<el-form-item prop="warehouseGroupKey">
<el-select v-model="formobj.warehouseGroupKey" placeholder="请选择" @change="changeWarehouseGroup" clearable
class="addinputw">
<el-select v-model="formobj.warehouseGroupKey" placeholder="请选择" @change="changeWarehouseGroup" clearable class="addinputw">
<el-option v-for="item in warehouseGroup_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
<!-- <el-input v-model="formobj.warehouseGroup" placeholder="分组" class="addinputw" clearable/>-->
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
<el-form-item><span slot="label"><span class="icon">*</span>详细地址</span></el-form-item>
<span><span class="icon">*</span>详细地址</span>
</el-col>
<el-col :span="21" class="trightb">
<el-col :span="9">
<el-form-item prop="warehouseAttribute">
<el-input v-model="formobj.warehouseAttribute" placeholder="详细地址" class="addinputw" clearable/>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>库管人员</span>
</el-col>
<el-col :span="9">
<el-form-item prop="libTubeName">
<el-select v-model="formobj.libTubeName" placeholder="请选择" @change="changeLibTube" clearable class="addinputw">
<el-option v-for="item in libTube_list" :key="item.userSid" :label="item.userName" :value="item.userName"/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
@ -84,7 +91,7 @@
<script>
import req from '@/api/anruiscm/scmwarehouse'
import { getUseOrgByUserSid } from '@/api/cheliang/basevehicle'
import { typeValues } from '@/api/cheliang/dictcommons'
import { typeValues, getGressionUserList } from '@/api/cheliang/dictcommons'
export default {
name: 'ScmWarehouseAdd',
@ -97,7 +104,7 @@ export default {
dataArr: [],
refreshItem: 0, // key
options: [], //
props: { // props
props: {
value: 'sid',
label: 'name',
children: 'children',
@ -107,310 +114,291 @@ export default {
orgProps: {
value: 'sid',
label: 'name',
children: 'children',
checkStrictly: true
},
orgOptions: [],
orgArr: [],
warehouseGroup_list:[],
formobj: {
id: '',
sid: '',
useOrg: '', // 使
useOrgSid: '', // 使sid
// warehouseCode: '', //
warehouseName: '', //
warehouseAttribute: '', //
warehouseContract: '', //
warehouseContractSid: '', // sid
warehouseGroupValue:'',
warehouseGroupKey:''
},
rules: {
useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使
useOrgSid: [{ required: true, message: '使用组织sid不能为空', trigger: 'blur' }], // 使sid
// warehouseCode: [{ required: true, message: '', trigger: 'blur' }], //
warehouseName: [{ required: true, message: '名称不能为空', trigger: 'blur' }], //
warehouseAttribute: [{ required: true, message: '存放地点详细地址不能为空', trigger: 'blur' }], //
warehouseContract: [{ required: true, message: '存放地点负责人不能为空', trigger: 'blur' }], //
warehouseContractSid: [{ required: true, message: '存放地点负责人sid不能为空', trigger: 'blur' }], // sid
warehouseGroupKey: [{ required: true, message: '分组不能为空', trigger: 'blur' }] //
},
submitdisabled: false
}
},
created() {
this.getBuMen()
this.getOrg()
},
methods: {
//
getUseOrg() {
const userSid = window.sessionStorage.getItem('userSid')
getUseOrgByUserSid({ userSid: userSid }).then((res) => {
if (res.success) {
this.formobj.useOrg = res.data.name // 使
this.formobj.useOrgSid = res.data.sid // 使sid
}
})
children: 'children',
checkStrictly: true
},
// ()
getOrg() {
req.getOrg().then((res) => {
if (res.code === '200') {
this.useOrg_list = res.data
console.log('使用组织', this.useOrg_list)
}
})
orgOptions: [],
orgArr: [],
warehouseGroup_list: [],
libTube_list: [],
formobj: {
id: '',
sid: '',
useOrg: '', // 使
useOrgSid: '', // 使sid
// warehouseCode: '', //
warehouseName: '', //
warehouseAttribute: '', //
warehouseContract: '', //
warehouseContractSid: '', // sid
warehouseGroupValue: '',
warehouseGroupKey: '',
libTubeName: '',
libTubeSid: ''
},
useOrgChange(value) {
console.log('触发下拉框按钮', value)
let bb = {}
this.useOrg_list.forEach((e) => {
// eslint-disable-next-line eqeqeq
if (e.name == value) {
bb = {
name: e.name,
key: e.id,
sid: e.sid
}
}
})
this.formobj.useOrg = bb.name
this.formobj.useOrgSid = bb.sid
console.log('name', this.formobj.useOrg, this.formobj.useOrgSid)
rules: {
useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使
useOrgSid: [{ required: true, message: '使用组织sid不能为空', trigger: 'blur' }], // 使sid
// warehouseCode: [{ required: true, message: '', trigger: 'blur' }], //
warehouseName: [{ required: true, message: '名称不能为空', trigger: 'blur' }], //
warehouseAttribute: [{ required: true, message: '存放地点详细地址不能为空', trigger: 'blur' }], //
warehouseContract: [{ required: true, message: '存放地点负责人不能为空', trigger: 'blur' }], //
warehouseContractSid: [{ required: true, message: '存放地点负责人sid不能为空', trigger: 'blur' }], // sid
warehouseGroupKey: [{ required: true, message: '分组不能为空', trigger: 'change' }], //
libTubeName: [{ required: true, message: '库管人员不能为空', trigger: 'change' }]
},
submitdisabled: false
}
},
created() {
this.getBuMen()
this.getOrg()
},
methods: {
//
getUseOrg() {
const userSid = window.sessionStorage.getItem('userSid')
getUseOrgByUserSid({ userSid: userSid }).then((res) => {
if (res.success) {
this.formobj.useOrg = res.data.name // 使
this.formobj.useOrgSid = res.data.sid // 使sid
}
})
},
// ()
getOrg() {
req.getOrg().then((res) => {
if (res.code === '200') {
this.useOrg_list = res.data
console.log('使用组织', this.useOrg_list)
}
})
},
// org0(data) {
// data.forEach((e) => {
// if (e.children.length != 0) {
// this.org0(e.children)
// } else {
// delete e.children
// this.orgArr.push(e)
// return
// }
// })
// },
//-
getBuMen() {
req.salesDepName().then((res) => {
if (res.code === '200') {
this.options = res.data
console.log('请求到的级联列表', this.options)
this.BuMen0(this.options)
useOrgChange(value) {
console.log('触发下拉框按钮', value)
let bb = null
this.useOrg_list.forEach((e) => {
// eslint-disable-next-line eqeqeq
if (e.name === value) {
bb = {
name: e.name,
key: e.id,
sid: e.sid
}
})
},
BuMen0(data) {
data.forEach((e) => {
if (e.children){
if (e.children.length != 0) {
this.BuMen0(e.children)
} else {
delete e.children
this.dataArr.push(e)
return
}
}
})
this.formobj.useOrg = bb.name
this.formobj.useOrgSid = bb.sid
console.log('name', this.formobj.useOrg, this.formobj.useOrgSid)
},
// org0(data) {
// data.forEach((e) => {
// if (e.children.length != 0) {
// this.org0(e.children)
// } else {
// delete e.children
// this.orgArr.push(e)
// return
// }
// })
// },
// -
getBuMen() {
req.salesDepName().then((res) => {
if (res.code === '200') {
this.options = res.data
console.log('请求到的级联列表', this.options)
this.BuMen0(this.options)
}
})
},
BuMen0(data) {
data.forEach((e) => {
if (e.children) {
if (e.children.length != 0) {
this.BuMen0(e.children)
} else {
delete e.children
this.dataArr.push(e)
return
}
})
},
getType(){
typeValues({type:'locationGroup'}).then((res) => {
if (res.success){
this.warehouseGroup_list = res.data
}
})
},
getType() {
typeValues({ type: 'locationGroup' }).then((res) => {
if (res.success) {
this.warehouseGroup_list = res.data
}
})
getGressionUserList(window.sessionStorage.getItem('userSid')).then((resp) => {
if (resp.success) {
this.libTube_list = resp.data
}
})
},
changeWarehouseGroup(val) {
if (val) {
const choosetItem = this.warehouseGroup_list.filter((item) => item.dictKey === val)
this.formobj.warehouseGroupValue = choosetItem[0].dictValue
console.log('name:', this.formobj.warehouseGroupValue, 'key:', this.formobj.warehouseGroupKey)
}
},
changeLibTube(value) {
let bb = null
this.libTube_list.forEach((e) => {
if (e.userName === value) {
bb = {
name: e.userName,
sid: e.userSid
}
})
},
changeWarehouseGroup(val){
if (val) {
const choosetItem = this.warehouseGroup_list.filter((item) => item.dictKey == val)
this.formobj.warehouseGroupValue = choosetItem[0].dictValue
console.log('name:', this.formobj.warehouseGroupValue, 'key:', this.formobj.warehouseGroupKey)
}
},
})
this.formobj.libTubeSid = bb.sid
},
// //
// useOrgChange(e) {
// console.log('' + JSON.stringify(e))
// var result = ''
// var result_Sid = ''
// if (e.length > 0) {
// //
// e.forEach((item) => {
// var last_id = item[item.length - 1]
// //
// this.select_temp_Name = '' // ()
// this.select_temp_Sid = '' //(Sid)
// this.gainOrgId(last_id, this.orgOptions)
// result = result + this.select_temp_Name + ','
// result_Sid = result_Sid + this.select_temp_Sid + ','
// })
// }
// if (result !== '') {
// result = result.substring(0, result.length - 1)
// }
// if (result_Sid !== '') {
// result_Sid = result_Sid.substring(0, result_Sid.length - 1)
// }
// this.formobj.useOrg = result
// this.formobj.useOrgSid = result_Sid
// console.log('' + this.formobj.useOrg, this.formobj.useOrgSid)
// },
//
// // ---
// gainOrgId(id, orgOptions) {
// console.log('id', id)
// for (var i = 0; i < orgOptions.length; i++) {
// if (id == orgOptions[i].sid) {
// this.select_temp_Name = orgOptions[i].name //
// this.select_temp_Sid = orgOptions[i].sid
// return true
// } else {
// //
// if (orgOptions[i].children !== undefined) {
// //
// if (this.gainOrgId(id, orgOptions[i].children)) {
// return true
// }
// }
// }
// }
// },
// //
// useOrgChange(e) {
// console.log('' + JSON.stringify(e))
// var result = ''
// var result_Sid = ''
// if (e.length > 0) {
// //
// e.forEach((item) => {
// var last_id = item[item.length - 1]
// //
// this.select_temp_Name = '' // ()
// this.select_temp_Sid = '' //(Sid)
// this.gainOrgId(last_id, this.orgOptions)
// result = result + this.select_temp_Name + ','
// result_Sid = result_Sid + this.select_temp_Sid + ','
// })
// }
// if (result !== '') {
// result = result.substring(0, result.length - 1)
// }
// if (result_Sid !== '') {
// result_Sid = result_Sid.substring(0, result_Sid.length - 1)
// }
// this.formobj.useOrg = result
// this.formobj.useOrgSid = result_Sid
// console.log('' + this.formobj.useOrg, this.formobj.useOrgSid)
// },
//
// // ---
// gainOrgId(id, orgOptions) {
// console.log('id', id)
// for (var i = 0; i < orgOptions.length; i++) {
// if (id == orgOptions[i].sid) {
// this.select_temp_Name = orgOptions[i].name //
// this.select_temp_Sid = orgOptions[i].sid
// return true
// } else {
// //
// if (orgOptions[i].children !== undefined) {
// //
// if (this.gainOrgId(id, orgOptions[i].children)) {
// return true
// }
// }
// }
// }
// },
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj.id = ''
this.formobj.sid = '' // SID
this.useOrg = '' // 使
this.useOrgSid = '' // 使sid
// this.warehouseCode = '' //
this.warehouseName = '' //
this.warehouseAttribute = '' //
this.warehouseContract = '' //
this.warehouseContractSid = '' // sid
this.warehouseGroup = '' //
// this.useOrg_list = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'add'
this.viewTitle = '【新增】存放地点'
this.getUseOrg()
this.getType()
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【修改】存放地点'
const _this = this
req
.fetchBySid(row.sid)
.then(resp => {
const vdata = resp.data
_this.formobj.id = vdata.id
_this.formobj.sid = vdata.sid // SID
_this.formobj.useOrg = vdata.useOrg // 使
// _this.formobj.warehouseCode = vdata.warehouseCode //
_this.formobj.warehouseName = vdata.warehouseName //
_this.formobj.warehouseAttribute = vdata.warehouseAttribute //
_this.formobj.warehouseContract = vdata.warehouseContract //
_this.formobj.warehouseContractSid = vdata.warehouseContractSid // sid
_this.formobj.warehouseGroupKey = vdata.warehouseGroupKey //
_this.formobj.warehouseGroupValue = vdata.warehouseGroupValue //
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj.id = ''
this.formobj.sid = '' // SID
this.formobj.useOrg = '' // 使
this.useOrgSid = '' // 使sid
// this.warehouseCode = '' //
this.formobj.warehouseName = '' //
this.formobj.warehouseAttribute = '' //
this.formobj.warehouseContract = '' //
this.formobj.warehouseContractSid = '' // sid
this.formobj.warehouseGroup = '' //
this.formobj.libTubeSid = ''
this.formobj.libTubeName = ''
// this.useOrg_list = []
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
showAdd() {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'add'
this.viewTitle = '【新增】存放地点'
this.getUseOrg()
this.getType()
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.dialogStatus = 'edit'
this.viewTitle = '【修改】存放地点'
req.fetchBySid(row.sid).then(resp => {
const vdata = resp.data
this.formobj.id = vdata.id
this.formobj.sid = vdata.sid // SID
this.formobj.useOrg = vdata.useOrg // 使
// this.formobj.warehouseCode = vdata.warehouseCode //
this.formobj.warehouseName = vdata.warehouseName //
this.formobj.warehouseAttribute = vdata.warehouseAttribute //
this.formobj.warehouseContract = vdata.warehouseContract //
this.formobj.warehouseContractSid = vdata.warehouseContractSid // sid
this.formobj.warehouseGroupKey = vdata.warehouseGroupKey //
this.formobj.warehouseGroupValue = vdata.warehouseGroupValue //
this.formobj.libTubeName = vdata.libTubeName
this.formobj.libTubeSid = vdata.libTubeSid
}).catch(e => {
this.formobj = row
})
this.getUseOrg()
this.getType()
},
saveAdd() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.saveAdd(this.formobj).then(resp => {
this.submitdisabled = false
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}).catch(() => {
this.submitdisabled = false
})
.catch(e => {
this.formobj = row
} else {
return false
}
})
},
saveEdit() {
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req.saveEdit(this.formobj, this.formobj.sid).then(resp => {
this.submitdisabled = false
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}).catch(() => {
this.submitdisabled = false
})
this.getUseOrg()
this.getType()
},
saveAdd() {
const _this = this
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req
.saveAdd(this.formobj)
.then(resp => {
this.submitdisabled = false
_this.$message({ showClose: true, type: 'success', message: resp.msg })
_this.handleReturn('true')
})
.catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
saveEdit() {
const _this = this
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
req
.saveEdit(this.formobj, this.formobj.sid)
.then(resp => {
this.submitdisabled = false
_this.$message({ showClose: true, type: 'success', message: resp.msg })
_this.handleReturn('true')
})
.catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
}
} else {
return false
}
})
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__label {
padding: 0 !important;
}
.row_first {
border-top: 1px solid #e0e3eb !important;
}
/*.formadd /deep/ .el-row {*/
/* display: -webkit-box;*/
/* display: -ms-flexbox;*/
/* display: flex;*/
/* -ms-flex-wrap: wrap;*/
/* justify-content: center;*/
/* border-left: 0 !important;*/
/*}*/
/deep/ .tab-headerg {
height: 35px;
background-color: #EDF1F7;
padding: 20px 20px;
.icon {
color: #e84026;
margin-right: 4px;
}
.icon {
color: #e84026;
margin-right: 4px;
}
.specialCol {
min-height: 30px !important;
border: 0 !important;
font-size: 14px;
color: #606266;
font-weight: 600;
}
</style>

157
anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseInfo.vue

@ -1,70 +1,78 @@
<template>
<div>
<div class="app-container">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>存放地点详情</div>
<!--start 详情按钮-->
<div>
<el-button itype="info" size="small" @click="handleReturn()">返回</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
<!--end 详情按钮-->
</div>
<!--标题按钮部分结束-->
<div class="listconadd">
<div class="titwu"><span>存放地点</span></div>
<el-form ref="form_obj" :model="formobj" label-position="top" label-width="300px" class="formadd">
<!-- <el-row>-->
<!-- <el-col :span="18" class="specialCol">-->
<!-- <span>使用组织</span>-->
<!-- <span>{{ formobj.useOrg }}</span>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row>
<el-col :span="3" class="tleftb row_first">
<el-form-item><span slot="label">使用组织</span></el-form-item>
<el-form ref="form_obj" :model="formobj" class="formadd">
<!-- <el-row>-->
<!-- <el-col :span="18" class="specialCol">-->
<!-- <span>使用组织</span>-->
<!-- <span>{{ formobj.useOrg }}</span>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span>使用组织</span>
</el-col>
<el-col :span="9" class="trightb row_first">
<el-form-item prop="">
<el-col :span="9">
<el-form-item>
<span>{{ formobj.useOrg }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb row_first">
<el-form-item><span slot="label">名称</span></el-form-item>
<el-col :span="3" class="tleftb">
<span>名称</span>
</el-col>
<el-col :span="9" class="trightb row_first">
<el-form-item prop="warehouseName">
<el-col :span="9">
<el-form-item>
<span>{{ formobj.warehouseName }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
<el-form-item><span slot="label">负责人及电话</span></el-form-item>
<span>负责人及电话</span>
</el-col>
<el-col :span="9" class="trightb">
<el-form-item prop="warehouseContract">
<el-col :span="9">
<el-form-item>
<span>{{ formobj.warehouseContract }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<el-form-item><span slot="label">分组</span></el-form-item>
<span>分组</span>
</el-col>
<el-col :span="9" class="trightb">
<el-form-item prop="warehouseGroup">
<el-col :span="9">
<el-form-item>
<span>{{ formobj.warehouseGroupValue }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
<el-form-item><span slot="label">详细地址</span></el-form-item>
<span>详细地址</span>
</el-col>
<el-col :span="21" class="trightb">
<el-form-item prop="warehouseAttribute">
<el-col :span="9">
<el-form-item>
<span>{{ formobj.warehouseAttribute }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>库管人员</span>
</el-col>
<el-col :span="9">
<el-form-item>
<span>{{ formobj.libTubeName }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
@ -72,79 +80,40 @@
</template>
<script>
import req from '@/api/anruiscm/scmwarehouse'
import req from '@/api/anruiscm/scmwarehouse'
export default {
name: 'ScmWarehouseInfo',
data() {
return {
formobj: {}
}
export default {
name: 'ScmWarehouseInfo',
data() {
return {
formobj: {}
}
},
methods: {
handleReturn() {
this.formobj = {}
this.$emit('doback')
},
methods: {
handleReturn() {
this.formobj = {}
this.$emit('doback')
},
showInfo(row) {
showInfo(row) {
this.formobj = row
req.fetchBySid(row.sid).then(resp => {
const vdata = resp.data
this.formobj.id = vdata.id
this.formobj.sid = vdata.sid // SID
this.formobj.useOrg = vdata.useOrg // 使
this.formobj.warehouseName = vdata.warehouseName //
this.formobj.warehouseAttribute = vdata.warehouseAttribute //
this.formobj.warehouseContract = vdata.warehouseContract //
this.formobj.warehouseContractSid = vdata.warehouseContractSid // sid
this.formobj.warehouseGroupKey = vdata.warehouseGroupKey //
this.formobj.warehouseGroupValue = vdata.warehouseGroupValue //
}).catch(e => {
this.formobj = row
const _this = this
req
.fetchBySid(row.sid)
.then(resp => {
const vdata = resp.data
_this.formobj.id = vdata.id
_this.formobj.sid = vdata.sid // SID
_this.formobj.useOrg = vdata.useOrg // 使
_this.formobj.warehouseName = vdata.warehouseName //
_this.formobj.warehouseAttribute = vdata.warehouseAttribute //
_this.formobj.warehouseContract = vdata.warehouseContract //
_this.formobj.warehouseContractSid = vdata.warehouseContractSid // sid
_this.formobj.warehouseGroupKey = vdata.warehouseGroupKey //
_this.formobj.warehouseGroupValue = vdata.warehouseGroupValue //
})
.catch(e => {
this.formobj = row
})
}
})
}
}
}
</script>
<style scoped>
/deep/ .el-form-item__label {
padding: 0 !important;
}
.row_first {
border-top: 1px solid #e0e3eb !important;
}
/*.formadd /deep/ .el-row {*/
/* display: -webkit-box;*/
/* display: -ms-flexbox;*/
/* display: flex;*/
/* -ms-flex-wrap: wrap;*/
/* justify-content: center;*/
/* border-left: 0 !important;*/
/*}*/
/deep/ .tab-headerg {
height: 35px;
background-color: #EDF1F7;
padding: 20px 20px;
}
.icon {
color: #e84026;
margin-right: 4px;
}
.specialCol {
min-height: 30px !important;
border: 0 !important;
font-size: 14px;
color: #606266;
font-weight: 600;
}
</style>

Loading…
Cancel
Save