6b3cb24b by 吴蕾

材料信息

1 parent bda87305
......@@ -42,3 +42,30 @@ export function Init (data) {
data
})
}
// 材料目录明细初始化
export function clmlInit (data) {
return request({
url: '/zhcx/clml/Init',
method: 'post',
data
})
}
// 材料目录明细移动
export function move (data) {
return request({
url: '/zhcx/clml/move',
method: 'post',
data
})
}
// 材料目录明细保存
export function save (data) {
return request({
url: '/zhcx/clml/save',
method: 'post',
data
})
}
......
......@@ -77,16 +77,23 @@
</div>
</div>
</div>
<clxxAddDialog v-model="isDialog"/>
<clxxAddDialog v-model="isDialog" />
</div>
</template>
<script>
import clxxAddDialog from "./clxxAddDialog.vue"
import clxxAddDialog from "./clxxAddDialog.vue";
import { upward, down } from "@/utils/operation";
import { clmlInit, move, save } from "@/api/fqsq.js";
export default {
components: {clxxAddDialog},
components: { clxxAddDialog },
props: {
id: "",
unitData: Array,
},
data() {
return {
isDialog:false,
isDialog: false,
menuList: [
{
id: "1",
......@@ -184,7 +191,9 @@ export default {
},
},
],
tableData: [
key: 0,
tableData: [],
tableData1: [
{
sfbx: "必选",
clmc: "不动产登记申请书",
......@@ -284,13 +293,58 @@ export default {
iclass: "itemIcon el-icon-caret-bottom",
};
},
watch: {
unitData: {
handler(newName, oldName) {
if (newName && newName.length > 0) {
this.clmlmxInit();
}
},
immediate: true,
},
},
methods: {
// 左侧菜单点击
menuClick(item) {
this.checkedId = item.id;
},
// 添加材料目录
handleAdd() {},
handleAdd() {
this.isDialog = true;
},
// 上移
moveUpward(index, row) {
upward(index, this.tableData);
},
// 下移
moveDown(index, row) {
down(index, this.tableData);
},
// 材料目录明细初始化
clmlmxInit() {
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0].bsmSldy);
formdata.append("bsmSlsq", this.id);
clmlInit(formdata).then((res) => {
if (res.result.result) {
this.tableData = res.result.result;
}
});
},
// 新增弹窗保存
addSave(data){
let obj = [...this.tableData];
obj.push({
bsmSlsq:this.id,
xh: this.tableData.length + 1,
isrequired:'0',
sjmc:data.clmc,
sjlx:data.cllx
})
save(obj).then(res => {
console.log('22222',res);
})
},
// 材料目录关闭收起
iconClick() {
this.menuOpen = !this.menuOpen;
......
<template>
<dialogBox title="新建材料信息" width="60%">
<dialogBox
title="新建材料信息"
width="40%"
v-model="myValue"
:isButton="false"
>
<el-form :model="ruleForm" ref="ruleForm" label-width="120px">
<el-row>
<el-col :span="24">
<el-form-item label="材料类型">
<el-input v-model="ruleForm.cllx"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="材料名称">
<el-input v-model="ruleForm.clmc"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="submit-button" style="padding-bottom: 20px">
<el-button type="primary" @click="onSave">保存</el-button>
<el-button @click="closeDialog">取消</el-button>
</div>
</dialogBox>
</template>
<script>
export default {
props: {
value: { type: Boolean, default: false },
},
data () {
return {}
data() {
return {
myValue: this.value,
ruleForm: {
cllx: "",
clmc: "",
},
};
},
methods: {}
}
watch: {
value(val) {
this.myValue = val;
},
},
methods: {
closeDialog() {
this.$emit("input", false);
},
onSave() {
this.$parent.addSave(this.ruleForm);
this.$emit("input", false);
},
},
};
</script>
<style scoped lang="scss">
.submit-button {
text-align: center;
height: 52px;
padding-top: 10px;
background-color: #fff;
}
</style>
......
......@@ -43,7 +43,7 @@
<div class="splitScreen-con" v-if='index == 0'>
<component ref='slxx' :is="editItem" :flag="flag" :key="key" />
</div>
<component :is="editItem" v-else :key="key" />
<component :is="editItem" v-else :key="key" :unitData="unitData" :id="id" />
</el-tab-pane>
</el-tabs>
</div>
......