apply-clients 3.2.41 → 3.2.50

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.
Files changed (43) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +20 -20
  3. package/src/apply.js +185 -175
  4. package/src/components/app_apply/Process/AppExplorationUser.vue +1 -1
  5. package/src/components/app_apply/ProgressReport/ProgressReportList.vue +209 -208
  6. package/src/components/app_apply/Supervisory/AppProcessSupervisory.vue +183 -183
  7. package/src/components/image/tubiao.png +0 -0
  8. package/src/components/product/Ledger/ContractManagement/OtherContract/OtherContractInformation.vue +429 -429
  9. package/src/components/product/Ledger/ContractManagement/OtherContract/OtherContractList.vue +267 -267
  10. package/src/components/product/Ledger/ContractManagement/PurchaseContract/PurchaseContractInformation.vue +715 -682
  11. package/src/components/product/Ledger/ContractManagement/PurchaseContract/PurchaseContractList.vue +304 -304
  12. package/src/components/product/Ledger/ContractManagement/RepairContract/RepairContractInformation.vue +286 -286
  13. package/src/components/product/Ledger/ContractManagement/RepairContract/RepairContractList.vue +258 -258
  14. package/src/components/product/Ledger/FacilityManagement/FacilityInventory/FacilityInventory.vue +31 -0
  15. package/src/components/product/Ledger/FacilityManagement/FacilityInventory/FacilityInventoryList.vue +5 -0
  16. package/src/components/product/Ledger/FacilityManagement/FacilityInventory/addoldFacilityInformation.vue +326 -0
  17. package/src/components/product/Ledger/FileDownload/FileDownload.vue +42 -0
  18. package/src/components/product/Ledger/Function/InstallInfoSelect.vue +4 -1
  19. package/src/components/product/Ledger/ImportApply/ImportApply.vue +68 -0
  20. package/src/components/product/Ledger/MaterialManagement/DeliveryRecord/DeliveryRecordList.vue +39 -3
  21. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/InventoryInformationList.vue +32 -2
  22. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/MaterialInformation.vue +1 -1
  23. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/MaterialOutStock.vue +438 -430
  24. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/MaterialOutboundOrder.vue +457 -449
  25. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/PurchaseMaterial.vue +10 -2
  26. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/PurchaseOrder.vue +10 -2
  27. package/src/components/product/Ledger/MaterialManagement/InventoryInformation/ReturnMaterial.vue +10 -2
  28. package/src/components/product/Ledger/MaterialManagement/OutboundOrder/OutboundOrderInformation.vue +3 -1
  29. package/src/components/product/Ledger/MaterialManagement/OutboundOrder/OutboundOrderList.vue +31 -2
  30. package/src/components/product/Ledger/MaterialManagement/OutboundOrder/PrintMaterialBill.vue +2 -2
  31. package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PrintPurchaseOrder.vue +5 -4
  32. package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PurchaseRecordsInformation.vue +5 -1
  33. package/src/components/product/Ledger/MaterialManagement/PurchaseRecords/PurchaseRecordsList.vue +33 -7
  34. package/src/components/product/Ledger/MaterialManagement/WarehousingRecord/WarehousingRecordList.vue +45 -3
  35. package/src/components/product/Ledger/Process/ProcessSelect.vue +3 -5
  36. package/src/components/product/Ledger/Process/Service/ServiceControl.vue +42 -5
  37. package/src/components/product/Ledger/QinhuaMaterial/PickingRecord/PickingInformation.vue +24 -3
  38. package/src/components/product/Ledger/QinhuaMaterial/SeasoningRecord/SeasoningRecordList.vue +14 -2
  39. package/src/components/product/Ledger/Supervisory/Service/RenWuDan.vue +78 -0
  40. package/src/components/product/Ledger/Supervisory/Service/SupervisoryServiceControl.vue +38 -2
  41. package/src/components/product/Ledger/Supervisory/SupervisoryList.vue +182 -7
  42. package/src/components/product/ServiceView.vue +761 -850
  43. package/static/images/lefticon//346/226/207/344/273/266/346/250/241/345/235/227.png +0 -0
@@ -1,304 +1,304 @@
1
- <template>
2
- <criteria-paged :model="model" v-ref:cp>
3
- <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
4
- <div class="form-horizontal select-overspread container-fluid auto" partial>
5
- <div class="row">
6
- <div class="form-group col-sm-3">
7
- <label class="font_normal_body">合同编号:</label>
8
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_contract_number"
9
- v-on:keyup.enter="$parent.$parent.search()" condition="f_contract_number like '%{}%'" placeholder='合同编号'>
10
- </div>
11
- <div class="form-group col-sm-3">
12
- <label class="font_normal_body">供方单位:</label>
13
- <v-select
14
- v-model="model.f_supplier"
15
- placeholder='请选择'
16
- condition="f_supplier = '{}'"
17
- :value.sync="model.f_supplier"
18
- :options='$parent.$parent.supplier'
19
- class="select select_list"
20
- :value-single="true"
21
- close-on-select ></v-select>
22
- </div>
23
- <div class="form-group col-sm-3">
24
- <label class="font_normal_body">合同状态:</label>
25
- <v-select
26
- v-model="model.f_contract_status"
27
- placeholder='请选择'
28
- :value.sync="model.f_contract_status"
29
- :options='$parent.$parent.contractStatus'
30
- class="select select_list"
31
- :value-single="true"
32
- close-on-select ></v-select>
33
- </div>
34
- <div class="form-group col-sm-3 button-range">
35
- <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
36
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
37
- <button class="button_new button_spacing" @click="$parent.$parent.openAddContract()">添加合同</button>
38
- <div
39
- :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
40
- @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
41
- class="button_spacing"
42
- style="float: right">
43
- </div>
44
- </div>
45
- </div>
46
- <div class="row" v-show="$parent.$parent.criteriaShow">
47
- <div class="form-group col-sm-3">
48
- <label class="font_normal_body">联&ensp;系&ensp;人:</label>
49
- <input type="text" style="width: 60%" class="input_search" placeholder='联系人' v-model="model.f_contact_person"
50
- v-on:keyup.enter="$parent.$parent.search()"
51
- condition="f_contact_person like '%{}%'">
52
- </div>
53
- <div class="form-group col-sm-3">
54
- <label class="font_normal_body">联系电话:</label>
55
- <input type="text" style="width: 60%" class="input_search" placeholder='联系电话' v-model="model.f_tel"
56
- v-on:keyup.enter="$parent.$parent.search()"
57
- condition="f_tel like '%{}%'">
58
- </div>
59
- <div class="form-group col-sm-3">
60
- <label class="font_normal_body">合同性质:</label>
61
- <v-select
62
- v-model="model.f_contract_nature"
63
- placeholder='请选择'
64
- condition="f_contract_nature = '{}'"
65
- :value.sync="model.f_contract_nature"
66
- :options='$parent.$parent.contractNature'
67
- class="select select_list"
68
- :value-single="true"
69
- close-on-select ></v-select>
70
- </div>
71
- <div class="form-group col-sm-3">
72
- <label class="font_normal_body">合同来源:</label>
73
- <v-select
74
- v-model="model.f_contract_source"
75
- placeholder='请选择'
76
- condition="f_contract_source = '{}'"
77
- :value.sync="model.f_contract_source"
78
- :options='$parent.$parent.contractSource'
79
- class="select select_list"
80
- :value-single="true"
81
- close-on-select ></v-select>
82
- </div>
83
- <div class="form-group col-sm-3">
84
- <label class="font_normal_body">合同类别:</label>
85
- <v-select
86
- v-model="model.f_contract_category"
87
- placeholder='请选择'
88
- condition="f_contract_category = '{}'"
89
- :value.sync="model.f_contract_category"
90
- :options='$parent.$parent.contractCategory'
91
- class="select select_list"
92
- :value-single="true"
93
- close-on-select ></v-select>
94
- </div>
95
- </div>
96
- </div>
97
- </criteria>
98
- <data-grid v-if="$parent.showData" :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
99
- <template partial='head'>
100
- <tr>
101
- <th style="white-space: nowrap;">序号</th>
102
- <th style="white-space: nowrap;">合同编号</th>
103
- <th style="white-space: nowrap;">供方单位</th>
104
- <th style="white-space: nowrap;">联系人</th>
105
- <th style="white-space: nowrap;">电话</th>
106
- <th style="white-space: nowrap;">合同性质</th>
107
- <th style="white-space: nowrap;">合同来源</th>
108
- <th style="white-space: nowrap;">合同类别</th>
109
- <th style="white-space: nowrap;">合同份数</th>
110
- <th style="white-space: nowrap;">合同金额</th>
111
- <th style="white-space: nowrap;">签订时间</th>
112
- <th style="white-space: nowrap;">到期时间</th>
113
- <th style="white-space: nowrap;">合同状态</th>
114
- <th style="white-space: nowrap;">入库次数</th>
115
- <th style="white-space: nowrap;">操作</th>
116
- </tr>
117
- </template>
118
- <template partial='body'>
119
- <tr >
120
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
121
- <nobr><font>{{$index+1}}</font></nobr>
122
- </td>
123
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
124
- <nobr><font>{{row.f_contract_number}}</font></nobr>
125
- </td>
126
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
127
- <nobr><font>{{row.f_supplier}}</font></nobr>
128
- </td>
129
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
130
- <nobr><font>{{row.f_contact_person}}</font></nobr>
131
- </td>
132
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
133
- <nobr><font>{{row.f_tel}}</font></nobr>
134
- </td>
135
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
136
- <nobr><font>{{row.f_contract_nature}}</font></nobr>
137
- </td>
138
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
139
- <nobr><font>{{row.f_contract_source}}</font></nobr>
140
- </td>
141
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
142
- <nobr><font>{{row.f_contract_category}}</font></nobr>
143
- </td>
144
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
145
- <nobr><font>{{row.f_amount}}</font></nobr>
146
- </td>
147
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
148
- <nobr><font>{{row.f_contract_money}}</font></nobr>
149
- </td>
150
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
151
- <nobr><font>{{new Date(row.f_contract_time).Format('yyyy-MM-dd')}}</font></nobr>
152
- </td>
153
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
154
- <nobr><font>{{new Date(row.f_contract_expiration_date).Format('yyyy-MM-dd')}}</font></nobr>
155
- </td>
156
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
157
- <nobr><font>{{row.f_contract_nature === '年度' ? (new Date() > new Date(row.f_contract_expiration_date) ? '无效': '有效') : row.f_contract_status}}</font></nobr>
158
- </td>
159
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
160
- <nobr><font>{{ row.f_warehousing_quantity }}</font></nobr>
161
- </td>
162
- <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;">
163
- <dropdown v-if="row.f_contract_status === '有效'">
164
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
165
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
166
- </button>
167
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
168
- <li v-if="row.f_contract_nature === '年度'">
169
- <a href="#" @click="$parent.$parent.$parent.openRenew(row)">续签</a>
170
- </li>
171
- <li v-if="row.f_contract_nature === '单次'">
172
- <a href="#" @click="$parent.$parent.$parent.openInvalid(row)">作废</a>
173
- </li>
174
- </ul>
175
- </dropdown>
176
- </td>
177
- </tr>
178
- </template>
179
- </data-grid>
180
- </criteria-paged>
181
- </template>
182
-
183
- <script>
184
- import {PagedList} from 'vue-client'
185
- import {HttpResetClass} from 'vue-client'
186
- import {isEmpty} from '../../../../Util'
187
- // Date格式化
188
- Date.prototype.Format = function (fmt) {
189
- var o = {
190
- 'M+': this.getMonth() + 1, // 月份
191
- 'd+': this.getDate(), // 日
192
- 'H+': this.getHours(), // 小时
193
- 'm+': this.getMinutes(), // 分
194
- 's+': this.getSeconds(), // 秒
195
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
196
- 'S': this.getMilliseconds() // 毫秒
197
- }
198
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
199
- for (var k in o) {
200
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
201
- }
202
- return fmt
203
- }
204
- export default {
205
- title: '采购合同列表',
206
- props: ['showData'],
207
- data () {
208
- return {
209
- model: new PagedList('rs/sql/getContract', 30, {
210
- data: {
211
- f_contract_type: '采购合同',
212
- orgid: this.$login.f.orgid,
213
- date: new Date().Format('yyyy-MM-dd')
214
- }
215
- }),
216
- criteriaShow: false,
217
- contractStatus: [
218
- {
219
- 'label': '全部',
220
- 'value': ''
221
- },
222
- {
223
- 'label': '有效',
224
- 'value': `f_contract_expiration_date >= '${new Date().Format('yyyy-MM-dd')}'`
225
- },
226
- {
227
- 'label': '预警',
228
- 'value': `f_contract_early_warning_date < '${new Date().Format('yyyy-MM-dd')}' and f_contract_expiration_date >= '${new Date().Format('yyyy-MM-dd')}'`
229
- },
230
- {
231
- 'label': '无效',
232
- 'value': `f_contract_expiration_date < '${new Date().Format('yyyy-MM-dd')}'`
233
- }
234
- ],
235
- supplier: [{label: '全部', value: ''}, ...this.$appdata.getParam('供方单位')],
236
- contractSource: [{label: '全部', value: ''}, ...this.$appdata.getParam('合同来源')],
237
- contractCategory: [{label: '全部', value: ''}, ...this.$appdata.getParam('合同类别')],
238
- contractNature: [{label: '全部', value: ''}, ...this.$appdata.getParam('合同性质')]
239
- }
240
- },
241
- ready () {
242
- // 调用查询
243
- this.search()
244
- },
245
- methods: {
246
- openInvalid (row) {
247
- this.$dispatch('openInvalid', row)
248
- },
249
- searchCondition (args) {
250
- if (!isEmpty(args.model.f_contract_status)) {
251
- args.condition += ` and ${args.model.f_contract_status}`
252
- }
253
- this.model.search(args.condition, args.model)
254
- },
255
- openRenew (row) {
256
- this.$dispatch('openRenew', row)
257
- },
258
- // 添加合同
259
- openAddContract () {
260
- this.$dispatch('openAddContract')
261
- },
262
- // 查看合同详情
263
- openViewContract (row) {
264
- this.$dispatch('openViewContract', row)
265
- },
266
- clear () {
267
- Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
268
- this.$refs.cp.$refs.cri.model[key] = null
269
- })
270
- },
271
- // 查询
272
- search () {
273
- this.$dispatch('search')
274
- },
275
- },
276
- events: {
277
- },
278
- computed: {
279
- rowclass () {
280
- return function (contract) {
281
- if (contract.f_contract_nature === '单次' && contract.f_contract_status !== '有效') {
282
- return 'danger'
283
- }
284
- if (contract.f_contract_nature === '年度' && new Date() > new Date(contract.f_contract_expiration_date)) {
285
- return 'danger'
286
- }
287
- if (contract.f_contract_nature === '年度' && new Date() > new Date(contract.f_contract_early_warning_date)) {
288
- return 'warning'
289
- }
290
- return ''
291
- }
292
- }
293
- }
294
- }
295
- </script>
296
-
297
- <style scoped>
298
- .warning {
299
- background-color: #f0ad4e;
300
- }
301
- .danger {
302
- background-color: #d9534f;
303
- }
304
- </style>
1
+ <template>
2
+ <criteria-paged :model="model" v-ref:cp>
3
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
4
+ <div class="form-horizontal select-overspread container-fluid auto" partial>
5
+ <div class="row">
6
+ <div class="form-group col-sm-3">
7
+ <label class="font_normal_body">合同编号:</label>
8
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_contract_number"
9
+ v-on:keyup.enter="$parent.$parent.search()" condition="f_contract_number like '%{}%'" placeholder='合同编号'>
10
+ </div>
11
+ <div class="form-group col-sm-3">
12
+ <label class="font_normal_body">供方单位:</label>
13
+ <v-select
14
+ v-model="model.f_supplier"
15
+ placeholder='请选择'
16
+ condition="f_supplier = '{}'"
17
+ :value.sync="model.f_supplier"
18
+ :options='$parent.$parent.supplier'
19
+ class="select select_list"
20
+ :value-single="true"
21
+ close-on-select ></v-select>
22
+ </div>
23
+ <div class="form-group col-sm-3">
24
+ <label class="font_normal_body">合同状态:</label>
25
+ <v-select
26
+ v-model="model.f_contract_status"
27
+ placeholder='请选择'
28
+ :value.sync="model.f_contract_status"
29
+ :options='$parent.$parent.contractStatus'
30
+ class="select select_list"
31
+ :value-single="true"
32
+ close-on-select ></v-select>
33
+ </div>
34
+ <div class="form-group col-sm-3 button-range">
35
+ <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
36
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
37
+ <button class="button_new button_spacing" @click="$parent.$parent.openAddContract()">添加合同</button>
38
+ <div
39
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
40
+ @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
41
+ class="button_spacing"
42
+ style="float: right">
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <div class="row" v-show="$parent.$parent.criteriaShow">
47
+ <div class="form-group col-sm-3">
48
+ <label class="font_normal_body">联&ensp;系&ensp;人:</label>
49
+ <input type="text" style="width: 60%" class="input_search" placeholder='联系人' v-model="model.f_contact_person"
50
+ v-on:keyup.enter="$parent.$parent.search()"
51
+ condition="f_contact_person like '%{}%'">
52
+ </div>
53
+ <div class="form-group col-sm-3">
54
+ <label class="font_normal_body">联系电话:</label>
55
+ <input type="text" style="width: 60%" class="input_search" placeholder='联系电话' v-model="model.f_tel"
56
+ v-on:keyup.enter="$parent.$parent.search()"
57
+ condition="f_tel like '%{}%'">
58
+ </div>
59
+ <div class="form-group col-sm-3">
60
+ <label class="font_normal_body">合同性质:</label>
61
+ <v-select
62
+ v-model="model.f_contract_nature"
63
+ placeholder='请选择'
64
+ condition="f_contract_nature = '{}'"
65
+ :value.sync="model.f_contract_nature"
66
+ :options='$parent.$parent.contractNature'
67
+ class="select select_list"
68
+ :value-single="true"
69
+ close-on-select ></v-select>
70
+ </div>
71
+ <div class="form-group col-sm-3">
72
+ <label class="font_normal_body">合同来源:</label>
73
+ <v-select
74
+ v-model="model.f_contract_source"
75
+ placeholder='请选择'
76
+ condition="f_contract_source = '{}'"
77
+ :value.sync="model.f_contract_source"
78
+ :options='$parent.$parent.contractSource'
79
+ class="select select_list"
80
+ :value-single="true"
81
+ close-on-select ></v-select>
82
+ </div>
83
+ <div class="form-group col-sm-3">
84
+ <label class="font_normal_body">合同类别:</label>
85
+ <v-select
86
+ v-model="model.f_contract_category"
87
+ placeholder='请选择'
88
+ condition="f_contract_category = '{}'"
89
+ :value.sync="model.f_contract_category"
90
+ :options='$parent.$parent.contractCategory'
91
+ class="select select_list"
92
+ :value-single="true"
93
+ close-on-select ></v-select>
94
+ </div>
95
+ </div>
96
+ </div>
97
+ </criteria>
98
+ <data-grid v-if="$parent.showData" :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
99
+ <template partial='head'>
100
+ <tr>
101
+ <th style="white-space: nowrap;">序号</th>
102
+ <th style="white-space: nowrap;">合同编号</th>
103
+ <th style="white-space: nowrap;">供方单位</th>
104
+ <th style="white-space: nowrap;">联系人</th>
105
+ <th style="white-space: nowrap;">电话</th>
106
+ <th style="white-space: nowrap;">合同性质</th>
107
+ <th style="white-space: nowrap;">合同来源</th>
108
+ <th style="white-space: nowrap;">合同类别</th>
109
+ <th style="white-space: nowrap;">合同份数</th>
110
+ <th style="white-space: nowrap;">合同金额</th>
111
+ <th style="white-space: nowrap;">签订时间</th>
112
+ <th style="white-space: nowrap;">到期时间</th>
113
+ <th style="white-space: nowrap;">合同状态</th>
114
+ <th style="white-space: nowrap;">入库次数</th>
115
+ <th style="white-space: nowrap;">操作</th>
116
+ </tr>
117
+ </template>
118
+ <template partial='body'>
119
+ <tr >
120
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
121
+ <nobr><font>{{$index+1}}</font></nobr>
122
+ </td>
123
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
124
+ <nobr><font>{{row.f_contract_number}}</font></nobr>
125
+ </td>
126
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
127
+ <nobr><font>{{row.f_supplier}}</font></nobr>
128
+ </td>
129
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
130
+ <nobr><font>{{row.f_contact_person}}</font></nobr>
131
+ </td>
132
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
133
+ <nobr><font>{{row.f_tel}}</font></nobr>
134
+ </td>
135
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
136
+ <nobr><font>{{row.f_contract_nature}}</font></nobr>
137
+ </td>
138
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
139
+ <nobr><font>{{row.f_contract_source}}</font></nobr>
140
+ </td>
141
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
142
+ <nobr><font>{{row.f_contract_category}}</font></nobr>
143
+ </td>
144
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
145
+ <nobr><font>{{row.f_amount}}</font></nobr>
146
+ </td>
147
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
148
+ <nobr><font>{{row.f_contract_money}}</font></nobr>
149
+ </td>
150
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
151
+ <nobr><font>{{new Date(row.f_contract_time).Format('yyyy-MM-dd')}}</font></nobr>
152
+ </td>
153
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
154
+ <nobr><font>{{new Date(row.f_contract_expiration_date).Format('yyyy-MM-dd')}}</font></nobr>
155
+ </td>
156
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
157
+ <nobr><font>{{row.f_status}}</font></nobr>
158
+ </td>
159
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;" @click="$parent.$parent.$parent.openViewContract(row)">
160
+ <nobr><font>{{ row.f_warehousing_quantity }}</font></nobr>
161
+ </td>
162
+ <td :class="$parent.$parent.$parent.rowclass(row)" style="text-align: center;">
163
+ <dropdown v-if="row.f_status === '有效'">
164
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
165
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
166
+ </button>
167
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
168
+ <li v-if="row.f_contract_nature === '年度'|| row.f_status==='有效'">
169
+ <a href="#" @click="$parent.$parent.$parent.openRenew(row)">续签</a>
170
+ </li>
171
+ <li>
172
+ <a href="#" @click="$parent.$parent.$parent.openInvalid(row)">作废</a>
173
+ </li>
174
+ </ul>
175
+ </dropdown>
176
+ </td>
177
+ </tr>
178
+ </template>
179
+ </data-grid>
180
+ </criteria-paged>
181
+ </template>
182
+
183
+ <script>
184
+ import {PagedList} from 'vue-client'
185
+ import {HttpResetClass} from 'vue-client'
186
+ import {isEmpty} from '../../../../Util'
187
+ // Date格式化
188
+ Date.prototype.Format = function (fmt) {
189
+ var o = {
190
+ 'M+': this.getMonth() + 1, // 月份
191
+ 'd+': this.getDate(), // 日
192
+ 'H+': this.getHours(), // 小时
193
+ 'm+': this.getMinutes(), // 分
194
+ 's+': this.getSeconds(), // 秒
195
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
196
+ 'S': this.getMilliseconds() // 毫秒
197
+ }
198
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
199
+ for (var k in o) {
200
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
201
+ }
202
+ return fmt
203
+ }
204
+ export default {
205
+ title: '采购合同列表',
206
+ props: ['showData'],
207
+ data () {
208
+ return {
209
+ model: new PagedList('rs/sql/getContract', 30, {
210
+ data: {
211
+ f_contract_type: '采购合同',
212
+ orgid: this.$login.f.orgid,
213
+ date: new Date().Format('yyyy-MM-dd')
214
+ }
215
+ }),
216
+ criteriaShow: false,
217
+ contractStatus: [
218
+ {
219
+ 'label': '全部',
220
+ 'value': ''
221
+ },
222
+ {
223
+ 'label': '有效',
224
+ 'value': `f_contract_expiration_date >= '${new Date().Format('yyyy-MM-dd')}'`
225
+ },
226
+ {
227
+ 'label': '预警',
228
+ 'value': `f_contract_early_warning_date < '${new Date().Format('yyyy-MM-dd')}' and f_contract_expiration_date >= '${new Date().Format('yyyy-MM-dd')}'`
229
+ },
230
+ {
231
+ 'label': '无效',
232
+ 'value': `f_contract_expiration_date < '${new Date().Format('yyyy-MM-dd')}'`
233
+ }
234
+ ],
235
+ supplier: [{label: '全部', value: ''}, ...this.$appdata.getParam('供方单位')],
236
+ contractSource: [{label: '全部', value: ''}, ...this.$appdata.getParam('合同来源')],
237
+ contractCategory: [{label: '全部', value: ''}, ...this.$appdata.getParam('合同类别')],
238
+ contractNature: [{label: '全部', value: ''}, ...this.$appdata.getParam('合同性质')]
239
+ }
240
+ },
241
+ ready () {
242
+ // 调用查询
243
+ this.search()
244
+ },
245
+ methods: {
246
+ openInvalid (row) {
247
+ this.$dispatch('openInvalid', row)
248
+ },
249
+ searchCondition (args) {
250
+ if (!isEmpty(args.model.f_contract_status)) {
251
+ args.condition += ` and ${args.model.f_contract_status}`
252
+ }
253
+ this.model.search(args.condition, args.model)
254
+ },
255
+ openRenew (row) {
256
+ this.$dispatch('openRenew', row)
257
+ },
258
+ // 添加合同
259
+ openAddContract () {
260
+ this.$dispatch('openAddContract')
261
+ },
262
+ // 查看合同详情
263
+ openViewContract (row) {
264
+ this.$dispatch('openViewContract', row)
265
+ },
266
+ clear () {
267
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
268
+ this.$refs.cp.$refs.cri.model[key] = null
269
+ })
270
+ },
271
+ // 查询
272
+ search () {
273
+ this.$dispatch('search')
274
+ },
275
+ },
276
+ events: {
277
+ },
278
+ computed: {
279
+ rowclass () {
280
+ return function (contract) {
281
+ if (contract.f_contract_nature === '单次' && contract.f_contract_status !== '有效') {
282
+ return 'danger'
283
+ }
284
+ if ((contract.f_contract_nature === '年度' && new Date() > new Date(contract.f_contract_expiration_date) )|| contract.f_contract_status === '无效') {
285
+ return 'danger'
286
+ }
287
+ if (contract.f_contract_nature === '年度' && new Date() > new Date(contract.f_contract_early_warning_date)) {
288
+ return 'warning'
289
+ }
290
+ return ''
291
+ }
292
+ }
293
+ }
294
+ }
295
+ </script>
296
+
297
+ <style scoped>
298
+ .warning {
299
+ background-color: #f0ad4e;
300
+ }
301
+ .danger {
302
+ background-color: #d9534f;
303
+ }
304
+ </style>