|
|
@@ -15,19 +15,12 @@
|
|
15
|
15
|
</u-form-item>
|
|
16
|
16
|
<u-form-item label="回收时间" labelWidth="70" @click="openTimePicker">
|
|
17
|
17
|
<Cell :val="time" :isDelete="true" :border="true" @handleClear="clear('time')"> </Cell>
|
|
18
|
|
- <jtimePickerPopup :isShowShortTimeList="true" shortTimeTitle="快捷时间" :shortTimeList="shortTimeList"
|
|
|
18
|
+ <JTimePicker :isShowShortTimeList="true" shortTimeTitle="快捷时间" :shortTimeList="shortTimeList"
|
|
19
|
19
|
:isShowSeletTimeTitle="true" seletTimeTitle="时间选择" cancelText="取消" confirmText="确认"
|
|
20
|
20
|
:endSelectMonth="-1" :endSelectDay="-1" beginTimePlaceHolder='开始时间' endTimePlaceHolder="结束时间"
|
|
21
|
21
|
:isDateTypeRange="true" :isShowSelectedTimeEcho="true" @confirm="getSelectTime" :defaultSelect="0"
|
|
22
|
22
|
ref="jtimePickerPopupRef">
|
|
23
|
|
- </jtimePickerPopup>
|
|
24
|
|
- </u-form-item>
|
|
25
|
|
- <u-form-item label="机构部门" labelWidth="70" @click="recycleDeptClick">
|
|
26
|
|
- <Cell :val="formData.deptName" :isDelete="true" :border="true" @handleClear="clear('dept')"></Cell>
|
|
27
|
|
- <ba-tree-picker :selectParent="true" v-if="deptList.length > 0" ref="recycleDeptRef" :multiple='false'
|
|
28
|
|
- @select-change="deptSeletchang" border title="机构部门" :localdata="deptList" valueKey="deptId"
|
|
29
|
|
- textKey="deptName" childrenKey="children" :selectedValues="formData.deptId"
|
|
30
|
|
- :personNames="formData.deptName" />
|
|
|
23
|
+ </JTimePicker>
|
|
31
|
24
|
</u-form-item>
|
|
32
|
25
|
<u-form-item label="回收人员" labelWidth="70" @click="recyclePersonClick">
|
|
33
|
26
|
<Cell :val="formData.recyclePerson" :isDelete="true" :border="true" @handleClear="clear('recyclePerson')"></Cell>
|
|
|
@@ -56,15 +49,15 @@ import Cell from '@/components/custom-cell/index.vue'
|
|
56
|
49
|
import BrandList from '@/components/brand-list/index.vue'
|
|
57
|
50
|
import PersonPicker from '@/components/person-picker/index.vue'
|
|
58
|
51
|
import TabSelect from '@/components/custom-tab-select/index.vue'
|
|
|
52
|
+import JTimePicker from '@/uni_modules/jtime-picker-popup/components/JTimePicker/JTimePicker.vue'
|
|
59
|
53
|
import { productAttributeList, stockStatusListAll,shortTimeList } from '../js/public.js'
|
|
60
|
|
-import jtimePickerPopup from '@/uni_modules/jtime-picker-popup/components/JTimePicker/JTimePicker.vue';
|
|
61
|
54
|
export default {
|
|
62
|
55
|
components: {
|
|
63
|
56
|
Cell,
|
|
64
|
57
|
BrandList,
|
|
65
|
58
|
PersonPicker,
|
|
66
|
59
|
TabSelect,
|
|
67
|
|
- jtimePickerPopup,
|
|
|
60
|
+ JTimePicker,
|
|
68
|
61
|
},
|
|
69
|
62
|
name: 'searchFilter',
|
|
70
|
63
|
emits: ['confirm'],
|
|
|
@@ -79,8 +72,6 @@ export default {
|
|
79
|
72
|
location: '',
|
|
80
|
73
|
startTime: '',
|
|
81
|
74
|
endTime: '',
|
|
82
|
|
- deptId:'',
|
|
83
|
|
- deptName:'',
|
|
84
|
75
|
recyclePerson:'',
|
|
85
|
76
|
recyclePersonId: '',
|
|
86
|
77
|
identifyingPerson:'',
|
|
|
@@ -94,32 +85,13 @@ export default {
|
|
94
|
85
|
// 将导入的变量在data中重新定义,确保模板能够访问
|
|
95
|
86
|
productAttributeList: productAttributeList,
|
|
96
|
87
|
stockStatusListAll: stockStatusListAll,
|
|
97
|
|
- deptList: [],
|
|
|
88
|
+
|
|
98
|
89
|
}
|
|
99
|
90
|
},
|
|
100
|
91
|
props: {
|
|
101
|
92
|
},
|
|
102
|
93
|
emits: [],
|
|
103
|
|
- mounted() {
|
|
104
|
|
- this.getDeptListAll();
|
|
105
|
|
- },
|
|
106
|
94
|
methods: {
|
|
107
|
|
- getDeptListAll() {
|
|
108
|
|
- const params = {
|
|
109
|
|
- isDept:2
|
|
110
|
|
- }
|
|
111
|
|
- uni.$u.api.getDeptListAll(params).then(res => {
|
|
112
|
|
- if(res.data.length > 0){
|
|
113
|
|
- this.deptList = res.data;
|
|
114
|
|
- }else{
|
|
115
|
|
- uni.$u.toast('暂无机构部门');
|
|
116
|
|
- }
|
|
117
|
|
- })
|
|
118
|
|
- },
|
|
119
|
|
- deptSeletchang(ids, names) {
|
|
120
|
|
- this.formData.deptId = ids[0] || '';
|
|
121
|
|
- this.formData.deptName = names[0] || '';
|
|
122
|
|
- },
|
|
123
|
95
|
handleSearch() {
|
|
124
|
96
|
this.$emit('confirm', this.formData);
|
|
125
|
97
|
this.close();
|
|
|
@@ -133,8 +105,6 @@ export default {
|
|
133
|
105
|
location: '',
|
|
134
|
106
|
startTime: '',
|
|
135
|
107
|
endTime: '',
|
|
136
|
|
- deptId:'',
|
|
137
|
|
- deptName:'',
|
|
138
|
108
|
recyclePerson:'',
|
|
139
|
109
|
recyclePersonId: '',
|
|
140
|
110
|
identifyingPerson:'',
|
|
|
@@ -145,12 +115,14 @@ export default {
|
|
145
|
115
|
},
|
|
146
|
116
|
open() {
|
|
147
|
117
|
this.show = true
|
|
148
|
|
- this.$nextTick(() => {
|
|
|
118
|
+ setTimeout(() => {
|
|
149
|
119
|
this.$refs.jtimePickerPopupRef.handleInit();
|
|
150
|
|
- })
|
|
|
120
|
+ }, 300)
|
|
151
|
121
|
},
|
|
152
|
122
|
openTimePicker() {
|
|
153
|
|
- this.$refs.jtimePickerPopupRef.pickerShow();
|
|
|
123
|
+ this.$nextTick(()=>{
|
|
|
124
|
+ this.$refs.jtimePickerPopupRef.pickerShow();
|
|
|
125
|
+ })
|
|
154
|
126
|
},
|
|
155
|
127
|
close() {
|
|
156
|
128
|
this.show = false
|
|
|
@@ -189,13 +161,6 @@ export default {
|
|
189
|
161
|
this.formData.endTime = '';
|
|
190
|
162
|
return;
|
|
191
|
163
|
}
|
|
192
|
|
- // 机构部门
|
|
193
|
|
- if(field == 'dept'){
|
|
194
|
|
- this.formData.deptId = '';
|
|
195
|
|
- this.formData.deptName = '';
|
|
196
|
|
- this.$refs.recycleDeptRef._clear();
|
|
197
|
|
- return;
|
|
198
|
|
- }
|
|
199
|
164
|
this.formData[field] = '';
|
|
200
|
165
|
},
|
|
201
|
166
|
getSelectTime(val) {
|
|
|
@@ -203,9 +168,7 @@ export default {
|
|
203
|
168
|
this.formData.endTime = this.$dayjs(val.endTime).format('YYYY-MM-DD');
|
|
204
|
169
|
this.time = this.$dayjs(val.beginTime).format('YYYY-MM-DD') + ' 至 ' + this.$dayjs(val.endTime).format('YYYY-MM-DD');
|
|
205
|
170
|
},
|
|
206
|
|
- recycleDeptClick() {
|
|
207
|
|
- this.$refs.recycleDeptRef._show();
|
|
208
|
|
- },
|
|
|
171
|
+
|
|
209
|
172
|
recyclePersonClick() {
|
|
210
|
173
|
this.$refs.recyclePersonPickerRef.open();
|
|
211
|
174
|
},
|