apply-clients 6.0.1 → 6.0.4
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/build/dev-server.js +72 -72
- package/package.json +1 -1
- package/src/apply.js +219 -219
- package/src/components/apply/base/rightview/InstallCardList2.vue +267 -268
- package/src/components/apply/base/rightview/carddetail/BuildFeeDetail2.vue +77 -77
- package/src/components/apply/base/rightview/carddetail/ChangeFeeDetail2.vue +116 -116
- package/src/components/apply/base/rightview/carddetail/ReduceFeeDetail2.vue +77 -77
- package/src/components/build/Install/ExplorationSelect.vue +308 -308
- package/src/components/build/Install/ExplorationUser.vue +315 -315
- package/src/components/build/Install/InstallFee/AddContract.vue +257 -257
- package/src/components/build/Install/InstallFee/InstallFee.vue +929 -929
- package/src/components/build/Install/InstallFee/InstallInfoSelect.vue +232 -232
- package/src/components/build/Install/InstallFee/PreparationFee.vue +223 -223
- package/src/components/build/Install/InstallFee/PrestoreFee.vue +630 -630
- package/src/components/build/Install/Process/CustomerBuildingMessage.vue +251 -251
- package/src/components/build/Install/Process/CustomerEquipmentMessage.vue +172 -172
- package/src/components/build/Install/Process/CustomerEssentialInfo.vue +1 -1
- package/src/components/build/Install/Process/CustomerFile.vue +423 -423
- package/src/components/build/Install/Process/CustomerMaterialMessage.vue +414 -414
- package/src/components/build/Install/Process/CustomerRecordMessage.vue +10 -10
- package/src/components/build/Install/Process/FeeNormeAndContratSigne.vue +376 -376
- package/src/components/build/Install/Process/MeterType.vue +379 -379
- package/src/components/build/Install/Process/PlaceControler.vue +304 -304
- package/src/components/build/Install/Process/boneng/qbj_placecontroler.vue +1 -1
- package/src/components/build/Install/Process/zhongran/ZR_Construction.vue +388 -388
- package/src/components/build/Install/Process/zhongran/ZR_CustomerEssentialInfo.vue +1 -1
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlan.vue +259 -259
- package/src/components/build/Install/Process/zhongran/ZR_MaterialPlanExamine.vue +243 -243
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler.vue +426 -426
- package/src/components/build/Install/Process/zhongran/ZR_PlaceControler_print.vue +187 -187
- package/src/components/build/Install/Process/zhongran/ZR_TestDesign.vue +441 -441
- package/src/components/build/Install/ProcessInfo/ApplyRecordCancel.vue +135 -135
- package/src/components/build/Install/bill/BillGZKMakeInfo.vue +58 -58
- package/src/components/build/Install/bill/BillQRKMakeInfo.vue +79 -79
- package/src/components/build/Install/bill/BillXSDMakeInfo.vue +206 -206
- package/src/components/build/Install/monitor/SupervisoryControl.vue +178 -178
- package/src/main.js +25 -25
- package/.gradle/3.5.1/file-changes/last-build.bin +0 -0
- package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
- package/.gradle/buildOutputCleanup/built.bin +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
- package/yarn.lock +0 -8074
|
@@ -1,257 +1,257 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="col-sm-12" style="height: auto">
|
|
3
|
-
<div class="auto select-overspread">
|
|
4
|
-
<div class="panel panel-info">
|
|
5
|
-
<div class="panel-heading auto">
|
|
6
|
-
<h3 class="panel-title">补充协议</h3>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
<div class="col-sm-12" style="height: auto">
|
|
11
|
-
<span class="col-sm-1"></span>
|
|
12
|
-
<span class="col-sm-3">总个数:{{contract_datas.length}}</span>
|
|
13
|
-
<span class="col-sm-2"></span>
|
|
14
|
-
<span class="col-sm-3" v-if="!$login.f.f_fengongsi.includes('彩虹')">总金额:{{sum}}元</span>
|
|
15
|
-
<button class="col-sm-offset-2 btn btn-warning" type="button" @click="add()">补充协议</button>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="col-sm-12" style="height: auto;border:1px solid #000;padding-top: 10px;" v-for="row in contract_datas">
|
|
18
|
-
<div class="col-sm-12">
|
|
19
|
-
<div class="form-group col-sm-3 form-input-group">
|
|
20
|
-
<label class="control-label">合同编号:</label>
|
|
21
|
-
<div class="col-sm-6">
|
|
22
|
-
<input class="form-control" type="text" v-model="row.f_contract_number" readonly>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<div class="form-group col-sm-3 form-input-group">
|
|
26
|
-
<label class="control-label">类型(合同/协议):</label>
|
|
27
|
-
<div class="col-sm-6">
|
|
28
|
-
<input class="form-control" type="text" v-model="row.f_contract_type" readonly>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
<div class="form-group col-sm-3 form-input-group">
|
|
32
|
-
<label class="control-label">签订日期:</label>
|
|
33
|
-
<div class="col-sm-6">
|
|
34
|
-
<input class="form-control" type="text" v-model="row.f_contract_time" readonly>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
<div class="col-sm-12">
|
|
39
|
-
<div class="form-group col-sm-3 form-input-group">
|
|
40
|
-
<label class="control-label">合同金额(元):</label>
|
|
41
|
-
<div class="col-sm-6">
|
|
42
|
-
<input class="form-control" type="text" v-model="row.f_contract_money" readonly>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
<div class="form-group col-sm-3 form-input-group">
|
|
46
|
-
<label class="control-label">金额大写:</label>
|
|
47
|
-
<div class="col-sm-6">
|
|
48
|
-
<input class="form-control" type="text" v-model="row.f_capital" readonly>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
<div class="form-group col-sm-3 form-input-group">
|
|
52
|
-
<label class="control-label">合同性质:</label>
|
|
53
|
-
<div class="col-sm-6">
|
|
54
|
-
<input class="form-control" type="text" v-model="row.f_contract_nature" readonly>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="form-group col-sm-12 form-input-group">
|
|
59
|
-
<label class="control-label">缴费类型:</label>
|
|
60
|
-
<div class="col-sm-5">
|
|
61
|
-
<textarea class="form-control" v-model="row.f_pay_type" rows="3" readonly></textarea>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="form-group col-sm-12 form-input-group">
|
|
65
|
-
<label class="control-label">备注:</label>
|
|
66
|
-
<div class="col-sm-5">
|
|
67
|
-
<textarea class="form-control" v-model="row.t_remarks" rows="2" readonly></textarea>
|
|
68
|
-
</div>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
72
|
-
<header slot="modal-header" class="modal-header">
|
|
73
|
-
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
74
|
-
<h4 class="modal-title">新增合同</h4>
|
|
75
|
-
</header>
|
|
76
|
-
<article slot="modal-body" class="modal-body">
|
|
77
|
-
<div class="from-group">
|
|
78
|
-
<label>合同编号</label>
|
|
79
|
-
<input type="text" class="form-control" v-model="addcontract.f_contract_number" readonly>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="from-group">
|
|
82
|
-
<label>签订日期</label>
|
|
83
|
-
<div>
|
|
84
|
-
<datepicker width="600.76px;"
|
|
85
|
-
:value.sync="addItem.f_contract_time"
|
|
86
|
-
:format="'yyyy-MM-dd'"
|
|
87
|
-
v-model="addItem.f_contract_time" readonly="readonly"
|
|
88
|
-
:show-reset-button="reset">
|
|
89
|
-
</datepicker>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
<div class="from-group">
|
|
93
|
-
<label>合同金额(元)</label>
|
|
94
|
-
<input type="text" class="form-control" v-model="addItem.f_contract_money">
|
|
95
|
-
</div>
|
|
96
|
-
<div class="form-group">
|
|
97
|
-
<label class="control-label">金额大写:</label>
|
|
98
|
-
<input class="form-control" type="text" v-model="getCapital" readonly>
|
|
99
|
-
</div>
|
|
100
|
-
|
|
101
|
-
<div class="from-group">
|
|
102
|
-
<label>缴费类型</label>
|
|
103
|
-
<v-select :options="jiaofei"
|
|
104
|
-
v-model="addItem.f_pay_type" :value.sync="addItem.f_pay_type" close-on-select>
|
|
105
|
-
</v-select>
|
|
106
|
-
</div>
|
|
107
|
-
<div class="from-group">
|
|
108
|
-
<label>备注</label>
|
|
109
|
-
<textarea class="form-control" v-model="addItem.t_remarks" rows="3"></textarea>
|
|
110
|
-
</div>
|
|
111
|
-
</article>
|
|
112
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
113
|
-
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
114
|
-
<button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
115
|
-
</footer>
|
|
116
|
-
</modal>
|
|
117
|
-
</div>
|
|
118
|
-
</template>
|
|
119
|
-
|
|
120
|
-
<script>
|
|
121
|
-
import {HttpResetClass} from 'vue-client'
|
|
122
|
-
|
|
123
|
-
export default {
|
|
124
|
-
|
|
125
|
-
title: "追加合同",
|
|
126
|
-
props: ['addcontract'],
|
|
127
|
-
data() {
|
|
128
|
-
return {
|
|
129
|
-
contract_datas: [], // 合同信息数组
|
|
130
|
-
show: false, // 新增合同模态框控制
|
|
131
|
-
addItem: null, // 模态框零时对象
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
ready() {
|
|
135
|
-
// this.contract_datas = {
|
|
136
|
-
// f_contract_number: 1,
|
|
137
|
-
// f_contract_time: 2,
|
|
138
|
-
// f_contract_money: 9,
|
|
139
|
-
// f_pay_type: 3,
|
|
140
|
-
// t_remarks: 5
|
|
141
|
-
// }, //测试数据
|
|
142
|
-
// {f_contract_number: 1, f_contract_money: 9, f_contract_time: 2, f_pay_type: 3, t_remarks: 5}
|
|
143
|
-
this.load();
|
|
144
|
-
},
|
|
145
|
-
methods: {
|
|
146
|
-
// 小写转换大写
|
|
147
|
-
smalltoBIG(n) {
|
|
148
|
-
let fraction = ['角', '分'];
|
|
149
|
-
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
150
|
-
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
151
|
-
let head = n < 0 ? '欠' : '';
|
|
152
|
-
n = Math.abs(n);
|
|
153
|
-
|
|
154
|
-
let s = '';
|
|
155
|
-
|
|
156
|
-
for (var i = 0; i < fraction.length; i++) {
|
|
157
|
-
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
158
|
-
}
|
|
159
|
-
s = s || '整';
|
|
160
|
-
n = Math.floor(n);
|
|
161
|
-
|
|
162
|
-
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
163
|
-
let p = '';
|
|
164
|
-
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
165
|
-
p = digit[n % 10] + unit[1][j] + p;
|
|
166
|
-
n = Math.floor(n / 10);
|
|
167
|
-
}
|
|
168
|
-
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
169
|
-
}
|
|
170
|
-
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
171
|
-
},
|
|
172
|
-
// 获取数据库数据
|
|
173
|
-
async load() {
|
|
174
|
-
let http = new HttpResetClass();
|
|
175
|
-
let data = {
|
|
176
|
-
tablename: 't_contract',
|
|
177
|
-
condition: `processid = '${this.addcontract.f_process_id}'`
|
|
178
|
-
}
|
|
179
|
-
let res = await http.load('POST', 'rs/sql/
|
|
180
|
-
this.contract_datas = []
|
|
181
|
-
res.data.forEach((item,index)=>{
|
|
182
|
-
if(item.f_contract_nature.includes("\"")){
|
|
183
|
-
item.f_contract_nature = item.f_contract_nature.split("\"")[1]
|
|
184
|
-
}
|
|
185
|
-
if(item.f_pay_type.includes("\"")){
|
|
186
|
-
item.f_pay_type = item.f_pay_type.split("\"")[1]
|
|
187
|
-
}
|
|
188
|
-
})
|
|
189
|
-
this.contract_datas = res.data
|
|
190
|
-
},
|
|
191
|
-
// 新增按钮触发事件
|
|
192
|
-
add() {
|
|
193
|
-
if(!this.contract_datas){
|
|
194
|
-
this.show = true
|
|
195
|
-
}else{
|
|
196
|
-
this.$showMessage("请先在主流程中签订合同")
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
// 模态框确定按钮触发
|
|
201
|
-
async confirm() {
|
|
202
|
-
if(this.addItem.f_contract_money){
|
|
203
|
-
let http = new HttpResetClass();
|
|
204
|
-
this.addItem.f_contract_nature = this.addcontract.f_contract_nature
|
|
205
|
-
this.addItem.f_contract_number = this.addcontract.f_contract_number
|
|
206
|
-
this.addItem.processid = this.addcontract.f_process_id
|
|
207
|
-
this.addItem.f_contract_type = '补充协议'
|
|
208
|
-
this.addItem.applyid = this.addcontract.f_apply_num
|
|
209
|
-
this.addItem.f_operator = this.$login.f.name
|
|
210
|
-
this.addItem.f_department = this.$login.f.f_parentname
|
|
211
|
-
this.addItem.f_filiale = this.$login.f.f_fengongsi
|
|
212
|
-
this.contract_datas.push(this.addItem)
|
|
213
|
-
await http.load('POST', 'rs/logic/saveentity', {data:{tablename:'t_contract',parameters:this.addItem}}, {resolveMsg: null, rejectMsg: "添加失败"})
|
|
214
|
-
.then((res) => {
|
|
215
|
-
this.close()
|
|
216
|
-
})
|
|
217
|
-
}{
|
|
218
|
-
this.$showMessage("请输入金额")
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
},
|
|
223
|
-
// 模态框关闭按钮触发
|
|
224
|
-
close() {
|
|
225
|
-
this.show = false
|
|
226
|
-
this.addItem = null
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
},
|
|
230
|
-
computed: {
|
|
231
|
-
// 计算大写
|
|
232
|
-
getCapital() {
|
|
233
|
-
if (this.addItem.f_contract_money) {
|
|
234
|
-
this.addItem.f_capital = this.smalltoBIG(Number(this.addItem.f_contract_money))
|
|
235
|
-
}
|
|
236
|
-
return this.addItem.f_capital
|
|
237
|
-
},
|
|
238
|
-
// 总金额计算
|
|
239
|
-
sum() {
|
|
240
|
-
let num = 0;
|
|
241
|
-
for (var i = 0; i < this.contract_datas.length; i++) {
|
|
242
|
-
num += Number(this.contract_datas[i].f_contract_money)
|
|
243
|
-
}
|
|
244
|
-
return num
|
|
245
|
-
},
|
|
246
|
-
jiaofei() {
|
|
247
|
-
return this.$appdata.getParam('缴费类型')
|
|
248
|
-
// return [{label: '全部', value: ''}, ...AppData.getParam('缴费类型')]
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
</script>
|
|
253
|
-
<style scoped>
|
|
254
|
-
textarea {
|
|
255
|
-
width: 74.5%;
|
|
256
|
-
}
|
|
257
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="col-sm-12" style="height: auto">
|
|
3
|
+
<div class="auto select-overspread">
|
|
4
|
+
<div class="panel panel-info">
|
|
5
|
+
<div class="panel-heading auto">
|
|
6
|
+
<h3 class="panel-title">补充协议</h3>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
<div class="col-sm-12" style="height: auto">
|
|
11
|
+
<span class="col-sm-1"></span>
|
|
12
|
+
<span class="col-sm-3">总个数:{{contract_datas.length}}</span>
|
|
13
|
+
<span class="col-sm-2"></span>
|
|
14
|
+
<span class="col-sm-3" v-if="!$login.f.f_fengongsi.includes('彩虹')">总金额:{{sum}}元</span>
|
|
15
|
+
<button class="col-sm-offset-2 btn btn-warning" type="button" @click="add()">补充协议</button>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="col-sm-12" style="height: auto;border:1px solid #000;padding-top: 10px;" v-for="row in contract_datas">
|
|
18
|
+
<div class="col-sm-12">
|
|
19
|
+
<div class="form-group col-sm-3 form-input-group">
|
|
20
|
+
<label class="control-label">合同编号:</label>
|
|
21
|
+
<div class="col-sm-6">
|
|
22
|
+
<input class="form-control" type="text" v-model="row.f_contract_number" readonly>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="form-group col-sm-3 form-input-group">
|
|
26
|
+
<label class="control-label">类型(合同/协议):</label>
|
|
27
|
+
<div class="col-sm-6">
|
|
28
|
+
<input class="form-control" type="text" v-model="row.f_contract_type" readonly>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="form-group col-sm-3 form-input-group">
|
|
32
|
+
<label class="control-label">签订日期:</label>
|
|
33
|
+
<div class="col-sm-6">
|
|
34
|
+
<input class="form-control" type="text" v-model="row.f_contract_time" readonly>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-sm-12">
|
|
39
|
+
<div class="form-group col-sm-3 form-input-group">
|
|
40
|
+
<label class="control-label">合同金额(元):</label>
|
|
41
|
+
<div class="col-sm-6">
|
|
42
|
+
<input class="form-control" type="text" v-model="row.f_contract_money" readonly>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="form-group col-sm-3 form-input-group">
|
|
46
|
+
<label class="control-label">金额大写:</label>
|
|
47
|
+
<div class="col-sm-6">
|
|
48
|
+
<input class="form-control" type="text" v-model="row.f_capital" readonly>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div class="form-group col-sm-3 form-input-group">
|
|
52
|
+
<label class="control-label">合同性质:</label>
|
|
53
|
+
<div class="col-sm-6">
|
|
54
|
+
<input class="form-control" type="text" v-model="row.f_contract_nature" readonly>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="form-group col-sm-12 form-input-group">
|
|
59
|
+
<label class="control-label">缴费类型:</label>
|
|
60
|
+
<div class="col-sm-5">
|
|
61
|
+
<textarea class="form-control" v-model="row.f_pay_type" rows="3" readonly></textarea>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="form-group col-sm-12 form-input-group">
|
|
65
|
+
<label class="control-label">备注:</label>
|
|
66
|
+
<div class="col-sm-5">
|
|
67
|
+
<textarea class="form-control" v-model="row.t_remarks" rows="2" readonly></textarea>
|
|
68
|
+
</div>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<modal :show.sync="show" v-ref:modal backdrop="false">
|
|
72
|
+
<header slot="modal-header" class="modal-header">
|
|
73
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
|
74
|
+
<h4 class="modal-title">新增合同</h4>
|
|
75
|
+
</header>
|
|
76
|
+
<article slot="modal-body" class="modal-body">
|
|
77
|
+
<div class="from-group">
|
|
78
|
+
<label>合同编号</label>
|
|
79
|
+
<input type="text" class="form-control" v-model="addcontract.f_contract_number" readonly>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="from-group">
|
|
82
|
+
<label>签订日期</label>
|
|
83
|
+
<div>
|
|
84
|
+
<datepicker width="600.76px;"
|
|
85
|
+
:value.sync="addItem.f_contract_time"
|
|
86
|
+
:format="'yyyy-MM-dd'"
|
|
87
|
+
v-model="addItem.f_contract_time" readonly="readonly"
|
|
88
|
+
:show-reset-button="reset">
|
|
89
|
+
</datepicker>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div class="from-group">
|
|
93
|
+
<label>合同金额(元)</label>
|
|
94
|
+
<input type="text" class="form-control" v-model="addItem.f_contract_money">
|
|
95
|
+
</div>
|
|
96
|
+
<div class="form-group">
|
|
97
|
+
<label class="control-label">金额大写:</label>
|
|
98
|
+
<input class="form-control" type="text" v-model="getCapital" readonly>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<div class="from-group">
|
|
102
|
+
<label>缴费类型</label>
|
|
103
|
+
<v-select :options="jiaofei"
|
|
104
|
+
v-model="addItem.f_pay_type" :value.sync="addItem.f_pay_type" close-on-select>
|
|
105
|
+
</v-select>
|
|
106
|
+
</div>
|
|
107
|
+
<div class="from-group">
|
|
108
|
+
<label>备注</label>
|
|
109
|
+
<textarea class="form-control" v-model="addItem.t_remarks" rows="3"></textarea>
|
|
110
|
+
</div>
|
|
111
|
+
</article>
|
|
112
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
113
|
+
<button v-show="show" type="button" class="btn btn-default" @click='close'>取消</button>
|
|
114
|
+
<button v-show="show" type="button" class="btn btn-success" @click='confirm'>确认</button>
|
|
115
|
+
</footer>
|
|
116
|
+
</modal>
|
|
117
|
+
</div>
|
|
118
|
+
</template>
|
|
119
|
+
|
|
120
|
+
<script>
|
|
121
|
+
import {HttpResetClass} from 'vue-client'
|
|
122
|
+
|
|
123
|
+
export default {
|
|
124
|
+
|
|
125
|
+
title: "追加合同",
|
|
126
|
+
props: ['addcontract'],
|
|
127
|
+
data() {
|
|
128
|
+
return {
|
|
129
|
+
contract_datas: [], // 合同信息数组
|
|
130
|
+
show: false, // 新增合同模态框控制
|
|
131
|
+
addItem: null, // 模态框零时对象
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
ready() {
|
|
135
|
+
// this.contract_datas = {
|
|
136
|
+
// f_contract_number: 1,
|
|
137
|
+
// f_contract_time: 2,
|
|
138
|
+
// f_contract_money: 9,
|
|
139
|
+
// f_pay_type: 3,
|
|
140
|
+
// t_remarks: 5
|
|
141
|
+
// }, //测试数据
|
|
142
|
+
// {f_contract_number: 1, f_contract_money: 9, f_contract_time: 2, f_pay_type: 3, t_remarks: 5}
|
|
143
|
+
this.load();
|
|
144
|
+
},
|
|
145
|
+
methods: {
|
|
146
|
+
// 小写转换大写
|
|
147
|
+
smalltoBIG(n) {
|
|
148
|
+
let fraction = ['角', '分'];
|
|
149
|
+
let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
|
|
150
|
+
let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
|
|
151
|
+
let head = n < 0 ? '欠' : '';
|
|
152
|
+
n = Math.abs(n);
|
|
153
|
+
|
|
154
|
+
let s = '';
|
|
155
|
+
|
|
156
|
+
for (var i = 0; i < fraction.length; i++) {
|
|
157
|
+
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
|
|
158
|
+
}
|
|
159
|
+
s = s || '整';
|
|
160
|
+
n = Math.floor(n);
|
|
161
|
+
|
|
162
|
+
for (var i = 0; i < unit[0].length && n > 0; i++) {
|
|
163
|
+
let p = '';
|
|
164
|
+
for (var j = 0; j < unit[1].length && n > 0; j++) {
|
|
165
|
+
p = digit[n % 10] + unit[1][j] + p;
|
|
166
|
+
n = Math.floor(n / 10);
|
|
167
|
+
}
|
|
168
|
+
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
|
|
169
|
+
}
|
|
170
|
+
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
|
|
171
|
+
},
|
|
172
|
+
// 获取数据库数据
|
|
173
|
+
async load() {
|
|
174
|
+
let http = new HttpResetClass();
|
|
175
|
+
let data = {
|
|
176
|
+
tablename: 't_contract',
|
|
177
|
+
condition: `processid = '${this.addcontract.f_process_id}'`
|
|
178
|
+
}
|
|
179
|
+
let res = await http.load('POST', 'rs/sql/applysingleTable', {data: data}, {resolveMsg: null, rejectMsg: '获取合同表失败'})
|
|
180
|
+
this.contract_datas = []
|
|
181
|
+
res.data.forEach((item,index)=>{
|
|
182
|
+
if(item.f_contract_nature.includes("\"")){
|
|
183
|
+
item.f_contract_nature = item.f_contract_nature.split("\"")[1]
|
|
184
|
+
}
|
|
185
|
+
if(item.f_pay_type.includes("\"")){
|
|
186
|
+
item.f_pay_type = item.f_pay_type.split("\"")[1]
|
|
187
|
+
}
|
|
188
|
+
})
|
|
189
|
+
this.contract_datas = res.data
|
|
190
|
+
},
|
|
191
|
+
// 新增按钮触发事件
|
|
192
|
+
add() {
|
|
193
|
+
if(!this.contract_datas){
|
|
194
|
+
this.show = true
|
|
195
|
+
}else{
|
|
196
|
+
this.$showMessage("请先在主流程中签订合同")
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
},
|
|
200
|
+
// 模态框确定按钮触发
|
|
201
|
+
async confirm() {
|
|
202
|
+
if(this.addItem.f_contract_money){
|
|
203
|
+
let http = new HttpResetClass();
|
|
204
|
+
this.addItem.f_contract_nature = this.addcontract.f_contract_nature
|
|
205
|
+
this.addItem.f_contract_number = this.addcontract.f_contract_number
|
|
206
|
+
this.addItem.processid = this.addcontract.f_process_id
|
|
207
|
+
this.addItem.f_contract_type = '补充协议'
|
|
208
|
+
this.addItem.applyid = this.addcontract.f_apply_num
|
|
209
|
+
this.addItem.f_operator = this.$login.f.name
|
|
210
|
+
this.addItem.f_department = this.$login.f.f_parentname
|
|
211
|
+
this.addItem.f_filiale = this.$login.f.f_fengongsi
|
|
212
|
+
this.contract_datas.push(this.addItem)
|
|
213
|
+
await http.load('POST', 'rs/logic/saveentity', {data:{tablename:'t_contract',parameters:this.addItem}}, {resolveMsg: null, rejectMsg: "添加失败"})
|
|
214
|
+
.then((res) => {
|
|
215
|
+
this.close()
|
|
216
|
+
})
|
|
217
|
+
}{
|
|
218
|
+
this.$showMessage("请输入金额")
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
},
|
|
223
|
+
// 模态框关闭按钮触发
|
|
224
|
+
close() {
|
|
225
|
+
this.show = false
|
|
226
|
+
this.addItem = null
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
},
|
|
230
|
+
computed: {
|
|
231
|
+
// 计算大写
|
|
232
|
+
getCapital() {
|
|
233
|
+
if (this.addItem.f_contract_money) {
|
|
234
|
+
this.addItem.f_capital = this.smalltoBIG(Number(this.addItem.f_contract_money))
|
|
235
|
+
}
|
|
236
|
+
return this.addItem.f_capital
|
|
237
|
+
},
|
|
238
|
+
// 总金额计算
|
|
239
|
+
sum() {
|
|
240
|
+
let num = 0;
|
|
241
|
+
for (var i = 0; i < this.contract_datas.length; i++) {
|
|
242
|
+
num += Number(this.contract_datas[i].f_contract_money)
|
|
243
|
+
}
|
|
244
|
+
return num
|
|
245
|
+
},
|
|
246
|
+
jiaofei() {
|
|
247
|
+
return this.$appdata.getParam('缴费类型')
|
|
248
|
+
// return [{label: '全部', value: ''}, ...AppData.getParam('缴费类型')]
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
</script>
|
|
253
|
+
<style scoped>
|
|
254
|
+
textarea {
|
|
255
|
+
width: 74.5%;
|
|
256
|
+
}
|
|
257
|
+
</style>
|