apply-clients 5.0.35-ezhou-24 → 5.0.35-ezhou-25-1

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.
@@ -1,217 +1,217 @@
1
- <template>
2
- <div class="flex" style="height: auto">
3
- <div style="height: auto" class="flex">
4
- <div class="bg-info text-center" style="padding: 8px;font-size: 20px">材料信息
5
- </div>
6
- <div class="form-inline auto" style="margin-bottom: 5px;">
7
- <criteria-paged :model="model" :pager="true" v-ref:paged1 >
8
- <data-grid :model="$parent.model" v-ref:grid1 partial='list'>
9
- <template partial='head'>
10
- <tr>
11
- <th><nobr>序号</nobr></th>
12
- <th><nobr>分项内容</nobr></th>
13
- <th><nobr>规格型号</nobr></th>
14
- <th><nobr>单位</nobr></th>
15
- <th><nobr>数量</nobr></th>
16
- <th><nobr>生产厂家</nobr></th>
17
- <th style="padding: 0px">
18
- <button class="btn btn-success" @click="$parent.$parent.$parent.modify()">+</button>
19
- <button class="btn btn-success" @click="$parent.$parent.$parent.search()">查询</button>
20
- </th>
21
- </tr>
22
- </template>
23
- <template partial='body'>
24
- <td style="text-align: center;">{{ $index + 1 }}</td>
25
- <td style="text-align: center;">{{ row.f_material_name }}</td>
26
- <td style="text-align: center;">{{ row.f_material_style }}</td>
27
- <td style="text-align: center;">{{ row.f_material_unit }}</td>
28
- <td style="text-align: center;">{{ row.f_material_number }}</td>
29
- <td style="text-align: center;">{{ row.f_material_manufacturer }}</td>
30
- <td style="text-align: center;">
31
- <button type="button" name="button" class="btn btn-link"
32
- @click="$parent.$parent.$parent.update(row)">修正
33
- </button>
34
- <button type="button" name="button" class="btn btn-link"
35
- @click="$parent.$parent.$parent.delete(row)">移除
36
- </button>
37
- </td>
38
- </template>
39
- </data-grid>
40
- </criteria-paged>
41
- </div>
42
- </div>
43
- <modal :show.sync="modifyshow" backdrop="false">
44
- <header slot="modal-header" class="modal-header">
45
- <h4 class="modal-title">材料信息</h4>
46
- </header>
47
- <article slot="modal-body" class="modal-body">
48
- <form class="form-horizontal">
49
- <div class="form-group">
50
- <label for="f_material_name" class="control-label">分项内容</label>
51
- <input-select
52
- readonly="readonly" :value.sync="model.f_material_name"
53
- v-model="model.f_material_name"
54
- :options='material_names' :valueSingle="true"></input-select>
55
- </div>
56
- <div class="form-group">
57
- <label for="f_material_style" class="control-label">规格型号</label>
58
- <input type="string" class="form-control" v-model="model.f_material_style"
59
- placeholder='规格型号'>
60
- </div>
61
- <div class="form-group">
62
- <label for="f_material_unit" class="control-label">单位</label>
63
- <input type="string" class="form-control" v-model="model.f_material_unit"
64
- placeholder='单位'>
65
- </div>
66
- <div class="form-group">
67
- <label for="f_material_number" class="control-label">数量</label>
68
- <input type="number" class="form-control" v-model="model.f_material_number"
69
- placeholder='数量'>
70
- </div>
71
- <div class="form-group">
72
- <label for="f_material_manufacturer" class="control-label">生产厂家</label>
73
- <input type="string" class="form-control" v-model="model.f_material_manufacturer"
74
- placeholder='生产厂家'>
75
- </div>
76
- </form>
77
- </article>
78
- <footer slot="modal-footer" class="modal-footer">
79
- <button type="button" class="btn btn-success" @click='modifyConfirm'>确认</button>
80
- <button type="button" class="btn btn-default" @click='modifyclose'>取消</button>
81
- </footer>
82
- </modal>
83
- <modal :show.sync="updateshow" backdrop="false">
84
- <header slot="modal-header" class="modal-header">
85
- <h4 class="modal-title">材料信息</h4>
86
- </header>
87
- <article slot="modal-body" class="modal-body">
88
- <form class="form-horizontal">
89
- <div class="form-group">
90
- <label for="f_material_name" class="control-label">分项内容</label>
91
- <input-select
92
- readonly="readonly" :value.sync="updaterow.f_material_name"
93
- v-model="updaterow.f_material_name"
94
- :options='material_names' :valueSingle="true"></input-select>
95
- </div>
96
- <div class="form-group">
97
- <label for="f_material_style" class="control-label">规格型号</label>
98
- <input type="string" class="form-control" v-model="updaterow.f_material_style"
99
- placeholder='规格型号'>
100
- </div>
101
- <div class="form-group">
102
- <label for="f_material_unit" class="control-label">单位</label>
103
- <input type="string" class="form-control" v-model="updaterow.f_material_unit"
104
- placeholder='单位'>
105
- </div>
106
- <div class="form-group">
107
- <label for="f_material_number" class="control-label">数量</label>
108
- <input type="number" class="form-control" v-model="updaterow.f_material_number"
109
- placeholder='数量'>
110
- </div>
111
- <div class="form-group">
112
- <label for="f_material_manufacturer" class="control-label">生产厂家</label>
113
- <input type="string" class="form-control" v-model="updaterow.f_material_manufacturer"
114
- placeholder='生产厂家'>
115
- </div>
116
- </form>
117
- </article>
118
- <footer slot="modal-footer" class="modal-footer">
119
- <button type="button" class="btn btn-success" @click='updateConfirm'>确认</button>
120
- <button type="button" class="btn btn-default" @click='updateyclose'>取消</button>
121
- </footer>
122
- </modal>
123
- </div>
124
- </template>
125
- <script>
126
- import {PagedList, HttpResetClass} from 'vue-client'
127
- import {toStandardTimeString} from '../../Util'
128
-
129
- export default {
130
- title: '添加材料',
131
- props: ['selectdata'],
132
- data() {
133
- return {
134
- model: new PagedList('rs/sql/getmaterialapply', 8, { orderitem: '`id`'}),
135
- modifyshow: false,
136
- updateshow: false,
137
- updaterow: null,
138
- material_names: this.$appdata.getParam('分项内容')
139
- }
140
- },
141
- ready() {
142
- this.search()
143
- console.log('登录信息', this.$login.f)
144
- },
145
- methods: {
146
- search () {
147
- let condition = ` f_process_id = '${this.selectdata.f_process_id}'`
148
- this.model.search(condition)
149
- },
150
- modify () {
151
- this.modifyshow = true
152
- },
153
- modifyclose () {
154
- this.modifyshow = false
155
- this.search()
156
- },
157
- modifyConfirm () {
158
- let data = {
159
- f_material_name: this.model.f_material_name,
160
- f_material_style: this.model.f_material_style,
161
- f_material_unit: this.model.f_material_unit,
162
- f_material_number: this.model.f_material_number,
163
- f_material_manufacturer: this.model.f_material_manufacturer,
164
- f_process_id: this.selectdata.f_process_id,
165
- f_operation_date: toStandardTimeString(),
166
- f_operator: this.$login.f.name,
167
- f_operator_id: this.$login.f.id,
168
- f_orgid: this.$login.f.f_orgids,
169
- f_orgname: this.$login.f.filialenames
170
- }
171
- this.$showMessage(`是否确认添加新的材料信息`, ['confirm', 'cancel']).then((res) => {
172
- if (res === 'confirm') {
173
- let http = new HttpResetClass()
174
- http.load('post', 'rs/logic/savematerialapply', {data: data}, {resolveMsg: '保存成功!', rejectMsg: '保存失败!'})
175
- }
176
- })
177
- },
178
- update (row) {
179
- this.updaterow = row
180
- this.updateshow = true
181
- },
182
- updateyclose () {
183
- this.updaterow = {}
184
- this.updateshow = false
185
- this.search()
186
- },
187
- updateConfirm () {
188
- this.$showMessage(`是否确认修改该材料信息`, ['confirm', 'cancel']).then((res) => {
189
- if (res === 'confirm') {
190
- let http = new HttpResetClass()
191
- http.load('post', 'rs/logic/savematerialapply', {data: this.updaterow}, {resolveMsg: '保存成功!', rejectMsg: '保存失败!'})
192
- }
193
- })
194
- },
195
- delete (row) {
196
- this.$showMessage(`是否确认删除此材料信息`, ['confirm', 'cancel']).then((res) => {
197
- if (res === 'confirm') {
198
- let data = {
199
- tablename: 't_material_apply',
200
- id: row.id
201
- }
202
- let http = new HttpResetClass()
203
- http.load('post', 'rs/logic/applyDeleteValue', {data: data}, {resolveMsg: '删除成功!', rejectMsg: '删除失败!'})
204
- this.search()
205
- }
206
- })
207
- }
208
- },
209
- computed: {},
210
- events: {},
211
- watch: {
212
- 'selectdata.f_process_id'() {
213
- this.search()
214
- }
215
- }
216
- }
217
- </script>
1
+ <template>
2
+ <div class="flex" style="height: auto">
3
+ <div style="height: auto" class="flex">
4
+ <div class="bg-info text-center" style="padding: 8px;font-size: 20px">材料信息
5
+ </div>
6
+ <div class="form-inline auto" style="margin-bottom: 5px;">
7
+ <criteria-paged :model="model" :pager="true" v-ref:paged1 >
8
+ <data-grid :model="$parent.model" v-ref:grid1 partial='list'>
9
+ <template partial='head'>
10
+ <tr>
11
+ <th><nobr>序号</nobr></th>
12
+ <th><nobr>分项内容</nobr></th>
13
+ <th><nobr>规格型号</nobr></th>
14
+ <th><nobr>单位</nobr></th>
15
+ <th><nobr>数量</nobr></th>
16
+ <th><nobr>生产厂家</nobr></th>
17
+ <th style="padding: 0px">
18
+ <button class="btn btn-success" @click="$parent.$parent.$parent.modify()">+</button>
19
+ <button class="btn btn-success" @click="$parent.$parent.$parent.search()">查询</button>
20
+ </th>
21
+ </tr>
22
+ </template>
23
+ <template partial='body'>
24
+ <td style="text-align: center;">{{ $index + 1 }}</td>
25
+ <td style="text-align: center;">{{ row.f_material_name }}</td>
26
+ <td style="text-align: center;">{{ row.f_material_style }}</td>
27
+ <td style="text-align: center;">{{ row.f_material_unit }}</td>
28
+ <td style="text-align: center;">{{ row.f_material_number }}</td>
29
+ <td style="text-align: center;">{{ row.f_material_manufacturer }}</td>
30
+ <td style="text-align: center;">
31
+ <button type="button" name="button" class="btn btn-link"
32
+ @click="$parent.$parent.$parent.update(row)">修正
33
+ </button>
34
+ <button type="button" name="button" class="btn btn-link"
35
+ @click="$parent.$parent.$parent.delete(row)">移除
36
+ </button>
37
+ </td>
38
+ </template>
39
+ </data-grid>
40
+ </criteria-paged>
41
+ </div>
42
+ </div>
43
+ <modal :show.sync="modifyshow" backdrop="false">
44
+ <header slot="modal-header" class="modal-header">
45
+ <h4 class="modal-title">材料信息</h4>
46
+ </header>
47
+ <article slot="modal-body" class="modal-body">
48
+ <form class="form-horizontal">
49
+ <div class="form-group">
50
+ <label for="f_material_name" class="control-label">分项内容</label>
51
+ <input-select
52
+ readonly="readonly" :value.sync="model.f_material_name"
53
+ v-model="model.f_material_name"
54
+ :options='material_names' :valueSingle="true"></input-select>
55
+ </div>
56
+ <div class="form-group">
57
+ <label for="f_material_style" class="control-label">规格型号</label>
58
+ <input type="string" class="form-control" v-model="model.f_material_style"
59
+ placeholder='规格型号'>
60
+ </div>
61
+ <div class="form-group">
62
+ <label for="f_material_unit" class="control-label">单位</label>
63
+ <input type="string" class="form-control" v-model="model.f_material_unit"
64
+ placeholder='单位'>
65
+ </div>
66
+ <div class="form-group">
67
+ <label for="f_material_number" class="control-label">数量</label>
68
+ <input type="number" class="form-control" v-model="model.f_material_number"
69
+ placeholder='数量'>
70
+ </div>
71
+ <div class="form-group">
72
+ <label for="f_material_manufacturer" class="control-label">生产厂家</label>
73
+ <input type="string" class="form-control" v-model="model.f_material_manufacturer"
74
+ placeholder='生产厂家'>
75
+ </div>
76
+ </form>
77
+ </article>
78
+ <footer slot="modal-footer" class="modal-footer">
79
+ <button type="button" class="btn btn-success" @click='modifyConfirm'>确认</button>
80
+ <button type="button" class="btn btn-default" @click='modifyclose'>取消</button>
81
+ </footer>
82
+ </modal>
83
+ <modal :show.sync="updateshow" backdrop="false">
84
+ <header slot="modal-header" class="modal-header">
85
+ <h4 class="modal-title">材料信息</h4>
86
+ </header>
87
+ <article slot="modal-body" class="modal-body">
88
+ <form class="form-horizontal">
89
+ <div class="form-group">
90
+ <label for="f_material_name" class="control-label">分项内容</label>
91
+ <input-select
92
+ readonly="readonly" :value.sync="updaterow.f_material_name"
93
+ v-model="updaterow.f_material_name"
94
+ :options='material_names' :valueSingle="true"></input-select>
95
+ </div>
96
+ <div class="form-group">
97
+ <label for="f_material_style" class="control-label">规格型号</label>
98
+ <input type="string" class="form-control" v-model="updaterow.f_material_style"
99
+ placeholder='规格型号'>
100
+ </div>
101
+ <div class="form-group">
102
+ <label for="f_material_unit" class="control-label">单位</label>
103
+ <input type="string" class="form-control" v-model="updaterow.f_material_unit"
104
+ placeholder='单位'>
105
+ </div>
106
+ <div class="form-group">
107
+ <label for="f_material_number" class="control-label">数量</label>
108
+ <input type="number" class="form-control" v-model="updaterow.f_material_number"
109
+ placeholder='数量'>
110
+ </div>
111
+ <div class="form-group">
112
+ <label for="f_material_manufacturer" class="control-label">生产厂家</label>
113
+ <input type="string" class="form-control" v-model="updaterow.f_material_manufacturer"
114
+ placeholder='生产厂家'>
115
+ </div>
116
+ </form>
117
+ </article>
118
+ <footer slot="modal-footer" class="modal-footer">
119
+ <button type="button" class="btn btn-success" @click='updateConfirm'>确认</button>
120
+ <button type="button" class="btn btn-default" @click='updateyclose'>取消</button>
121
+ </footer>
122
+ </modal>
123
+ </div>
124
+ </template>
125
+ <script>
126
+ import {PagedList, HttpResetClass} from 'vue-client'
127
+ import {toStandardTimeString} from '../../Util'
128
+
129
+ export default {
130
+ title: '添加材料',
131
+ props: ['selectdata'],
132
+ data() {
133
+ return {
134
+ model: new PagedList('rs/sql/getmaterialapply', 8, { orderitem: '`id`'}),
135
+ modifyshow: false,
136
+ updateshow: false,
137
+ updaterow: null,
138
+ material_names: this.$appdata.getParam('分项内容')
139
+ }
140
+ },
141
+ ready() {
142
+ this.search()
143
+ console.log('登录信息', this.$login.f)
144
+ },
145
+ methods: {
146
+ search () {
147
+ let condition = ` f_process_id = '${this.selectdata.f_process_id}'`
148
+ this.model.search(condition)
149
+ },
150
+ modify () {
151
+ this.modifyshow = true
152
+ },
153
+ modifyclose () {
154
+ this.modifyshow = false
155
+ this.search()
156
+ },
157
+ modifyConfirm () {
158
+ let data = {
159
+ f_material_name: this.model.f_material_name,
160
+ f_material_style: this.model.f_material_style,
161
+ f_material_unit: this.model.f_material_unit,
162
+ f_material_number: this.model.f_material_number,
163
+ f_material_manufacturer: this.model.f_material_manufacturer,
164
+ f_process_id: this.selectdata.f_process_id,
165
+ f_operation_date: toStandardTimeString(),
166
+ f_operator: this.$login.f.name,
167
+ f_operator_id: this.$login.f.id,
168
+ f_orgid: this.$login.f.f_orgids,
169
+ f_orgname: this.$login.f.filialenames
170
+ }
171
+ this.$showMessage(`是否确认添加新的材料信息`, ['confirm', 'cancel']).then((res) => {
172
+ if (res === 'confirm') {
173
+ let http = new HttpResetClass()
174
+ http.load('post', 'rs/logic/savematerialapply', {data: data}, {resolveMsg: '保存成功!', rejectMsg: '保存失败!'})
175
+ }
176
+ })
177
+ },
178
+ update (row) {
179
+ this.updaterow = row
180
+ this.updateshow = true
181
+ },
182
+ updateyclose () {
183
+ this.updaterow = {}
184
+ this.updateshow = false
185
+ this.search()
186
+ },
187
+ updateConfirm () {
188
+ this.$showMessage(`是否确认修改该材料信息`, ['confirm', 'cancel']).then((res) => {
189
+ if (res === 'confirm') {
190
+ let http = new HttpResetClass()
191
+ http.load('post', 'rs/logic/savematerialapply', {data: this.updaterow}, {resolveMsg: '保存成功!', rejectMsg: '保存失败!'})
192
+ }
193
+ })
194
+ },
195
+ delete (row) {
196
+ this.$showMessage(`是否确认删除此材料信息`, ['confirm', 'cancel']).then((res) => {
197
+ if (res === 'confirm') {
198
+ let data = {
199
+ tablename: 't_material_apply',
200
+ id: row.id
201
+ }
202
+ let http = new HttpResetClass()
203
+ http.load('post', 'rs/logic/applyDeleteValue', {data: data}, {resolveMsg: '删除成功!', rejectMsg: '删除失败!'})
204
+ this.search()
205
+ }
206
+ })
207
+ }
208
+ },
209
+ computed: {},
210
+ events: {},
211
+ watch: {
212
+ 'selectdata.f_process_id'() {
213
+ this.search()
214
+ }
215
+ }
216
+ }
217
+ </script>
@@ -296,7 +296,10 @@
296
296
  },
297
297
  methods: {
298
298
  clear () {
299
- this.$refs.paged.$refs.criteria.model = {}
299
+ // this.$refs.paged.$refs.criteria.model = {}
300
+ Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
301
+ this.$refs.paged.$refs.criteria.model[key] = []
302
+ })
300
303
  },
301
304
  getRes (obj) {
302
305
  this.filialeNameStr = obj.res
@@ -345,7 +348,7 @@
345
348
  selfSearch (args) {
346
349
  args.condition = args.condition + ` and a.f_filialeids like '%${this.filialeCodeStr}%'`
347
350
  if (args.model.f_payment_method.length > 0) {
348
- args.condition += ' and f_payment_method in ("' + args.model.f_payment_method.join('","') + '")'
351
+ args.condition += ` and f_payment_method in ('${args.model.f_payment_method.join('\',\'')}') `
349
352
  }
350
353
  console.log('condition:', args.condition)
351
354
  this.model.search(args.condition, args.model)
@@ -354,7 +357,7 @@
354
357
  },
355
358
  cleaner () {
356
359
  Object.keys(this.$refs.paged.$refs.criteria.model).forEach((key) => {
357
- this.$refs.paged.$refs.criteria.model[key] = ''
360
+ this.$refs.paged.$refs.criteria.model[key] = []
358
361
  })
359
362
  console.log('condition:', this.$refs.paged.$refs.criteria.condition)
360
363
  this.$refs.paged.$refs.criteria.condition = this.$refs.paged.$refs.criteria.condition+" and r.f_filiale like '%"+this.$login.f.f_fengongsi+"%'"