|
@@ -3,49 +3,61 @@
|
3
|
3
|
<div class="position">
|
4
|
4
|
<bread-crumb :crumbs="crumbs"></bread-crumb>
|
5
|
5
|
</div>
|
6
|
|
- <div class="app-container ">
|
7
|
|
- <div style="justify-content: space-between;margin: 0px 0 12px 0;display: flex;align-items: center;">
|
|
6
|
+ <div class="app-container">
|
|
7
|
+ <div
|
|
8
|
+ style="
|
|
9
|
+ justify-content: space-between;
|
|
10
|
+ margin: 0px 0 12px 0;
|
|
11
|
+ display: flex;
|
|
12
|
+ align-items: center;
|
|
13
|
+ "
|
|
14
|
+ >
|
8
|
15
|
<div>
|
9
|
|
-
|
10
|
16
|
<el-date-picker
|
11
|
17
|
size="small"
|
12
|
18
|
v-model="start_time"
|
13
|
19
|
prefix-icon="el-icon-date"
|
14
|
20
|
:editable="false"
|
15
|
|
- style="width: 196px;"
|
|
21
|
+ style="width: 196px"
|
16
|
22
|
type="date"
|
17
|
23
|
placeholder="选择日期时间"
|
18
|
24
|
align="right"
|
19
|
25
|
format="yyyy-MM-dd"
|
20
|
26
|
value-format="yyyy-MM-dd"
|
21
|
27
|
@change="startTimeChange"
|
22
|
|
- ></el-date-picker>-
|
23
|
|
- <el-date-picker
|
24
|
|
- size="small"
|
25
|
|
- v-model="end_time"
|
26
|
|
- prefix-icon="el-icon-date"
|
27
|
|
- :editable="false"
|
28
|
|
- style="width: 196px;"
|
29
|
|
- type="date"
|
30
|
|
- placeholder="选择日期时间"
|
31
|
|
- align="right"
|
32
|
|
- format="yyyy-MM-dd"
|
33
|
|
- value-format="yyyy-MM-dd"
|
34
|
|
- @change="endTimeChange"
|
|
28
|
+ ></el-date-picker
|
|
29
|
+ >-
|
|
30
|
+ <el-date-picker
|
|
31
|
+ size="small"
|
|
32
|
+ v-model="end_time"
|
|
33
|
+ prefix-icon="el-icon-date"
|
|
34
|
+ :editable="false"
|
|
35
|
+ style="width: 196px"
|
|
36
|
+ type="date"
|
|
37
|
+ placeholder="选择日期时间"
|
|
38
|
+ align="right"
|
|
39
|
+ format="yyyy-MM-dd"
|
|
40
|
+ value-format="yyyy-MM-dd"
|
|
41
|
+ @change="endTimeChange"
|
35
|
42
|
></el-date-picker>
|
36
|
43
|
<span>审核状态:</span>
|
37
|
|
- <el-select v-model="check_id" style="width:140px;margin-right:10px;" placeholder="请选择"
|
38
|
|
- @change="changeTypeName">
|
|
44
|
+ <el-select
|
|
45
|
+ v-model="check_id"
|
|
46
|
+ style="width: 140px; margin-right: 10px"
|
|
47
|
+ placeholder="请选择"
|
|
48
|
+ @change="changeTypeName"
|
|
49
|
+ >
|
39
|
50
|
<el-option
|
40
|
|
- v-for="item in checkList"
|
41
|
|
- :key="item.id"
|
42
|
|
- :label="item.name"
|
43
|
|
- :value="item.id">
|
|
51
|
+ v-for="item in checkList"
|
|
52
|
+ :key="item.id"
|
|
53
|
+ :label="item.name"
|
|
54
|
+ :value="item.id"
|
|
55
|
+ >
|
44
|
56
|
</el-option>
|
45
|
57
|
</el-select>
|
46
|
58
|
<el-input
|
47
|
59
|
size="small"
|
48
|
|
- style="width: 200px;margin-left:10px;"
|
|
60
|
+ style="width: 200px; margin-left: 10px"
|
49
|
61
|
class="filter-item"
|
50
|
62
|
v-model.trim="keywords"
|
51
|
63
|
placeholder="订单编号或供应商名称"
|
|
@@ -64,118 +76,132 @@
|
64
|
76
|
</div>
|
65
|
77
|
</div>
|
66
|
78
|
|
67
|
|
-
|
68
|
|
- <el-table
|
69
|
|
- :row-style="{ color: '#303133' }"
|
70
|
|
- :header-cell-style="{
|
71
|
|
- backgroundColor: 'rgb(245, 247, 250)',
|
72
|
|
- color: '#606266'
|
73
|
|
- }"
|
74
|
|
- :data="tableList"
|
75
|
|
- :class="signAndWeighBoxPatients"
|
76
|
|
- border
|
77
|
|
- style="width: 100%"
|
78
|
|
- max-height="450"
|
79
|
|
-
|
|
79
|
+ <el-table
|
|
80
|
+ :row-style="{ color: '#303133' }"
|
|
81
|
+ :header-cell-style="{
|
|
82
|
+ backgroundColor: 'rgb(245, 247, 250)',
|
|
83
|
+ color: '#606266',
|
|
84
|
+ }"
|
|
85
|
+ :data="tableList"
|
|
86
|
+ :class="signAndWeighBoxPatients"
|
|
87
|
+ border
|
|
88
|
+ style="width: 100%"
|
80
|
89
|
>
|
81
|
90
|
<el-table-column label="单据日期" align="center" width="200">
|
82
|
91
|
<template slot-scope="scope">
|
83
|
|
- <span>{{getTimes(scope.row.document_date)}}</span>
|
84
|
|
- </template>
|
|
92
|
+ <span>{{ getTimes(scope.row.document_date) }}</span>
|
|
93
|
+ </template>
|
85
|
94
|
</el-table-column>
|
86
|
95
|
<el-table-column label="单据编号" align="center" width="200">
|
87
|
96
|
<template slot-scope="scope">
|
88
|
|
- <span>{{scope.row.number}}</span>
|
|
97
|
+ <span>{{ scope.row.number }}</span>
|
89
|
98
|
</template>
|
90
|
99
|
</el-table-column>
|
91
|
100
|
<el-table-column label="供应商" align="center" width="200">
|
92
|
|
- <template slot-scope="scope">
|
93
|
|
- <span>{{getName(scope.row.supplier_id)}}</span>
|
94
|
|
- </template>
|
95
|
|
- </el-table-column>
|
|
101
|
+ <template slot-scope="scope">
|
|
102
|
+ <span>{{ getName(scope.row.supplier_id) }}</span>
|
|
103
|
+ </template>
|
|
104
|
+ </el-table-column>
|
96
|
105
|
<el-table-column label="关联采购订单号" align="center" width="200">
|
97
|
106
|
<template slot-scope="scope">
|
98
|
|
- <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].order_number}}</span>
|
|
107
|
+ <span
|
|
108
|
+ v-if="
|
|
109
|
+ scope.row.cancelOrder != undefined &&
|
|
110
|
+ scope.row.cancelOrder.length > 0
|
|
111
|
+ "
|
|
112
|
+ >{{ scope.row.cancelOrder[0].order_number }}</span
|
|
113
|
+ >
|
99
|
114
|
</template>
|
100
|
115
|
</el-table-column>
|
101
|
|
- <el-table-column label="关联采购单号" align="center" width="200">
|
|
116
|
+ <el-table-column label="关联采购单号" align="center" width="200">
|
102
|
117
|
<template slot-scope="scope">
|
103
|
|
- <span v-if="scope.row.cancelOrder!=undefined && scope.row.cancelOrder.length >0">{{scope.row.cancelOrder[0].good_number}}</span>
|
|
118
|
+ <span
|
|
119
|
+ v-if="
|
|
120
|
+ scope.row.cancelOrder != undefined &&
|
|
121
|
+ scope.row.cancelOrder.length > 0
|
|
122
|
+ "
|
|
123
|
+ >{{ scope.row.cancelOrder[0].good_number }}</span
|
|
124
|
+ >
|
104
|
125
|
</template>
|
105
|
126
|
</el-table-column>
|
106
|
127
|
<el-table-column label="采购金额" align="center" width="200">
|
107
|
128
|
<template slot-scope="scope">
|
108
|
|
- <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPrice(scope.row.cancelOrder)}}</span>
|
|
129
|
+ <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
|
|
130
|
+ getAllBuyPrice(scope.row.cancelOrder)
|
|
131
|
+ }}</span>
|
109
|
132
|
</template>
|
110
|
133
|
</el-table-column>
|
111
|
134
|
<el-table-column label="优惠后金额" align="center" width="200">
|
112
|
|
- <template slot-scope="scope">
|
113
|
|
- <span v-if="getAllBuyPrice(scope.row.cancelOrder)>0">{{getAllBuyPriceOne(scope.row.cancelOrder,scope.row.discount_amount)}}</span>
|
114
|
|
- </template>
|
115
|
|
- </el-table-column>
|
|
135
|
+ <template slot-scope="scope">
|
|
136
|
+ <span v-if="getAllBuyPrice(scope.row.cancelOrder) > 0">{{
|
|
137
|
+ getAllBuyPriceOne(
|
|
138
|
+ scope.row.cancelOrder,
|
|
139
|
+ scope.row.discount_amount
|
|
140
|
+ )
|
|
141
|
+ }}</span>
|
|
142
|
+ </template>
|
|
143
|
+ </el-table-column>
|
116
|
144
|
<el-table-column label="已退款" align="center" width="200">
|
117
|
|
- <template slot-scope="scope">
|
118
|
|
- <span v-if="scope.row.payment > 0">{{scope.row.payment}}</span>
|
119
|
|
- </template>
|
120
|
|
- </el-table-column>
|
121
|
|
- <el-table-column label="数量" align="center" width="200">
|
122
|
|
- <template slot-scope="scope">
|
123
|
|
- {{getCount(scope.row.cancelOrder)}}
|
124
|
|
- </template>
|
125
|
|
- </el-table-column>
|
|
145
|
+ <template slot-scope="scope">
|
|
146
|
+ <span v-if="scope.row.payment > 0">{{ scope.row.payment }}</span>
|
|
147
|
+ </template>
|
|
148
|
+ </el-table-column>
|
|
149
|
+ <el-table-column label="数量" align="center" width="200">
|
|
150
|
+ <template slot-scope="scope">
|
|
151
|
+ {{ getCount(scope.row.cancelOrder) }}
|
|
152
|
+ </template>
|
|
153
|
+ </el-table-column>
|
126
|
154
|
|
127
|
|
- <el-table-column label="退款状态" align="center" width="200">
|
128
|
|
- <template slot-scope="scope">
|
129
|
|
- <!-- <span v-if="scope.row.is_check == 2">未审核</span>
|
|
155
|
+ <el-table-column label="退款状态" align="center" width="200">
|
|
156
|
+ <template slot-scope="scope">
|
|
157
|
+ <!-- <span v-if="scope.row.is_check == 2">未审核</span>
|
130
|
158
|
<span v-if="scope.row.is_check == 1">已审核</span> -->
|
131
|
|
- </template>
|
132
|
|
- </el-table-column>
|
133
|
|
-
|
134
|
|
-
|
135
|
|
- <el-table-column label="制单人" align="center" width="200">
|
136
|
|
- <template slot-scope="scope">
|
137
|
|
- {{getDocName(scope.row.creater)}}
|
138
|
|
- </template>
|
139
|
|
- </el-table-column>
|
|
159
|
+ </template>
|
|
160
|
+ </el-table-column>
|
140
|
161
|
|
141
|
|
- <el-table-column label="审核人" align="center" width="200">
|
142
|
|
- <template slot-scope="scope">
|
143
|
|
- {{getDocName(scope.row.checker)}}
|
144
|
|
- </template>
|
145
|
|
- </el-table-column>
|
|
162
|
+ <el-table-column label="制单人" align="center" width="200">
|
|
163
|
+ <template slot-scope="scope">
|
|
164
|
+ {{ getDocName(scope.row.creater) }}
|
|
165
|
+ </template>
|
|
166
|
+ </el-table-column>
|
|
167
|
+
|
|
168
|
+ <el-table-column label="审核人" align="center" width="200">
|
|
169
|
+ <template slot-scope="scope">
|
|
170
|
+ {{ getDocName(scope.row.checker) }}
|
|
171
|
+ </template>
|
|
172
|
+ </el-table-column>
|
146
|
173
|
|
147
|
|
- <el-table-column label="操作" align="center" width="260" fixed="right">
|
|
174
|
+ <el-table-column label="操作" align="center" width="260" fixed="right">
|
148
|
175
|
<template slot-scope="scope">
|
149
|
|
- <el-button
|
150
|
|
- icon="el-icon-edit-outline"
|
151
|
|
- size="small"
|
152
|
|
- type="primary"
|
153
|
|
- @click="editGoodReturn(scope.row.id)"
|
|
176
|
+ <el-button
|
|
177
|
+ icon="el-icon-edit-outline"
|
|
178
|
+ size="small"
|
|
179
|
+ type="primary"
|
|
180
|
+ @click="editGoodReturn(scope.row.id)"
|
154
|
181
|
>编辑
|
155
|
|
- </el-button>
|
156
|
|
- <el-button
|
157
|
|
- icon="el-icon-delete"
|
158
|
|
- size="small"
|
159
|
|
- type="danger"
|
160
|
|
- @click="toClickOne(scope.row,scope.$index)"
|
|
182
|
+ </el-button>
|
|
183
|
+ <el-button
|
|
184
|
+ icon="el-icon-delete"
|
|
185
|
+ size="small"
|
|
186
|
+ type="danger"
|
|
187
|
+ @click="toClickOne(scope.row, scope.$index)"
|
161
|
188
|
>删除
|
162
|
|
- </el-button>
|
|
189
|
+ </el-button>
|
163
|
190
|
</template>
|
164
|
191
|
</el-table-column>
|
165
|
192
|
</el-table>
|
166
|
193
|
<el-pagination
|
167
|
194
|
@size-change="handleSizeChange"
|
168
|
195
|
@current-change="handleCurrentChange"
|
169
|
|
- :page-sizes="[10, 50, 100,200,500,1000]"
|
|
196
|
+ :page-sizes="[10, 50, 100, 200, 500, 1000]"
|
170
|
197
|
:page-size="10"
|
171
|
198
|
background
|
172
|
199
|
align="right"
|
173
|
|
- style="margin-top:20px;"
|
|
200
|
+ style="margin-top: 20px"
|
174
|
201
|
layout="total, sizes, prev, pager, next, jumper"
|
175
|
202
|
:total="total"
|
176
|
203
|
>
|
177
|
204
|
</el-pagination>
|
178
|
|
-
|
179
|
205
|
</div>
|
180
|
206
|
</div>
|
181
|
207
|
</template>
|
|
@@ -183,213 +209,214 @@
|
183
|
209
|
<script>
|
184
|
210
|
import BreadCrumb from "@/xt_pages/components/bread-crumb";
|
185
|
211
|
|
186
|
|
-import {getAllSupply,getAllGoodReturnOrderList,deleteReturnOrder} from "@/api/supply"
|
187
|
|
-import {uParseTime } from '@/utils/tools'
|
|
212
|
+import {
|
|
213
|
+ getAllSupply,
|
|
214
|
+ getAllGoodReturnOrderList,
|
|
215
|
+ deleteReturnOrder,
|
|
216
|
+} from "@/api/supply";
|
|
217
|
+import { uParseTime } from "@/utils/tools";
|
188
|
218
|
export default {
|
189
|
219
|
name: "stockIn",
|
190
|
|
- components: {
|
191
|
|
-
|
192
|
|
- },
|
|
220
|
+ components: {},
|
193
|
221
|
components: {
|
194
|
|
- BreadCrumb
|
|
222
|
+ BreadCrumb,
|
195
|
223
|
},
|
196
|
224
|
data() {
|
197
|
225
|
return {
|
198
|
226
|
crumbs: [
|
199
|
227
|
{ path: false, name: "采购管理" },
|
200
|
|
- { path: "/good/return/query", name: "退货单" }
|
|
228
|
+ { path: "/good/return/query", name: "退货单" },
|
201
|
229
|
],
|
202
|
230
|
keywords: "",
|
203
|
231
|
total: 0,
|
204
|
232
|
multipleSelection: [],
|
205
|
233
|
signAndWeighBoxPatients: "sign-and-weigh-box-patients",
|
206
|
234
|
start_time: "",
|
207
|
|
- end_time:"",
|
|
235
|
+ end_time: "",
|
208
|
236
|
page: 1,
|
209
|
237
|
limit: 10,
|
210
|
238
|
goodType: [],
|
211
|
239
|
goodInfo: [],
|
212
|
|
- org_id:0,
|
213
|
|
- types:[],
|
214
|
|
- tableList:[1],
|
215
|
|
- type_name:"",
|
216
|
|
- checkList:[
|
217
|
|
- {id:0,name:"请选择"},
|
218
|
|
- {id:1,name:"已审核"},
|
219
|
|
- {id:2,name:"未审核"},
|
|
240
|
+ org_id: 0,
|
|
241
|
+ types: [],
|
|
242
|
+ tableList: [1],
|
|
243
|
+ type_name: "",
|
|
244
|
+ checkList: [
|
|
245
|
+ { id: 0, name: "请选择" },
|
|
246
|
+ { id: 1, name: "已审核" },
|
|
247
|
+ { id: 2, name: "未审核" },
|
220
|
248
|
],
|
221
|
|
- supplyList:[],
|
222
|
|
- check_id:0,
|
223
|
|
- doctorList:[],
|
|
249
|
+ supplyList: [],
|
|
250
|
+ check_id: 0,
|
|
251
|
+ doctorList: [],
|
224
|
252
|
};
|
225
|
253
|
},
|
226
|
|
- methods:{
|
227
|
|
- toAdd(){
|
228
|
|
- this.$router.push({path:"/good/return/add"})
|
229
|
|
- },
|
230
|
|
- changeTypeName(){
|
231
|
|
- this.getlist()
|
232
|
|
- },
|
233
|
|
- startTimeChange(){
|
234
|
|
- this.getlist()
|
235
|
|
- },
|
236
|
|
- endTimeChange(){
|
237
|
|
- this.getlist()
|
238
|
|
- },
|
239
|
|
- search(){
|
240
|
|
- this.getlist()
|
241
|
|
- },
|
242
|
|
- handleSizeChange(val){
|
243
|
|
- this.limit = val
|
244
|
|
- this.getlist()
|
245
|
|
- },
|
246
|
|
- handleCurrentChange(val){
|
247
|
|
- this.page = val
|
248
|
|
- this.getlist()
|
249
|
|
- },
|
250
|
|
- getAllSupply(){
|
251
|
|
- getAllSupply().then(response=>{
|
252
|
|
- if(response.data.state == 1){
|
253
|
|
- var supplyList = response.data.data.supplyList
|
254
|
|
- this.doctorList = response.data.data.doctorList
|
255
|
|
- for(let i=0;i<supplyList.length;i++){
|
256
|
|
- this.supplyList.push(supplyList[i])
|
257
|
|
- }
|
258
|
|
- }
|
259
|
|
- })
|
260
|
|
- },
|
261
|
|
- getTimes(time) {
|
262
|
|
- if (time === '') {
|
263
|
|
- return ''
|
|
254
|
+ methods: {
|
|
255
|
+ toAdd() {
|
|
256
|
+ this.$router.push({ path: "/good/return/add" });
|
|
257
|
+ },
|
|
258
|
+ changeTypeName() {
|
|
259
|
+ this.getlist();
|
|
260
|
+ },
|
|
261
|
+ startTimeChange() {
|
|
262
|
+ this.getlist();
|
|
263
|
+ },
|
|
264
|
+ endTimeChange() {
|
|
265
|
+ this.getlist();
|
|
266
|
+ },
|
|
267
|
+ search() {
|
|
268
|
+ this.getlist();
|
|
269
|
+ },
|
|
270
|
+ handleSizeChange(val) {
|
|
271
|
+ this.limit = val;
|
|
272
|
+ this.getlist();
|
|
273
|
+ },
|
|
274
|
+ handleCurrentChange(val) {
|
|
275
|
+ this.page = val;
|
|
276
|
+ this.getlist();
|
|
277
|
+ },
|
|
278
|
+ getAllSupply() {
|
|
279
|
+ getAllSupply().then((response) => {
|
|
280
|
+ if (response.data.state == 1) {
|
|
281
|
+ var supplyList = response.data.data.supplyList;
|
|
282
|
+ this.doctorList = response.data.data.doctorList;
|
|
283
|
+ for (let i = 0; i < supplyList.length; i++) {
|
|
284
|
+ this.supplyList.push(supplyList[i]);
|
|
285
|
+ }
|
|
286
|
+ }
|
|
287
|
+ });
|
|
288
|
+ },
|
|
289
|
+ getTimes(time) {
|
|
290
|
+ if (time === "") {
|
|
291
|
+ return "";
|
264
|
292
|
}
|
265
|
|
- return uParseTime(time, '{y}-{m}-{d}')
|
266
|
|
- },
|
267
|
|
- getlist(){
|
268
|
|
- var params = {
|
269
|
|
- check_id:this.check_id,
|
270
|
|
- start_time:this.start_time,
|
271
|
|
- end_time:this.end_time,
|
272
|
|
- keyword:this.keywords,
|
273
|
|
- page:this.page,
|
274
|
|
- limit:this.limit,
|
|
293
|
+ return uParseTime(time, "{y}-{m}-{d}");
|
|
294
|
+ },
|
|
295
|
+ getlist() {
|
|
296
|
+ var params = {
|
|
297
|
+ check_id: this.check_id,
|
|
298
|
+ start_time: this.start_time,
|
|
299
|
+ end_time: this.end_time,
|
|
300
|
+ keyword: this.keywords,
|
|
301
|
+ page: this.page,
|
|
302
|
+ limit: this.limit,
|
|
303
|
+ };
|
|
304
|
+ console.log("param23232323", params);
|
|
305
|
+ getAllGoodReturnOrderList(params).then((response) => {
|
|
306
|
+ if (response.data.state == 1) {
|
|
307
|
+ var list = response.data.data.list;
|
|
308
|
+ console.log("list2332232323232", list);
|
|
309
|
+ this.tableList = list;
|
|
310
|
+ var total = response.data.data.total;
|
|
311
|
+ this.total = total;
|
275
|
312
|
}
|
276
|
|
- console.log("param23232323",params)
|
277
|
|
- getAllGoodReturnOrderList(params).then(response=>{
|
278
|
|
- if(response.data.state == 1){
|
279
|
|
- var list = response.data.data.list
|
280
|
|
- console.log("list2332232323232",list)
|
281
|
|
- this.tableList = list
|
282
|
|
- var total = response.data.data.total
|
283
|
|
- this.total = total
|
284
|
|
- }
|
285
|
|
- })
|
286
|
|
- },
|
287
|
|
- getName(id){
|
288
|
|
- var name = ""
|
289
|
|
- for(let i=0;i<this.supplyList.length;i++){
|
290
|
|
- if(id == this.supplyList[i].id){
|
291
|
|
- name = this.supplyList[i].supplier_name
|
292
|
|
- }
|
293
|
|
- }
|
294
|
|
- return name
|
295
|
|
- },
|
296
|
|
- getDocName(id){
|
297
|
|
- var user_name = ""
|
298
|
|
- for(let i=0;i<this.doctorList.length;i++){
|
299
|
|
- if(id == this.doctorList[i].admin_user_id){
|
300
|
|
- user_name = this.doctorList[i].user_name
|
|
313
|
+ });
|
|
314
|
+ },
|
|
315
|
+ getName(id) {
|
|
316
|
+ var name = "";
|
|
317
|
+ for (let i = 0; i < this.supplyList.length; i++) {
|
|
318
|
+ if (id == this.supplyList[i].id) {
|
|
319
|
+ name = this.supplyList[i].supplier_name;
|
|
320
|
+ }
|
|
321
|
+ }
|
|
322
|
+ return name;
|
|
323
|
+ },
|
|
324
|
+ getDocName(id) {
|
|
325
|
+ var user_name = "";
|
|
326
|
+ for (let i = 0; i < this.doctorList.length; i++) {
|
|
327
|
+ if (id == this.doctorList[i].admin_user_id) {
|
|
328
|
+ user_name = this.doctorList[i].user_name;
|
|
329
|
+ }
|
|
330
|
+ }
|
|
331
|
+ return user_name;
|
|
332
|
+ },
|
|
333
|
+ getAllBuyPrice(arr) {
|
|
334
|
+ var buy_price = 0;
|
|
335
|
+ if (arr != undefined && arr.length > 0) {
|
|
336
|
+ for (let i = 0; i < arr.length; i++) {
|
|
337
|
+ buy_price += arr[i].supply_count * arr[i].price;
|
301
|
338
|
}
|
302
|
339
|
}
|
303
|
|
- return user_name
|
304
|
|
- },
|
305
|
|
- getAllBuyPrice(arr){
|
306
|
|
- var buy_price = 0
|
307
|
|
- if(arr!=undefined && arr.length > 0){
|
308
|
|
- for(let i=0;i<arr.length;i++){
|
309
|
|
- buy_price += (arr[i].supply_count * arr[i].price)
|
310
|
|
- }
|
311
|
|
- }
|
312
|
340
|
|
313
|
|
- return buy_price.toFixed(2)
|
314
|
|
- },
|
315
|
|
- getAllBuyPriceOne(arr,discount_amount){
|
316
|
|
-
|
317
|
|
- var buy_price = 0
|
318
|
|
- if(arr!=undefined && arr.length > 0){
|
319
|
|
- for(let i=0;i<arr.length;i++){
|
320
|
|
- buy_price += (parseInt(arr[i].supply_count) * arr[i].price)
|
321
|
|
- }
|
322
|
|
- }
|
323
|
|
- return (buy_price-discount_amount).toFixed(2)
|
324
|
|
- },
|
325
|
|
- getAllCount(arr){
|
326
|
|
- var count = ""
|
327
|
|
- if(arr!=undefined && arr.length > 0){
|
328
|
|
- for(let i=0;i<arr.length;i++){
|
329
|
|
- count += arr[i].supply_count
|
330
|
|
- }
|
331
|
|
- }
|
332
|
|
- return count
|
333
|
|
- },
|
334
|
|
- editGoodReturn(id){
|
335
|
|
- this.$router.push({path:"/good/return/edit?id="+id})
|
336
|
|
- },
|
337
|
|
- toClickOne(val,index){
|
338
|
|
- console.log("val323232323232",val)
|
339
|
|
- if(val.is_check == 1){
|
340
|
|
- this.$message.error("已审核单据,不能删除!")
|
341
|
|
- return false
|
342
|
|
- }
|
|
341
|
+ return buy_price.toFixed(2);
|
|
342
|
+ },
|
|
343
|
+ getAllBuyPriceOne(arr, discount_amount) {
|
|
344
|
+ var buy_price = 0;
|
|
345
|
+ if (arr != undefined && arr.length > 0) {
|
|
346
|
+ for (let i = 0; i < arr.length; i++) {
|
|
347
|
+ buy_price += parseInt(arr[i].supply_count) * arr[i].price;
|
|
348
|
+ }
|
|
349
|
+ }
|
|
350
|
+ return (buy_price - discount_amount).toFixed(2);
|
|
351
|
+ },
|
|
352
|
+ getAllCount(arr) {
|
|
353
|
+ var count = "";
|
|
354
|
+ if (arr != undefined && arr.length > 0) {
|
|
355
|
+ for (let i = 0; i < arr.length; i++) {
|
|
356
|
+ count += arr[i].supply_count;
|
|
357
|
+ }
|
|
358
|
+ }
|
|
359
|
+ return count;
|
|
360
|
+ },
|
|
361
|
+ editGoodReturn(id) {
|
|
362
|
+ this.$router.push({ path: "/good/return/edit?id=" + id });
|
|
363
|
+ },
|
|
364
|
+ toClickOne(val, index) {
|
|
365
|
+ console.log("val323232323232", val);
|
|
366
|
+ if (val.is_check == 1) {
|
|
367
|
+ this.$message.error("已审核单据,不能删除!");
|
|
368
|
+ return false;
|
|
369
|
+ }
|
343
|
370
|
// if(val.cancelOrder.length >0 ){
|
344
|
371
|
// this.$message.error("已关联单据,不能删除!")
|
345
|
372
|
// return false
|
346
|
373
|
// }
|
347
|
|
- this.$confirm('确认删除吗?', '删除', {
|
348
|
|
- confirmButtonText: '确 定',
|
349
|
|
- cancelButtonText: '取 消',
|
350
|
|
- type: 'warning'
|
351
|
|
- }).then(() => {
|
352
|
|
- deleteReturnOrder(val.id).then(response => {
|
|
374
|
+ this.$confirm("确认删除吗?", "删除", {
|
|
375
|
+ confirmButtonText: "确 定",
|
|
376
|
+ cancelButtonText: "取 消",
|
|
377
|
+ type: "warning",
|
|
378
|
+ })
|
|
379
|
+ .then(() => {
|
|
380
|
+ deleteReturnOrder(val.id).then((response) => {
|
353
|
381
|
if (response.data.state == 1) {
|
354
|
|
- var msg = response.data.data.msg
|
355
|
|
- this.tableList.splice(index, 1);
|
356
|
|
- this.getlist()
|
357
|
|
- this.$message.success("删除成功")
|
|
382
|
+ var msg = response.data.data.msg;
|
|
383
|
+ this.tableList.splice(index, 1);
|
|
384
|
+ this.getlist();
|
|
385
|
+ this.$message.success("删除成功");
|
358
|
386
|
} else {
|
359
|
|
- this.$message.error("删除失败")
|
|
387
|
+ this.$message.error("删除失败");
|
360
|
388
|
}
|
361
|
|
- })
|
362
|
|
- }).catch(() => {
|
363
|
|
- })
|
364
|
|
- },
|
365
|
|
- getCount(val){
|
366
|
|
- console.log("val323223322323",val)
|
367
|
|
- var total = 0
|
368
|
|
- if(val!=undefined){
|
369
|
|
- for(let i=0;i<val.length;i++){
|
370
|
|
- total += val[i].supply_count
|
|
389
|
+ });
|
|
390
|
+ })
|
|
391
|
+ .catch(() => {});
|
|
392
|
+ },
|
|
393
|
+ getCount(val) {
|
|
394
|
+ console.log("val323223322323", val);
|
|
395
|
+ var total = 0;
|
|
396
|
+ if (val != undefined) {
|
|
397
|
+ for (let i = 0; i < val.length; i++) {
|
|
398
|
+ total += val[i].supply_count;
|
371
|
399
|
}
|
372
|
|
- if(total >0){
|
373
|
|
- return total
|
374
|
|
- }else{
|
375
|
|
- return ""
|
|
400
|
+ if (total > 0) {
|
|
401
|
+ return total;
|
|
402
|
+ } else {
|
|
403
|
+ return "";
|
376
|
404
|
}
|
377
|
|
- }
|
378
|
|
- }
|
|
405
|
+ }
|
|
406
|
+ },
|
379
|
407
|
},
|
380
|
408
|
created() {
|
381
|
|
- var now = new Date(); //当前日期
|
382
|
|
- var nowMonth = now.getMonth(); //当前月
|
383
|
|
- var nowYear = now.getFullYear(); //当前年
|
|
409
|
+ var now = new Date(); //当前日期
|
|
410
|
+ var nowMonth = now.getMonth(); //当前月
|
|
411
|
+ var nowYear = now.getFullYear(); //当前年
|
384
|
412
|
//本月的开始时间
|
385
|
|
- var monthStartDate = new Date(nowYear, nowMonth, 1);
|
386
|
|
- this.start_time = this.getTimes(monthStartDate)
|
|
413
|
+ var monthStartDate = new Date(nowYear, nowMonth, 1);
|
|
414
|
+ this.start_time = this.getTimes(monthStartDate);
|
387
|
415
|
this.end_time = this.getTimes(new Date());
|
388
|
|
- this.org_id = this.$store.getters.xt_user.org_id
|
389
|
|
- this.getAllSupply()
|
390
|
|
- this.getlist()
|
|
416
|
+ this.org_id = this.$store.getters.xt_user.org_id;
|
|
417
|
+ this.getAllSupply();
|
|
418
|
+ this.getlist();
|
391
|
419
|
},
|
392
|
|
-
|
393
|
420
|
};
|
394
|
421
|
</script>
|
395
|
422
|
|
|
@@ -451,7 +478,12 @@ export default {
|
451
|
478
|
.el-table__fixed-right {
|
452
|
479
|
width: 150px;
|
453
|
480
|
bottom: 20px;
|
|
481
|
+ height: 100% !important;
|
|
482
|
+}
|
|
483
|
+.el-table__fixed-body-wrapper {
|
454
|
484
|
height: 100%;
|
455
|
485
|
}
|
456
|
|
-
|
|
486
|
+.el-table__body-wrapper.is-scrolling-left {
|
|
487
|
+ max-height: 100% !important;
|
|
488
|
+}
|
457
|
489
|
</style>
|