|
|
|
|
@ -1,14 +1,14 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<xy-dialog
|
|
|
|
|
ref="dialog"
|
|
|
|
|
:width="70"
|
|
|
|
|
:is-show.sync="isShow"
|
|
|
|
|
type="form"
|
|
|
|
|
:title="type==='add'?'新增':'编辑'"
|
|
|
|
|
<xy-dialog
|
|
|
|
|
ref="dialog"
|
|
|
|
|
:width="70"
|
|
|
|
|
:is-show.sync="isShow"
|
|
|
|
|
type="form"
|
|
|
|
|
:title="type==='add'?'新增':'编辑'"
|
|
|
|
|
:form="form"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
@submit="submit"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
@submit="submit"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
<!-- <template v-slot:storehouses_id>
|
|
|
|
|
@ -44,28 +44,40 @@
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:shifouzili>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />是否纳入物资管理:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.shifouzili" style="width:300px" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in [{id:'是',value:'是'},{id:'否',value:'否'}]" :key="item.id" :label="item.value" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:sort>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />排序:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.sort" style="width:300px" type="number" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:shifouzili>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />是否纳入物资管理:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.shifouzili" style="width:300px" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in [{id:'是',value:'是'},{id:'否',value:'否'}]" :key="item.id" :label="item.value" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:shifouxunihuojia>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />是否显示虚拟货架:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-select v-model="form.shifouxunihuojia" style="width:300px" placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in [{id:'是',value:'是'},{id:'否',value:'否'}]" :key="item.id" :label="item.value" :value="item.value" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:sort>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />排序:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.sort" style="width:300px" type="number" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-slot:suozaiquyu>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
@ -85,13 +97,13 @@
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />建设时间:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.jiansheniandai"
|
|
|
|
|
style="width:300px"
|
|
|
|
|
value-format="yyyy"
|
|
|
|
|
<el-date-picker
|
|
|
|
|
v-model="form.jiansheniandai"
|
|
|
|
|
style="width:300px"
|
|
|
|
|
value-format="yyyy"
|
|
|
|
|
format="yyyy"
|
|
|
|
|
type="year"
|
|
|
|
|
placeholder="选择年"
|
|
|
|
|
type="year"
|
|
|
|
|
placeholder="选择年"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -133,11 +145,11 @@
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />仓库地址:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<avue-input-map
|
|
|
|
|
v-model="mapform"
|
|
|
|
|
:params="mapparams"
|
|
|
|
|
<avue-input-map
|
|
|
|
|
v-model="mapform"
|
|
|
|
|
:params="mapparams"
|
|
|
|
|
style="width:300px"
|
|
|
|
|
placeholder="请选择地图"
|
|
|
|
|
placeholder="请选择地图"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -178,80 +190,80 @@
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />仓库概览图:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:action="action"
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
<el-upload
|
|
|
|
|
class="upload-demo"
|
|
|
|
|
:action="action"
|
|
|
|
|
:on-success="handleSuccess"
|
|
|
|
|
:on-remove="handleRemove"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="1"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
multiple
|
|
|
|
|
:limit="1"
|
|
|
|
|
:file-list="fileList"
|
|
|
|
|
>
|
|
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
|
|
<!-- <div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div> -->
|
|
|
|
|
</el-upload>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:zhizefengong>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />职责分工:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.zhizefengong" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:zhibananpai>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />值班安排:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.zhibananpai" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:huojiaxitong>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />货架系统:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.huojiaxitong" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:zhuangxieshebei>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />装卸设备:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.zhuangxieshebei" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:wenkongshebei>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />温控设备:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.wenkongshebei" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:jiankongxitong>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />监控系统:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.jiankongxitong" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:zhizefengong>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />职责分工:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.zhizefengong" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:zhibananpai>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />值班安排:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.zhibananpai" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:huojiaxitong>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />货架系统:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.huojiaxitong" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:zhuangxieshebei>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />装卸设备:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.zhuangxieshebei" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:wenkongshebei>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />温控设备:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.wenkongshebei" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<template v-if="form.shifouzili==='是'" v-slot:jiankongxitong>
|
|
|
|
|
<div class="xy-table-item">
|
|
|
|
|
<div class="xy-table-item-label">
|
|
|
|
|
<span style="color: red;font-weight: 600;padding-right: 4px;" />监控系统:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-input v-model="form.jiankongxitong" style="width: 300px;" type="textarea" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</xy-dialog>
|
|
|
|
|
|
|
|
|
|
@ -275,8 +287,8 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
isShow: false,
|
|
|
|
|
type: 'add',
|
|
|
|
|
id: '',
|
|
|
|
|
action: `${process.env.VUE_APP_UPLOAD_API}`,
|
|
|
|
|
id: '',
|
|
|
|
|
action: `${process.env.VUE_APP_UPLOAD_API}`,
|
|
|
|
|
fileList: [],
|
|
|
|
|
tableName: 'materialstorages',
|
|
|
|
|
// flood_storages
|
|
|
|
|
@ -289,8 +301,9 @@ export default {
|
|
|
|
|
form: {
|
|
|
|
|
storehouses_id: '',
|
|
|
|
|
cangkumingcheng: '',
|
|
|
|
|
cangkubianma: '',
|
|
|
|
|
shifouzili: '否',
|
|
|
|
|
cangkubianma: '',
|
|
|
|
|
shifouzili: '否',
|
|
|
|
|
shifouxunihuojia: '否', // 是否显示虚拟货架
|
|
|
|
|
sort: 0,
|
|
|
|
|
suozaiquyu: '',
|
|
|
|
|
jiansheniandai: '',
|
|
|
|
|
@ -301,12 +314,12 @@ export default {
|
|
|
|
|
jingdu: '',
|
|
|
|
|
weidu: '',
|
|
|
|
|
cangkujianjie: '',
|
|
|
|
|
image_id: '',
|
|
|
|
|
zhizefengong: '',
|
|
|
|
|
zhibananpai: '',
|
|
|
|
|
huojiaxitong: '',
|
|
|
|
|
zhuangxieshebei: '',
|
|
|
|
|
wenkongshebei: '',
|
|
|
|
|
image_id: '',
|
|
|
|
|
zhizefengong: '',
|
|
|
|
|
zhibananpai: '',
|
|
|
|
|
huojiaxitong: '',
|
|
|
|
|
zhuangxieshebei: '',
|
|
|
|
|
wenkongshebei: '',
|
|
|
|
|
jiankongxitong: '',
|
|
|
|
|
quyu_id: ''
|
|
|
|
|
},
|
|
|
|
|
@ -332,7 +345,7 @@ export default {
|
|
|
|
|
} else {
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.type = ''
|
|
|
|
|
this.mapform = []
|
|
|
|
|
this.mapform = []
|
|
|
|
|
this.fileList = []
|
|
|
|
|
this.$refs['dialog'].reset()
|
|
|
|
|
}
|
|
|
|
|
@ -374,33 +387,33 @@ export default {
|
|
|
|
|
id: this.id,
|
|
|
|
|
table_name: this.tableName
|
|
|
|
|
})
|
|
|
|
|
this.$integrateData(this.form, res)
|
|
|
|
|
this.$integrateData(this.form, res)
|
|
|
|
|
this.form.sort = res.sort ? res.sort : 0
|
|
|
|
|
this.mapform = [res.jingdu, res.weidu, res.cangkudizhi]
|
|
|
|
|
if (res.image_id_uploads_id_relation) {
|
|
|
|
|
this.fileList.push(res.image_id_uploads_id_relation)
|
|
|
|
|
this.mapform = [res.jingdu, res.weidu, res.cangkudizhi]
|
|
|
|
|
if (res.image_id_uploads_id_relation) {
|
|
|
|
|
this.fileList.push(res.image_id_uploads_id_relation)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
|
this.fileList = fileList
|
|
|
|
|
},
|
|
|
|
|
handleSuccess(response, file, fileList) {
|
|
|
|
|
this.fileList = fileList
|
|
|
|
|
handleRemove(file, fileList) {
|
|
|
|
|
this.fileList = fileList
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
console.log(this.fileList)
|
|
|
|
|
this.form.image_id = ''
|
|
|
|
|
if (this.fileList.length > 0) {
|
|
|
|
|
for (var g of this.fileList) {
|
|
|
|
|
if (g.response) {
|
|
|
|
|
this.form.image_id = g.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.image_id = g.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.image_id = ''
|
|
|
|
|
}
|
|
|
|
|
handleSuccess(response, file, fileList) {
|
|
|
|
|
this.fileList = fileList
|
|
|
|
|
},
|
|
|
|
|
submit() {
|
|
|
|
|
console.log(this.fileList)
|
|
|
|
|
this.form.image_id = ''
|
|
|
|
|
if (this.fileList.length > 0) {
|
|
|
|
|
for (var g of this.fileList) {
|
|
|
|
|
if (g.response) {
|
|
|
|
|
this.form.image_id = g.response.id
|
|
|
|
|
} else {
|
|
|
|
|
this.form.image_id = g.id
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.form.image_id = ''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.type === 'add') {
|
|
|
|
|
save({
|
|
|
|
|
@ -412,7 +425,7 @@ export default {
|
|
|
|
|
message: '新增成功'
|
|
|
|
|
})
|
|
|
|
|
this.$emit('refresh')
|
|
|
|
|
this.isShow = false
|
|
|
|
|
this.isShow = false
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
@ -441,4 +454,4 @@ export default {
|
|
|
|
|
::v-deep .xy-table-item-label {
|
|
|
|
|
min-width: 160px !important
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|
|
|
|
|
|