材料信息
Showing
4 changed files
with
145 additions
and
15 deletions
| ... | @@ -42,3 +42,30 @@ export function Init (data) { | ... | @@ -42,3 +42,30 @@ export function Init (data) { |
| 42 | data | 42 | data |
| 43 | }) | 43 | }) |
| 44 | } | 44 | } |
| 45 | |||
| 46 | // 材料目录明细初始化 | ||
| 47 | export function clmlInit (data) { | ||
| 48 | return request({ | ||
| 49 | url: '/zhcx/clml/Init', | ||
| 50 | method: 'post', | ||
| 51 | data | ||
| 52 | }) | ||
| 53 | } | ||
| 54 | |||
| 55 | // 材料目录明细移动 | ||
| 56 | export function move (data) { | ||
| 57 | return request({ | ||
| 58 | url: '/zhcx/clml/move', | ||
| 59 | method: 'post', | ||
| 60 | data | ||
| 61 | }) | ||
| 62 | } | ||
| 63 | |||
| 64 | // 材料目录明细保存 | ||
| 65 | export function save (data) { | ||
| 66 | return request({ | ||
| 67 | url: '/zhcx/clml/save', | ||
| 68 | method: 'post', | ||
| 69 | data | ||
| 70 | }) | ||
| 71 | } | ... | ... |
| ... | @@ -77,16 +77,23 @@ | ... | @@ -77,16 +77,23 @@ |
| 77 | </div> | 77 | </div> |
| 78 | </div> | 78 | </div> |
| 79 | </div> | 79 | </div> |
| 80 | <clxxAddDialog v-model="isDialog"/> | 80 | <clxxAddDialog v-model="isDialog" /> |
| 81 | </div> | 81 | </div> |
| 82 | </template> | 82 | </template> |
| 83 | <script> | 83 | <script> |
| 84 | import clxxAddDialog from "./clxxAddDialog.vue" | 84 | import clxxAddDialog from "./clxxAddDialog.vue"; |
| 85 | import { upward, down } from "@/utils/operation"; | ||
| 86 | import { clmlInit, move, save } from "@/api/fqsq.js"; | ||
| 87 | |||
| 85 | export default { | 88 | export default { |
| 86 | components: {clxxAddDialog}, | 89 | components: { clxxAddDialog }, |
| 90 | props: { | ||
| 91 | id: "", | ||
| 92 | unitData: Array, | ||
| 93 | }, | ||
| 87 | data() { | 94 | data() { |
| 88 | return { | 95 | return { |
| 89 | isDialog:false, | 96 | isDialog: false, |
| 90 | menuList: [ | 97 | menuList: [ |
| 91 | { | 98 | { |
| 92 | id: "1", | 99 | id: "1", |
| ... | @@ -184,7 +191,9 @@ export default { | ... | @@ -184,7 +191,9 @@ export default { |
| 184 | }, | 191 | }, |
| 185 | }, | 192 | }, |
| 186 | ], | 193 | ], |
| 187 | tableData: [ | 194 | key: 0, |
| 195 | tableData: [], | ||
| 196 | tableData1: [ | ||
| 188 | { | 197 | { |
| 189 | sfbx: "必选", | 198 | sfbx: "必选", |
| 190 | clmc: "不动产登记申请书", | 199 | clmc: "不动产登记申请书", |
| ... | @@ -284,13 +293,58 @@ export default { | ... | @@ -284,13 +293,58 @@ export default { |
| 284 | iclass: "itemIcon el-icon-caret-bottom", | 293 | iclass: "itemIcon el-icon-caret-bottom", |
| 285 | }; | 294 | }; |
| 286 | }, | 295 | }, |
| 296 | watch: { | ||
| 297 | unitData: { | ||
| 298 | handler(newName, oldName) { | ||
| 299 | if (newName && newName.length > 0) { | ||
| 300 | this.clmlmxInit(); | ||
| 301 | } | ||
| 302 | }, | ||
| 303 | immediate: true, | ||
| 304 | }, | ||
| 305 | }, | ||
| 287 | methods: { | 306 | methods: { |
| 288 | // 左侧菜单点击 | 307 | // 左侧菜单点击 |
| 289 | menuClick(item) { | 308 | menuClick(item) { |
| 290 | this.checkedId = item.id; | 309 | this.checkedId = item.id; |
| 291 | }, | 310 | }, |
| 292 | // 添加材料目录 | 311 | // 添加材料目录 |
| 293 | handleAdd() {}, | 312 | handleAdd() { |
| 313 | this.isDialog = true; | ||
| 314 | }, | ||
| 315 | // 上移 | ||
| 316 | moveUpward(index, row) { | ||
| 317 | upward(index, this.tableData); | ||
| 318 | }, | ||
| 319 | // 下移 | ||
| 320 | moveDown(index, row) { | ||
| 321 | down(index, this.tableData); | ||
| 322 | }, | ||
| 323 | // 材料目录明细初始化 | ||
| 324 | clmlmxInit() { | ||
| 325 | var formdata = new FormData(); | ||
| 326 | formdata.append("bsmSldy", this.unitData[0].bsmSldy); | ||
| 327 | formdata.append("bsmSlsq", this.id); | ||
| 328 | clmlInit(formdata).then((res) => { | ||
| 329 | if (res.result.result) { | ||
| 330 | this.tableData = res.result.result; | ||
| 331 | } | ||
| 332 | }); | ||
| 333 | }, | ||
| 334 | // 新增弹窗保存 | ||
| 335 | addSave(data){ | ||
| 336 | let obj = [...this.tableData]; | ||
| 337 | obj.push({ | ||
| 338 | bsmSlsq:this.id, | ||
| 339 | xh: this.tableData.length + 1, | ||
| 340 | isrequired:'0', | ||
| 341 | sjmc:data.clmc, | ||
| 342 | sjlx:data.cllx | ||
| 343 | }) | ||
| 344 | save(obj).then(res => { | ||
| 345 | console.log('22222',res); | ||
| 346 | }) | ||
| 347 | }, | ||
| 294 | // 材料目录关闭收起 | 348 | // 材料目录关闭收起 |
| 295 | iconClick() { | 349 | iconClick() { |
| 296 | this.menuOpen = !this.menuOpen; | 350 | this.menuOpen = !this.menuOpen; | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <dialogBox title="新建材料信息" width="60%"> | 2 | <dialogBox |
| 3 | 3 | title="新建材料信息" | |
| 4 | width="40%" | ||
| 5 | v-model="myValue" | ||
| 6 | :isButton="false" | ||
| 7 | > | ||
| 8 | <el-form :model="ruleForm" ref="ruleForm" label-width="120px"> | ||
| 9 | <el-row> | ||
| 10 | <el-col :span="24"> | ||
| 11 | <el-form-item label="材料类型"> | ||
| 12 | <el-input v-model="ruleForm.cllx"></el-input> | ||
| 13 | </el-form-item> | ||
| 14 | </el-col> | ||
| 15 | </el-row> | ||
| 16 | <el-row :gutter="20"> | ||
| 17 | <el-col :span="24"> | ||
| 18 | <el-form-item label="材料名称"> | ||
| 19 | <el-input v-model="ruleForm.clmc"></el-input> | ||
| 20 | </el-form-item> | ||
| 21 | </el-col> | ||
| 22 | </el-row> | ||
| 23 | </el-form> | ||
| 24 | <div class="submit-button" style="padding-bottom: 20px"> | ||
| 25 | <el-button type="primary" @click="onSave">保存</el-button> | ||
| 26 | <el-button @click="closeDialog">取消</el-button> | ||
| 27 | </div> | ||
| 4 | </dialogBox> | 28 | </dialogBox> |
| 5 | </template> | 29 | </template> |
| 6 | 30 | ||
| 7 | <script> | 31 | <script> |
| 32 | |||
| 8 | export default { | 33 | export default { |
| 9 | props: { | 34 | props: { |
| 10 | 35 | value: { type: Boolean, default: false }, | |
| 11 | }, | 36 | }, |
| 12 | 37 | data() { | |
| 13 | data () { | 38 | return { |
| 14 | return {} | 39 | myValue: this.value, |
| 40 | ruleForm: { | ||
| 41 | cllx: "", | ||
| 42 | clmc: "", | ||
| 15 | }, | 43 | }, |
| 16 | methods: {} | 44 | }; |
| 17 | } | 45 | }, |
| 46 | watch: { | ||
| 47 | value(val) { | ||
| 48 | this.myValue = val; | ||
| 49 | }, | ||
| 50 | }, | ||
| 51 | methods: { | ||
| 52 | closeDialog() { | ||
| 53 | this.$emit("input", false); | ||
| 54 | }, | ||
| 55 | onSave() { | ||
| 56 | this.$parent.addSave(this.ruleForm); | ||
| 57 | this.$emit("input", false); | ||
| 58 | }, | ||
| 59 | }, | ||
| 60 | }; | ||
| 18 | </script> | 61 | </script> |
| 19 | <style scoped lang="scss"> | 62 | <style scoped lang="scss"> |
| 63 | .submit-button { | ||
| 64 | text-align: center; | ||
| 65 | height: 52px; | ||
| 66 | padding-top: 10px; | ||
| 67 | background-color: #fff; | ||
| 68 | } | ||
| 20 | </style> | 69 | </style> | ... | ... |
| ... | @@ -43,7 +43,7 @@ | ... | @@ -43,7 +43,7 @@ |
| 43 | <div class="splitScreen-con" v-if='index == 0'> | 43 | <div class="splitScreen-con" v-if='index == 0'> |
| 44 | <component ref='slxx' :is="editItem" :flag="flag" :key="key" /> | 44 | <component ref='slxx' :is="editItem" :flag="flag" :key="key" /> |
| 45 | </div> | 45 | </div> |
| 46 | <component :is="editItem" v-else :key="key" /> | 46 | <component :is="editItem" v-else :key="key" :unitData="unitData" :id="id" /> |
| 47 | </el-tab-pane> | 47 | </el-tab-pane> |
| 48 | </el-tabs> | 48 | </el-tabs> |
| 49 | </div> | 49 | </div> | ... | ... |
-
Please register or sign in to post a comment