Commit 39f2a5db authored by 李苏's avatar 李苏 💬

公用组件物料弹框

parent afe4416e
Pipeline #235 canceled with stages
<template>
<RelDialog :dialogTitle="'物料'" :width="'70vw'" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-tabs slot="form" class="full" style="height: 70vh;" v-model="activeName" @tab-click="handleClick">
<el-tab-pane class="full" label="基础信息" name="first">
<el-form ref="form" :model="form" label-width="80px" :rules="rules">
<el-row :gutter="20">
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="仓库" ref="ckid" prop="ckid">
<!-- <el-input :readonly="readonly" v-model="form.name" ></el-input> -->
<RelSelect :readonly="readonly" filterable style="width: 100%;" src='jcsj/ck/init/getKwglCk' :match="{value:'id',label:'name'}" v-model='form.ckid' ></RelSelect>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="库位编码" ref="code" prop="code">
<el-input :readonly="readonly" v-model="form.code"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-rule="{
required:true,
rules:rules,
}" label="库位名称" ref="name" prop="name">
<el-input :readonly="readonly" v-model="form.name"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="备注" ref="bz" prop="bz">
<el-input :readonly="readonly" v-model="form.bz"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="物料属性" class="full" name="second">配置管理</el-tab-pane>
</el-tabs>
<!-- 填写表单内容,slot=form必写-->
</RelDialog>
</template>
<script>
import {editMixin} from 'common'
export default {
mixins: [editMixin],
/* 存放index页面传递的额外参数*/
mounted() {
},
/* 组件名称*/
/* 传递props模式一样必填,用于index,button,REdialog之间的组件通信*/
data() {
return {
activeName: 'first',
/* 当前表单初始值,默认由RelDialog查询indexQuery赋值,copy时不赋值id,初始化时所有query的值都会赋值给form*/
form: {
ckid:"",
code:'',
name:'',
bz:''
}
}
},
methods: {
handleClick(tab, event) {
console.log(tab, event);
}
}
}
</script>
<style scoped lang="scss">
</style>
<template>
<DefaultDialog :app='app' >
<div slot="form" style="height: 70vh;display: flex;">
<Edit :app='this' v-if="showDialog" />
<div class="min_full" style="width: 200px;border-right: 0px;height: 70vh;">
<TreeBase :dgtype='5' :app='this' @selected='selectedTree'></TreeBase>
</div>
......@@ -18,12 +20,12 @@
</div>
<!-- 按钮操作-->
<el-row class="tool-bar">
<!-- <selectMaterial @save="save" /> -->
<AddButton ref="add" :app='this'></AddButton>
</el-row>
<!-- 表格-->
<div class="tablePagers">
<TablePager showSelection saveSelected @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem' :editButton="false"
<TablePager showSelection saveSelected @getData='getData' :ref="'TablePager'" :app='this' :query='query' @selectItem='selectItem'
@getRow='getRow'>
</TablePager>
</div>
......@@ -39,6 +41,7 @@
</DefaultDialog>
</template>
<script>
import Edit from './edit.vue'
import {
queryKwwlForAdd,
apiTreeQuery
......@@ -63,7 +66,10 @@
},
data() {
return {
/*弹框数据*/
showDialog:false,
DialogTitle:'新增物料',
DialogWidth:'75vw',
queryParams:{
wlinfo:'',
kwid:''
......@@ -106,6 +112,10 @@
methods: {
query:queryKwwlForAdd,
apiTreeQuery: apiTreeQuery,
add(){
console.log(123)
this.showDialog=true
},
selectedTree(e) {
this.queryParams.flbm=e.id||'root'
......@@ -121,6 +131,9 @@
}
}
},
components:{
Edit
}
}
</script>
......
......@@ -125,8 +125,9 @@
addKwwl(params).then(res=>{
if(res.success){
this.$refs.selectMaterial.showDialog=false
this.$refs.TablePager.query()
this.$success("操作成功")
this.$refs.TablePager.pageQuery()
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment