style:材料申请
Showing
10 changed files
with
244 additions
and
25 deletions
1 | /* | 1 | /* |
2 | * @Description: 材料信息 | 2 | * @Description: 材料信息 |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-13 15:56:03 | 4 | * @LastEditTime: 2023-09-18 16:03:16 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
... | @@ -157,3 +157,17 @@ export function getClmxList (bsmSj) { | ... | @@ -157,3 +157,17 @@ export function getClmxList (bsmSj) { |
157 | } | 157 | } |
158 | }) | 158 | }) |
159 | } | 159 | } |
160 | /** | ||
161 | * @description: 补录材料目录 | ||
162 | * @param {*} data | ||
163 | * @author: renchao | ||
164 | */ | ||
165 | export function repairInitClml (data) { | ||
166 | return request({ | ||
167 | url: SERVER.SERVERAPI + '/rest/ywbl/clxx/repairInitClml', | ||
168 | method: 'post', | ||
169 | params: { | ||
170 | repair: data.bsmRepair | ||
171 | } | ||
172 | }) | ||
173 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -28,7 +28,7 @@ export function getXtParamsByYwh (ywh) { | ... | @@ -28,7 +28,7 @@ export function getXtParamsByYwh (ywh) { |
28 | */ | 28 | */ |
29 | export function getBlParamsByYwh (ywh, bsmQlxx) { | 29 | export function getBlParamsByYwh (ywh, bsmQlxx) { |
30 | return request({ | 30 | return request({ |
31 | url: SERVER.SERVERAPI + '/rest/ywbl/djyw/getBlParamsByYwh', | 31 | url: SERVER.SERVERAPI + '/rest/ywbl/djyw/getBlParamsByYwh', |
32 | method: 'get', | 32 | method: 'get', |
33 | params: { | 33 | params: { |
34 | ywh: ywh, | 34 | ywh: ywh, | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-07 15:04:46 | 4 | * @LastEditTime: 2023-09-18 16:49:25 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit" | 7 | <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit" |
... | @@ -24,6 +24,13 @@ | ... | @@ -24,6 +24,13 @@ |
24 | </el-form-item> | 24 | </el-form-item> |
25 | </el-col> | 25 | </el-col> |
26 | </el-row> | 26 | </el-row> |
27 | <el-row :gutter="20"> | ||
28 | <el-col :span="24"> | ||
29 | <el-form-item label="材料编码" prop="clbm"> | ||
30 | <el-input v-model="ruleForm.clbm"></el-input> | ||
31 | </el-form-item> | ||
32 | </el-col> | ||
33 | </el-row> | ||
27 | </el-form> | 34 | </el-form> |
28 | </dialogBox> | 35 | </dialogBox> |
29 | </template> | 36 | </template> |
... | @@ -40,6 +47,7 @@ | ... | @@ -40,6 +47,7 @@ |
40 | ruleForm: { | 47 | ruleForm: { |
41 | cllx: "", | 48 | cllx: "", |
42 | clmc: "", | 49 | clmc: "", |
50 | clbm: "" | ||
43 | }, | 51 | }, |
44 | rules: { | 52 | rules: { |
45 | cllx: [ | 53 | cllx: [ |
... | @@ -47,14 +55,17 @@ | ... | @@ -47,14 +55,17 @@ |
47 | ], | 55 | ], |
48 | clmc: [ | 56 | clmc: [ |
49 | { required: true, message: '请输入材料名称', trigger: 'blur' } | 57 | { required: true, message: '请输入材料名称', trigger: 'blur' } |
58 | ], | ||
59 | clbm: [ | ||
60 | { required: true, message: '请输入材料编码', trigger: 'blur' } | ||
50 | ] | 61 | ] |
51 | } | 62 | } |
52 | } | 63 | } |
53 | }, | 64 | }, |
54 | watch: { | 65 | watch: { |
55 | value (val) { | 66 | value (val) { |
56 | this.myValue = val; | 67 | this.myValue = val |
57 | }, | 68 | } |
58 | }, | 69 | }, |
59 | methods: { | 70 | methods: { |
60 | /** | 71 | /** |
... | @@ -66,6 +77,7 @@ | ... | @@ -66,6 +77,7 @@ |
66 | this.ruleForm = { | 77 | this.ruleForm = { |
67 | cllx: "", | 78 | cllx: "", |
68 | clmc: "", | 79 | clmc: "", |
80 | clbm: "" | ||
69 | } | 81 | } |
70 | }, | 82 | }, |
71 | /** | 83 | /** |
... | @@ -79,6 +91,7 @@ | ... | @@ -79,6 +91,7 @@ |
79 | this.ruleForm = { | 91 | this.ruleForm = { |
80 | cllx: "", | 92 | cllx: "", |
81 | clmc: "", | 93 | clmc: "", |
94 | clbm: "" | ||
82 | } | 95 | } |
83 | this.$emit("input", false); | 96 | this.$emit("input", false); |
84 | } else { | 97 | } else { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-15 10:09:10 | 4 | * @LastEditTime: 2023-09-18 16:57:31 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="clxx"> | 7 | <div class="clxx"> |
... | @@ -62,9 +62,7 @@ | ... | @@ -62,9 +62,7 @@ |
62 | import imagePreview from "./dialog/imagePreview.vue"; | 62 | import imagePreview from "./dialog/imagePreview.vue"; |
63 | import clxxAddDialog from "./dialog/clxxAddDialog.vue"; | 63 | import clxxAddDialog from "./dialog/clxxAddDialog.vue"; |
64 | import clxxDetailDialog from "./dialog/clxxDetailDialog.vue"; | 64 | import clxxDetailDialog from "./dialog/clxxDetailDialog.vue"; |
65 | import { getCompanyMaterialList, addCompanyMaterial, getFileListByBsmMaterial } from "@/api/company.js"; | 65 | import { repairInitClml, saveClml } from "@/api/clxx.js"; |
66 | import { saveClml, getClmxList } from "@/api/clxx.js"; | ||
67 | import { repairInitClml } from "@/api/djbRepair.js"; | ||
68 | export default { | 66 | export default { |
69 | components: { clxxAddDialog, imagePreview, clxxDetailDialog }, | 67 | components: { clxxAddDialog, imagePreview, clxxDetailDialog }, |
70 | props: { | 68 | props: { |
... | @@ -100,7 +98,7 @@ | ... | @@ -100,7 +98,7 @@ |
100 | watch: { | 98 | watch: { |
101 | workFresh: { | 99 | workFresh: { |
102 | handler (newValue, oldValue) { | 100 | handler (newValue, oldValue) { |
103 | this.clmlInitList() | 101 | if (newValue) this.clmlInitList() |
104 | }, | 102 | }, |
105 | deep: true, | 103 | deep: true, |
106 | immediate: true | 104 | immediate: true |
... | @@ -168,7 +166,7 @@ | ... | @@ -168,7 +166,7 @@ |
168 | clmlInitList (type) { | 166 | clmlInitList (type) { |
169 | // 1:列表初始化 2:新增材料 | 167 | // 1:列表初始化 2:新增材料 |
170 | return new Promise((resolve) => { | 168 | return new Promise((resolve) => { |
171 | getCompanyMaterialList(this.formData.bsmCompany).then((res) => { | 169 | repairInitClml(this.$parent).then((res) => { |
172 | if (res.code == 200) { | 170 | if (res.code == 200) { |
173 | resolve(res.code); | 171 | resolve(res.code); |
174 | if (res.result && res.result.length > 0) { | 172 | if (res.result && res.result.length > 0) { |
... | @@ -244,12 +242,7 @@ | ... | @@ -244,12 +242,7 @@ |
244 | * @author: renchao | 242 | * @author: renchao |
245 | */ | 243 | */ |
246 | addSave (data) { | 244 | addSave (data) { |
247 | let obj = { | 245 | saveClml({ ...data, bsmSldy: this.$parent.bsmRepair, bsmSlsq: this.$parent.bsmSlsq }).then(async (res) => { |
248 | bsmCompany: this.formData.bsmCompany, | ||
249 | clmc: data.clmc, | ||
250 | cllx: data.cllx | ||
251 | }; | ||
252 | addCompanyMaterial(obj).then(async (res) => { | ||
253 | if (res.code == 200) { | 246 | if (res.code == 200) { |
254 | let res = await this.clmlInitList(2); | 247 | let res = await this.clmlInitList(2); |
255 | if (res == 200) | 248 | if (res == 200) |
... | @@ -290,7 +283,6 @@ | ... | @@ -290,7 +283,6 @@ |
290 | store.dispatch("user/reWorkFresh", false); | 283 | store.dispatch("user/reWorkFresh", false); |
291 | ywPopupDialog("申请材料目录", "xxba/components/clxx/dialog/clxxDetailDialog", { | 284 | ywPopupDialog("申请材料目录", "xxba/components/clxx/dialog/clxxDetailDialog", { |
292 | data: this.tableData, | 285 | data: this.tableData, |
293 | bsmCompany: this.formData.bsmCompany | ||
294 | }, "60%", true, false) | 286 | }, "60%", true, false) |
295 | }, | 287 | }, |
296 | //设置tableData | 288 | //设置tableData | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-15 09:31:37 | 4 | * @LastEditTime: 2023-09-18 16:32:42 |
5 | */ | 5 | */ |
6 | //流程环节操作按钮 | 6 | //流程环节操作按钮 |
7 | export function getForm (tabName) { | 7 | export function getForm (tabName) { |
... | @@ -82,7 +82,7 @@ export function getForm (tabName) { | ... | @@ -82,7 +82,7 @@ export function getForm (tabName) { |
82 | form = require("@/views/djbworkflow/djbBook/components/blxxtabs/cfdj.vue"); | 82 | form = require("@/views/djbworkflow/djbBook/components/blxxtabs/cfdj.vue"); |
83 | break; | 83 | break; |
84 | case "clxx": | 84 | case "clxx": |
85 | form = require("@/views/djbworkflow/djbBook/components/clxx/index.vue"); | 85 | form = require("@/views/djbworkflow/components/clxx/index.vue"); |
86 | break; | 86 | break; |
87 | case "spyj": | 87 | case "spyj": |
88 | form = require("@/views/djbworkflow/djbBook/spyj.vue"); | 88 | form = require("@/views/djbworkflow/djbBook/spyj.vue"); | ... | ... |
1 | <!-- | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2023-09-15 15:38:53 | ||
5 | --> | ||
6 | <template> | ||
7 | <div class="clmlmx-box"> | ||
8 | <lb-table :column="column" :key="key" row-key="bsmMaterial" ref="listTable" :heightNumSetting="true" :calcHeight="500" :pagination="false" | ||
9 | :data="tableData"> | ||
10 | </lb-table> | ||
11 | <div class="text-center"> | ||
12 | <el-button @click="handleCancel">取消</el-button> | ||
13 | <el-button type="primary" @click="handleSubmit" :loading="loading">保存</el-button> | ||
14 | </div> | ||
15 | </div> | ||
16 | </template> | ||
17 | <script> | ||
18 | import store from '@/store/index.js' | ||
19 | import Sortable from 'sortablejs' | ||
20 | import { ywPopupCacel } from "@/utils/popup.js"; | ||
21 | import { editCompanyMaterialList } from "@/api/company.js"; | ||
22 | export default { | ||
23 | props: { | ||
24 | formData: { | ||
25 | type: Object, | ||
26 | default: () => { | ||
27 | return {} | ||
28 | } | ||
29 | } | ||
30 | }, | ||
31 | data () { | ||
32 | return { | ||
33 | loading: false, | ||
34 | sortable: null, | ||
35 | column: [ | ||
36 | { | ||
37 | label: "材料名称", | ||
38 | render: (h, scope) => { | ||
39 | return ( | ||
40 | <el-input value={scope.row.clmc} onInput={(val) => { scope.row.clmc = val }}></el-input> | ||
41 | ) | ||
42 | } | ||
43 | }, | ||
44 | { | ||
45 | label: "材料编码", | ||
46 | render: (h, scope) => { | ||
47 | return ( | ||
48 | <el-input value={scope.row.clbm} onInput={(val) => { scope.row.clbm = val }}></el-input> | ||
49 | ) | ||
50 | } | ||
51 | }, | ||
52 | { | ||
53 | label: "材料类型", | ||
54 | width: "110", | ||
55 | render: (h, scope) => { | ||
56 | return ( | ||
57 | <el-select value={scope.row.cllx} | ||
58 | onChange={(val) => { scope.row.cllx = val }}> | ||
59 | { | ||
60 | store.getters.dictData['A40'].map(option => { | ||
61 | return ( | ||
62 | <el-option label={option.dname} value={option.dcode}></el-option> | ||
63 | ) | ||
64 | }) | ||
65 | } | ||
66 | </el-select> | ||
67 | ) | ||
68 | } | ||
69 | }, | ||
70 | { | ||
71 | label: "页数", | ||
72 | width: "80", | ||
73 | render: (h, scope) => { | ||
74 | if (scope.row.count && scope.row.count > 0) { | ||
75 | return ( | ||
76 | <div> | ||
77 | <span>{scope.row.count}</span> | ||
78 | </div> | ||
79 | ); | ||
80 | } else { | ||
81 | return ( | ||
82 | <div> | ||
83 | <span>0</span> | ||
84 | </div> | ||
85 | ); | ||
86 | } | ||
87 | }, | ||
88 | }, | ||
89 | { | ||
90 | label: "操作", | ||
91 | width: "100", | ||
92 | render: (h, scope) => { | ||
93 | return ( | ||
94 | <el-button | ||
95 | type="text" | ||
96 | icon="el-icon-delete" | ||
97 | disabled={scope.row.count != 0} | ||
98 | onClick={() => { | ||
99 | this.handleDelete(scope.$index, scope.row); | ||
100 | }} | ||
101 | > | ||
102 | 删除 | ||
103 | </el-button> | ||
104 | ) | ||
105 | } | ||
106 | } | ||
107 | ], | ||
108 | key: 0, | ||
109 | tableData: [] | ||
110 | } | ||
111 | }, | ||
112 | mounted () { | ||
113 | this.initSort() | ||
114 | this.tableData = _.cloneDeep(this.formData.data) | ||
115 | }, | ||
116 | beforeDestroy () { | ||
117 | if (this.sortable) { | ||
118 | this.sortable.destroy(); | ||
119 | } | ||
120 | }, | ||
121 | watch: { | ||
122 | 'formData.data': { | ||
123 | handler: function (val, oldVal) { | ||
124 | this.tableData = _.cloneDeep(val) | ||
125 | }, | ||
126 | immediate: true, | ||
127 | deep: true | ||
128 | } | ||
129 | }, | ||
130 | methods: { | ||
131 | handleCancel () { | ||
132 | ywPopupCacel() | ||
133 | }, | ||
134 | handleSubmit () { | ||
135 | this.loading = true | ||
136 | store.dispatch('user/reWorkFresh', false) | ||
137 | editCompanyMaterialList(this.tableData, this.formData.bsmCompany).then(res => { | ||
138 | this.loading = false | ||
139 | if (res.code == 200) { | ||
140 | this.$message({ | ||
141 | message: '保存成功', | ||
142 | type: 'success' | ||
143 | }) | ||
144 | store.dispatch('user/reWorkFresh', true) | ||
145 | ywPopupCacel() | ||
146 | } | ||
147 | }).catch(() => { | ||
148 | this.loading = false | ||
149 | }) | ||
150 | }, | ||
151 | /** | ||
152 | * @description: 材料目录删除 | ||
153 | * @param {*} index | ||
154 | * @param {*} row | ||
155 | * @author: renchao | ||
156 | */ | ||
157 | handleDelete (index, row) { | ||
158 | this.$confirm('此操作将永久删除该 是否继续?', '提示', { | ||
159 | confirmButtonText: '确定', | ||
160 | cancelButtonText: '取消', | ||
161 | type: 'warning' | ||
162 | }).then(() => { | ||
163 | this.tableData.splice(index, 1); | ||
164 | }).catch(() => { | ||
165 | this.$message({ | ||
166 | type: 'info', | ||
167 | message: '已取消删除' | ||
168 | }) | ||
169 | }) | ||
170 | }, | ||
171 | initSort () { | ||
172 | const el = this.$refs.listTable.$el.querySelectorAll('.el-table__body-wrapper > table > tbody')[0] | ||
173 | this.sortable = Sortable.create(el, { | ||
174 | ghostClass: 'sortable-ghost', | ||
175 | setData: function (dataTransfer) { | ||
176 | dataTransfer.setData('Text', '') | ||
177 | }, | ||
178 | onEnd: evt => { | ||
179 | const targetRow = this.tableData.splice(evt.oldIndex, 1)[0]; | ||
180 | this.tableData.splice(evt.newIndex, 0, targetRow); | ||
181 | } | ||
182 | }) | ||
183 | } | ||
184 | } | ||
185 | } | ||
186 | </script> | ||
187 | <style scoped lang='scss'> | ||
188 | @import "~@/styles/mixin.scss"; | ||
189 | .clmlmx-box { | ||
190 | margin: 0 auto; | ||
191 | .title { | ||
192 | text-align: center; | ||
193 | height: 60px; | ||
194 | line-height: 60px; | ||
195 | border: 1px solid #dfe6ec; | ||
196 | font-size: 20px; | ||
197 | background: #81d3f81a; | ||
198 | margin-bottom: -1px; | ||
199 | } | ||
200 | } | ||
201 | </style> |
This diff is collapsed.
Click to expand it.
This diff is collapsed.
Click to expand it.
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-18 14:42:14 | 4 | * @LastEditTime: 2023-09-18 15:48:15 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="tableBox"> | 7 | <div class="tableBox"> |
... | @@ -97,6 +97,7 @@ | ... | @@ -97,6 +97,7 @@ |
97 | <script> | 97 | <script> |
98 | import Router from '@/router' | 98 | import Router from '@/router' |
99 | import { datas } from "../qlxxFormData.js"; | 99 | import { datas } from "../qlxxFormData.js"; |
100 | import { ywPopupDialog } from "@/utils/popup.js"; | ||
100 | import printTemplate from "../components/printTemplate.vue"; | 101 | import printTemplate from "../components/printTemplate.vue"; |
101 | import { getXtParamsByYwh, getBlParamsByYwh } from '@/api/djyw' | 102 | import { getXtParamsByYwh, getBlParamsByYwh } from '@/api/djyw' |
102 | export default { | 103 | export default { |
... | @@ -234,8 +235,7 @@ | ... | @@ -234,8 +235,7 @@ |
234 | } else { | 235 | } else { |
235 | getBlParamsByYwh(ywh, bsmQlxx).then(res => { | 236 | getBlParamsByYwh(ywh, bsmQlxx).then(res => { |
236 | let data = res.result | 237 | let data = res.result |
237 | const { href } = Router.resolve('/workFrameView?bsmSlsq=' + data.bsmSlsq + '&bestepid=' + data.bestepid + '&bsmBusiness=' + data.bsmBusiness + '&type=jdcx') | 238 | ywPopupDialog("材料信息", "registerBook/components/clxx/index", data, "60%", true, false) |
238 | window.open(href, `urlname${data.bsmSlsq}`) | ||
239 | }) | 239 | }) |
240 | } | 240 | } |
241 | } | 241 | } | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-15 10:02:12 | 4 | * @LastEditTime: 2023-09-18 16:28:16 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="clxx"> | 7 | <div class="clxx"> |
... | @@ -167,7 +167,6 @@ | ... | @@ -167,7 +167,6 @@ |
167 | //type 1:列表初始化 2:新增材料 | 167 | //type 1:列表初始化 2:新增材料 |
168 | return new Promise((resolve) => { | 168 | return new Promise((resolve) => { |
169 | this.unitData = this.$parent.unitData; | 169 | this.unitData = this.$parent.unitData; |
170 | console.log(this.$parent.unitData, 'this.$parent.unitData;'); | ||
171 | var formdata = new FormData(); | 170 | var formdata = new FormData(); |
172 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); | 171 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); |
173 | if (this.$route.query.sqywbm == "DJBBL") { | 172 | if (this.$route.query.sqywbm == "DJBBL") { | ... | ... |
-
Please register or sign in to post a comment