Просмотр исходного кода

feat:回收情况、机构部门

zhangxin 1 месяц назад
Родитель
Сommit
f2a81c7e3b

+ 10 - 0
pages/wareHouse/components/detail.vue

@@ -84,6 +84,10 @@
84
                 <view class="info_label">付款方式</view>
84
                 <view class="info_label">付款方式</view>
85
                 <view class="info_value">{{ payTypeFormatter(coreInfo.payType) }}</view>
85
                 <view class="info_value">{{ payTypeFormatter(coreInfo.payType) }}</view>
86
             </view>
86
             </view>
87
+            <view class="info_row">
88
+                <view class="info_label">回收情况</view>
89
+                <view class="info_value">{{ recycleSituationFormatter(coreInfo.recycleSituation) }}</view>
90
+            </view>
87
             <view class="info_row col">
91
             <view class="info_row col">
88
                 <view class="info_label">备注信息</view>
92
                 <view class="info_label">备注信息</view>
89
                 <view class="info_value note" @click.stop="toggleEditField('desc', coreInfo.desc)">
93
                 <view class="info_value note" @click.stop="toggleEditField('desc', coreInfo.desc)">
@@ -236,6 +240,7 @@ import BrandList from '@/components/brand-list/index.vue'
236
 import personPicker from '@/components/person-picker/index.vue'
240
 import personPicker from '@/components/person-picker/index.vue'
237
 import imgsRowScroll from '@/components/imgs-row-scroll/index.vue'
241
 import imgsRowScroll from '@/components/imgs-row-scroll/index.vue'
238
 import { permissionCheck } from '@/utils/util.js'
242
 import { permissionCheck } from '@/utils/util.js'
243
+import { recycleSituationList } from '../js/public.js'
239
 export default {
244
 export default {
240
     components: {
245
     components: {
241
         BrandList,
246
         BrandList,
@@ -322,6 +327,11 @@ export default {
322
                     return '-'
327
                     return '-'
323
             }
328
             }
324
         },
329
         },
330
+        // 回收情况格式化
331
+        recycleSituationFormatter(val){
332
+            let item = recycleSituationList.find(item => item.value == val)
333
+            return item ? item.name : '-'
334
+        },
325
         // 锁单
335
         // 锁单
326
         lockGoods() {
336
         lockGoods() {
327
             if (this.globalEditMode) {
337
             if (this.globalEditMode) {

+ 17 - 2
pages/wareHouse/components/edit.vue

@@ -26,7 +26,7 @@
26
                                 @click="handlePasteRecognition(recognitionContent)"></u-button>
26
                                 @click="handlePasteRecognition(recognitionContent)"></u-button>
27
                         </view>
27
                         </view>
28
                     </u-form-item>
28
                     </u-form-item>
29
-                    <u-form-item :label="'商品图片(' + (formData.goodPicFileList.length || 0) + '张)'" required prop="goodPicFileList" borderBottom>
29
+                    <u-form-item :label="'商品图片(' + (formData.goodPicFileList.length || 0) + '张)'" required  borderBottom>
30
                         <view class="imgs_scroll">
30
                         <view class="imgs_scroll">
31
                             <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
31
                             <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
32
                                 @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
32
                                 @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
@@ -162,6 +162,11 @@
162
                             @tabChange="handleTabChangeRecycleType">
162
                             @tabChange="handleTabChangeRecycleType">
163
                         </TabSelect>
163
                         </TabSelect>
164
                     </u-form-item>
164
                     </u-form-item>
165
+                    <u-form-item label="回收情况" borderBottom>
166
+                        <TabSelect :tabList="recycleSituationList" :colNum="5" mode="single" :isClear="recycleSituationIsClear" :echoInfo="echoInfoRecycleSituation"
167
+                            @tabChange="handleTabChangeRecycleSituation">
168
+                        </TabSelect>
169
+                    </u-form-item>
165
                     <u-form-item label="标签" borderBottom>
170
                     <u-form-item label="标签" borderBottom>
166
                         <TabSelect :tabList="labelList" :colNum="5" mode="single" :isClear="labelIsClear" :echoInfo="echoInfoLabel"
171
                         <TabSelect :tabList="labelList" :colNum="5" mode="single" :isClear="labelIsClear" :echoInfo="echoInfoLabel"
167
                             @tabChange="handleTabChangeLabel">
172
                             @tabChange="handleTabChangeLabel">
@@ -271,7 +276,7 @@ import ImgsRowScroll from '@/components/imgs-row-scroll/index.vue'
271
 import PersonPicker from '@/components/person-picker/index.vue'
276
 import PersonPicker from '@/components/person-picker/index.vue'
272
 import { permissionCheck,getRoles } from '@/utils/util.js'
277
 import { permissionCheck,getRoles } from '@/utils/util.js'
273
 import moreInfo from './moreInfo.vue'
278
 import moreInfo from './moreInfo.vue'
274
-import { productConditionList,productAttributeList,stockStatusList,recycleTypeList,labelList,paymentTabList } from '../js/public.js'
279
+import { productConditionList,productAttributeList,stockStatusList,recycleTypeList,labelList,paymentTabList,recycleSituationList } from '../js/public.js'
275
 export default {
280
 export default {
276
     components: {
281
     components: {
277
         TabSelect,
282
         TabSelect,
@@ -319,6 +324,7 @@ export default {
319
                 identifyingPersonId: '',
324
                 identifyingPersonId: '',
320
                 stockStatus: '0',
325
                 stockStatus: '0',
321
                 recycleType: '',
326
                 recycleType: '',
327
+                recycleSituation: '0',
322
                 recyclePerson: '',
328
                 recyclePerson: '',
323
                 recyclePersonId: '',
329
                 recyclePersonId: '',
324
                 recycleBottomDesc: '',
330
                 recycleBottomDesc: '',
@@ -376,6 +382,7 @@ export default {
376
             productConditionIsClear: false,//商品成色是否清空
382
             productConditionIsClear: false,//商品成色是否清空
377
             productAttributeIsClear: false,//商品属性是否清空
383
             productAttributeIsClear: false,//商品属性是否清空
378
             recycleTypeIsClear: false,//回收类型是否清空
384
             recycleTypeIsClear: false,//回收类型是否清空
385
+            recycleSituationIsClear: false,//回收情况是否清空
379
             stockStatusIsClear: false,//是否入库是否清空
386
             stockStatusIsClear: false,//是否入库是否清空
380
             labelIsClear: false,//商品标签是否清空
387
             labelIsClear: false,//商品标签是否清空
381
             payTypeIsClear: false,//付款方式是否清空
388
             payTypeIsClear: false,//付款方式是否清空
@@ -386,6 +393,7 @@ export default {
386
             echoInfoProductAttribute:'',//入库回显的时候 商品属性回显
393
             echoInfoProductAttribute:'',//入库回显的时候 商品属性回显
387
             echoInfoProductCondition:'',//入库回显的时候 商品成色回显
394
             echoInfoProductCondition:'',//入库回显的时候 商品成色回显
388
             echoInfoStockStatus:'',//入库回显的时候 是否入库回显
395
             echoInfoStockStatus:'',//入库回显的时候 是否入库回显
396
+            echoInfoRecycleSituation:'0',//入库回显的时候 回收情况回显
389
             isWareHouser: permissionCheck('WAREHOUSER',false),
397
             isWareHouser: permissionCheck('WAREHOUSER',false),
390
             formType: '',//表单类型 add:新增 edit:编辑
398
             formType: '',//表单类型 add:新增 edit:编辑
391
             xhlSystemSetList: [],//系统设置-列表
399
             xhlSystemSetList: [],//系统设置-列表
@@ -395,6 +403,7 @@ export default {
395
             recycleTypeList: recycleTypeList,
403
             recycleTypeList: recycleTypeList,
396
             labelList: labelList,
404
             labelList: labelList,
397
             paymentTabList: paymentTabList,
405
             paymentTabList: paymentTabList,
406
+            recycleSituationList: recycleSituationList,
398
             moreOptions: {},
407
             moreOptions: {},
399
             
408
             
400
         }
409
         }
@@ -425,6 +434,7 @@ export default {
425
                 this.formData.price = res.data.price || 0//官方指导价校验
434
                 this.formData.price = res.data.price || 0//官方指导价校验
426
                 this.echoInfoPayType = res.data.payType//付款方式回显
435
                 this.echoInfoPayType = res.data.payType//付款方式回显
427
                 this.echoInfoRecycleType = res.data.recycleType//回收类型回显
436
                 this.echoInfoRecycleType = res.data.recycleType//回收类型回显
437
+                this.echoInfoRecycleSituation = res.data.recycleSituation || '0'//回收情况回显
428
                 this.echoInfoLabel = res.data.label//商品标签回显
438
                 this.echoInfoLabel = res.data.label//商品标签回显
429
                 this.recognitionContent = `品牌:${res.data.dictLabel || '-'}
439
                 this.recognitionContent = `品牌:${res.data.dictLabel || '-'}
430
 来源:${res.data.origin || '-'}
440
 来源:${res.data.origin || '-'}
@@ -570,6 +580,7 @@ export default {
570
                 identifyingPersonId: '',
580
                 identifyingPersonId: '',
571
                 stockStatus: '0',
581
                 stockStatus: '0',
572
                 recycleType: '',
582
                 recycleType: '',
583
+                recycleSituation: '0',
573
                 label: '',
584
                 label: '',
574
                 recyclePerson: '',
585
                 recyclePerson: '',
575
                 recyclePersonId: '',
586
                 recyclePersonId: '',
@@ -654,6 +665,10 @@ export default {
654
         handleTabChangeRecycleType(e) {
665
         handleTabChangeRecycleType(e) {
655
             this.formData.recycleType = e;
666
             this.formData.recycleType = e;
656
         },
667
         },
668
+        // 回收情况
669
+        handleTabChangeRecycleSituation(e) {
670
+            this.formData.recycleSituation = e;
671
+        },
657
         // 商品标签
672
         // 商品标签
658
         handleTabChangeLabel(e) {
673
         handleTabChangeLabel(e) {
659
             this.formData.label = e;
674
             this.formData.label = e;

+ 41 - 2
pages/wareHouse/components/searchFilter.vue

@@ -22,6 +22,13 @@
22
                     ref="jtimePickerPopupRef">
22
                     ref="jtimePickerPopupRef">
23
                 </jtimePickerPopup>
23
                 </jtimePickerPopup>
24
             </u-form-item>
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" />
31
+            </u-form-item>
25
             <u-form-item label="回收人员" labelWidth="70" @click="recyclePersonClick">
32
             <u-form-item label="回收人员" labelWidth="70" @click="recyclePersonClick">
26
                 <Cell :val="formData.recyclePerson" :isDelete="true" :border="true" @handleClear="clear('recyclePerson')"></Cell>
33
                 <Cell :val="formData.recyclePerson" :isDelete="true" :border="true" @handleClear="clear('recyclePerson')"></Cell>
27
                 <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员" @selectPerson="handleSelectRecyclePerson"></PersonPicker>
34
                 <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员" @selectPerson="handleSelectRecyclePerson"></PersonPicker>
@@ -72,6 +79,8 @@ export default {
72
                 location: '',
79
                 location: '',
73
                 startTime: '',
80
                 startTime: '',
74
                 endTime: '',
81
                 endTime: '',
82
+                deptId:'',
83
+                deptName:'',
75
                 recyclePerson:'',
84
                 recyclePerson:'',
76
                 recyclePersonId: '',
85
                 recyclePersonId: '',
77
                 identifyingPerson:'',
86
                 identifyingPerson:'',
@@ -85,14 +94,32 @@ export default {
85
             // 将导入的变量在data中重新定义,确保模板能够访问
94
             // 将导入的变量在data中重新定义,确保模板能够访问
86
             productAttributeList: productAttributeList,
95
             productAttributeList: productAttributeList,
87
             stockStatusListAll: stockStatusListAll,
96
             stockStatusListAll: stockStatusListAll,
88
-            
97
+            deptList: [],
89
         }
98
         }
90
     },
99
     },
91
     props: {
100
     props: {
92
     },
101
     },
93
     emits: [],
102
     emits: [],
103
+    mounted() {
104
+        this.getDeptListAll();
105
+    },
94
     methods: {
106
     methods: {
95
-        
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
+        },
96
         handleSearch() {
123
         handleSearch() {
97
             this.$emit('confirm', this.formData);
124
             this.$emit('confirm', this.formData);
98
             this.close();
125
             this.close();
@@ -106,6 +133,8 @@ export default {
106
                 location: '',
133
                 location: '',
107
                 startTime: '',
134
                 startTime: '',
108
                 endTime: '',
135
                 endTime: '',
136
+                deptId:'',
137
+                deptName:'',
109
                 recyclePerson:'',
138
                 recyclePerson:'',
110
                 recyclePersonId: '',
139
                 recyclePersonId: '',
111
                 identifyingPerson:'',
140
                 identifyingPerson:'',
@@ -160,6 +189,13 @@ export default {
160
                 this.formData.endTime = '';
189
                 this.formData.endTime = '';
161
                 return;
190
                 return;
162
             }
191
             }
192
+            // 机构部门
193
+            if(field == 'dept'){
194
+                this.formData.deptId = '';
195
+                this.formData.deptName = '';
196
+                this.$refs.recycleDeptRef._clear();
197
+                return;
198
+            }
163
             this.formData[field] = '';
199
             this.formData[field] = '';
164
         },
200
         },
165
         getSelectTime(val) {
201
         getSelectTime(val) {
@@ -167,6 +203,9 @@ export default {
167
             this.formData.endTime = this.$dayjs(val.endTime).format('YYYY-MM-DD');
203
             this.formData.endTime = this.$dayjs(val.endTime).format('YYYY-MM-DD');
168
             this.time = this.$dayjs(val.beginTime).format('YYYY-MM-DD') + ' 至 ' + this.$dayjs(val.endTime).format('YYYY-MM-DD');
204
             this.time = this.$dayjs(val.beginTime).format('YYYY-MM-DD') + ' 至 ' + this.$dayjs(val.endTime).format('YYYY-MM-DD');
169
         },
205
         },
206
+        recycleDeptClick() {
207
+            this.$refs.recycleDeptRef._show();
208
+        },
170
         recyclePersonClick() {
209
         recyclePersonClick() {
171
             this.$refs.recyclePersonPickerRef.open();
210
             this.$refs.recyclePersonPickerRef.open();
172
         },
211
         },

+ 23 - 1
pages/wareHouse/js/public.js

@@ -179,4 +179,26 @@ export const shortTimeList = [{
179
     key: '上月',
179
     key: '上月',
180
     value: -1
180
     value: -1
181
 },
181
 },
182
-]
182
+]
183
+export const recycleSituationList = [
184
+    {
185
+        name: '全套',
186
+        value: '0',
187
+    },
188
+    {
189
+        name: '单表',
190
+        value: '1',
191
+    },
192
+    {
193
+        name: '单表头',
194
+        value: '2',
195
+    },
196
+    {
197
+        name: '附件',
198
+        value: '3',
199
+    },
200
+    {
201
+        name: '其他',
202
+        value: '4',
203
+    },
204
+]

+ 8 - 0
store/modules/user.js

@@ -61,6 +61,7 @@ export default {
61
 			const validRoles = [];
61
 			const validRoles = [];
62
 			
62
 			
63
 			const hasAdminRole = roles.some(role => role.roleKey && role.roleKey.includes('admin' || 'ADMIN'));
63
 			const hasAdminRole = roles.some(role => role.roleKey && role.roleKey.includes('admin' || 'ADMIN'));
64
+			console.log('hasAdminRole',hasAdminRole);
64
 			const hasCrmRole = roles.some(role => role.roleKey && role.roleKey.includes('CRM'));
65
 			const hasCrmRole = roles.some(role => role.roleKey && role.roleKey.includes('CRM'));
65
 			const hasWarehouser = roles.some(role => role.roleKey === 'WAREHOUSER');
66
 			const hasWarehouser = roles.some(role => role.roleKey === 'WAREHOUSER');
66
 			const hasSalesman = roles.some(role => role.roleKey === 'SALESMAN');
67
 			const hasSalesman = roles.some(role => role.roleKey === 'SALESMAN');
@@ -92,6 +93,13 @@ export default {
92
 				});
93
 				});
93
 				const currentRole = validRoles[0] || '';
94
 				const currentRole = validRoles[0] || '';
94
 				switch (currentRole) {
95
 				switch (currentRole) {
96
+					case 'admin':
97
+						// 展示首页、线索公海、销售线索、接单中心、我的
98
+						uni.setTabBarItem({ index: 0, visible: true }); // 首页
99
+						uni.setTabBarItem({ index: 1, visible: true }); // 线索公海
100
+						uni.setTabBarItem({ index: 5, visible: true }); // 销售线索
101
+						uni.setTabBarItem({ index: 6, visible: true }); // 接单中心
102
+						break;
95
 					case 'WAREandSALE':
103
 					case 'WAREandSALE':
96
 						// 展示仓库、核价中心、询价中心、我的
104
 						// 展示仓库、核价中心、询价中心、我的
97
 						uni.setTabBarItem({ index: 2, visible: true }); // 仓库
105
 						uni.setTabBarItem({ index: 2, visible: true }); // 仓库

+ 1 - 0
utils/api.js

@@ -14,6 +14,7 @@ const install = (Vue, vm) => {
14
 		getDicts: (dictType) => http.get('/system/dict/data/type/' + dictType), // 获取字典
14
 		getDicts: (dictType) => http.get('/system/dict/data/type/' + dictType), // 获取字典
15
 		getPhoneFileterResult: (data = {}) => http.post('/collect/all/casePhoneFilter/getPhoneFileterResult', data), // 滤号
15
 		getPhoneFileterResult: (data = {}) => http.post('/collect/all/casePhoneFilter/getPhoneFileterResult', data), // 滤号
16
 		listDetpUser: (data = {}) => http.post('/system/user/getDeptCustomer', data), // 查询部门人员列表
16
 		listDetpUser: (data = {}) => http.post('/system/user/getDeptCustomer', data), // 查询部门人员列表
17
+		getDeptListAll: (params = {}) => http.get('/system/dept/listAll', { params }), // 查询企业列表
17
 		getDeptCustomerByOrg: (data = {}) => http.post('/system/user/getDeptCustomerByOrg', data, { params: data }), // 查询部门人员列表
18
 		getDeptCustomerByOrg: (data = {}) => http.post('/system/user/getDeptCustomerByOrg', data, { params: data }), // 查询部门人员列表
18
 		getDeptOwner: (data = {}) => http.post('/system/user/getDeptOwner', data), // 查询部门人员列表
19
 		getDeptOwner: (data = {}) => http.post('/system/user/getDeptOwner', data), // 查询部门人员列表
19
 		listByOrgDataScope: (params = {}) => http.get('/system/user/listByOrgDataScope', { params }), // 查询部门人员列表
20
 		listByOrgDataScope: (params = {}) => http.get('/system/user/listByOrgDataScope', { params }), // 查询部门人员列表