style:待办箱
Showing
3 changed files
with
65 additions
and
26 deletions
| ... | @@ -100,6 +100,15 @@ class data extends filter { | ... | @@ -100,6 +100,15 @@ class data extends filter { |
| 100 | sortable: 'custom', | 100 | sortable: 'custom', |
| 101 | prop: 'fromstepdate', | 101 | prop: 'fromstepdate', |
| 102 | width: '160' | 102 | width: '160' |
| 103 | }, | ||
| 104 | { | ||
| 105 | label: '操作', | ||
| 106 | width: '80', | ||
| 107 | align: 'center', | ||
| 108 | fixed: 'right', | ||
| 109 | render: (h, scope) => { | ||
| 110 | return <el-button type="text" icon="el-icon-delete" onClick={() => { vm.del(scope.row) }}>删除</el-button> | ||
| 111 | } | ||
| 103 | } | 112 | } |
| 104 | ] | 113 | ] |
| 105 | } | 114 | } | ... | ... |
| ... | @@ -40,6 +40,7 @@ import { mapGetters } from "vuex"; | ... | @@ -40,6 +40,7 @@ import { mapGetters } from "vuex"; |
| 40 | import clxxAddDialog from "./clxxAddDialog.vue"; | 40 | import clxxAddDialog from "./clxxAddDialog.vue"; |
| 41 | import imagePreview from '@/views/components/imagePreview.vue' | 41 | import imagePreview from '@/views/components/imagePreview.vue' |
| 42 | import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js"; | 42 | import { clmlInit, move, save, clmlDelete } from "@/api/fqsq.js"; |
| 43 | import { async } from "q"; | ||
| 43 | export default { | 44 | export default { |
| 44 | components: { clxxAddDialog, imagePreview }, | 45 | components: { clxxAddDialog, imagePreview }, |
| 45 | data () { | 46 | data () { |
| ... | @@ -209,19 +210,22 @@ export default { | ... | @@ -209,19 +210,22 @@ export default { |
| 209 | methods: { | 210 | methods: { |
| 210 | // 材料目录明细初始化 | 211 | // 材料目录明细初始化 |
| 211 | clmlInitList () { | 212 | clmlInitList () { |
| 212 | this.unitData = this.$parent.unitData; | 213 | return new Promise(resolve => { |
| 213 | var formdata = new FormData(); | 214 | this.unitData = this.$parent.unitData; |
| 214 | formdata.append("bsmSldy", this.unitData[0].bsmSldy); | 215 | var formdata = new FormData(); |
| 215 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); | 216 | formdata.append("bsmSldy", this.unitData[0].bsmSldy); |
| 216 | clmlInit(formdata).then((res) => { | 217 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); |
| 217 | if (res.result.result) { | 218 | clmlInit(formdata).then((res) => { |
| 218 | this.tableData = res.result.result; | 219 | resolve(res.code) |
| 219 | this.treeCheckId = this.tableData[0].bsmSj; | 220 | if (res.result.result) { |
| 220 | this.title = this.tableData[0].sjmc; | 221 | this.tableData = res.result.result; |
| 221 | this.titleYs = 1; | 222 | this.treeCheckId = this.tableData[0].bsmSj; |
| 222 | this.titleNum = this.tableData[0].children.length; | 223 | this.title = this.tableData[0].sjmc; |
| 223 | } | 224 | this.titleYs = 1; |
| 224 | console.log(this.tableData); | 225 | this.titleNum = this.tableData[0].children.length; |
| 226 | } | ||
| 227 | console.log(this.tableData); | ||
| 228 | }) | ||
| 225 | }) | 229 | }) |
| 226 | }, | 230 | }, |
| 227 | // 左侧菜单点击 | 231 | // 左侧菜单点击 |
| ... | @@ -237,23 +241,39 @@ export default { | ... | @@ -237,23 +241,39 @@ export default { |
| 237 | let obj = { | 241 | let obj = { |
| 238 | xh: row.xh, | 242 | xh: row.xh, |
| 239 | bsmSlsq: row.bsmSlsq, | 243 | bsmSlsq: row.bsmSlsq, |
| 240 | moveDirection: "up", | 244 | moveDirection: "UP", |
| 241 | }; | 245 | }; |
| 242 | // 接口待调 | 246 | // 接口待调 |
| 243 | move(obj).then((res) => { | 247 | move(obj).then(async (res) => { |
| 244 | this.clmlInitList() | 248 | if (res.code == 200) { |
| 245 | }); | 249 | let res = await this.clmlInitList() |
| 250 | if (res == 200) this.$message({ | ||
| 251 | message: '上移成功', | ||
| 252 | type: 'success' | ||
| 253 | }) | ||
| 254 | } else { | ||
| 255 | this.$message.error(res.message); | ||
| 256 | } | ||
| 257 | }) | ||
| 246 | }, | 258 | }, |
| 247 | // 下移 | 259 | // 下移 |
| 248 | moveDown (index, row) { | 260 | moveDown (index, row) { |
| 249 | let obj = { | 261 | let obj = { |
| 250 | xh: row.xh, | 262 | xh: row.xh, |
| 251 | bsmSlsq: row.bsmSlsq, | 263 | bsmSlsq: row.bsmSlsq, |
| 252 | moveDirection: "down", | 264 | moveDirection: "DOWN", |
| 253 | } | 265 | } |
| 254 | // 接口待调 | 266 | // 接口待调 |
| 255 | move(obj).then((res) => { | 267 | move(obj).then(async (res) => { |
| 256 | this.clmlInitList() | 268 | if (res.code == 200) { |
| 269 | let res = await this.clmlInitList() | ||
| 270 | if (res == 200) this.$message({ | ||
| 271 | message: '下移成功', | ||
| 272 | type: 'success' | ||
| 273 | }) | ||
| 274 | } else { | ||
| 275 | this.$message.error(res.message); | ||
| 276 | } | ||
| 257 | }) | 277 | }) |
| 258 | }, | 278 | }, |
| 259 | // 新增弹窗保存 | 279 | // 新增弹窗保存 |
| ... | @@ -267,12 +287,16 @@ export default { | ... | @@ -267,12 +287,16 @@ export default { |
| 267 | let obj = { | 287 | let obj = { |
| 268 | bsmSlsq: this.id, | 288 | bsmSlsq: this.id, |
| 269 | xh: maxXh + 1, | 289 | xh: maxXh + 1, |
| 270 | isrequired: "0", | 290 | isrequired: "1", |
| 271 | sjmc: data.clmc, | 291 | sjmc: data.clmc, |
| 292 | sjsl: 0, | ||
| 293 | smzt: '', | ||
| 294 | ys: 0, | ||
| 272 | sjlx: data.cllx, | 295 | sjlx: data.cllx, |
| 273 | sfxjcl: "1", // 是否是新建材料 | 296 | sfxjcl: "1", // 是否必选 |
| 274 | }; | 297 | }; |
| 275 | save(obj).then((res) => { | 298 | save(obj).then((res) => { |
| 299 | console.log(res); | ||
| 276 | if (res.code == 200) { | 300 | if (res.code == 200) { |
| 277 | this.$message({ | 301 | this.$message({ |
| 278 | message: "新增成功", | 302 | message: "新增成功", | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <dialogBox title="新建材料信息" width="40%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit" | 2 | <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit" |
| 3 | :isFullscreen="false"> | 3 | :isFullscreen="false"> |
| 4 | <el-form :model="ruleForm" ref="ruleForm" label-width="120px"> | 4 | <el-form :model="ruleForm" ref="ruleForm" label-width="70px"> |
| 5 | <el-row> | 5 | <el-row> |
| 6 | <el-col :span="24"> | 6 | <el-col :span="24"> |
| 7 | <el-form-item label="材料类型"> | 7 | <el-form-item label="材料类型"> |
| 8 | <el-input v-model="ruleForm.cllx"></el-input> | 8 | <el-select v-model="ruleForm.cllx" class="width100" placeholder="请选择"> |
| 9 | <el-option v-for="item in dictData['A40']" :key="item.dcode" :label="item.dname" :value="item.dcode"> | ||
| 10 | </el-option> | ||
| 11 | </el-select> | ||
| 9 | </el-form-item> | 12 | </el-form-item> |
| 10 | </el-col> | 13 | </el-col> |
| 11 | </el-row> | 14 | </el-row> |
| ... | @@ -21,7 +24,7 @@ | ... | @@ -21,7 +24,7 @@ |
| 21 | </template> | 24 | </template> |
| 22 | 25 | ||
| 23 | <script> | 26 | <script> |
| 24 | 27 | import { mapGetters } from "vuex"; | |
| 25 | export default { | 28 | export default { |
| 26 | props: { | 29 | props: { |
| 27 | value: { type: Boolean, default: false }, | 30 | value: { type: Boolean, default: false }, |
| ... | @@ -35,6 +38,9 @@ export default { | ... | @@ -35,6 +38,9 @@ export default { |
| 35 | }, | 38 | }, |
| 36 | }; | 39 | }; |
| 37 | }, | 40 | }, |
| 41 | computed: { | ||
| 42 | ...mapGetters(["dictData"]), | ||
| 43 | }, | ||
| 38 | watch: { | 44 | watch: { |
| 39 | value (val) { | 45 | value (val) { |
| 40 | this.myValue = val; | 46 | this.myValue = val; | ... | ... |
-
Please register or sign in to post a comment