瀏覽代碼

feat:回收情况、机构部门

zhangxin 1 月之前
父節點
當前提交
f2a81c7e3b

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

@@ -84,6 +84,10 @@
84 84
                 <view class="info_label">付款方式</view>
85 85
                 <view class="info_value">{{ payTypeFormatter(coreInfo.payType) }}</view>
86 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 91
             <view class="info_row col">
88 92
                 <view class="info_label">备注信息</view>
89 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 240
 import personPicker from '@/components/person-picker/index.vue'
237 241
 import imgsRowScroll from '@/components/imgs-row-scroll/index.vue'
238 242
 import { permissionCheck } from '@/utils/util.js'
243
+import { recycleSituationList } from '../js/public.js'
239 244
 export default {
240 245
     components: {
241 246
         BrandList,
@@ -322,6 +327,11 @@ export default {
322 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 336
         lockGoods() {
327 337
             if (this.globalEditMode) {

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

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

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

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

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

@@ -179,4 +179,26 @@ export const shortTimeList = [{
179 179
     key: '上月',
180 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 61
 			const validRoles = [];
62 62
 			
63 63
 			const hasAdminRole = roles.some(role => role.roleKey && role.roleKey.includes('admin' || 'ADMIN'));
64
+			console.log('hasAdminRole',hasAdminRole);
64 65
 			const hasCrmRole = roles.some(role => role.roleKey && role.roleKey.includes('CRM'));
65 66
 			const hasWarehouser = roles.some(role => role.roleKey === 'WAREHOUSER');
66 67
 			const hasSalesman = roles.some(role => role.roleKey === 'SALESMAN');
@@ -92,6 +93,13 @@ export default {
92 93
 				});
93 94
 				const currentRole = validRoles[0] || '';
94 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 103
 					case 'WAREandSALE':
96 104
 						// 展示仓库、核价中心、询价中心、我的
97 105
 						uni.setTabBarItem({ index: 2, visible: true }); // 仓库

+ 1 - 0
utils/api.js

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