apply-clients 4.1.62-weinan → 4.1.63-weinan
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.
package/package.json
CHANGED
|
@@ -1,243 +1,248 @@
|
|
|
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>序号</th>
|
|
7
|
-
<th>材料名称</th>
|
|
8
|
-
<th>品名规格</th>
|
|
9
|
-
<th>型号</th>
|
|
10
|
-
<th>单价(元)</th>
|
|
11
|
-
<th>数量</th>
|
|
12
|
-
<th>金额</th>
|
|
13
|
-
<th>备注</th>
|
|
14
|
-
<th v-if="$parent.$parent.mark === 0">
|
|
15
|
-
<button type="button" class="btn btn-info head-but" @click="$parent.$parent.addshoufei()" >新增收费
|
|
16
|
-
</button>
|
|
17
|
-
</th>
|
|
18
|
-
</tr>
|
|
19
|
-
</template>
|
|
20
|
-
<template partial='body'>
|
|
21
|
-
<td style="text-align: center">{{ $index + 1}}</td>
|
|
22
|
-
<td style="text-align: center">{{ row.f_material_name}}</td>
|
|
23
|
-
<td style="text-align: center">{{ row.f_typename}}</td>
|
|
24
|
-
<td style="text-align: center">{{ row.f_typenumber}}</td>
|
|
25
|
-
<td style="text-align: center">{{ row.f_material_price}}</td>
|
|
26
|
-
<td style="text-align: center">{{ row.f_material_number}}</td>
|
|
27
|
-
<td style="text-align: center">{{ row.f_fee}}</td>
|
|
28
|
-
<td style="text-align: center">{{ row.f_remarks}}</td>
|
|
29
|
-
<td class="flex-around" v-if="$parent.$parent.mark === 0">
|
|
30
|
-
<button type="button" name="button" class="btn btn-link"
|
|
31
|
-
@click.stop="$parent.$parent.modifyParam(row)">修改
|
|
32
|
-
</button>
|
|
33
|
-
<button type="button" name="button" class="btn btn-link"
|
|
34
|
-
@click.stop="$parent.$parent.deleteItem(row)">删除
|
|
35
|
-
</button>
|
|
36
|
-
</td>
|
|
37
|
-
</template>
|
|
38
|
-
</data-grid>
|
|
39
|
-
<span>合计:{{ f_cost_sum }}元</span>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<modal :show.sync="showpay" v-ref:modal backdrop="false">
|
|
43
|
-
<header slot="modal-header" class="modal-header">
|
|
44
|
-
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
45
|
-
<h4 class="modal-title">新增材料收费</h4>
|
|
46
|
-
</header>
|
|
47
|
-
<article slot="modal-body" class="modal-body">
|
|
48
|
-
<div class="from-group">
|
|
49
|
-
<label>材料名称</label>
|
|
50
|
-
<input-select
|
|
51
|
-
class="select select_list"
|
|
52
|
-
:value.sync="addItem.f_material_name"
|
|
53
|
-
v-model="addItem.f_material_name"
|
|
54
|
-
:options="positions"
|
|
55
|
-
@change="setTypename"
|
|
56
|
-
:valueSingle="true"></input-select>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="from-group">
|
|
59
|
-
<label>品名规格</label>
|
|
60
|
-
<input-select
|
|
61
|
-
class="select select_list"
|
|
62
|
-
:value.sync="addItem.f_typename"
|
|
63
|
-
v-model="addItem.f_typename"
|
|
64
|
-
:options="typeNameList"
|
|
65
|
-
@change="setTypenumber"
|
|
66
|
-
:valueSingle="true"></input-select>
|
|
67
|
-
</div>
|
|
68
|
-
<div class="from-group">
|
|
69
|
-
<label>型号</label>
|
|
70
|
-
<input-select
|
|
71
|
-
class="select select_list"
|
|
72
|
-
:value.sync="addItem.f_typenumber"
|
|
73
|
-
v-model="addItem.f_typenumber"
|
|
74
|
-
:options="typeNumberList"
|
|
75
|
-
@change="setmaterialprice"
|
|
76
|
-
:valueSingle="true"></input-select>
|
|
77
|
-
</div>
|
|
78
|
-
<div class="from-group">
|
|
79
|
-
<label>单价(元)</label>
|
|
80
|
-
<input type="number" class="form-control" v-model="addItem.f_material_price" readonly>
|
|
81
|
-
</div>
|
|
82
|
-
<div class="from-group">
|
|
83
|
-
<label>数量</label>
|
|
84
|
-
<input type="number" class="form-control" v-model="addItem.f_material_number" >
|
|
85
|
-
</div>
|
|
86
|
-
<div class="from-group">
|
|
87
|
-
<label>金额</label>
|
|
88
|
-
<input type="number" class="form-control" v-model="addItem.f_fee" :value="smalltoBIG()" readonly>
|
|
89
|
-
</div>
|
|
90
|
-
<div class="from-group">
|
|
91
|
-
<label>备注</label>
|
|
92
|
-
<textarea type="text" rows="2" class="form-control" v-model="addItem.f_remarks"></textarea>
|
|
93
|
-
</div>
|
|
94
|
-
</article>
|
|
95
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
96
|
-
<button v-show="showpay" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
97
|
-
<button v-show="showpay" type="button" class="btn btn-success" @click='addpaydipetail' :disabled="!$v.valid">确认</button>
|
|
98
|
-
</footer>
|
|
99
|
-
</modal>
|
|
100
|
-
</template>
|
|
101
|
-
|
|
102
|
-
<script>
|
|
103
|
-
import {HttpResetClass} from 'vue-client'
|
|
104
|
-
import Vue from "vue";
|
|
105
|
-
import $ from 'jquery'
|
|
106
|
-
|
|
107
|
-
export default {
|
|
108
|
-
title: '材料收费',
|
|
109
|
-
data() {
|
|
110
|
-
return {
|
|
111
|
-
showpay: false, // 新增材料收费开关
|
|
112
|
-
model: {
|
|
113
|
-
rows: [] // 材料收费数据数组
|
|
114
|
-
},
|
|
115
|
-
addItem: {
|
|
116
|
-
f_material_price:0
|
|
117
|
-
},
|
|
118
|
-
f_cost_sum: 0,
|
|
119
|
-
positions:this.$appdata.getParam('品名及规格'),
|
|
120
|
-
typeNameList:null,
|
|
121
|
-
typeNumberList:null
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
props: {
|
|
125
|
-
selectdata: {
|
|
126
|
-
type: Object
|
|
127
|
-
},
|
|
128
|
-
mark: {
|
|
129
|
-
type: Number,
|
|
130
|
-
default: 0
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
ready() {
|
|
134
|
-
this.load()
|
|
135
|
-
},
|
|
136
|
-
methods: {
|
|
137
|
-
async load() {
|
|
138
|
-
let http = new HttpResetClass()
|
|
139
|
-
let data = {
|
|
140
|
-
tablename: 't_material_charges',
|
|
141
|
-
condition: `f_process_id = '${this.selectdata.f_process_id}'`
|
|
142
|
-
}
|
|
143
|
-
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取数据失败'})
|
|
144
|
-
.then((res) => {
|
|
145
|
-
this.model.rows = res.data
|
|
146
|
-
this.f_cost_sum = 0
|
|
147
|
-
for (var i = 0; i < this.model.rows.length; i++) {
|
|
148
|
-
this.f_cost_sum += Number(this.model.rows[i].f_fee)
|
|
149
|
-
}
|
|
150
|
-
this.$set('selectdata.f_cost_sum',this.f_cost_sum)
|
|
151
|
-
})
|
|
152
|
-
},
|
|
153
|
-
// 关闭模态框
|
|
154
|
-
close() {
|
|
155
|
-
this.showpay = false
|
|
156
|
-
this.addItem = {
|
|
157
|
-
f_material_price:0
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
|
-
// 模态框确定按钮保存数据
|
|
161
|
-
async addpaydipetail() {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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>序号</th>
|
|
7
|
+
<th>材料名称</th>
|
|
8
|
+
<th>品名规格</th>
|
|
9
|
+
<th>型号</th>
|
|
10
|
+
<th>单价(元)</th>
|
|
11
|
+
<th>数量</th>
|
|
12
|
+
<th>金额</th>
|
|
13
|
+
<th>备注</th>
|
|
14
|
+
<th v-if="$parent.$parent.mark === 0">
|
|
15
|
+
<button type="button" class="btn btn-info head-but" @click="$parent.$parent.addshoufei()" >新增收费
|
|
16
|
+
</button>
|
|
17
|
+
</th>
|
|
18
|
+
</tr>
|
|
19
|
+
</template>
|
|
20
|
+
<template partial='body'>
|
|
21
|
+
<td style="text-align: center">{{ $index + 1}}</td>
|
|
22
|
+
<td style="text-align: center">{{ row.f_material_name}}</td>
|
|
23
|
+
<td style="text-align: center">{{ row.f_typename}}</td>
|
|
24
|
+
<td style="text-align: center">{{ row.f_typenumber}}</td>
|
|
25
|
+
<td style="text-align: center">{{ row.f_material_price}}</td>
|
|
26
|
+
<td style="text-align: center">{{ row.f_material_number}}</td>
|
|
27
|
+
<td style="text-align: center">{{ row.f_fee}}</td>
|
|
28
|
+
<td style="text-align: center">{{ row.f_remarks}}</td>
|
|
29
|
+
<td class="flex-around" v-if="$parent.$parent.mark === 0">
|
|
30
|
+
<button type="button" name="button" class="btn btn-link"
|
|
31
|
+
@click.stop="$parent.$parent.modifyParam(row)">修改
|
|
32
|
+
</button>
|
|
33
|
+
<button type="button" name="button" class="btn btn-link"
|
|
34
|
+
@click.stop="$parent.$parent.deleteItem(row)">删除
|
|
35
|
+
</button>
|
|
36
|
+
</td>
|
|
37
|
+
</template>
|
|
38
|
+
</data-grid>
|
|
39
|
+
<span>合计:{{ f_cost_sum }}元</span>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<modal :show.sync="showpay" v-ref:modal backdrop="false">
|
|
43
|
+
<header slot="modal-header" class="modal-header">
|
|
44
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
45
|
+
<h4 class="modal-title">新增材料收费</h4>
|
|
46
|
+
</header>
|
|
47
|
+
<article slot="modal-body" class="modal-body">
|
|
48
|
+
<div class="from-group">
|
|
49
|
+
<label>材料名称</label>
|
|
50
|
+
<input-select
|
|
51
|
+
class="select select_list"
|
|
52
|
+
:value.sync="addItem.f_material_name"
|
|
53
|
+
v-model="addItem.f_material_name"
|
|
54
|
+
:options="positions"
|
|
55
|
+
@change="setTypename"
|
|
56
|
+
:valueSingle="true"></input-select>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="from-group">
|
|
59
|
+
<label>品名规格</label>
|
|
60
|
+
<input-select
|
|
61
|
+
class="select select_list"
|
|
62
|
+
:value.sync="addItem.f_typename"
|
|
63
|
+
v-model="addItem.f_typename"
|
|
64
|
+
:options="typeNameList"
|
|
65
|
+
@change="setTypenumber"
|
|
66
|
+
:valueSingle="true"></input-select>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="from-group">
|
|
69
|
+
<label>型号</label>
|
|
70
|
+
<input-select
|
|
71
|
+
class="select select_list"
|
|
72
|
+
:value.sync="addItem.f_typenumber"
|
|
73
|
+
v-model="addItem.f_typenumber"
|
|
74
|
+
:options="typeNumberList"
|
|
75
|
+
@change="setmaterialprice"
|
|
76
|
+
:valueSingle="true"></input-select>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="from-group">
|
|
79
|
+
<label>单价(元)</label>
|
|
80
|
+
<input type="number" class="form-control" v-model="addItem.f_material_price" readonly>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="from-group">
|
|
83
|
+
<label style="color: red">数量</label>
|
|
84
|
+
<input type="number" class="form-control" v-model="addItem.f_material_number" >
|
|
85
|
+
</div>
|
|
86
|
+
<div class="from-group">
|
|
87
|
+
<label>金额</label>
|
|
88
|
+
<input type="number" class="form-control" v-model="addItem.f_fee" :value="smalltoBIG()" readonly>
|
|
89
|
+
</div>
|
|
90
|
+
<div class="from-group">
|
|
91
|
+
<label>备注</label>
|
|
92
|
+
<textarea type="text" rows="2" class="form-control" v-model="addItem.f_remarks"></textarea>
|
|
93
|
+
</div>
|
|
94
|
+
</article>
|
|
95
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
96
|
+
<button v-show="showpay" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
97
|
+
<button v-show="showpay" type="button" class="btn btn-success" @click='addpaydipetail' :disabled="!$v.valid">确认</button>
|
|
98
|
+
</footer>
|
|
99
|
+
</modal>
|
|
100
|
+
</template>
|
|
101
|
+
|
|
102
|
+
<script>
|
|
103
|
+
import {HttpResetClass} from 'vue-client'
|
|
104
|
+
import Vue from "vue";
|
|
105
|
+
import $ from 'jquery'
|
|
106
|
+
|
|
107
|
+
export default {
|
|
108
|
+
title: '材料收费',
|
|
109
|
+
data() {
|
|
110
|
+
return {
|
|
111
|
+
showpay: false, // 新增材料收费开关
|
|
112
|
+
model: {
|
|
113
|
+
rows: [] // 材料收费数据数组
|
|
114
|
+
},
|
|
115
|
+
addItem: {
|
|
116
|
+
f_material_price:0
|
|
117
|
+
},
|
|
118
|
+
f_cost_sum: 0,
|
|
119
|
+
positions:this.$appdata.getParam('品名及规格'),
|
|
120
|
+
typeNameList:null,
|
|
121
|
+
typeNumberList:null
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
props: {
|
|
125
|
+
selectdata: {
|
|
126
|
+
type: Object
|
|
127
|
+
},
|
|
128
|
+
mark: {
|
|
129
|
+
type: Number,
|
|
130
|
+
default: 0
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
ready() {
|
|
134
|
+
this.load()
|
|
135
|
+
},
|
|
136
|
+
methods: {
|
|
137
|
+
async load() {
|
|
138
|
+
let http = new HttpResetClass()
|
|
139
|
+
let data = {
|
|
140
|
+
tablename: 't_material_charges',
|
|
141
|
+
condition: `f_process_id = '${this.selectdata.f_process_id}'`
|
|
142
|
+
}
|
|
143
|
+
let res = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/sql/singleTable`, {data: data}, {resolveMsg: null, rejectMsg: '获取数据失败'})
|
|
144
|
+
.then((res) => {
|
|
145
|
+
this.model.rows = res.data
|
|
146
|
+
this.f_cost_sum = 0
|
|
147
|
+
for (var i = 0; i < this.model.rows.length; i++) {
|
|
148
|
+
this.f_cost_sum += Number(this.model.rows[i].f_fee)
|
|
149
|
+
}
|
|
150
|
+
this.$set('selectdata.f_cost_sum',this.f_cost_sum)
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
// 关闭模态框
|
|
154
|
+
close() {
|
|
155
|
+
this.showpay = false
|
|
156
|
+
this.addItem = {
|
|
157
|
+
f_material_price:0
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
// 模态框确定按钮保存数据
|
|
161
|
+
async addpaydipetail() {
|
|
162
|
+
if( this.addItem.f_material_number==''|| Number(this.addItem.f_material_number)<0){
|
|
163
|
+
//提示数量不能为空
|
|
164
|
+
this.$showMessage('请输入数量必须大于0', 'warning')
|
|
165
|
+
return
|
|
166
|
+
}
|
|
167
|
+
let http = new HttpResetClass()
|
|
168
|
+
this.addItem.f_process_id = this.selectdata.f_process_id
|
|
169
|
+
this.addItem.f_apply_num = this.selectdata.f_apply_num
|
|
170
|
+
this.addItem.f_operator = Vue.user.name
|
|
171
|
+
this.addItem.f_department = Vue.user.f_department_name
|
|
172
|
+
this.addItem.f_filiale = Vue.user.orgs
|
|
173
|
+
await http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/addmaterialshoufei`, this.addItem, {resolveMsg: '保存成功', rejectMsg: '保存失败'})
|
|
174
|
+
.then((res) => {
|
|
175
|
+
this.close()
|
|
176
|
+
this.load()
|
|
177
|
+
})
|
|
178
|
+
},
|
|
179
|
+
deleteItem(row) {
|
|
180
|
+
let http = new HttpResetClass()
|
|
181
|
+
http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/logic/delectmaterialshoufei`, {data: row}, {resolveMsg: null, rejectMsg: '删除失败'})
|
|
182
|
+
.then((res) => {
|
|
183
|
+
this.load()
|
|
184
|
+
})
|
|
185
|
+
},
|
|
186
|
+
//新增收费 开启模态框
|
|
187
|
+
addshoufei() {
|
|
188
|
+
this.showpay = true
|
|
189
|
+
},
|
|
190
|
+
modifyParam(row) {
|
|
191
|
+
this.addItem = row
|
|
192
|
+
this.showpay = true
|
|
193
|
+
},
|
|
194
|
+
// 金额计算
|
|
195
|
+
smalltoBIG() {
|
|
196
|
+
let num = Number(this.addItem.f_material_price) * Number(this.addItem.f_material_number)
|
|
197
|
+
return num
|
|
198
|
+
},
|
|
199
|
+
setTypename (val) {
|
|
200
|
+
this.typeNameList = this.$appdata.getParam(val)
|
|
201
|
+
},
|
|
202
|
+
setTypenumber (val) {
|
|
203
|
+
this.typeNumberList = this.$appdata.getParam(val)
|
|
204
|
+
},
|
|
205
|
+
setmaterialprice(val){
|
|
206
|
+
if(val==null){
|
|
207
|
+
this.addItem.f_material_price = 0
|
|
208
|
+
}
|
|
209
|
+
this.addItem.f_material_price = this.$appdata.getSingleValue(val)
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
watch: {
|
|
213
|
+
'typeNumberList'(){
|
|
214
|
+
this.addItem.f_typenumber=null
|
|
215
|
+
this.addItem.f_material_price = 0
|
|
216
|
+
},
|
|
217
|
+
'typeNameList'() {
|
|
218
|
+
this.addItem.f_typename = null
|
|
219
|
+
this.addItem.f_typenumber = null
|
|
220
|
+
this.addItem.f_material_price = 0
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
</script>
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
<style scoped>
|
|
229
|
+
table {
|
|
230
|
+
border-collapse: collapse;
|
|
231
|
+
border-spacing: 0;
|
|
232
|
+
width: 100%;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
table, td, th {
|
|
236
|
+
padding: 0;
|
|
237
|
+
border: 1px solid black
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
tr {
|
|
241
|
+
height: 34px;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
#DynamicForm input {
|
|
245
|
+
text-align: center;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
</style>
|
|
@@ -120,7 +120,7 @@ export default {
|
|
|
120
120
|
},
|
|
121
121
|
// 模态框确定按钮保存数据
|
|
122
122
|
async addpaydipetail() {
|
|
123
|
-
if(this.addItem.f_material_number==''||this.addItem.f_material_number
|
|
123
|
+
if( this.addItem.f_material_number==''|| Number(this.addItem.f_material_number)<0){
|
|
124
124
|
//提示数量不能为空
|
|
125
125
|
this.$showMessage('请输入数量必须大于0', 'warning')
|
|
126
126
|
return
|