问题修改

master
lion 1 year ago
parent 91502ba9c3
commit 6bed2b8ad6

@ -2,15 +2,15 @@
ENV='development' ENV='development'
# base api # base api
#VUE_APP_BASE_API = http://192.168.60.99:9004/ VUE_APP_BASE_API = http://192.168.60.99:9004/
#VUE_APP_UPLOAD_API = http://192.168.60.99:9004/api/admin/upload-file VUE_APP_UPLOAD_API = http://192.168.60.99:9004/api/admin/upload-file
#VUE_APP_OA_URL = http://192.168.60.18:2021 VUE_APP_OA_URL = http://192.168.60.18:2021
#VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}' VUE_APP_OA_URL_TYPE = '{"领用":"37","处置":"38","应急":"39"}'
VUE_APP_BASE_API = http://192.168.60.99:8004/ #VUE_APP_BASE_API = http://192.168.60.99:8004/
VUE_APP_UPLOAD_API = http://192.168.60.99:8004/api/admin/upload-file #VUE_APP_UPLOAD_API = http://192.168.60.99:8004/api/admin/upload-file
VUE_APP_OA_URL= http://suzhouhedaooa.langye.net #VUE_APP_OA_URL= http://suzhouhedaooa.langye.net
VUE_APP_OA_URL_TYPE = '{"领用":"31","处置":"32","应急":"33"}' #VUE_APP_OA_URL_TYPE = '{"领用":"31","处置":"32","应急":"33"}'

@ -24,6 +24,7 @@
"element-ui": "2.15.13", "element-ui": "2.15.13",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"js-cookie": "2.2.0", "js-cookie": "2.2.0",
"less": "^3.13.1",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"moment": "^2.29.2", "moment": "^2.29.2",
"normalize.css": "7.0.0", "normalize.css": "7.0.0",

@ -2,8 +2,18 @@
<div> <div>
<div class="map" id="map" :style="{'height':mapHeight+'px'}"> <div class="map" id="map" :style="{'height':mapHeight+'px'}">
<div class="tabs"> <div class="tabs">
<div :class="!addCur?'tabcur':''" @click="changeMask(1)"></div> <div :class="!addCur?'tabcur':''" @click="changeMask(1)"></div>
<div :class="addCur?'tabcur':''" @click="changeMask(2)"></div>
<div :class="addCur?'tabcur':''">
<el-dropdown @command="clickQuyu" :show-timeout="100" >
<span class="el-dropdown-link" @click="changeMask(2)">
防汛仓库<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item in areaList" :command="item.id">{{item.value}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div> </div>
</div> </div>
<div ref='infoWindow' id="infoWindow"> <div ref='infoWindow' id="infoWindow">
@ -62,7 +72,10 @@
import { import {
index, index,
destroy destroy
} from "@/api/system/baseForm.js" } from "@/api/system/baseForm.js"
import {
getparameteritem
} from "@/api/system/dictionary.js"
export default { export default {
data() { data() {
return { return {
@ -74,10 +87,12 @@
makerObj: { makerObj: {
teams: [], teams: [],
storages: [] storages: []
}, },
areaList:[],
infoWindow: null, infoWindow: null,
openData: [], openData: [],
materList: [], materList: [],
quyu_id:'',
loading: true, loading: true,
total: 0, total: 0,
addCur: false, addCur: false,
@ -205,13 +220,19 @@
] ]
} }
}, },
created() { created() {
this.getArea()
this.initHeight() this.initHeight()
this.$nextTick(function() { this.$nextTick(function() {
this.mapInit() this.mapInit()
}) })
}, },
methods: { methods: {
getArea(){
getparameteritem("area").then(res=>{
this.areaList = res.detail
})
},
initHeight() { initHeight() {
let winHeight = document.body.clientHeight let winHeight = document.body.clientHeight
this.mapHeight = winHeight - 50 - 20 this.mapHeight = winHeight - 50 - 20
@ -239,7 +260,7 @@
offset: new AMap.Pixel(-10, -10) offset: new AMap.Pixel(-10, -10)
}) })
this.getTeams() this.getTeams()
this.getStorages() // this.getStorages()
// this.setMapMarker() // this.setMapMarker()
}, },
changeMask(type) { changeMask(type) {
@ -247,8 +268,10 @@
this.addCur = false this.addCur = false
this.setMapMarker("teams", this.makerObj.teams) this.setMapMarker("teams", this.makerObj.teams)
} else if (type == 2) { } else if (type == 2) {
this.addCur = true this.addCur = true
this.setMapMarker("storages", this.makerObj.storages) this.quyu_id = ''
this.getStorages()
// this.setMapMarker("storages", this.makerObj.storages)
} }
}, },
async getTeams() { async getTeams() {
@ -268,14 +291,32 @@
...item ...item
}) })
}) })
this.setMapMarker("teams", this.makerObj.teams) this.setMapMarker("teams", this.makerObj.teams)
this.loadingFull.close();
}) })
},
clickQuyu(e){
console.log("e",e)
this.quyu_id = e
this.getStorages()
}, },
async getStorages() { async getStorages() {
this.loadingFull = this.$loading({
lock: true,
text: '',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
this.makerObj.storages = []
await index({ await index({
page: 1, page: 1,
page_size: 9999, page_size: 9999,
table_name: 'flood_storages' table_name: 'flood_storages',
filter: [{
key:'quyu_id',
op:'eq',
value:this.quyu_id
}],
}).then(res => { }).then(res => {
let markers = [] let markers = []
if (res.data.length < 1) { if (res.data.length < 1) {
@ -288,6 +329,7 @@
...item ...item
}) })
}) })
this.setMapMarker("storages", this.makerObj.storages)
this.loadingFull.close(); this.loadingFull.close();
}) })
}, },
@ -363,7 +405,7 @@
} }
</script> </script>
<style> <style lang="scss" scoped>
.tabs { .tabs {
position: absolute; position: absolute;
z-index: 99; z-index: 99;
@ -379,7 +421,11 @@
background-color: #fff; background-color: #fff;
color: #333; color: #333;
} }
::v-deep .el-dropdown{
font-size: 16px;
color: #333;
}
.tabs>div:first-child { .tabs>div:first-child {
border-radius: 20px 0 0 20px; border-radius: 20px 0 0 20px;
@ -393,6 +439,10 @@
.tabs>div.tabcur { .tabs>div.tabcur {
background: #0077CC; background: #0077CC;
color: #fff color: #fff
}
::v-deep .tabs>div.tabcur .el-dropdown{
color: #fff;
} }
#infoWindow { #infoWindow {
@ -439,7 +489,7 @@
width: 50% width: 50%
} }
/deep/ #infoWindow .el-icon-close { ::v-deep #infoWindow .el-icon-close {
position: absolute; position: absolute;
top: 5px; top: 5px;
right: 5px; right: 5px;

@ -68,7 +68,8 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>入库数量 <span style="color: red;font-weight: 600;padding-right: 4px;"></span>入库数量
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-input v-model="form.rukushuliang" placeholder="请填写入库数量" clearable style="width: 300px;"></el-input> {{form.rukushuliang}}
<!-- <el-input v-model="form.rukushuliang" placeholder="请填写入库数量" clearable style="width: 300px;"></el-input> -->
</div> </div>
</div> </div>
</template> </template>
@ -78,7 +79,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>在库数量 <span style="color: red;font-weight: 600;padding-right: 4px;"></span>在库数量
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-input v-model="form.zaikushuliang" placeholder="请填写在库数量" clearable style="width: 300px;"></el-input> <el-input v-model="form.zaikushuliang" placeholder="请填写在库数量" clearable style="width: 300px;"></el-input>
</div> </div>
</div> </div>
</template> </template>
@ -88,7 +89,8 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>入库批次 <span style="color: red;font-weight: 600;padding-right: 4px;"></span>入库批次
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-input v-model="form.rukupici" placeholder="请填写入库批次" clearable style="width: 300px;"></el-input> {{form.rukupici}}
<!-- <el-input v-model="form.rukupici" placeholder="请填写入库批次" clearable style="width: 300px;"></el-input> -->
</div> </div>
</div> </div>
</template> </template>

@ -28,8 +28,8 @@
<Button type="primary" style="margin-left: 10px;" @click="getindex"></Button> <Button type="primary" style="margin-left: 10px;" @click="getindex"></Button>
<Button type="primary" style="margin-left: 10px;" @click="toprint"></Button> <Button type="primary" style="margin-left: 10px;" @click="toprint"></Button>
<Button type="primary" style="margin-left: 10px;" <!-- <Button type="primary" style="margin-left: 10px;"
@click="exportExcel(new Date().getTime().toString())">导出</Button> @click="exportExcel(new Date().getTime().toString())">导出</Button> -->
</div> </div>
@ -39,16 +39,17 @@
<xy-table :list="list" v-loading="loading" :total="total" @selection-change="selectionChange" <xy-table :list="list" v-loading="loading" :total="total" @selection-change="selectionChange"
@pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :table-item="table" :auths='[]'> @pageSizeChange="e => select.pageSize = e" @pageIndexChange="pageChange" :table-item="table" :auths='[]'>
<template v-slot:btns > <template v-slot:btns>
<!-- <div></div> --> <!-- <div></div> -->
<el-table-column v-if="isCkName=='仓库管理员'||roleName=='系统管理员'" fixed="right" label="操作" width="180" header-align="center"> <el-table-column v-if="isPandian==='pandian' && (isCkName=='仓库管理员'||roleName=='系统管理员')" fixed="right" align="center" label="操作" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<Button type="primary" size="small" @click="editorIn(scope.row.id,'editor')"></Button> <Button type="primary" size="small" @click="editorIn(scope.row.id,'editor')"></Button>
<!-- <Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteIn(scope.row)"> <!-- <Poptip transfer confirm title="确认要删除吗?" @on-ok="deleteIn(scope.row)">
<Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button> <Button type="primary" style="margin-left: 10px;" size="small" ghost>删除</Button>
</Poptip> --> </Poptip> -->
</template> </template>
</el-table-column> </el-table-column>
<div v-else></div>
</template> </template>
</xy-table> </xy-table>
@ -100,7 +101,8 @@
userName:'', userName:'',
authName:'', authName:'',
roleName:'', roleName:'',
isCkName:'', isCkName:'',
isPandian:'',
select: { select: {
pageSize: 10, pageSize: 10,
pageIndex: 1, pageIndex: 1,
@ -272,9 +274,16 @@
} }
}, },
mounted() { mounted() {
if (this.$route.path) {
let path = this.$route.path.split("_")
if(path[1]){
this.isPandian = 'pandian'
}
}
this.getField() this.getField()
this.getindex() this.getindex()
this.getUserName() this.getUserName()
}, },
methods: { methods: {
async getUserName(){ async getUserName(){

@ -13,7 +13,7 @@
<span class="selector-item__label">资产名称</span> <span class="selector-item__label">资产名称</span>
<Input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="资产名称搜索" /> <Input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="资产名称搜索" />
</div> </div>
<!-- <DatePicker @on-change="changeDate" type="daterange" split-panels placeholder="请选择日期" style="width: 200px"></DatePicker> -->
<Button type="primary" style="margin-left: 10px;" @click="getindex"></Button> <Button type="primary" style="margin-left: 10px;" @click="getindex"></Button>
<Button type="primary" style="margin-left: 10px;" <Button type="primary" style="margin-left: 10px;"
@click="exportExcel(new Date().getTime().toString())">导出</Button> @click="exportExcel(new Date().getTime().toString())">导出</Button>
@ -88,7 +88,8 @@
}, },
form: [], form: [],
total: 0, total: 0,
list: [], list: [],
dateRanges:'',
table: [{ table: [{
label: '序号', label: '序号',
type: 'index', type: 'index',
@ -199,7 +200,18 @@
this.getindex() this.getindex()
}, },
methods: { methods: {
changeDate(e){
console.log(e)
if(e.length>0){
if(e[0]){
this.dateRanges = e.join(",")
}else{
this.dateRanges = ''
}
}else{
this.dateRanges = ''
}
},
async exportExcel(sheetName) { async exportExcel(sheetName) {
this.loading = true this.loading = true
const res = await index(Object.assign('', { const res = await index(Object.assign('', {

@ -13,7 +13,7 @@
<span class="selector-item__label">资产名称</span> <span class="selector-item__label">资产名称</span>
<Input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="资产名称搜索" /> <Input v-model="select.keyword" style="width: 120px;margin-right: 10px;" placeholder="资产名称搜索" />
</div> </div>
<!-- <DatePicker @on-change="changeDate" type="daterange" split-panels placeholder="请选择日期" style="width: 200px"></DatePicker> -->
<Button type="primary" style="margin-left: 10px;" @click="getindex"></Button> <Button type="primary" style="margin-left: 10px;" @click="getindex"></Button>
<Button type="primary" style="margin-left: 10px;" <Button type="primary" style="margin-left: 10px;"
@click="exportExcel(new Date().getTime().toString())">导出</Button> @click="exportExcel(new Date().getTime().toString())">导出</Button>
@ -88,7 +88,8 @@
}, },
form: [], form: [],
total: 0, total: 0,
list: [], list: [],
dateRanges:'',
table: [{ table: [{
label: '序号', label: '序号',
type: 'index', type: 'index',
@ -242,7 +243,18 @@
this.getindex() this.getindex()
}, },
methods: { methods: {
changeDate(e){
console.log(e)
if(e.length>0){
if(e[0]){
this.dateRanges = e.join(",")
}else{
this.dateRanges = ''
}
}else{
this.dateRanges = ''
}
},
async exportExcel(sheetName) { async exportExcel(sheetName) {
this.loading = true this.loading = true
const res = await index(Object.assign('', { const res = await index(Object.assign('', {

@ -5,7 +5,10 @@
<lx-header icon="md-apps" text="物资档案管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="md-apps" text="物资档案管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot> <slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;"> <div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="关键词搜索" /> <Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="关键词搜索" />
<Select v-model="select.suozaicangku" style="width: 200px;margin-right: 10px;" placeholder="所在仓库" clearable>
<Option v-for="item in cangkuList" :key="item.id" :value="item.cangkumingcheng">{{ item.cangkumingcheng }}</Option>
</Select>
<Button type="primary" @click="getindex"></Button> <Button type="primary" @click="getindex"></Button>
<Button icon="ios-add" type="primary" style="margin-left: 10px;" <Button icon="ios-add" type="primary" style="margin-left: 10px;"
@click="$refs['addMater'].isShow = true,$refs['addMater'].type = 'add'">添加</Button> @click="$refs['addMater'].isShow = true,$refs['addMater'].type = 'add'">添加</Button>
@ -111,8 +114,10 @@
select: { select: {
pageSize: 10, pageSize: 10,
pageIndex: 1, pageIndex: 1,
keyword: "" keyword: "",
}, suozaicangku:''
},
cangkuList:[],
customForm: { customForm: {
customFormId: 1, customFormId: 1,
tableName: "material_infos" tableName: "material_infos"
@ -219,8 +224,21 @@
} }
] ]
} }
},
mounted() {
this.getCangku()
this.getField()
this.getindex()
}, },
methods: { methods: {
async getCangku() {
let res = await index({
page_size: 999,
page: 1,
table_name: 'materialstorages',
})
this.cangkuList = res.data
},
async getindex() { async getindex() {
this.loading = true this.loading = true
const res = await index({ const res = await index({
@ -231,7 +249,14 @@
"key": "zichanmingcheng", "key": "zichanmingcheng",
"op": "like", "op": "like",
"value": this.select.keyword "value": this.select.keyword
}], },
{
"key": "suozaicangku",
"op": "eq",
"value": this.select.suozaicangku
},
],
}) })
this.list = res.data this.list = res.data
this.total = res.total this.total = res.total
@ -368,11 +393,6 @@
}) })
}, },
}, },
mounted() {
this.getField()
this.getindex()
}
} }
</script> </script>

@ -29,7 +29,7 @@
<span style="color: red;font-weight: 600;padding-right: 4px;"></span>所在区域 <span style="color: red;font-weight: 600;padding-right: 4px;"></span>所在区域
</div> </div>
<div class="xy-table-item-content"> <div class="xy-table-item-content">
<el-select v-model="form.suozaiquyu" style="width:300px" placeholder="请选择"> <el-select v-model="form.suozaiquyu" @change="changeQuyu" style="width:300px" placeholder="请选择">
<el-option <el-option
v-for="item in areaList" v-for="item in areaList"
:key="item.id" :key="item.id"
@ -164,7 +164,8 @@
cangkudizhi: '', cangkudizhi: '',
jingdu: '', jingdu: '',
weidu: '', weidu: '',
cangkujianjie: '' cangkujianjie: '',
quyu_id:''
}, },
rules: { rules: {
cangkumingcheng: [{ cangkumingcheng: [{
@ -184,6 +185,19 @@
this.areaList = res.detail this.areaList = res.detail
}) })
}, },
changeQuyu(e){
if(e){
this.areaList.map(item=>{
if(e===item.value){
this.form.suozaiquyu = item.value
this.form.quyu_id = item.id
}
})
}else{
this.form.suozaiquyu = ''
this.form.quyu_id = ''
}
},
setTableName(e){ setTableName(e){
this.tableName = e?e:'materialstorages' this.tableName = e?e:'materialstorages'
}, },

@ -11,8 +11,11 @@
:value="item.cangkumingcheng"> :value="item.cangkumingcheng">
</el-option> </el-option>
</el-select> --> </el-select> -->
<Select v-model="select.guanliancangku" style="width:200px;margin-right: 10px;"> <Select v-model="select.guanliancangku" style="width:200px;margin-right: 10px;" placeholder="所在仓库" clearable>
<Option v-for="item in cangkuList" :value="item.id" :key="item.value">{{ item.cangkumingcheng }}</Option> <Option v-for="item in cangkuList" :value="item.id" :key="item.value">{{ item.cangkumingchengquyu }}</Option>
</Select>
<Select @on-change="clearArea" v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable>
<Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select> </Select>
<Button type="primary" @click="getindex"></Button> <Button type="primary" @click="getindex"></Button>
<Button type="primary" style="margin-left: 10px;" <Button type="primary" style="margin-left: 10px;"
@ -60,7 +63,10 @@
import { import {
Message Message
} from 'element-ui' } from 'element-ui'
import imports from "@/views/component/imports.vue" import imports from "@/views/component/imports.vue"
import {
getparameteritem
} from "@/api/system/dictionary.js"
export default { export default {
components: { components: {
addMater, addMater,
@ -73,8 +79,10 @@
pageSize: 10, pageSize: 10,
pageIndex: 1, pageIndex: 1,
keyword: "", keyword: "",
guanliancangku:'' guanliancangku:'',
}, area:''
},
areaList:[],
customForm: { customForm: {
tableName: "flood_materials" tableName: "flood_materials"
}, },
@ -100,6 +108,12 @@
width: 220, width: 220,
prop: 'cangkumingcheng', prop: 'cangkumingcheng',
align: 'left', align: 'left',
},
{
label: "所在区域",
width: 120,
prop: 'suozaiquyu',
align: 'center',
}, },
{ {
label: "物资代码", label: "物资代码",
@ -206,7 +220,8 @@
] ]
} }
}, },
mounted() { mounted() {
this.getArea()
this.getCangku() this.getCangku()
this.getindex() this.getindex()
this.table.map(item => { this.table.map(item => {
@ -217,7 +232,19 @@
}) })
console.log("importForm", this.importForm) console.log("importForm", this.importForm)
}, },
methods: { methods: {
getArea(){
getparameteritem("area").then(res=>{
this.areaList = res.detail
})
},
clearArea(e){
if(e){
this.select.area = e
}else{
this.select.area = ''
}
},
async getCangku() { async getCangku() {
let res = await index({ let res = await index({
page_size: 999, page_size: 999,
@ -240,6 +267,10 @@
"key": "guanliancangku", "key": "guanliancangku",
"op": "eq", "op": "eq",
"value": this.select.guanliancangku "value": this.select.guanliancangku
},{
key:'quyu_id',
op:'eq',
value:this.select.area
}], }],
}) })
this.list = res.data this.list = res.data

@ -4,7 +4,10 @@
<lx-header icon="md-apps" text="防汛仓库" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="md-apps" text="防汛仓库" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot> <slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;"> <div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="名称搜索" /> <Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="名称搜索" />
<Select @on-change="clearArea" v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable>
<Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
<Button type="primary" @click="getList"></Button> <Button type="primary" @click="getList"></Button>
<Button type="primary" style="margin-left: 10px;" @click="$refs['addStorage'].type='add', <Button type="primary" style="margin-left: 10px;" @click="$refs['addStorage'].type='add',
$refs['addStorage'].setTableName('flood_storages') $refs['addStorage'].setTableName('flood_storages')
@ -19,7 +22,7 @@
<xy-table :list="list" :total="total" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" <xy-table :list="list" :total="total" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange"
:table-item="table"> :table-item="table">
<template v-slot:btns> <template v-slot:btns>
<el-table-column fixed="right" label="操作" width="260" header-align="center"> <el-table-column fixed="right" label="操作" align="center" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<Button type="primary" size="small" @click="$refs['addStorage'].type='editor', <Button type="primary" size="small" @click="$refs['addStorage'].type='editor',
@ -45,7 +48,10 @@
index, index,
destroy destroy
} from "@/api/system/baseForm.js" } from "@/api/system/baseForm.js"
import addStorage from './components/addStorage.vue' import addStorage from './components/addStorage.vue'
import {
getparameteritem
} from "@/api/system/dictionary.js"
export default { export default {
components: { components: {
addStorage, addStorage,
@ -57,8 +63,10 @@
page: 1, page: 1,
page_size: 10, page_size: 10,
keyword: '', keyword: '',
table_name: 'flood_storages' table_name: 'flood_storages',
}, area:''
},
areaList:[],
total: 0, total: 0,
list: [], list: [],
table: [{ table: [{
@ -69,7 +77,6 @@
}, { }, {
label: '仓库名称', label: '仓库名称',
prop: 'cangkumingcheng', prop: 'cangkumingcheng',
width: 240,
align: 'left', align: 'left',
fixed: 'left' fixed: 'left'
}, },
@ -89,8 +96,9 @@
width: 120, width: 120,
}, { }, {
label: '仓库地址', label: '仓库地址',
prop: 'cangkudizhi', prop: 'cangkudizhi',
width: 120, width: 360,
align:'left'
}, { }, {
label: '仓库面积', label: '仓库面积',
prop: 'cangkumianji', prop: 'cangkumianji',
@ -113,10 +121,23 @@
}], }],
} }
}, },
created() { created() {
this.getArea()
this.getList() this.getList()
}, },
methods: { methods: {
getArea(){
getparameteritem("area").then(res=>{
this.areaList = res.detail
})
},
clearArea(e){
if(e){
this.select.area = e
}else{
this.select.area = ''
}
},
async getList() { async getList() {
const res = await index({ const res = await index({
...this.select, ...this.select,
@ -124,6 +145,10 @@
key:'cangkumingcheng', key:'cangkumingcheng',
op:'like', op:'like',
value:this.select.keyword value:this.select.keyword
},{
key:'quyu_id',
op:'eq',
value:this.select.area
}], }],
}) })
this.list = res.data this.list = res.data

@ -4,7 +4,10 @@
<lx-header icon="md-apps" text="仓库管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px"> <lx-header icon="md-apps" text="仓库管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<slot> <slot>
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;"> <div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
<Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="名称搜索" /> <Input v-model="select.keyword" style="width: 200px;margin-right: 10px;" placeholder="名称搜索" />
<Select @on-change="clearArea" v-model="select.area" style="width: 200px;margin-right: 10px;" placeholder="所在区域" clearable>
<Option v-for="item in areaList" :key="item.id" :value="item.id">{{ item.value }}</Option>
</Select>
<Button type="primary" @click="getList"></Button> <Button type="primary" @click="getList"></Button>
<Button type="primary" style="margin-left: 10px;" @click="$refs['addStorage'].type='add', <Button type="primary" style="margin-left: 10px;" @click="$refs['addStorage'].type='add',
$refs['addStorage'].isShow=true">添加</Button> $refs['addStorage'].isShow=true">添加</Button>
@ -18,7 +21,7 @@
<xy-table :list="list" :total="total" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange" <xy-table :list="list" :total="total" @pageSizeChange="pageSizeChange" @pageIndexChange="pageChange"
:table-item="table"> :table-item="table">
<template v-slot:btns> <template v-slot:btns>
<el-table-column fixed="right" label="操作" width="260" header-align="center"> <el-table-column fixed="right" label="操作" align="center" width="120" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<Button type="primary" size="small" @click="$refs['addStorage'].type='editor', <Button type="primary" size="small" @click="$refs['addStorage'].type='editor',
@ -43,7 +46,10 @@
index, index,
destroy destroy
} from "@/api/system/baseForm.js" } from "@/api/system/baseForm.js"
import addStorage from './components/addStorage.vue' import addStorage from './components/addStorage.vue'
import {
getparameteritem
} from "@/api/system/dictionary.js"
export default { export default {
components: { components: {
addStorage, addStorage,
@ -55,8 +61,10 @@
page: 1, page: 1,
page_size: 10, page_size: 10,
keyword: '', keyword: '',
table_name: 'materialstorages' table_name: 'materialstorages',
}, area:''
},
areaList:[],
total: 0, total: 0,
list: [], list: [],
table: [{ table: [{
@ -67,15 +75,17 @@
}, { }, {
label: '仓库名称', label: '仓库名称',
prop: 'cangkumingcheng', prop: 'cangkumingcheng',
width: 240,
align: 'left', align: 'left',
fixed: 'left' fixed: 'left'
}, { },
label: '仓库编码', // {
prop: 'cangkubianma', // label: '',
align: 'left', // prop: 'cangkubianma',
width: 240 // align: 'left',
}, { // width: 240
// },
{
label: '所在区域', label: '所在区域',
prop: 'suozaiquyu', prop: 'suozaiquyu',
width: 120, width: 120,
@ -86,7 +96,8 @@
}, { }, {
label: '仓库地址', label: '仓库地址',
prop: 'cangkudizhi', prop: 'cangkudizhi',
width: 120, width: 360,
align:'left'
}, { }, {
label: '仓库面积', label: '仓库面积',
prop: 'cangkumianji', prop: 'cangkumianji',
@ -109,10 +120,23 @@
}], }],
} }
}, },
created() { created() {
this.getArea()
this.getList() this.getList()
}, },
methods: { methods: {
getArea(){
getparameteritem("area").then(res=>{
this.areaList = res.detail
})
},
clearArea(e){
if(e){
this.select.area = e
}else{
this.select.area = ''
}
},
async getList() { async getList() {
const res = await index({ const res = await index({
...this.select, ...this.select,
@ -120,6 +144,10 @@
key:'cangkumingcheng', key:'cangkumingcheng',
op:'like', op:'like',
value:this.select.keyword value:this.select.keyword
},{
key:'quyu_id',
op:'like',
value:this.select.area
}], }],
}) })
this.list = res.data this.list = res.data

Loading…
Cancel
Save