apply-clients 4.1.73 → 4.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,205 @@
1
+ <template>
2
+ <div style="margin-bottom: 20px" class="form-group select-overspread">
3
+ <label class="control-label-justify control-label col-sm-3">选择用户</label>
4
+ <div class="col-sm-10" >
5
+ <button class="button_search button_spacing" type="button" style="width: max-content;position: absolute" @click="openSelect" :disabled="mark === 1">选择</button>
6
+ </div>
7
+ </div>
8
+
9
+ <modal v-if="showselect" :show.sync="showselect" width="80%" title="用户信息" v-ref:modal large backdrop="false">
10
+ <article slot="modal-body" class="modal-body" style="height: 600px!important;">
11
+ <criteria-paged :model="model" v-ref:cp>
12
+ <criteria partial='criteria' @condition-changed='$parent.$parent.searchCondition' v-ref:cri>
13
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
14
+ <div class="row">
15
+ <div class="form-group col-sm-3">
16
+ <label class="font_normal_body">客户编号:</label>
17
+ <input type="text" style="width:60%" class="input_search" placeholder='客户编号' v-model="model.f_userinfo_code"
18
+ v-on:keyup.enter="search"
19
+ condition="ui.f_userinfo_code = '{}'">
20
+ </div>
21
+ <div class="form-group col-sm-3">
22
+ <label class="font_normal_body">客户地址:</label>
23
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_address"
24
+ v-on:keyup.enter="search" condition="ua.f_address like '%{}%'" placeholder='客户地址'>
25
+ </div>
26
+ <div class="form-group col-sm-3 button-range">
27
+ <button class="button_search button_spacing" @click.prevent="search" v-el:cx>查询</button>
28
+ <button class="button_clear button_spacing" @click.prevent="$parent.$parent.$parent.clear()">清空</button>
29
+ <div
30
+ :class="{'button_shrink_top':$parent.$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.$parent.criteriaShow}"
31
+ @click="$parent.$parent.$parent.criteriaShow = !$parent.$parent.$parent.criteriaShow"
32
+ class="button_spacing"
33
+ style="float: right">
34
+ </div>
35
+ </div>
36
+ </div>
37
+ <div class="row" v-show="$parent.$parent.$parent.criteriaShow">
38
+ <div class="form-group col-sm-3">
39
+ <label class="font_normal_body">客户名称:</label>
40
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
41
+ v-on:keyup.enter="search" condition="ui.f_user_name like '%{}%'" placeholder='客户名称'>
42
+ </div>
43
+ <div class="form-group col-sm-3">
44
+ <label class="font_normal_body">客户电话:</label>
45
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_phone"
46
+ v-on:keyup.enter="search" condition="ui.f_user_phone = '{}'" placeholder='客户电话'>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </criteria>
51
+ <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy" style="height: 100%">
52
+ <template partial='head'>
53
+ <tr>
54
+ <th style="white-space: nowrap;">序号</th>
55
+ <th style="white-space: nowrap;">客户编号</th>
56
+ <th style="white-space: nowrap;">客户名称</th>
57
+ <th style="white-space: nowrap;">客户电话</th>
58
+ <th style="white-space: nowrap;">地址信息</th>
59
+ <th style="white-space: nowrap;">选择</th>
60
+ </tr>
61
+ </template>
62
+ <template partial='body'>
63
+ <tr >
64
+ <td style="text-align: center;">
65
+ <nobr><font>{{$index+1}}</font></nobr>
66
+ </td>
67
+ <td style="text-align: center;">
68
+ <nobr><font>{{ row.f_userinfo_code }}</font></nobr>
69
+ </td>
70
+ <td style="text-align: center;">
71
+ <nobr><font>{{ row.f_user_name }}</font></nobr>
72
+ </td>
73
+ <td style="text-align: center;">
74
+ <nobr><font>{{ row.f_user_phone }}</font></nobr>
75
+ </td>
76
+ <td style="text-align: center;">
77
+ <nobr><font>{{ row.f_address_type }}</font></nobr>
78
+ </td>
79
+ <td style="text-align: center;" v-show="false">
80
+ <nobr><font>{{ row.f_pcd }}</font></nobr>
81
+ </td>
82
+ <td style="text-align: center;" v-show="false">
83
+ <nobr><font>{{ row.f_street }}</font></nobr>
84
+ </td>
85
+ <td style="text-align: center;" v-show="false">
86
+ <nobr><font>{{ row.f_residential_area }}</font></nobr>
87
+ </td>
88
+ <td style="text-align: center;" v-show="false">
89
+ <nobr><font>{{ row.f_building }}</font></nobr>
90
+ </td>
91
+ <td style="text-align: center;" v-show="false">
92
+ <nobr><font>{{ row.f_unit }}</font></nobr>
93
+ </td>
94
+ <td style="text-align: center;" v-show="false">
95
+ <nobr><font>{{ row.f_floor }}</font></nobr>
96
+ </td>
97
+ <td style="text-align: center;" v-show="false">
98
+ <nobr><font>{{ row.f_room }}</font></nobr>
99
+ </td>
100
+ <td style="text-align: center;">
101
+ <nobr><font>{{ row.f_address }}</font></nobr>
102
+ </td>
103
+ <td style="text-align: center;">
104
+ <nobr><font>
105
+ <button type="button" name="button" class="button_export" @click.prevent="$parent.$parent.$parent.$parent.select(row)">确认选择</button>
106
+ </font></nobr>
107
+ </td>
108
+ </tr>
109
+ </template>
110
+ </data-grid>
111
+ </criteria-paged>
112
+ </article>
113
+ <footer slot="modal-footer" class="modal-footer">
114
+ </footer>
115
+ </modal>
116
+ </template>
117
+ <script>
118
+ import {PagedList} from 'vue-client'
119
+ import Vue from 'vue'
120
+
121
+ export default {
122
+ title: '选择用户',
123
+ props: {
124
+ selectdata: {
125
+ type: Object
126
+ },
127
+ mark: {
128
+ type: Number,
129
+ default: 0
130
+ }
131
+ },
132
+ data () {
133
+ return {
134
+ showselect: false,
135
+ model: new PagedList('rs/sql/applyGetUserinfos', 20, null),
136
+ criteriaShow: false
137
+ }
138
+ },
139
+ ready () {
140
+ },
141
+ methods: {
142
+ select (row) {
143
+ this.$dispatch('selectUserinfo', row)
144
+
145
+ this.showselect = false
146
+ },
147
+ searchCondition (args) {
148
+ args.condition = `${args.condition} and ui.f_filialeid = '${this.$login.f.orgid}'`
149
+
150
+ this.model.search(args.condition, args.model)
151
+ },
152
+ clear () {
153
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
154
+ this.$refs.cp.$refs.cri.model[key] = null
155
+ })
156
+ },
157
+ openSelect () {
158
+ this.showselect = true
159
+ setTimeout(() => {
160
+ this.$refs.cp.$refs.cri.search()
161
+ }, 100)
162
+ }
163
+ },
164
+ events: {
165
+ },
166
+ computed: {
167
+ },
168
+ watch: {
169
+ }
170
+ }
171
+ </script>
172
+ <style scoped>
173
+ .control-label-justify {
174
+ display: inline-block;
175
+ vertical-align: top;
176
+ width: 110px;
177
+ text-align: justify;
178
+ font-family: PingFang-SC-Bold;
179
+ }
180
+
181
+ .control-label-justify::after {
182
+ content: "";
183
+ display: inline-block;
184
+ width: 100%;
185
+ overflow: hidden;
186
+ height: 0;
187
+ }
188
+ .input_view{
189
+ padding: 8px;
190
+ background-color: #ffffff;
191
+ border-radius: 2px;
192
+ border: solid 1px #c7c7c7!important;
193
+ color: #333333!important;
194
+ font-size: 15px!important;
195
+ }
196
+
197
+ .input_view[readonly]{
198
+ border: 1px solid #DDD!important;
199
+ color:#ACA899!important;
200
+ }
201
+ .input_view:disabled{
202
+ border: 1px solid #DDD!important;
203
+ color:#ACA899!important;
204
+ }
205
+ </style>
@@ -0,0 +1,358 @@
1
+ <template>
2
+ <div class="col-sm-12" style="margin: 20px 0px;">
3
+ <data-grid :model="model" v-ref:grid class="list_area table_sy" style="padding: 0px">
4
+ <template partial='head'>
5
+ <tr>
6
+ <th class="textNoLineBreak">序号</th>
7
+ <th class="textNoLineBreak">材料名称</th>
8
+ <th class="textNoLineBreak">材料型号</th>
9
+ <th class="textNoLineBreak">材料单价</th>
10
+ <th class="textNoLineBreak">材料单位</th>
11
+ <th class="textNoLineBreak">材料数量</th>
12
+ <th class="textNoLineBreak">小计</th>
13
+ <th class="textNoLineBreak">材料备注</th>
14
+ <th class="textNoLineBreak">
15
+ <button
16
+ type="button"
17
+ class="btn btn-info head-but"
18
+ :disabled="$parent.$parent.mark === 1"
19
+ @click="$parent.$parent.showSupplement = !$parent.$parent.showSupplement"
20
+ >添加材料
21
+ </button>
22
+ <button v-if="$parent.$parent.mark !== 1" type="button" class="btn btn-info head-but"
23
+ @click="$parent.$parent.showFileModal()">导入</button>
24
+ <a v-if="$parent.$parent.mark !== 1" type="button" class="btn btn-info head-but"
25
+ href="/apply/download/excel/中盛材料批量导入.xlsx" download>模板下载</a>
26
+ </th>
27
+ </tr>
28
+ </template>
29
+ <template partial='body'>
30
+ <tr>
31
+ <td style="text-align: center;">
32
+ <nobr>{{ $index + 1 }}</nobr>
33
+ </td>
34
+ <td style="text-align: center;">
35
+ <nobr>{{ row.f_material_name }}</nobr>
36
+ </td>
37
+ <td style="text-align: center;">
38
+ <nobr>{{ row.f_material_style }}</nobr>
39
+ </td>
40
+ <td style="text-align: center;">
41
+ <nobr>{{ row.f_material_price }}</nobr>
42
+ </td>
43
+ <td style="text-align: center;">
44
+ <nobr>{{ row.f_material_unit }}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{ row.f_material_number }}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <nobr>{{ row.f_price_sum }}</nobr>
51
+ </td>
52
+ <td style="text-align: center;">
53
+ <nobr>{{ row.f_material_remarks }}</nobr>
54
+ </td>
55
+ <td style="text-align: center;">
56
+ <nobr>
57
+ <button
58
+ type="button"
59
+ name="button"
60
+ class="btn btn-link"
61
+ :disabled="$parent.$parent.mark === 1 || row.f_material_status === '作废'"
62
+ @click="$parent.$parent.showInvalidModal(row)"
63
+ >{{ row.f_material_status === '作废' ? '已作废' : '作废' }}
64
+ </button>
65
+ </nobr>
66
+ </td>
67
+ </tr>
68
+ </template>
69
+ </data-grid>
70
+
71
+ <validator name="v">
72
+ <modal v-if="showSupplement" :show.sync="showSupplement" v-ref:modal :large="true" :backdrop="false">
73
+ <header slot="modal-header" class="modal-header">
74
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
75
+ <h4 class="modal-title">预算材料</h4>
76
+ </header>
77
+ <article slot="modal-body" class="modal-body clearfix">
78
+ <div class="form-group col-sm-12" :class="[$v.f_material_name.required ? 'has-error' : '']">
79
+ <label class="col-sm-2 control-label">材料名称:</label>
80
+ <div class="col-sm-10">
81
+ <input type="text"
82
+ class="form-control input_view"
83
+ v-validate:f_material_name="['required']"
84
+ style="width: 100%"
85
+ v-model="material.f_material_name"/>
86
+ </div>
87
+ </div>
88
+ <div class="form-group col-sm-12" :class="[$v.f_material_style.required ? 'has-error' : '']">
89
+ <label class="col-sm-2 control-label">材料型号:</label>
90
+ <div class="col-sm-10">
91
+ <input type="text"
92
+ class="form-control input_view"
93
+ v-validate:f_material_style="['required']"
94
+ v-model="material.f_material_style"/>
95
+ </div>
96
+ </div>
97
+ <div class="form-group col-sm-12" :class="[$v.f_material_price.required ? 'has-error' : '']">
98
+ <label class="col-sm-2 control-label">材料单价:</label>
99
+ <div class="col-sm-10">
100
+ <input type="number"
101
+ class="form-control input_view"
102
+ style="width: 100%"
103
+ v-validate:f_material_price="['required']"
104
+ v-model="material.f_material_price"/>
105
+ </div>
106
+ </div>
107
+ <div class="form-group col-sm-12">
108
+ <label class="col-sm-2 control-label">材料单位:</label>
109
+ <div class="col-sm-10">
110
+ <input type="text"
111
+ class="form-control input_view"
112
+ style="width: 100%"
113
+ v-model="material.f_material_unit"/>
114
+ </div>
115
+ </div>
116
+ <div class="form-group col-sm-12" :class="[$v.f_material_number.required ? 'has-error' : '']">
117
+ <label class="col-sm-2 control-label">材料数量:</label>
118
+ <div class="col-sm-10">
119
+ <input type="number"
120
+ class="form-control input_view"
121
+ style="width: 100%"
122
+ v-validate:f_material_number="['required']"
123
+ v-model="material.f_material_number"/>
124
+ </div>
125
+ </div>
126
+ <div class="form-group col-sm-12">
127
+ <label class="col-sm-2 control-label">材料备注:</label>
128
+ <div class="col-sm-10">
129
+ <input type="text"
130
+ class="form-control input_view"
131
+ style="width: 100%"
132
+ v-model="material.f_material_remarks"/>
133
+ </div>
134
+ </div>
135
+ </article>
136
+ <footer slot="modal-footer" class="modal-footer">
137
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="savematerial()">新增材料</button>
138
+ </footer>
139
+ </modal>
140
+
141
+ <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废材料">
142
+ <header slot="modal-header" class="modal-header">
143
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
144
+ <h4 class="modal-title">作废协议</h4>
145
+ </header>
146
+ <article slot="modal-body" class="modal-body clearfix">
147
+ <div class="form-group col-sm-12">
148
+ <label class="col-sm-2 control-label">材料名称:</label>
149
+ <div class="col-sm-10">
150
+ <input type="text"
151
+ readonly
152
+ class="form-control input_view"
153
+ style="width: 100%"
154
+ v-model="material.f_material_name"/>
155
+ </div>
156
+ </div>
157
+ <div class="form-group col-sm-12">
158
+ <label class="col-sm-2 control-label">材料型号:</label>
159
+ <div class="col-sm-10">
160
+ <input type="text"
161
+ readonly
162
+ class="form-control input_view"
163
+ v-validate:f_material_style="['required']"
164
+ v-model="material.f_material_style"/>
165
+ </div>
166
+ </div>
167
+ <div class="form-group col-sm-12">
168
+ <label class="col-sm-2 control-label">材料单价:</label>
169
+ <div class="col-sm-10">
170
+ <input type="number"
171
+ readonly
172
+ class="form-control input_view"
173
+ style="width: 100%"
174
+ v-model="material.f_material_price"/>
175
+ </div>
176
+ </div>
177
+ <div class="form-group col-sm-12">
178
+ <label class="col-sm-2 control-label">材料单位:</label>
179
+ <div class="col-sm-10">
180
+ <input type="text"
181
+ readonly
182
+ class="form-control input_view"
183
+ style="width: 100%"
184
+ v-model="material.f_material_unit"/>
185
+ </div>
186
+ </div>
187
+ <div class="form-group col-sm-12">
188
+ <label class="col-sm-2 control-label">材料数量:</label>
189
+ <div class="col-sm-10">
190
+ <input type="number"
191
+ readonly
192
+ class="form-control input_view"
193
+ style="width: 100%"
194
+ v-model="material.f_material_number"/>
195
+ </div>
196
+ </div>
197
+ <div class="form-group col-sm-12">
198
+ <label class="col-sm-2 control-label">材料备注:</label>
199
+ <div class="col-sm-10">
200
+ <input type="text"
201
+ readonly
202
+ class="form-control input_view"
203
+ style="width: 100%"
204
+ v-model="material.f_material_remarks"/>
205
+ </div>
206
+ </div>
207
+ <div class="form-group col-sm-12" :class="[$v.f_material_void_remarks.required ? 'has-error' : '']">
208
+ <label class="col-sm-2 control-label">作废原因:</label>
209
+ <div class="col-sm-10">
210
+ <input type="text" style="width: 100%"
211
+ class="form-control input_view"
212
+ v-validate:f_material_void_remarks="['required']"
213
+ v-model="material.f_material_void_remarks"/>
214
+ </div>
215
+ </div>
216
+ </article>
217
+ <footer slot="modal-footer" class="modal-footer">
218
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="invalidmaterial()">确认作废</button>
219
+ </footer>
220
+ </modal>
221
+ </validator>
222
+ </div>
223
+
224
+ <modal :show.sync="showFile" v-ref:modal backdrop="true" title="选择文件">
225
+ <header slot="modal-header" class="modal-header">
226
+ <button type="button" class="close" @click="closeModal"><span>&times;</span></button>
227
+ <h4 class="modal-title">选择文件</h4>
228
+ </header>
229
+ <article slot="modal-body" class="modal-body">
230
+ <div class="form-group">
231
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
232
+ </div>
233
+ </article>
234
+ <footer slot="modal-footer" class="modal-footer"></footer>
235
+ </modal>
236
+ </template>
237
+ <script>
238
+ import {getNowDate, isEmpty} from '../../../Util'
239
+ import {PagedList} from 'vue-client'
240
+ import {HttpResetClass} from 'vue-client'
241
+
242
+ export default {
243
+ title: '拆改材料',
244
+ props: {
245
+ selectdata: {
246
+ type: Object
247
+ },
248
+ mark: {
249
+ type: Number,
250
+ default: 0
251
+ }
252
+ },
253
+ data() {
254
+ return {
255
+ showFile: false,
256
+ showSupplement: false,
257
+ showInvalid: false,
258
+ model: {
259
+ data: null
260
+ },
261
+ material: {}
262
+ }
263
+ },
264
+ ready() {
265
+ this.search()
266
+ },
267
+ methods: {
268
+ showFileModal() {
269
+ this.showFile = !this.showFile
270
+ },
271
+ async invalidmaterial() {
272
+ let http = new HttpResetClass()
273
+ let data = {
274
+ selectdata: this.selectdata,
275
+ user: this.$login.f,
276
+ material: this.material
277
+ }
278
+ let res = await http.load('POST', 'rs/logic/deleteApplyMaterial', {data: data}, {
279
+ resolveMsg: null,
280
+ rejectMsg: '作废失败'
281
+ })
282
+ this.$dispatch('breakControl', this.selectdata)
283
+ },
284
+ showInvalidModal(row) {
285
+ this.material = row
286
+ this.showInvalid = true
287
+ },
288
+ async savematerial() {
289
+ let http = new HttpResetClass()
290
+ let data = {
291
+ material: this.material,
292
+ user: this.$login.f,
293
+ selectdata: this.selectdata
294
+ }
295
+ let res = await http.load('POST', 'rs/logic/addApplyMaterial', {data: data}, {
296
+ resolveMsg: null,
297
+ rejectMsg: '添加失败'
298
+ })
299
+ this.$dispatch('breakControl', this.selectdata)
300
+ },
301
+ async search() {
302
+ let http = new HttpResetClass()
303
+ let data = {
304
+ tablename: 't_material_apply',
305
+ condition: `f_process_id = '${this.selectdata.f_process_id}'`
306
+ }
307
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
308
+ resolveMsg: null,
309
+ rejectMsg: 'null'
310
+ })
311
+ this.model.data = res.data
312
+ },
313
+ closeModal() {
314
+ this.showFile = false
315
+ this.showSupplement = false
316
+ this.showInvalid = false
317
+ this.material = {}
318
+ this.search()
319
+ }
320
+ },
321
+ events: {
322
+ async 'onFileUpload'(file, result) {
323
+ let data = {
324
+ selectdata: this.selectdata,
325
+ filepath: result.f_downloadpath,
326
+ user: this.$login.f,
327
+ mark: this.mark
328
+ }
329
+ let res = await this.$resetpost(`rs/logic/importMaterials`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败', silent: true}, 0)
330
+ this.$showMessage(res.data);
331
+ if (this.mark !== 0) {
332
+ this.$dispatch('breakControl', this.selectdata)
333
+ }
334
+ this.closeModal()
335
+ }
336
+ },
337
+ computed: {
338
+ materialType() {
339
+ return this.$appdata.getParam('材料型号')
340
+ }
341
+ },
342
+ watch: {}
343
+ }
344
+ </script>
345
+ <style scoped>
346
+ .textNoLineBreak {
347
+ white-space: nowrap;
348
+ }
349
+
350
+ .head-but {
351
+ margin-left: 5px;
352
+ height: 34px;
353
+ /*background-color: #6aa6e2;*/
354
+ border-radius: 4px;
355
+ font-family: PingFang;
356
+ color: #ffffff;
357
+ }
358
+ </style>