apply-clients 3.4.82 → 3.4.83-2
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 +119 -120
- package/package.json +1 -1
- package/src/filiale/hongda/android/AppAddMaterialScience.vue +393 -0
- package/src/filiale/hongda/android/AppExplorationUser.vue +507 -0
- package/src/filiale/hongda/android.js +7 -0
- package/src/filiale/hongda/pc/ExplorationSelect.vue +485 -0
- package/src/filiale/hongda/pc/ServiceControl.vue +1930 -0
- package/src/filiale/hongda/pc/ServiceView.vue +533 -448
- package/src/filiale/hongda/pc/addMaterialScience.vue +536 -0
- package/src/filiale/hongda/pc/chargeManagement.vue +691 -0
- package/src/filiale/hongda/pc/printChargepc.vue +135 -0
- package/src/filiale/hongda/pc/printactivatecard.vue +140 -0
- package/src/filiale/hongda/pc/printinstall.vue +105 -0
- package/src/filiale/hongda/pc.js +7 -0
- package/src/filiale/shexian/android/AppExplorationUser.vue +622 -622
- package/src/filiale/shexian/android/AppInstallationDetails.vue +498 -498
- package/src/filiale/shexian/android/AppServiceView.vue +745 -745
- package/src/filiale/shexian/android/AppTakePic.vue +145 -0
- package/src/filiale/shexian/android.js +9 -9
- package/src/filiale/shexian/pc/InstallationDetails.vue +614 -614
- package/src/filiale/shexian/pc/ServiceView.vue +1020 -1020
- package/src/filiale/shexian/pc.js +9 -9
- package/src/main.js +23 -23
package/build/dev-server.js
CHANGED
|
@@ -1,120 +1,119 @@
|
|
|
1
|
-
var express = require('express')
|
|
2
|
-
var webpack = require('webpack')
|
|
3
|
-
var config = require('./webpack.dev.conf')
|
|
4
|
-
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
-
// var httpProxy = require('http-proxy')
|
|
6
|
-
var app = express()
|
|
7
|
-
var compiler = webpack(config)
|
|
8
|
-
// var proxy = httpProxy.createProxyServer()
|
|
9
|
-
// var ldap = 'http://121.36.79.201:8400'
|
|
10
|
-
// var applyinstall = 'http://121.36.79.201:8400'
|
|
11
|
-
var ldap = 'http://
|
|
12
|
-
var applyinstall = 'http://
|
|
13
|
-
|
|
14
|
-
var proxyTable = {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
app.use(
|
|
94
|
-
//
|
|
95
|
-
// res.header('Access-Control-Allow-
|
|
96
|
-
// res.header('Access-Control-Allow-
|
|
97
|
-
// res.header('
|
|
98
|
-
// res.header('
|
|
99
|
-
// res.header('
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
})
|
|
1
|
+
var express = require('express')
|
|
2
|
+
var webpack = require('webpack')
|
|
3
|
+
var config = require('./webpack.dev.conf')
|
|
4
|
+
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
+
// var httpProxy = require('http-proxy')
|
|
6
|
+
var app = express()
|
|
7
|
+
var compiler = webpack(config)
|
|
8
|
+
// var proxy = httpProxy.createProxyServer()
|
|
9
|
+
// var ldap = 'http://121.36.79.201:8400'
|
|
10
|
+
// var applyinstall = 'http://121.36.79.201:8400'
|
|
11
|
+
var ldap = 'http://219.138.226.181:8401'
|
|
12
|
+
var applyinstall = 'http://219.138.226.181:8401'
|
|
13
|
+
|
|
14
|
+
var proxyTable = {
|
|
15
|
+
'/rs/logic/getSaleInitData': {
|
|
16
|
+
target: ldap
|
|
17
|
+
},
|
|
18
|
+
'/rs/workflow': {
|
|
19
|
+
target: applyinstall
|
|
20
|
+
},
|
|
21
|
+
'/rs/vue': {
|
|
22
|
+
target: ldap
|
|
23
|
+
},
|
|
24
|
+
// 查找资源服务数据
|
|
25
|
+
'/rs/search': {
|
|
26
|
+
target: ldap
|
|
27
|
+
},
|
|
28
|
+
// 街道查询
|
|
29
|
+
'/rs/sql/address_getstreetlist': {
|
|
30
|
+
target: ldap
|
|
31
|
+
},
|
|
32
|
+
// 创建街道
|
|
33
|
+
'/rs/logic/address_updatestreet': {
|
|
34
|
+
target: ldap
|
|
35
|
+
},
|
|
36
|
+
// 创建小区
|
|
37
|
+
'/rs/logic/address_updatearea': {
|
|
38
|
+
target: ldap
|
|
39
|
+
},
|
|
40
|
+
// 用户登录服务地址
|
|
41
|
+
'/rs/user': {
|
|
42
|
+
target: ldap
|
|
43
|
+
},
|
|
44
|
+
'/rs/logic/getInitData': {
|
|
45
|
+
target: ldap?ldap:applyinstall
|
|
46
|
+
},
|
|
47
|
+
'/rs/logic/getLogin': {
|
|
48
|
+
target: ldap
|
|
49
|
+
},
|
|
50
|
+
'/rs/file': { // 文件上传
|
|
51
|
+
target: applyinstall
|
|
52
|
+
},
|
|
53
|
+
'/project': { // 文件回显
|
|
54
|
+
target: applyinstall
|
|
55
|
+
},
|
|
56
|
+
'/rs': {
|
|
57
|
+
target: applyinstall
|
|
58
|
+
},
|
|
59
|
+
'/ws': {
|
|
60
|
+
target: applyinstall,
|
|
61
|
+
ws: true // 代理webSocket
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
66
|
+
publicPath: config.output.publicPath,
|
|
67
|
+
stats: {
|
|
68
|
+
colors: true,
|
|
69
|
+
chunks: false
|
|
70
|
+
}
|
|
71
|
+
})
|
|
72
|
+
|
|
73
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
74
|
+
// force page reload when html-webpack-plugin template changes
|
|
75
|
+
compiler.plugin('compilation', function (compilation) {
|
|
76
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
77
|
+
hotMiddleware.publish({action: 'reload'})
|
|
78
|
+
cb()
|
|
79
|
+
})
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
// proxy api requests
|
|
83
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
84
|
+
var options = proxyTable[context]
|
|
85
|
+
if (typeof options === 'string') {
|
|
86
|
+
options = {target: options}
|
|
87
|
+
}
|
|
88
|
+
app.use(proxyMiddleware(context, options))
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
// handle fallback for HTML5 history API
|
|
92
|
+
app.use(require('connect-history-api-fallback')())
|
|
93
|
+
// app.use(function (req, res, next) {
|
|
94
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
95
|
+
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
96
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
97
|
+
// res.header('X-Powered-By', '3,2,1')
|
|
98
|
+
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
99
|
+
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
100
|
+
// next()
|
|
101
|
+
// })
|
|
102
|
+
|
|
103
|
+
// serve webpack bundle output
|
|
104
|
+
app.use(devMiddleware)
|
|
105
|
+
|
|
106
|
+
// enable hot-reload and state-preserving
|
|
107
|
+
// compilation error display
|
|
108
|
+
app.use(hotMiddleware)
|
|
109
|
+
|
|
110
|
+
// serve pure static assets
|
|
111
|
+
app.use('/static', express.static('./static'))
|
|
112
|
+
|
|
113
|
+
module.exports = app.listen(8300, function (err) {
|
|
114
|
+
if (err) {
|
|
115
|
+
console.log(err)
|
|
116
|
+
return
|
|
117
|
+
}
|
|
118
|
+
console.log('Listening at http://localhost:8300')
|
|
119
|
+
})
|
package/package.json
CHANGED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<data-grid :model="onetomany" class="list_area table_sy">
|
|
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">
|
|
14
|
+
<button class="button_new button_spacing" type="button" @click="$parent.$parent.openMaterialModal()">添加
|
|
15
|
+
</button>
|
|
16
|
+
</th>
|
|
17
|
+
</tr>
|
|
18
|
+
</template>
|
|
19
|
+
<template partial='body'>
|
|
20
|
+
<tr>
|
|
21
|
+
<td style="text-align: center;">
|
|
22
|
+
<nobr>{{$index+1}}</nobr>
|
|
23
|
+
</td>
|
|
24
|
+
<td style="text-align: center;">
|
|
25
|
+
<nobr>{{row.f_material_name}}</nobr>
|
|
26
|
+
</td>
|
|
27
|
+
<td style="text-align: center;">
|
|
28
|
+
<nobr>{{row.f_material_style}}</nobr>
|
|
29
|
+
</td>
|
|
30
|
+
<td style="text-align: center;">
|
|
31
|
+
<nobr>{{row.f_material_unit}}</nobr>
|
|
32
|
+
</td>
|
|
33
|
+
<td style="text-align: center;">
|
|
34
|
+
<nobr>{{row.f_material_number}}</nobr>
|
|
35
|
+
</td>
|
|
36
|
+
<td style="text-align: center;">
|
|
37
|
+
<nobr>{{row.f_material_price}}</nobr>
|
|
38
|
+
</td>
|
|
39
|
+
<td style="text-align: center;">
|
|
40
|
+
<nobr>{{row.f_material_type}}</nobr>
|
|
41
|
+
</td>
|
|
42
|
+
<td style="text-align: center;">
|
|
43
|
+
<button type="button" class="button_search button_spacing"
|
|
44
|
+
@click="$parent.$parent.updateMaterial($index,row)">修改
|
|
45
|
+
</button>
|
|
46
|
+
<button type="button" class="button_delete button_spacing" @click="$parent.$parent.deleteMaterial(row)">删除
|
|
47
|
+
</button>
|
|
48
|
+
</td>
|
|
49
|
+
</tr>
|
|
50
|
+
</template>
|
|
51
|
+
</data-grid>
|
|
52
|
+
<modal v-if="showMaterialModal" :show.sync="showMaterialModal" v-ref:modal :large="true"
|
|
53
|
+
:backdrop="false" :title="title">
|
|
54
|
+
<header slot="modal-header" class="modal-header">
|
|
55
|
+
<button type="button" class="close" @click="closeMaterials"><span>×</span></button>
|
|
56
|
+
<h4 class="modal-title">{{title}}</h4>
|
|
57
|
+
</header>
|
|
58
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
59
|
+
<div v-for="(i,item) in materials" class="form-group col-sm-12 panel panel-info">
|
|
60
|
+
<div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
|
|
61
|
+
<div class="col-sm-6 text-left">材料{{$index+1}}信息</div>
|
|
62
|
+
<div class="col-sm-6 text-right">
|
|
63
|
+
<button
|
|
64
|
+
class="button_delete button_spacing"
|
|
65
|
+
@click.prevent="deleteDevicesinfo(i)"
|
|
66
|
+
v-if="title === '新增'"
|
|
67
|
+
>删除
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div class="form-group col-sm-6">
|
|
72
|
+
<label class="col-sm-4 control-label">选择材料:</label>
|
|
73
|
+
<div class="col-sm-8">
|
|
74
|
+
<input-select
|
|
75
|
+
class="select select_list"
|
|
76
|
+
:value.sync="item.material"
|
|
77
|
+
v-model="item.material"
|
|
78
|
+
:options="meterialOptions"
|
|
79
|
+
:disable="mark === 1"
|
|
80
|
+
@change="modifyOtherValue(i)"
|
|
81
|
+
:valueSingle="true"></input-select>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
<div class="form-group col-sm-6" :class="[item.f_material_name ? '' : 'has-error']">
|
|
85
|
+
<label class="col-sm-4 control-label">材料名称:</label>
|
|
86
|
+
<div class="col-sm-8">
|
|
87
|
+
<input class="form-control input_view" style="" type="text"
|
|
88
|
+
placeholder="材料名称"
|
|
89
|
+
v-model="item.f_material_name"
|
|
90
|
+
:value="item.f_material_name"
|
|
91
|
+
/>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
<div class="form-group col-sm-6" :class="[item.f_material_style ? '' : 'has-error']">
|
|
95
|
+
<label class="col-sm-4 control-label">材料型号:</label>
|
|
96
|
+
<div class="col-sm-8">
|
|
97
|
+
<input class="form-control input_view" style="" type="text"
|
|
98
|
+
placeholder="材料型号"
|
|
99
|
+
v-model="item.f_material_style"
|
|
100
|
+
:value="item.f_material_style"
|
|
101
|
+
/>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="form-group col-sm-6" :class="[item.f_material_unit ? '' : 'has-error']">
|
|
105
|
+
<label class="col-sm-4 control-label">材料单位:</label>
|
|
106
|
+
<div class="col-sm-8">
|
|
107
|
+
<input class="form-control input_view" style="" type="text"
|
|
108
|
+
placeholder="材料单位"
|
|
109
|
+
v-model="item.f_material_unit"
|
|
110
|
+
:value="item.f_material_unit"
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="form-group col-sm-6" :class="[item.f_material_number ? '' : 'has-error']">
|
|
115
|
+
<label class="col-sm-4 control-label">材料数量:</label>
|
|
116
|
+
<div class="col-sm-8">
|
|
117
|
+
<input class="form-control input_view" style="" type="number"
|
|
118
|
+
placeholder="设备数量"
|
|
119
|
+
v-model="item.f_material_number"
|
|
120
|
+
:value="item.f_material_number"
|
|
121
|
+
/>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
<div class="form-group col-sm-6">
|
|
125
|
+
<label class="col-sm-4 control-label">材料价格:</label>
|
|
126
|
+
<div class="col-sm-8">
|
|
127
|
+
<input class="form-control input_view" style="" type="text"
|
|
128
|
+
placeholder="材料价格"
|
|
129
|
+
v-model="item.f_material_price"
|
|
130
|
+
:value="item.f_material_price"
|
|
131
|
+
/>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
<div class="form-group col-sm-6">
|
|
135
|
+
<label class="col-sm-4 control-label"></label>
|
|
136
|
+
<div class="col-sm-8">
|
|
137
|
+
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
140
|
+
<div class="form-group col-sm-6">
|
|
141
|
+
<label class="col-sm-4 control-label"></label>
|
|
142
|
+
<div class="col-sm-8">
|
|
143
|
+
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
<div class="form-group col-sm-6">
|
|
147
|
+
<label class="col-sm-4 control-label"></label>
|
|
148
|
+
<div class="col-sm-8">
|
|
149
|
+
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
<div class="form-group col-sm-6">
|
|
153
|
+
<label class="col-sm-4 control-label"></label>
|
|
154
|
+
<div class="col-sm-8">
|
|
155
|
+
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="form-group col-sm-6">
|
|
159
|
+
<label class="col-sm-4 control-label"></label>
|
|
160
|
+
<div class="col-sm-8">
|
|
161
|
+
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<div class="form-group col-sm-6">
|
|
165
|
+
<label class="col-sm-4 control-label"></label>
|
|
166
|
+
<div class="col-sm-8">
|
|
167
|
+
|
|
168
|
+
</div>
|
|
169
|
+
</div>
|
|
170
|
+
<div class="form-group col-sm-6">
|
|
171
|
+
<label class="col-sm-4 control-label"></label>
|
|
172
|
+
<div class="col-sm-8">
|
|
173
|
+
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</article>
|
|
178
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
179
|
+
<template v-if="mark !== 1">
|
|
180
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="pushMaterial()">添加材料</button>
|
|
181
|
+
<button type="button" class="btn btn-primary" v-if="title==='新增'" @click="addMaterial()"
|
|
182
|
+
:disabled="!$v.valid">确认添加
|
|
183
|
+
</button>
|
|
184
|
+
<button type="button" class="btn btn-primary" v-if="title==='修改'" @click="updateConfirm()"
|
|
185
|
+
:disabled="!$v.valid">确认修改
|
|
186
|
+
</button>
|
|
187
|
+
</template>
|
|
188
|
+
</footer>
|
|
189
|
+
</modal>
|
|
190
|
+
</div>
|
|
191
|
+
</template>
|
|
192
|
+
|
|
193
|
+
<script>
|
|
194
|
+
import Vue from 'vue'
|
|
195
|
+
import {HttpResetClass} from 'vue-client'
|
|
196
|
+
|
|
197
|
+
export default {
|
|
198
|
+
name: 'addMaterialScience',
|
|
199
|
+
props: {
|
|
200
|
+
selectdata: {
|
|
201
|
+
type: Object
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
data() {
|
|
205
|
+
return {
|
|
206
|
+
onetomany: {
|
|
207
|
+
rows: []
|
|
208
|
+
},
|
|
209
|
+
title: '新增',
|
|
210
|
+
showMaterialModal: false,
|
|
211
|
+
materials: [
|
|
212
|
+
{
|
|
213
|
+
material: '',
|
|
214
|
+
f_material_name: '',
|
|
215
|
+
f_material_style: '',
|
|
216
|
+
f_material_unit: '',
|
|
217
|
+
f_material_number: '',
|
|
218
|
+
f_material_price:''
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
meterialOptions: [],
|
|
222
|
+
row: {},
|
|
223
|
+
bjqChecklag:[],
|
|
224
|
+
fmaterialname:{},
|
|
225
|
+
isShow:[false]
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
ready() {
|
|
229
|
+
this.getOnetoManyData()
|
|
230
|
+
},
|
|
231
|
+
methods: {
|
|
232
|
+
async getOnetoManyData () {
|
|
233
|
+
let http = new HttpResetClass()
|
|
234
|
+
let data = {
|
|
235
|
+
tablename: `t_material_apply`,
|
|
236
|
+
condition: `f_process_id='${this.selectdata.f_process_id}'`
|
|
237
|
+
}
|
|
238
|
+
let res = await http.load(
|
|
239
|
+
'POST',
|
|
240
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/apply_singleTable?aaa=123`,
|
|
241
|
+
{data: data},
|
|
242
|
+
{resolveMsg: null, rejectMsg: 'onetomany查询失败'}
|
|
243
|
+
)
|
|
244
|
+
this.onetomany.rows = res.data
|
|
245
|
+
},
|
|
246
|
+
async openMaterialModal() {
|
|
247
|
+
this.getMateralNames()
|
|
248
|
+
this.title = '新增'
|
|
249
|
+
this.materials = [
|
|
250
|
+
{
|
|
251
|
+
material: '',
|
|
252
|
+
f_material_name: '',
|
|
253
|
+
f_material_style: '',
|
|
254
|
+
f_material_unit: '',
|
|
255
|
+
f_material_number: '',
|
|
256
|
+
f_material_price:''
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
this.showMaterialModal = true
|
|
260
|
+
this.isShow = [false]
|
|
261
|
+
},
|
|
262
|
+
deleteDevicesinfo(index) {
|
|
263
|
+
this.materials.splice(index, 1)
|
|
264
|
+
this.isShow.splice(index, 1)
|
|
265
|
+
},
|
|
266
|
+
pushMaterial() {
|
|
267
|
+
this.materials.push({
|
|
268
|
+
material: '',
|
|
269
|
+
f_material_name: '',
|
|
270
|
+
f_material_style: '',
|
|
271
|
+
f_material_unit: '',
|
|
272
|
+
f_material_number: '',
|
|
273
|
+
f_material_price:''
|
|
274
|
+
})
|
|
275
|
+
this.isShow.push(false)
|
|
276
|
+
},
|
|
277
|
+
// 获取模态框材料
|
|
278
|
+
async getMateralNames() {
|
|
279
|
+
let data = {
|
|
280
|
+
condition: `1=1`
|
|
281
|
+
}
|
|
282
|
+
let http = new HttpResetClass()
|
|
283
|
+
let res = await http.load(
|
|
284
|
+
'POST',
|
|
285
|
+
`${this.$androidUtil.getProxyUrl()}/rs/sql/getStockMaterial`,
|
|
286
|
+
{data: data},
|
|
287
|
+
{resolveMsg: null, rejectMsg: '材料查询失败!!!'}
|
|
288
|
+
)
|
|
289
|
+
|
|
290
|
+
this.meterialOptions = res.data.map(item => {
|
|
291
|
+
return {
|
|
292
|
+
'label': `${item.f_material_name}--${item.f_material_style}`,
|
|
293
|
+
'value': item
|
|
294
|
+
}
|
|
295
|
+
})
|
|
296
|
+
},
|
|
297
|
+
modifyOtherValue(index) {
|
|
298
|
+
console.log("进来了", index)
|
|
299
|
+
console.log("dddd", this.materials[index].material)
|
|
300
|
+
let material = this.materials[index].material
|
|
301
|
+
this.materials[index].f_material_name = material.f_material_name
|
|
302
|
+
this.materials[index].f_material_style = material.f_material_style
|
|
303
|
+
this.materials[index].f_material_unit = material.f_material_unit
|
|
304
|
+
this.materials[index].f_material_number = material.f_material_number
|
|
305
|
+
this.materials[index].f_material_price = material.f_material_price
|
|
306
|
+
if (material.f_material_name === "报警器-汉威") {
|
|
307
|
+
this.isShow[index] = true
|
|
308
|
+
} else {
|
|
309
|
+
this.isShow[index] = false
|
|
310
|
+
}
|
|
311
|
+
this.isShow.splice(0, 1, this.isShow[0])
|
|
312
|
+
},
|
|
313
|
+
// 新增材料
|
|
314
|
+
async addMaterial() {
|
|
315
|
+
this.title = '新增'
|
|
316
|
+
let data = {
|
|
317
|
+
f_process_id: this.selectdata.f_process_id,
|
|
318
|
+
f_operator_id: Vue.user.id,
|
|
319
|
+
f_operator: Vue.user.name,
|
|
320
|
+
f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
|
|
321
|
+
f_orgid: Vue.user.orgid,
|
|
322
|
+
f_orgname: Vue.user.orgs,
|
|
323
|
+
materials: this.materials
|
|
324
|
+
}
|
|
325
|
+
let http = new HttpResetClass()
|
|
326
|
+
let res = await http.load(
|
|
327
|
+
'POST',
|
|
328
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/saveMaterials`,
|
|
329
|
+
data
|
|
330
|
+
)
|
|
331
|
+
this.closeMaterials()
|
|
332
|
+
},
|
|
333
|
+
async deleteMaterial(row) {
|
|
334
|
+
debugger
|
|
335
|
+
var show1 = window.confirm('您确定要删除这条记录吗?')
|
|
336
|
+
if(show1 != true){
|
|
337
|
+
this.closeMaterials()
|
|
338
|
+
}else{
|
|
339
|
+
let http = new HttpResetClass()
|
|
340
|
+
let res = await http.load(
|
|
341
|
+
'POST',
|
|
342
|
+
`${this.$androidUtil.getProxyUrl()}/rs/logic/deleteMaterial`,
|
|
343
|
+
{data: row},
|
|
344
|
+
{resolveMsg: null, rejectMsg: '材料删除失败!!!'}
|
|
345
|
+
)
|
|
346
|
+
this.closeMaterials()
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
,
|
|
350
|
+
async updateMaterial(index, row) {
|
|
351
|
+
this.title = '修改'
|
|
352
|
+
this.row = row
|
|
353
|
+
this.getMateralNames()
|
|
354
|
+
this.materials = [
|
|
355
|
+
{
|
|
356
|
+
material: '',
|
|
357
|
+
f_material_name: row.f_material_name,
|
|
358
|
+
f_material_style: row.f_material_style,
|
|
359
|
+
f_material_unit: row.f_material_unit,
|
|
360
|
+
f_material_number: row.f_material_number,
|
|
361
|
+
f_material_price: row.f_material_price
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
this.showMaterialModal = true
|
|
365
|
+
},
|
|
366
|
+
async updateConfirm() {
|
|
367
|
+
let data = this.row
|
|
368
|
+
data.f_material_name = this.materials[0].f_material_name
|
|
369
|
+
data.f_material_style = this.materials[0].f_material_style
|
|
370
|
+
data.f_material_unit = this.materials[0].f_material_unit
|
|
371
|
+
data.f_material_number = this.materials[0].f_material_number
|
|
372
|
+
data.f_material_price = this.materials[0].f_material_price
|
|
373
|
+
|
|
374
|
+
let http = new HttpResetClass()
|
|
375
|
+
let res = await http.load(
|
|
376
|
+
'POST',
|
|
377
|
+
`${this.$androidUtil.getProxyUrl()}/rs/entity/t_material_apply`,
|
|
378
|
+
data
|
|
379
|
+
)
|
|
380
|
+
this.closeMaterials()
|
|
381
|
+
},
|
|
382
|
+
closeMaterials() {
|
|
383
|
+
this.getOnetoManyData()
|
|
384
|
+
this.showMaterialModal = false
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
</script>
|
|
390
|
+
|
|
391
|
+
<style scoped>
|
|
392
|
+
|
|
393
|
+
</style>
|