Bladeren bron

feat:询价、核价mock接口;品牌列表组件化

zhangxin 2 maanden geleden
bovenliggende
commit
5a0e63dcf8

+ 49 - 0
components/add-inquiry-dialog/index.scss

@@ -0,0 +1,49 @@
1
+::v-deep .u-modal__content{
2
+	flex-direction: column;
3
+	gap: 30rpx;
4
+	.modal_wrap{
5
+		border-radius: 40rpx;
6
+		padding: 10rpx 20rpx;
7
+		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.1);
8
+		display: flex;
9
+		align-items: center;
10
+		.item{
11
+			width: 33%;
12
+		}
13
+		.brand{
14
+			font-size: 30rpx;
15
+			color: #111827;
16
+			text-align: center;
17
+			font-weight: 550;
18
+		}
19
+		.placeholder{
20
+			font-size:30rpx;
21
+			color: #c0c4cc;
22
+			text-align: center;
23
+		}
24
+		.divider{
25
+			color: #ddd;
26
+			font-size: 28rpx;
27
+		}
28
+		.uni-input-wrapper{
29
+			text-align: center;
30
+		}
31
+		.code-input {
32
+			.u-input__content__field-wrapper__field{
33
+				color: blueviolet !important;
34
+				font-weight: 550;
35
+			}
36
+		}
37
+	}
38
+	.img_wrap{
39
+		display: flex;
40
+	}
41
+	.price{
42
+		.u-input__content__field-wrapper__field{
43
+			font-size: 34rpx !important;
44
+			color: red !important;
45
+			font-weight: 600;
46
+		}
47
+		
48
+	}
49
+}

+ 182 - 0
components/add-inquiry-dialog/index.vue

@@ -0,0 +1,182 @@
1
+<template>
2
+	<view>
3
+		<u-modal :show="showModal" ref="uModal" :title="editOrAdd === 'edit' ? '编辑' : '新增'" :asyncClose="false" showCancelButton @cancel="closeDialog" cancelColor="#909399" :confirmText="'确定'" confirmColor="#2979ff"@confirm="confirm" @close="closeDialog" :closeOnClickOverlay="false">
4
+            <view class="modal_wrap">
5
+                <text @click="handleBrandClick" class="item" :class="info.dictLabel ? 'brand' : 'brand placeholder'">{{ info.dictLabel || '品牌' }}</text>
6
+                <text class="divider">|</text>
7
+                <u--input placeholder="型号" class="item" border="none" v-model="info.model" clearable></u--input>
8
+                <text class="divider">|</text>
9
+                <u--input class="code-input item" placeholder="编码" border="none" v-model="info.code" clearable></u--input>
10
+            </view>
11
+            <view class="img_wrap">
12
+                <imgs-row-scroll v-if="info.imgsUrl.length > 0" :isShowDeleteIcon="true" @deleteImgInfo="getDeleteImgInfo" imgMode="aspectFill" :totalWidth="400" :images="info.imgsUrl" :previewEnabled="true" :imageWidth="150" :imageHeight="150"></imgs-row-scroll>
13
+                <u-upload
14
+                    @afterRead="afterRead"
15
+                    name="3"
16
+                    multiple
17
+                    :maxCount="10"
18
+                ></u-upload>
19
+            </view>
20
+            <u--input v-if="editOrAdd === 'edit'" class="price" placeholder="价格" border="bottom" v-model="info.price" clearable></u--input>
21
+        </u-modal>
22
+        <brandList ref="brandListRef" @selectedBrand="handleSelectedBrand"></brandList>
23
+	</view>
24
+</template>
25
+
26
+<script>
27
+import imgsRowScroll from '@/components/imgs-row-scroll/index.vue'
28
+import brandList from '@/components/brand-list/index.vue'
29
+export default {
30
+	name: 'AddInquiryDialog',
31
+    components: {
32
+        imgsRowScroll,
33
+        brandList
34
+    },
35
+	props: {
36
+        clueId: {
37
+            type: String,
38
+            default: ''
39
+        },
40
+		show: {
41
+			type: Boolean,
42
+			default: false
43
+		},
44
+        editOrAdd: {
45
+            type: String,
46
+            default: ''
47
+        },
48
+        editInfo: {
49
+            type: Object,
50
+            default: () => {}
51
+        },
52
+
53
+	},
54
+	data() {
55
+		return {
56
+			showModal: false,
57
+            info: {
58
+                model:'',
59
+                code:'',
60
+                id:'',
61
+                price:'',
62
+                dictLabel:'',
63
+                dictValue:'',
64
+                imgsUrl:[]
65
+            },
66
+            rules: {
67
+                brand: [
68
+                    { required: true, message: '请输入品牌', trigger: 'blur' }
69
+                ]
70
+            },
71
+		}
72
+	},
73
+	watch: {
74
+		show: {
75
+			handler(newVal) {
76
+				this.showModal = newVal;
77
+			},
78
+			immediate: true
79
+		}
80
+	},
81
+	methods: {
82
+        // 编辑回显
83
+        initData() {
84
+            if (this.editOrAdd === 'edit') {
85
+                this.info = JSON.parse(JSON.stringify(this.editInfo))
86
+            }
87
+        },
88
+        // 获取删除图片信息
89
+        getDeleteImgInfo(info) {
90
+            this.info.imgsUrl = info.newImages
91
+        },
92
+        handleBrandClick() {
93
+            this.$refs.brandListRef.showBrandList();
94
+        },
95
+        handleSelectedBrand(info) {
96
+            this.info.dictLabel = info.dictLabel
97
+            this.info.dictValue = info.dictValue
98
+        },
99
+        // 上传图片
100
+        afterRead(info) {
101
+            info.file.forEach(item=>{
102
+                uni.$u.api.uploadFile(item.url).then((res) => {
103
+                    this.info.imgsUrl.push(res.data.url);
104
+                    uni.$u.toast("文件上传成功");
105
+                }).catch(() => {
106
+                    uni.$u.toast("上传文件失败");
107
+                })
108
+            })
109
+        },
110
+        // 确认添加
111
+        confirm() {
112
+            if (!this.info.dictLabel || !this.info.dictValue) {
113
+                uni.showToast({
114
+                    title: '请选择品牌',
115
+                    icon: 'none'
116
+                })
117
+                return
118
+            }
119
+            if (!this.info.model) {
120
+                uni.showToast({
121
+                    title: '请输入型号',
122
+                    icon: 'none'
123
+                })
124
+                return
125
+            }
126
+            if (!this.info.code) {
127
+                uni.showToast({
128
+                    title: '请输入编码',
129
+                    icon: 'none'
130
+                })
131
+                return
132
+            }
133
+            const data = {
134
+                clueId: this.clueId,
135
+                dictValue: this.info.dictValue,
136
+                dictLabel: this.info.dictLabel,
137
+                model: this.info.model,
138
+                code: this.info.code,
139
+                id: this.editOrAdd === 'edit' ? this.info.id : '',
140
+                price: this.editOrAdd === 'edit' ? this.info.price : '',
141
+                imgsUrl:this.info.imgsUrl
142
+            }
143
+            uni.$u.api.addInquiry(data).then(res => {
144
+                if (res.code == 200) {
145
+                    uni.showToast({
146
+                        title: '添加成功',
147
+                        icon: 'success'
148
+                    })
149
+                    this.closeDialog()
150
+                    this.$emit('addSuccess')
151
+                }
152
+            })
153
+        },
154
+        showDialog() {
155
+            this.showModal = true;
156
+            if (this.editOrAdd === 'edit') {
157
+                this.initData();
158
+            }else{
159
+                this.clearForm()
160
+            }
161
+        },
162
+        clearForm() {
163
+            this.info = {
164
+                dictLabel:'',
165
+                dictValue:'',
166
+                model:'',
167
+                code:'',
168
+                id:'',
169
+                price:'',
170
+                imgsUrl:[]
171
+            }
172
+        },
173
+        closeDialog() {
174
+            this.showModal = false;
175
+        },
176
+	}
177
+};
178
+</script>
179
+
180
+<style lang="scss" scoped>
181
+    @import './index.scss'
182
+</style>

+ 12 - 4
pages/wareHouse/styles/brandList.scss

@@ -1,9 +1,12 @@
1 1
 .brand_list_page {
2
-    width: 100%;
3
-
2
+    width: 100vw;
3
+    height: 100vh;
4
+    display: flex;
5
+    flex-direction: column;
4 6
     .brand_list {
5 7
         background-color: #fff;
6 8
         padding: 20rpx;
9
+        flex-shrink: 0;
7 10
 
8 11
         .u-nav-slot {
9 12
             display: flex;
@@ -36,8 +39,13 @@
36 39
 
37 40
     }
38 41
     .index_list{
42
+        flex: 1;
43
+        overflow: auto;
39 44
         ::v-deep .uni-scroll-view-content{
40
-            margin-bottom: 120rpx;
45
+            padding-bottom: 120rpx;
46
+        }
47
+        ::v-deep .u-index-list{
48
+            height: 100%;
41 49
         }
42 50
     }
43 51
     .no_brand{
@@ -70,4 +78,4 @@
70 78
         width: 160rpx;
71 79
         height: 80rpx;
72 80
     }
73
-}
81
+}

+ 158 - 0
components/brand-list/index.vue

@@ -0,0 +1,158 @@
1
+<template>
2
+    <u-popup :show="show" @close="hideBrandList" mode="right" class="brand_list_popup">
3
+        <view class="brand_list_page">
4
+            <view class="brand_list">
5
+                <u-navbar class="nav-bar" title="品牌" :autoBack="false" :placeholder="true" v-hideNav @leftClick="hideBrandList">
6
+                    <!-- <view class="u-nav-slot" slot="right" @click="handleAddBrand">
7
+                        <u-icon name="plus-circle" color="#2979ff" size="20"></u-icon>
8
+                        <text>新增</text>
9
+                    </view> -->
10
+                </u-navbar>
11
+                <u-search placeholder="搜索" v-model="keyword" @custom="handleSearch" @change="handleSearch"></u-search>
12
+                <view class="suggest_list">
13
+                    <view class="brand_item" v-for="item in adviceList" :key="item.id" @click="handleBrandClick(item)">
14
+                        <img class="brand_img" :src="item.imgUrl ? item.imgUrl : '/static/no-img.png'" alt="">
15
+                        <view class="brand_name">{{ item.dictLabel }}</view>
16
+                    </view>
17
+                </view>
18
+            </view>
19
+            <u-index-list :index-list="indexList" class="index_list">
20
+                <template v-for="(item, index) in brandList">
21
+                    <!-- #ifdef APP-NVUE -->
22
+                    <u-index-anchor :text="indexList[index]"></u-index-anchor>
23
+                    <!-- #endif -->
24
+                    <u-index-item>
25
+                        <!-- #ifndef APP-NVUE -->
26
+                        <u-index-anchor :text="indexList[index]"></u-index-anchor>
27
+                        <!-- #endif -->
28
+                        <view class="list-cell" v-for="cell in item" :key="cell.dictValue" @click="handleBrandClick(cell)">
29
+                            <img :src="cell.imgUrl ? cell.imgUrl : '/static/no-img.png'" alt="">
30
+                            {{ cell.dictLabel }}
31
+                        </view>
32
+                    </u-index-item>
33
+                </template>
34
+            </u-index-list>
35
+            <!-- <view class="no_brand">
36
+                <u-button type="primary" :plain="true" text="找不到品牌" color="#108cff"></u-button>
37
+            </view> -->
38
+        </view>
39
+    </u-popup>
40
+
41
+</template>
42
+<script>
43
+    import pinyin from 'pinyin'
44
+export default {
45
+    components: {
46
+    },
47
+    props: {
48
+    },
49
+    emits: ['selectedBrand'],
50
+    data() {
51
+        return {
52
+            show: false,
53
+            keyword: '',
54
+            adviceList: [],
55
+            indexList: [],
56
+            brandList: [],
57
+            list: [],
58
+        }
59
+    },
60
+    methods: {
61
+        handleSearch(val) {
62
+            if(val){
63
+                this.filterData(this.list.filter(item => item.dictLabel.includes(this.keyword)))
64
+            }else{
65
+                this.filterData(this.list)
66
+            }
67
+        },
68
+        handleBrandClick(brand) {
69
+            this.$emit('selectedBrand', brand)
70
+            this.hideBrandList()
71
+        },
72
+        // 显示品牌列表
73
+        showBrandList() {
74
+            this.getList()
75
+            this.show = true;
76
+        },
77
+        // 隐藏品牌列表
78
+        hideBrandList() {
79
+            this.show = false;
80
+        },
81
+        getList() {
82
+            this.$getDicts('crm_form_brand').then(res => {
83
+                this.filterData(res)
84
+                this.list = res
85
+                this.adviceList = res.filter(item => item.remark == 'R')
86
+            })
87
+        },
88
+        filterData(res){
89
+            const processedData = this.processBrandData(res)
90
+            this.brandList = processedData.groupedList
91
+            this.indexList = processedData.indexList
92
+        },
93
+        processBrandData(data) {
94
+            // 1. 首先按 isDefault 排序(true 的排在前面),然后按 dictLabel 字母排序
95
+            const sortedData = data.sort((a, b) => {
96
+                // isDefault 为 true 的排在前面
97
+                if (a.isDefault !== b.isDefault) {
98
+                    return b.isDefault - a.isDefault
99
+                }
100
+                // 如果 isDefault 相同,则按 dictLabel 字母顺序排序
101
+                return a.dictLabel.localeCompare(b.dictLabel, 'zh-CN')
102
+            })
103
+
104
+            // 2. 按首字母分组
105
+            const groupedData = {}
106
+            const indexList = []
107
+
108
+            for (const item of sortedData) {
109
+                let firstLetter
110
+                const label = item.dictLabel || ''
111
+                
112
+                if (/[a-zA-Z]/.test(label.charAt(0))) {
113
+                    // 英文字母开头,使用大写首字母
114
+                    firstLetter = label.charAt(0).toUpperCase()
115
+                } else {
116
+                    // 中文字符,使用拼音首字母
117
+                    try {
118
+                        const pinyinArray = pinyin(label, {
119
+                            style: pinyin.STYLE_FIRST_LETTER,
120
+                        })
121
+                        if (pinyinArray.length > 0 && /[a-zA-Z]/.test(pinyinArray[0][0].toUpperCase())) {
122
+                            firstLetter = pinyinArray[0][0].toUpperCase()
123
+                        } else {
124
+                            firstLetter = '#'
125
+                        }
126
+                    } catch (error) {
127
+                        firstLetter = '#'
128
+                    }
129
+                }
130
+
131
+                // 创建字母分组
132
+                if (!groupedData[firstLetter]) {
133
+                    groupedData[firstLetter] = []
134
+                    indexList.push(firstLetter)
135
+                }
136
+                groupedData[firstLetter].push(item)
137
+            }
138
+
139
+            // 3. 按字母顺序排序索引列表
140
+            indexList.sort((a, b) => {
141
+                if (a === '#') return 1
142
+                if (b === '#') return -1
143
+                return a.localeCompare(b)
144
+            })
145
+
146
+            // 4. 将分组数据转换为数组格式
147
+            const groupedList = indexList.map(letter => groupedData[letter])
148
+            return {
149
+                groupedList,
150
+                indexList
151
+            }
152
+        },
153
+    }
154
+}
155
+</script>
156
+<style lang="scss" scoped>
157
+@import './index.scss';
158
+</style>

pages/wareHouse/imgs/lv.jpg → components/brand-list/lv.jpg


+ 1 - 1
components/form-select-to-page/index.vue

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
     <view class="form_select_to_page" @click="handleClickToPage">
3 3
         <view>{{ val }}</view>
4
-        <u-icon size="13" name="close-circle" @click="clear" v-if="val"></u-icon>
4
+        <!-- <u-icon size="13" name="close-circle" @click="clear" v-if="val"></u-icon> -->
5 5
         <u-icon size="20" name="arrow-right"></u-icon>
6 6
     </view>
7 7
 </template>

+ 38 - 0
components/imgs-row-scroll/index.scss

@@ -0,0 +1,38 @@
1
+.imgs-row-scroll {
2
+	.img-list {
3
+		display: flex;
4
+		align-items: center;
5
+	}
6
+	
7
+	.img-item {
8
+		flex-shrink: 0;
9
+		border-radius: 12rpx;
10
+		overflow: hidden;
11
+		background-color: #f5f5f5;
12
+		position: relative;
13
+	}
14
+	
15
+	.img-content {
16
+		width: 100%;
17
+		height: 100%;
18
+		border-radius: 12rpx;
19
+		object-fit: contain;
20
+	}
21
+	.delete-icon {
22
+		position: absolute;
23
+		top: 8rpx;
24
+		right: 8rpx;
25
+		width: 36rpx;
26
+		height: 36rpx;
27
+		background-color: rgba(0, 0, 0, 0.5);
28
+		border-radius: 50%;
29
+		display: flex;
30
+		align-items: center;
31
+		justify-content: center;
32
+		z-index: 10;
33
+	}
34
+	// 使用indicator隐藏滚动条会报错,暂时使用样式隐藏
35
+	::v-deep .u-scroll-list__indicator{
36
+		display: none !important;
37
+	}
38
+}

+ 193 - 0
components/imgs-row-scroll/index.vue

@@ -0,0 +1,193 @@
1
+<template>
2
+	<view class="imgs-row-scroll" :style="{ maxWidth: containerWidth + 'rpx' }">
3
+		<u-scroll-list :indicator="true" :indicator-width="indicatorWidth" :indicator-bar-width="indicatorBarWidth" class="scroll-list">
4
+			<view class="img-list">
5
+				<view 
6
+					class="img-item" 
7
+					v-for="(item, index) in imageUrls" 
8
+					:key="index"
9
+					@click.stop="handleImageClick(item, index)"
10
+					:style="{ 
11
+						marginRight: itemMargin + 'rpx',
12
+						width: imageWidth + 'rpx',
13
+						height: imageHeight + 'rpx'
14
+					}"
15
+				>
16
+					<image 
17
+						:src="item" 
18
+						:mode="imgMode"
19
+						:lazy-load="true"
20
+						class="img-content"
21
+						@error="handleImageError"
22
+					/>
23
+					<view 
24
+						v-if="isShowDeleteIcon" 
25
+						class="delete-icon"
26
+						@click.stop="handleDelete(index, item)"
27
+					>
28
+						<u-icon name="close" color="#fff" size="16"></u-icon>
29
+					</view>
30
+				</view>
31
+			</view>
32
+		</u-scroll-list>
33
+	</view>
34
+</template>
35
+
36
+<script>
37
+export default {
38
+	name: 'ImgsRowScroll',
39
+	props: {
40
+		images: {
41
+			type: Array,
42
+			default: () => []
43
+		},
44
+		// 从数组对象中读取图片地址的属性名
45
+		keyName: {
46
+			type: String,
47
+			default: ''
48
+		},
49
+		// 是否启用预览功能
50
+		previewEnabled: {
51
+			type: Boolean,
52
+			default: true
53
+		},
54
+		// 图片裁剪模式
55
+		imgMode: {
56
+			type: String,
57
+			default: 'aspectFill'
58
+            // - aspectFit :完整显示(保持比例,不裁剪)
59
+            // - aspectFill :填充显示(裁剪图片填充容器)
60
+            // - scaleToFill :拉伸显示(可能变形)
61
+		},
62
+		// 图片间距
63
+		itemMargin: {
64
+			type: Number,
65
+			default: 16
66
+		},
67
+		// 图片宽度
68
+		imageWidth: {
69
+			type: Number,
70
+			default: 200
71
+		},
72
+		// 图片高度
73
+		imageHeight: {
74
+			type: Number,
75
+			default: 200
76
+		},
77
+		// 容器总宽度
78
+		totalWidth: {
79
+			type: Number,
80
+			default: 0,
81
+			// 说明:不传或传0时,默认100%宽度;传入正数时使用指定的rpx宽度
82
+			// 例如:传600表示容器宽度为600rpx
83
+		},
84
+		// 是否显示指示器
85
+		showIndicator: {
86
+			type: Boolean,
87
+			default: true
88
+		},
89
+		// 指示器宽度
90
+		indicatorWidth: {
91
+			type: Number,
92
+			default: 50
93
+		},
94
+		// 指示器滑块宽度
95
+		indicatorBarWidth: {
96
+			type: Number,
97
+			default: 30
98
+		},
99
+		// 是否显示删除图标
100
+		isShowDeleteIcon: {
101
+			type: Boolean,
102
+			default: false
103
+		}
104
+	},
105
+	computed: {
106
+		// 处理图片地址数组
107
+		imageUrls() {
108
+			if (!this.images || this.images.length === 0) {
109
+				return [];
110
+			}
111
+			
112
+			// 如果没有指定keyName,直接返回数组内容
113
+			if (!this.keyName) {
114
+				return this.images;
115
+			}
116
+			
117
+			// 如果指定了keyName,从对象中提取指定属性
118
+			return this.images.map(item => {
119
+				if (typeof item === 'object' && item !== null) {
120
+					return item[this.keyName] || '';
121
+				}
122
+				return item;
123
+			}).filter(url => url); // 过滤掉空值
124
+		},
125
+		
126
+		// 容器宽度
127
+		containerWidth() {
128
+			if (this.totalWidth > 0) {
129
+				return this.totalWidth + 'rpx';
130
+			}
131
+			return '100%';
132
+		}
133
+	},
134
+	methods: {
135
+		handleImageClick(item, index) {
136
+			if (!this.previewEnabled) {
137
+				return;
138
+			}
139
+			
140
+			this.previewImage(item, index);
141
+		},
142
+		
143
+		// 预览图片
144
+		previewImage(current, currentIndex) {
145
+			// 过滤掉无效的图片地址
146
+			const validUrls = this.imageUrls.filter(url => url && url.trim());
147
+			
148
+			if (validUrls.length === 0) {
149
+				uni.showToast({
150
+					title: '没有可预览的图片',
151
+					icon: 'none'
152
+				});
153
+				return;
154
+			}
155
+			
156
+			uni.previewImage({
157
+				current: current, // 当前显示图片的http链接
158
+				urls: validUrls, // 需要预览的图片http链接列表
159
+				success: () => {
160
+					console.log('图片预览成功');
161
+				},
162
+				fail: (err) => {
163
+					console.error('图片预览失败:', err);
164
+					uni.showToast({
165
+						title: '预览失败',
166
+						icon: 'none'
167
+					});
168
+				}
169
+			});
170
+		},
171
+		
172
+		// 处理图片加载错误
173
+		handleImageError(e) {
174
+			console.error('图片加载失败:', e.detail.errMsg);
175
+		},
176
+		
177
+		// 处理删除图片
178
+		handleDelete(index, item) {
179
+			const newImages = this.images.slice();
180
+			newImages.splice(index, 1);
181
+			this.$emit('deleteImgInfo', {
182
+				delIndex: index,
183
+				delUrl: item,
184
+				newImages
185
+			});
186
+		}
187
+	}
188
+};
189
+</script>
190
+
191
+<style lang="scss" scoped>
192
+    @import './index.scss'
193
+</style>

+ 54 - 0
components/inquiry-verification-list/index.vue

@@ -0,0 +1,54 @@
1
+<template>
2
+    <view class="inquiry_wrap">
3
+        <u-navbar class="nav-bar" :title="type == '1' ? '询价中心' : '核价中心'" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
4
+        <scroll-view class="list" scroll-y @scrolltolower="getList" enable-back-to-top>
5
+            <transition-group name="order-move" tag="div">
6
+                <view class="list_item" v-for="(item, index) in list" :key="index" @click="handleClick(item)">
7
+                    <view class="list_item_top">
8
+                        <view class="top_left">
9
+                            <text class="name">{{ item.dictLabel }}</text>
10
+                            <text class="desc">{{ type == '1' ? '意向' : item.model }}</text>
11
+                        </view>
12
+                        <view class="top_right">
13
+                            <text :class="['status', type == '1' ? 'inquiry' : 'verification']">{{
14
+                                formtterStatus(item.status) }}</text>
15
+                        </view>
16
+                    </view>
17
+                    <view class="imgs">
18
+                        <imgs-row-scroll :images="item.imgsUrl" :previewEnabled="true" :showIndicator="false"
19
+                            :imageWidth="140" :imageHeight="140"></imgs-row-scroll>
20
+                    </view>
21
+                    <view class="list_item_bottom">
22
+                        <view class="bottom">
23
+                            <u-icon name="bookmark" size="16" color="#9ca3af"></u-icon>
24
+                            <text class="code">编码:{{ item.code }}</text>
25
+                        </view>
26
+                        <view class="bottom">
27
+                            <u-icon name="clock" size="16" color="#9ca3af"></u-icon>
28
+                            <text class="time">{{ item.date }}</text>
29
+                        </view>
30
+                    </view>
31
+                </view>
32
+            </transition-group>
33
+        </scroll-view>
34
+
35
+        <add-inquiry-dialog ref="addInquiryDialog" editOrAdd="edit" :editInfo="editInfo" @success="handleInquirySuccess"
36
+            @addSuccess="handleInquiryCancel" />
37
+    </view>
38
+</template>
39
+<script>
40
+import imgsRowScroll from '@/components/imgs-row-scroll/index.vue'
41
+import addInquiryDialog from '@/components/add-inquiry-dialog/index.vue'
42
+import inquiryVerificationList from "./mixins/inquiryVerificationList.js";
43
+export default {
44
+    components: {
45
+        imgsRowScroll,
46
+        addInquiryDialog
47
+    },
48
+    mixins: [inquiryVerificationList]
49
+}
50
+</script>
51
+
52
+<style lang="scss">
53
+@import "./styles/index.scss";
54
+</style>

+ 165 - 0
components/inquiry-verification-list/mixins/inquiryVerificationList.js

@@ -0,0 +1,165 @@
1
+export default {
2
+    props: {
3
+        type: {
4
+            type: Number,
5
+            default: 1
6
+        }
7
+    },
8
+    data() {
9
+        return {
10
+            list: [
11
+        {
12
+          clueId:'',//线索公海id
13
+          id:'',//询价id
14
+          dictValue:'2',//品牌id
15
+          dictLabel:'Rolex',//品牌名称
16
+          model:'Submariner Date 126610LN',//型号
17
+          code:'123',//编码
18
+          price:'12345',//询价价格
19
+          desc:'意向',
20
+          date:'2026-2-1 10:00:00',//询价日期
21
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
22
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
23
+        },
24
+        {
25
+          clueId:'',//线索公海id
26
+          id:'',//询价id
27
+          dictValue:'2',//品牌id
28
+          dictLabel:'Rolex',//品牌名称
29
+          model:'Submariner Date 126610LN',//型号
30
+          code:'123',//编码
31
+          price:'12345',//询价价格
32
+          desc:'意向',
33
+          date:'2026-2-1 10:00:00',//询价日期
34
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
35
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
36
+        },
37
+        {
38
+          clueId:'',//线索公海id
39
+          id:'',//询价id
40
+          dictValue:'2',//品牌id
41
+          dictLabel:'Rolex',//品牌名称
42
+          model:'Submariner Date 126610LN',//型号
43
+          code:'123',//编码
44
+          price:'12345',//询价价格
45
+          desc:'意向',
46
+          date:'2026-2-1 10:00:00',//询价日期
47
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
48
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
49
+        },
50
+        {
51
+          clueId:'',//线索公海id
52
+          id:'',//询价id
53
+          dictValue:'2',//品牌id
54
+          dictLabel:'Rolex',//品牌名称
55
+          model:'Submariner Date 126610LN',//型号
56
+          code:'123',//编码
57
+          price:'12345',//询价价格
58
+          desc:'意向',
59
+          date:'2026-2-1 10:00:00',//询价日期
60
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
61
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
62
+        },
63
+        {
64
+          clueId:'',//线索公海id
65
+          id:'',//询价id
66
+          dictValue:'2',//品牌id
67
+          dictLabel:'Rolex',//品牌名称
68
+          model:'Submariner Date 126610LN',//型号
69
+          code:'123',//编码
70
+          price:'12345',//询价价格
71
+          desc:'意向',
72
+          date:'2026-2-1 10:00:00',//询价日期
73
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
74
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
75
+        },
76
+        {
77
+          clueId:'',//线索公海id
78
+          id:'',//询价id
79
+          dictValue:'2',//品牌id
80
+          dictLabel:'Rolex',//品牌名称
81
+          model:'Submariner Date 126610LN',//型号
82
+          code:'123',//编码
83
+          price:'12345',//询价价格
84
+          desc:'意向',
85
+          date:'2026-2-1 10:00:00',//询价日期
86
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
87
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
88
+        },
89
+        {
90
+          clueId:'',//线索公海id
91
+          id:'',//询价id
92
+          dictValue:'2',//品牌id
93
+          dictLabel:'Rolex',//品牌名称
94
+          model:'Submariner Date 126610LN',//型号
95
+          code:'123',//编码
96
+          price:'12345',//询价价格
97
+          desc:'意向',
98
+          date:'2026-2-1 10:00:00',//询价日期
99
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
100
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
101
+        },
102
+      ],
103
+            editInfo: {},
104
+            queryParams: {
105
+                pageSize: 10,
106
+                pageNum: 0,
107
+            },
108
+            total: 0,
109
+        }
110
+    },
111
+    mounted() {
112
+        this.getList();
113
+    },
114
+    methods: {
115
+        getList(){
116
+            if (this.list.length > 0 && this.list.length >= this.total) {
117
+                uni.$u.toast('暂无更多数据');
118
+                return;
119
+            }
120
+            
121
+            if (this.queryParams.pageNum === 0) {
122
+                this.queryParams.pageNum = 1;
123
+                this.list = [];
124
+            } else {
125
+                this.queryParams.pageNum++;
126
+            }
127
+            
128
+            uni.$u.api.inquiryVerificationList(this.queryParams,{
129
+                type: this.type,
130
+            }).then(res => {
131
+                this.total = res.total;
132
+                
133
+                if(this.total === 0){
134
+                    uni.$u.toast('暂无数据');
135
+                    return;
136
+                }
137
+                
138
+                if (this.queryParams.pageNum === 1) {
139
+                    this.list = res.rows;
140
+                } else {
141
+                    this.list = this.list.concat(res.rows);
142
+                }
143
+            })
144
+        },
145
+        formtterStatus(status){
146
+            switch(status){
147
+                case '1':
148
+                    return this.type == '1' ? '待询价' : '待核价';
149
+                case '2':
150
+                    return this.type == '1' ? '询价完成' : '核价完成';
151
+            }
152
+        },
153
+        handleClick(item) {
154
+            this.editInfo = item;
155
+            this.$refs.addInquiryDialog.showDialog();
156
+        },
157
+        handleInquirySuccess() {
158
+            this.$refs.addInquiryDialog.closeDialog();
159
+        },
160
+        handleInquiryCancel() {
161
+            this.getList();
162
+            this.$refs.addInquiryDialog.closeDialog();
163
+        },
164
+    }
165
+}

+ 99 - 0
components/inquiry-verification-list/styles/index.scss

@@ -0,0 +1,99 @@
1
+.inquiry_wrap {
2
+    background-color: #f9fafb;
3
+    height: 100vh;
4
+    display: flex;
5
+    flex-direction: column;
6
+    box-sizing: border-box;
7
+
8
+    .list {
9
+        flex: 1;
10
+        height: calc(100vh - 100rpx);
11
+        ::v-deep .uni-scroll-view {
12
+            height:100%;
13
+            .list_item {
14
+                margin: 0 20rpx;
15
+                padding: 30rpx;
16
+                background-color: #fff;
17
+                border-radius: 20rpx;
18
+                margin-bottom: 20rpx;
19
+                box-shadow: 2px 2px 11px 1px #e7e7e7;
20
+
21
+                .list_item_top {
22
+                    display: flex;
23
+                    justify-content: space-between;
24
+                    align-items: flex-start;
25
+
26
+                    .top_left {
27
+                        display: flex;
28
+                        flex-direction: column;
29
+                        justify-content: flex-start;
30
+
31
+                        .name {
32
+                            font-size: 32rpx;
33
+                            font-weight: bold;
34
+                            color: #111827;
35
+                        }
36
+
37
+                        .desc {
38
+                            font-size: 26rpx;
39
+                            color: #9ca3af;
40
+                        }
41
+                    }
42
+
43
+                    .top_right {
44
+                        display: flex;
45
+                        flex-direction: column;
46
+                        justify-content: flex-end;
47
+
48
+                        .status {
49
+                            font-size: 24rpx;
50
+                            padding: 6rpx 12rpx;
51
+                            border-radius: 12rpx;
52
+                            border: 2rpx solid #2563eb;
53
+                            font-weight: 600;
54
+                        }
55
+
56
+                        .inquiry {
57
+                            color: #2563eb;
58
+                            background-color: #eff6ff;
59
+                            border-color: #dceafe;
60
+                        }
61
+
62
+                        .verification {
63
+                            color: #ed590e;
64
+                            background-color: #fff7ed;
65
+                            border-color: #fff2e2;
66
+                        }
67
+                    }
68
+
69
+                }
70
+
71
+                .imgs {
72
+                    margin: 20rpx 0;
73
+                }
74
+
75
+                .list_item_bottom {
76
+                    display: flex;
77
+                    justify-content: space-between;
78
+                    align-items: center;
79
+                    font-size: 26rpx;
80
+                    color: #9ca3af;
81
+                    font-weight: 550;
82
+
83
+                    .bottom {
84
+                        display: flex;
85
+                        align-items: center;
86
+                        gap: 8rpx;
87
+                    }
88
+                }
89
+                &:nth-of-type(1){
90
+                    margin-top: 20rpx;
91
+                }
92
+            }
93
+            // .uni-scroll-view-content{
94
+            //     height: calc(100% - 70px);
95
+            // }
96
+        }
97
+
98
+    }
99
+}

+ 8 - 1
manifest.json

@@ -176,7 +176,14 @@
176 176
             }
177 177
         },
178 178
         "devServer" : {
179
-            "https" : false
179
+            "proxy" : {
180
+                "/prod-api" : {
181
+                    "target" : "https://crm.nanjingshiyu.com",
182
+                    "changeOrigin" : true,
183
+                    "secure" : false,
184
+                    "pathRewrite": { "^/prod-api": "" }
185
+                }
186
+            }
180 187
         },
181 188
         "unipush" : {
182 189
             "enable" : false

+ 157 - 9
mock/mockData.js

@@ -1,8 +1,11 @@
1 1
 const mockDataList = {
2 2
   // 获取个人中心数据
3
-  'getPersonCards': {
3
+  '/personCenter/getPersonCards': {
4 4
     method: 'get',
5
-    url: '/prod-api/crm/getPersonCards',
5
+    params: {
6
+      userId: '',
7
+    },
8
+    url: '/prod-api/crm/personCenter/getPersonCards',
6 9
     delay: 300,
7 10
     response: {
8 11
       code: 200,
@@ -24,9 +27,12 @@ const mockDataList = {
24 27
     }
25 28
   },
26 29
   // 个人中心-获取最新线索
27
-  'getPersonLatestClue': {
30
+  '/personCenter/getPersonLatestClue': {
28 31
     method: 'get',
29
-    url: '/prod-api/crm/getPersonLatestClue',
32
+    params: {
33
+      userId: '',
34
+    },
35
+    url: '/prod-api/crm/personCenter/getPersonLatestClue',
30 36
     delay: 300,
31 37
     response: {
32 38
       code: 200,
@@ -58,9 +64,12 @@ const mockDataList = {
58 64
     }
59 65
   },
60 66
   // 个人中心-近七天排名折线图
61
-  'getPersonRanking': {
67
+  '/personCenter/getPersonRanking': {
62 68
     method: 'get',
63
-    url: '/prod-api/crm/getPersonRanking',
69
+    params: {
70
+      userId: '',
71
+    },
72
+    url: '/prod-api/crm/personCenter/getPersonRanking',
64 73
     delay: 300,
65 74
     response: {
66 75
       code: 200,
@@ -89,10 +98,13 @@ const mockDataList = {
89 98
       ]
90 99
     }
91 100
   },
92
-  // 个人中心-仓库卡片数据
93
-  'getWareHouseCard': {
101
+  // 仓库模块-卡片数据
102
+  '/warehouse/getWareHouseCard': {
94 103
     method: 'get',
95
-    url: '/prod-api/crm/getWareHouseCard',
104
+    params: {
105
+      userId: '',
106
+    },
107
+    url: '/prod-api/crm/warehouse/getWareHouseCard',
96 108
     delay: 300,
97 109
     response: {
98 110
       code: 200,
@@ -105,6 +117,142 @@ const mockDataList = {
105 117
       }
106 118
     }
107 119
   },
120
+  // 询价-新增
121
+  '/inquiryCenter/addInquiry': {
122
+    method: 'post',
123
+    data: {
124
+      clueId:'',//线索公海id
125
+      dictValue:'',//品牌id
126
+      dictLabel:'',//品牌名称
127
+      model:'',//型号
128
+      code:'',//编码
129
+      id:'',//询价id,新增为'',编辑传值
130
+      price:'',//询价价格,新增为'',编辑传值
131
+      imgsUrl:[]//询价图片数组,比如
132
+      // [
133
+      //   "https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg",
134
+      //   "https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677342956-1767677338014.jpg"
135
+      // ]
136
+    },
137
+    url: '/prod-api/crm/inquiryCenter/addInquiry',
138
+    delay: 300,
139
+    response: {
140
+      code: 200,
141
+      msg: 'success'
142
+    }
143
+  },
144
+  // 询价-核价-列表
145
+  '/inquiryCenter/inquiryVerificationList': {
146
+    method: 'post',
147
+    params: {
148
+      pageSize:'',//每页条数
149
+      pageNum:'',//当前页
150
+    },
151
+    data:{
152
+      type:1,//1-询价列表  2-核价列表
153
+    },
154
+    url: '/prod-api/crm/inquiryCenter/inquiryVerificationList',
155
+    delay: 300,
156
+    response: {
157
+      code: 200,
158
+      msg: 'success',
159
+      rows: [
160
+        {
161
+          clueId:'',//线索公海id
162
+          id:'',//询价id
163
+          dictValue:'2',//品牌id
164
+          dictLabel:'Rolex',//品牌名称
165
+          model:'Submariner Date 126610LN',//型号
166
+          code:'123',//编码
167
+          price:'12345',//询价价格
168
+          desc:'意向',
169
+          date:'2026-2-1 10:00:00',//询价日期
170
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
171
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
172
+        },
173
+        {
174
+          clueId:'',//线索公海id
175
+          id:'',//询价id
176
+          dictValue:'2',//品牌id
177
+          dictLabel:'Rolex',//品牌名称
178
+          model:'Submariner Date 126610LN',//型号
179
+          code:'123',//编码
180
+          price:'12345',//询价价格
181
+          desc:'意向',
182
+          date:'2026-2-1 10:00:00',//询价日期
183
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
184
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
185
+        },
186
+        {
187
+          clueId:'',//线索公海id
188
+          id:'',//询价id
189
+          dictValue:'2',//品牌id
190
+          dictLabel:'Rolex',//品牌名称
191
+          model:'Submariner Date 126610LN',//型号
192
+          code:'123',//编码
193
+          price:'12345',//询价价格
194
+          desc:'意向',
195
+          date:'2026-2-1 10:00:00',//询价日期
196
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
197
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
198
+        },
199
+        {
200
+          clueId:'',//线索公海id
201
+          id:'',//询价id
202
+          dictValue:'2',//品牌id
203
+          dictLabel:'Rolex',//品牌名称
204
+          model:'Submariner Date 126610LN',//型号
205
+          code:'123',//编码
206
+          price:'12345',//询价价格
207
+          desc:'意向',
208
+          date:'2026-2-1 10:00:00',//询价日期
209
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
210
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
211
+        },
212
+        {
213
+          clueId:'',//线索公海id
214
+          id:'',//询价id
215
+          dictValue:'2',//品牌id
216
+          dictLabel:'Rolex',//品牌名称
217
+          model:'Submariner Date 126610LN',//型号
218
+          code:'123',//编码
219
+          price:'12345',//询价价格
220
+          desc:'意向',
221
+          date:'2026-2-1 10:00:00',//询价日期
222
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
223
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
224
+        },
225
+        {
226
+          clueId:'',//线索公海id
227
+          id:'',//询价id
228
+          dictValue:'2',//品牌id
229
+          dictLabel:'Rolex',//品牌名称
230
+          model:'Submariner Date 126610LN',//型号
231
+          code:'123',//编码
232
+          price:'12345',//询价价格
233
+          desc:'意向',
234
+          date:'2026-2-1 10:00:00',//询价日期
235
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
236
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
237
+        },
238
+        {
239
+          clueId:'',//线索公海id
240
+          id:'',//询价id
241
+          dictValue:'2',//品牌id
242
+          dictLabel:'Rolex',//品牌名称
243
+          model:'Submariner Date 126610LN',//型号
244
+          code:'123',//编码
245
+          price:'12345',//询价价格
246
+          desc:'意向',
247
+          date:'2026-2-1 10:00:00',//询价日期
248
+          status:'1',//询价列表:1-待询价 2-询价完成;   核价列表:1-待核价 2-核价完成
249
+          imgsUrl:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg','https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg']//询价图片数组
250
+        },
251
+      ],
252
+      total: 14,//总条数
253
+    }
254
+  }
255
+  
108 256
   
109 257
 };
110 258
 

+ 1 - 0
package.json

@@ -12,6 +12,7 @@
12 12
 		"jssip": "^3.10.1",
13 13
 		"lodash": "^4.17.21",
14 14
 		"mp-storage": "^1.0.1",
15
+		"pinyin": "^4.0.0",
15 16
 		"qs": "^6.11.0",
16 17
 		"recorder-core": "^1.3.24102001",
17 18
 		"vuex-persistedstate": "^2.5.4"

+ 0 - 18
pages.json

@@ -187,15 +187,6 @@
187 187
 			}
188 188
 		},
189 189
 		{
190
-			"path" : "pages/wareHouse/brandList",
191
-			"style" : 
192
-			{
193
-				"navigationBarTitleText" : "仓库品牌列表",
194
-				"enablePullDownRefresh": true,
195
-				"navigationStyle": "custom"
196
-			}
197
-		},
198
-		{
199 190
 			"path" : "pages/wareHouse/openOrder",	
200 191
 			"style" : 
201 192
 			{
@@ -313,15 +304,6 @@
313 304
 			}
314 305
 		},
315 306
 		{
316
-			"path": "pages/inquiry/add",
317
-			"style": {
318
-				"navigationBarTitleText": "询价中心-新增",
319
-				"enablePullDownRefresh": false,
320
-				"navigationBarBackgroundColor": "#108cff",
321
-				"navigationStyle": "custom"
322
-			}
323
-		},
324
-		{
325 307
 			"path": "pages/verification/index",
326 308
 			"style": {
327 309
 				"navigationBarTitleText": "核价中心",

+ 16 - 3
pages/clue/post/index.vue

@@ -58,14 +58,19 @@
58 58
 			<image src='/static/publicClue/littlePlane.png' mode="aspectFit" class="sendOrder_img"></image>
59 59
 			<view>发单</view>
60 60
 		</view>
61
+		<add-inquiry-dialog ref="inquiryDialog" :clueId="clueId" editOrAdd="add" @success="handleInquirySuccess" @cancel="handleInquiryCancel"/>
61 62
 	</view>
62 63
 </template>
63 64
 
64 65
 <script>
66
+import addInquiryDialog from '@/components/add-inquiry-dialog/index.vue'
65 67
 import {
66 68
 	selectDictLabel
67 69
 } from "@/utils/util";
68 70
 export default {
71
+	components: {
72
+		addInquiryDialog
73
+	},
69 74
 	props: {
70 75
 		item: {
71 76
 			type: Object,
@@ -83,6 +88,7 @@ export default {
83 88
 	data() {
84 89
 		return {
85 90
 			caseStatusDicts: [],
91
+			clueId: '',
86 92
 		}
87 93
 	},
88 94
 	methods: {
@@ -155,9 +161,16 @@ export default {
155 161
 		},
156 162
 		// 询价
157 163
 		async handleInquiry(item) {
158
-			uni.navigateTo({
159
-				url: `/pages/inquiry/add?clueId=${item.id}`
160
-			})
164
+			this.clueId = item.id
165
+			this.$refs.inquiryDialog.showDialog()
166
+		},
167
+		// 询价成功
168
+		handleInquirySuccess() {
169
+			this.$refs.inquiryDialog.closeDialog()
170
+		},
171
+		// 询价取消
172
+		handleInquiryCancel() {
173
+			this.$refs.inquiryDialog.closeDialog()
161 174
 		},
162 175
 	},
163 176
 }

+ 0 - 25
pages/inquiry/add.vue

@@ -1,25 +0,0 @@
1
-<template>
2
-    <view class="add_wrap">
3
-        <view class="container">
4
-			新增
5
-        </view>
6
-    </view>
7
-</template>
8
-<script>
9
-    export default {
10
-        data() {
11
-            return {
12
-                clueId: ''
13
-            }
14
-        },
15
-        onLoad(options) {
16
-            console.log(options);
17
-            
18
-            this.clueId = options.clueId
19
-        }
20
-    }
21
-</script>
22
-
23
-<style lang="scss">
24
-    @import "./styles/index.scss";
25
-</style>

+ 21 - 7
pages/inquiry/index.vue

@@ -1,12 +1,26 @@
1 1
 <template>
2
-    <view class="inquiry_wrap">
3
-        <view class="container">
4
-			<u-navbar class="nav-bar" title="询价中心" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
5
-        </view>
2
+    <view class="page-container">
3
+        <inquiryVerificationList :type="type"></inquiryVerificationList>
6 4
     </view>
7 5
 </template>
8
-<script></script>
6
+<script>
7
+    import inquiryVerificationList from '@/components/inquiry-verification-list/index.vue'
8
+    export default {
9
+        components: {
10
+            inquiryVerificationList
11
+        },
12
+        data() {
13
+            return {
14
+                type:1//1:询价 2:核价
15
+            }
16
+        },
17
+    }
18
+</script>
9 19
 
10
-<style lang="scss">
11
-    @import "./styles/index.scss";
20
+<style>
21
+    .page-container {
22
+        height: 100vh;
23
+        width: 100%;
24
+        overflow: hidden;
25
+    }
12 26
 </style>

+ 0 - 0
pages/inquiry/styles/add.scss


+ 0 - 0
pages/inquiry/styles/index.scss


+ 6 - 6
pages/person/cards/index.vue

@@ -233,21 +233,21 @@ export default {
233 233
 
234 234
     methods: {
235 235
         getCardData() {
236
-            uni.$u.api.getPersonCards().then(res => {
236
+            uni.$u.api.getPersonCards({ userId: this.$store.state.user.userInfo.userId }).then(res => {
237 237
               if (res.code === 200) {
238 238
                 this.cardData = res.data;
239 239
               }
240 240
             });
241 241
         },
242 242
         getClueList() {
243
-            uni.$u.api.getPersonLatestClue().then(res => {
243
+            uni.$u.api.getPersonLatestClue({ userId: this.$store.state.user.userInfo.userId }).then(res => {
244 244
                 if (res.code === 200) {
245 245
                     this.clueList = res.data;
246 246
                 }
247 247
             });
248 248
         },
249 249
         getChartData() {
250
-            uni.$u.api.getPersonRanking().then(res => {
250
+            uni.$u.api.getPersonRanking({ userId: this.$store.state.user.userInfo.userId }).then(res => {
251 251
                 if (res.code === 200) {
252 252
                     this.chartData.categories = res.data.map(item => item.x);
253 253
                     this.chartData.series[0].data = res.data.map(item => item.y);
@@ -260,9 +260,9 @@ export default {
260 260
         },
261 261
     },
262 262
     mounted() {
263
-        // this.getCardData();
264
-        // this.getClueList();
265
-        // this.getChartData();
263
+        this.getCardData();
264
+        this.getClueList();
265
+        this.getChartData();
266 266
     },
267 267
 
268 268
 };

+ 21 - 7
pages/verification/index.vue

@@ -1,12 +1,26 @@
1 1
 <template>
2
-    <view class="verification_wrap">
3
-        <view class="container">
4
-			<u-navbar class="nav-bar" title="核价中心" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
5
-        </view>
2
+    <view class="page-container">
3
+        <inquiryVerificationList :type="type"></inquiryVerificationList>
6 4
     </view>
7 5
 </template>
8
-<script></script>
6
+<script>
7
+    import inquiryVerificationList from '@/components/inquiry-verification-list/index.vue'
8
+    export default {
9
+        components: {
10
+            inquiryVerificationList
11
+        },
12
+        data() {
13
+            return {
14
+                type:2//1:询价 2:核价
15
+            }
16
+        },
17
+    }
18
+</script>
9 19
 
10
-<style lang="scss">
11
-	@import "./styles/index.scss";
20
+<style>
21
+    .page-container {
22
+        height: 100vh;
23
+        width: 100%;
24
+        overflow: hidden;
25
+    }
12 26
 </style>

+ 0 - 0
pages/verification/styles/index.scss


+ 14 - 3
pages/wareHouse/add.vue

@@ -36,9 +36,8 @@
36 36
                         <TabSelect :tabList="typeList" @tabChange="handleTabChangeType" :colNum="4" mode="single">
37 37
                         </TabSelect>
38 38
                     </u-form-item>
39
-                    <u-form-item label="品牌" required prop="brand" class="u-form-item-row" borderBottom>
40
-                        <FormSelectToPage :val="formData.brand" :url="brandToUrl" @handleClear="clear('brand')">
41
-                        </FormSelectToPage>
39
+                    <u-form-item label="品牌" required prop="brand" class="u-form-item-row" borderBottom @click="showBrandList">
40
+                        <FormSelectToPage :val="formData.brand"></FormSelectToPage>
42 41
                     </u-form-item>
43 42
                     <u-form-item label="系列" class="u-form-item-row" borderBottom>
44 43
                         <u--input v-model="formData.series" placeholder="请输入" clearable border="none"></u--input>
@@ -192,15 +191,18 @@
192 191
             <u-button plain type="primary" @click="submitForm('onlyIn')">仅入库</u-button>
193 192
             <u-button type="primary" @click="submitForm('inAndUp')">入库并上架</u-button>
194 193
         </view>
194
+        <BrandList ref="brandListRef" @selectedBrand="handleSelectedBrand"></BrandList>
195 195
     </view>
196 196
 </template>
197 197
 <script>
198 198
 import TabSelect from '@/components/custom-tab-select/index.vue'
199 199
 import FormSelectToPage from '@/components/form-select-to-page/index.vue'
200
+import BrandList from '@/components/brand-list/index.vue'
200 201
 export default {
201 202
     components: {
202 203
         TabSelect,
203 204
         FormSelectToPage,
205
+        BrandList,
204 206
     },
205 207
     data() {
206 208
         return {
@@ -211,6 +213,7 @@ export default {
211 213
                 desc: '',
212 214
                 type: '',
213 215
                 brand: '',
216
+                brandId: '',
214 217
                 series: '',
215 218
                 model: '',
216 219
                 caseMaterial: '',
@@ -384,6 +387,14 @@ export default {
384 387
         }
385 388
     },
386 389
     methods: {
390
+        handleSelectedBrand(info) {
391
+            this.formData.brand = info.dictLabel;
392
+            this.formData.brandId = info.dictValue;
393
+        },
394
+        // 显示品牌列表
395
+        showBrandList() {
396
+            this.$refs.brandListRef.showBrandList();
397
+        },
387 398
         submitForm() {
388 399
             this.$refs.addForm.validate().then((valid) => {
389 400
                 if (valid) {

+ 0 - 370
pages/wareHouse/brandList.vue

@@ -1,370 +0,0 @@
1
-<template>
2
-    <view class="brand_list_page">
3
-        <view class="brand_list">
4
-            <u-navbar class="nav-bar" title="品牌" :autoBack="true" :placeholder="true" v-hideNav>
5
-                <!-- <view class="u-nav-slot" slot="right" @click="handleAddBrand">
6
-                    <u-icon name="plus-circle" color="#2979ff" size="20"></u-icon>
7
-                    <text>新增</text>
8
-                </view> -->
9
-            </u-navbar>
10
-            <u-search placeholder="搜索" v-model="keyword"></u-search>
11
-            <view class="suggest_list">
12
-                <view class="brand_item" v-for="item in brandList" :key="item.id">
13
-                    <img class="brand_img" v-if="item.url" :src="item.url" alt="">
14
-                    <img class="brand_img" v-else src="/static/no-img.png"></img>
15
-                    <view class="brand_name">{{ item.name }}</view>
16
-                </view>
17
-            </view>
18
-        </view>
19
-        <u-index-list :index-list="indexList" class="index_list">
20
-            <template v-for="(item, index) in itemArr">
21
-                <!-- #ifdef APP-NVUE -->
22
-                <u-index-anchor :text="indexList[index]"></u-index-anchor>
23
-                <!-- #endif -->
24
-                <u-index-item>
25
-                    <!-- #ifndef APP-NVUE -->
26
-                    <u-index-anchor :text="indexList[index]"></u-index-anchor>
27
-                    <!-- #endif -->
28
-                    <view class="list-cell" v-for="(cell, index) in item">
29
-                        <img v-if="cell.url" :src="cell.url" alt="">
30
-                        <img v-else src="/static/no-img.png"></img>
31
-                        {{ cell.name }}
32
-                    </view>
33
-                </u-index-item>
34
-            </template>
35
-        </u-index-list>
36
-        <view class="no_brand">
37
-            <u-button type="primary" :plain="true" text="找不到品牌" color="#108cff"></u-button>
38
-        </view>
39
-    </view>
40
-</template>
41
-<script>
42
-export default {
43
-    components: {
44
-    },
45
-    props: {
46
-    },
47
-    emits: [],
48
-    data() {
49
-        return {
50
-            keyword: '',
51
-            brandList: [
52
-                {
53
-                    id: 1,
54
-                    name: 'LOUIS VUITTON',
55
-                    code: '001',
56
-                    url: require('./imgs/lv.jpg'),
57
-                },
58
-                {
59
-                    id: 2,
60
-                    name: '品牌2',
61
-                    code: '002',
62
-                    url: null,
63
-                },
64
-                {
65
-                    id: 1,
66
-                    name: '品牌1',
67
-                    code: '001',
68
-                    url: null,
69
-                },
70
-                {
71
-                    id: 2,
72
-                    name: '品牌2',
73
-                    code: '002',
74
-                    url: null,
75
-                },
76
-                {
77
-                    id: 1,
78
-                    name: '品牌1',
79
-                    code: '001',
80
-                    url: null,
81
-                },
82
-                {
83
-                    id: 1,
84
-                    name: '品牌1',
85
-                    code: '001',
86
-                    url: null,
87
-                },
88
-            ],
89
-            indexList: ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z","#"],
90
-            itemArr: [
91
-                [
92
-                    {
93
-                        name:'LOUIS VUITTON',
94
-                        url:require('./imgs/lv.jpg'),
95
-                    },
96
-                    {
97
-                        name:'品牌2',
98
-                        url:null,
99
-                    },
100
-                ],
101
-                [
102
-                    {
103
-                        name:'品牌3',
104
-                        url:null,
105
-                    },
106
-                    {
107
-                        name:'品牌4',
108
-                        url:null,
109
-                    },
110
-                ],
111
-                [
112
-                    {
113
-                        name:'品牌5',
114
-                        url:null,
115
-                    },
116
-                    {
117
-                        name:'品牌6',
118
-                        url:null,
119
-                    },
120
-                ],
121
-                [
122
-                    {
123
-                        name:'品牌7',
124
-                        url:null,
125
-                    },
126
-                    {
127
-                        name:'品牌8',
128
-                        url:null,
129
-                    },
130
-                ],
131
-                [
132
-                    {
133
-                        name:'品牌9',
134
-                        url:null,
135
-                    },
136
-                    {
137
-                        name:'品牌10',
138
-                        url:null,
139
-                    },
140
-                ],
141
-                [
142
-                    {
143
-                        name:'品牌11',
144
-                        url:null,
145
-                    },
146
-                    {
147
-                        name:'品牌12',
148
-                        url:null,
149
-                    },
150
-                ],
151
-                [
152
-                    {
153
-                        name:'品牌13',
154
-                        url:null,
155
-                    },
156
-                    {
157
-                        name:'品牌14',
158
-                        url:null,
159
-                    },
160
-                ],
161
-                [
162
-                    {
163
-                        name:'品牌15',
164
-                        url:null,
165
-                    },
166
-                    {
167
-                        name:'品牌16',
168
-                        url:null,
169
-                    },
170
-                ],
171
-                [
172
-                    {
173
-                        name:'品牌17',
174
-                        url:null,
175
-                    },
176
-                    {
177
-                        name:'品牌18',
178
-                        url:null,
179
-                    },
180
-                ],
181
-                [
182
-                    {
183
-                        name:'品牌19',
184
-                        url:null,
185
-                    },
186
-                    {
187
-                        name:'品牌20',
188
-                        url:null,
189
-                    },
190
-                ],
191
-                [
192
-                    {
193
-                        name:'品牌21',
194
-                        url:null,
195
-                    },
196
-                    {
197
-                        name:'品牌22',
198
-                        url:null,
199
-                    },
200
-                ],
201
-                [
202
-                    {
203
-                        name:'品牌23',
204
-                        url:null,
205
-                    },
206
-                    {
207
-                        name:'品牌24',
208
-                        url:null,
209
-                    },
210
-                ],
211
-                [
212
-                    {
213
-                        name:'品牌25',
214
-                        url:null,
215
-                    },
216
-                    {
217
-                        name:'品牌26',
218
-                        url:null,
219
-                    },
220
-                ],
221
-                [
222
-                    {
223
-                        name:'品牌27',
224
-                        url:null,
225
-                    },
226
-                    {
227
-                        name:'品牌28',
228
-                        url:null,
229
-                    },
230
-                ],
231
-                [
232
-                    {
233
-                        name:'品牌25',
234
-                        url:null,
235
-                    },
236
-                    {
237
-                        name:'品牌26',
238
-                        url:null,
239
-                    },
240
-                ],
241
-                [
242
-                    {
243
-                        name:'品牌27',
244
-                        url:null,
245
-                    },
246
-                    {
247
-                        name:'品牌28',
248
-                        url:null,
249
-                    },
250
-                ],
251
-                [
252
-                    {
253
-                        name:'品牌25',
254
-                        url:null,
255
-                    },
256
-                    {
257
-                        name:'品牌26',
258
-                        url:null,
259
-                    },
260
-                ],
261
-                [
262
-                    {
263
-                        name:'品牌27',
264
-                        url:null,
265
-                    },
266
-                    {
267
-                        name:'品牌28',
268
-                        url:null,
269
-                    },
270
-                ],
271
-                [
272
-                    {
273
-                        name:'品牌25',
274
-                        url:null,
275
-                    },
276
-                    {
277
-                        name:'品牌26',
278
-                        url:null,
279
-                    },
280
-                ],
281
-                [
282
-                    {
283
-                        name:'品牌27',
284
-                        url:null,
285
-                    },
286
-                    {
287
-                        name:'品牌28',
288
-                        url:null,
289
-                    },
290
-                ],
291
-                [
292
-                    {
293
-                        name:'品牌25',
294
-                        url:null,
295
-                    },
296
-                    {
297
-                        name:'品牌26',
298
-                        url:null,
299
-                    },
300
-                ],
301
-                [
302
-                    {
303
-                        name:'品牌27',
304
-                        url:null,
305
-                    },
306
-                    {
307
-                        name:'品牌28',
308
-                        url:null,
309
-                    },
310
-                ],
311
-                [
312
-                    {
313
-                        name:'品牌25',
314
-                        url:null,
315
-                    },
316
-                    {
317
-                        name:'品牌26',
318
-                        url:null,
319
-                    },
320
-                ],
321
-                [
322
-                    {
323
-                        name:'品牌27',
324
-                        url:null,
325
-                    },
326
-                    {
327
-                        name:'品牌28',
328
-                        url:null,
329
-                    },
330
-                ],
331
-                [
332
-                    {
333
-                        name:'品牌25',
334
-                        url:null,
335
-                    },
336
-                    {
337
-                        name:'品牌26',
338
-                        url:null,
339
-                    },
340
-                ],
341
-                [
342
-                    {
343
-                        name:'品牌27',
344
-                        url:null,
345
-                    },
346
-                    {
347
-                        name:'品牌28',
348
-                        url:null,
349
-                    },
350
-                ],
351
-                [
352
-                    {
353
-                        name:'##品牌27',
354
-                        url:null,
355
-                    },
356
-                    {
357
-                        name:'#品牌28',
358
-                        url:null,
359
-                    },
360
-                ]
361
-            ]
362
-        }
363
-    },
364
-    methods: {
365
-    }
366
-}
367
-</script>
368
-<style lang="scss" scoped>
369
-@import './styles/brandList.scss';
370
-</style>

+ 2 - 2
pages/wareHouse/index.vue

@@ -208,7 +208,7 @@ export default {
208 208
 		},
209 209
 		// 获取仓库卡片数据
210 210
 		getCard() {
211
-			uni.$u.api.getWareHouseCard().then(res => {
211
+			uni.$u.api.getWareHouseCard({ userId: this.$store.state.user.userInfo.userId }).then(res => {
212 212
 				if (res.code === 200) {
213 213
 					this.wareHouseCard = res.data;
214 214
 				}
@@ -216,7 +216,7 @@ export default {
216 216
 		},
217 217
 	},
218 218
 	mounted() {
219
-		// this.getCard();
219
+		this.getCard();
220 220
 	}
221 221
 };
222 222
 </script>

+ 9 - 4
utils/api.js

@@ -119,10 +119,15 @@ const install = (Vue, vm) => {
119 119
 		// 服务器地址: http://192.168.0.243:3001
120 120
 		// 手机预览时需要使用电脑局域网IP,不能用localhost
121 121
 		// 切换真实接口时,将 baseUrl 改为真实接口地址即可
122
-		getPersonCards:()=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/getPersonCards'),
123
-		getPersonLatestClue:()=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/getPersonLatestClue'),
124
-		getPersonRanking:()=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/getPersonRanking'),
125
-		getWareHouseCard:()=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/getWareHouseCard'),
122
+		getPersonCards:(params)=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/personCenter/getPersonCards',{ params }),//个人中心-获取个人中心数据
123
+		getPersonLatestClue:(params)=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/personCenter/getPersonLatestClue',{ params }),//个人中心-获取最新线索
124
+		getPersonRanking:(params)=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/personCenter/getPersonRanking',{ params }),//个人中心-获取个人排名
125
+		getWareHouseCard:(params)=>http.get('http://192.168.0.243:3001/mock-api/prod-api/crm/warehouse/getWareHouseCard',{ params }),//仓库中心-获取仓库信息
126
+		addInquiry:(data)=>http.post('http://192.168.0.243:3001/mock-api/prod-api/crm/inquiryCenter/addInquiry',data),//添加询价
127
+		inquiryVerificationList:(params,data)=>http.post('http://192.168.0.243:3001/mock-api/prod-api/crm/inquiryCenter/inquiryVerificationList?' + qs.stringify(params), data),//  询价/核价列表
128
+
129
+
130
+
126 131
 		saveOrderFileAndTransfer: (data = {}) => http.post(store.state.user.path + '/storeInfo/saveOrderFileAndTransfer', data),
127 132
 
128 133
 		// 删除订单分成数据

+ 3 - 1
utils/request.js

@@ -30,7 +30,9 @@ const install = (Vue, vm) => {
30 30
 		// 处理请求url的逻辑
31 31
 		// 如果是完整的URL(包含http://或https://)或者是本地Mock服务器请求,则不拼接baseURL
32 32
  		const isFullUrl = /^https?:\/\//i.test(config.url);
33
- 		const isMockRequest = config.url.includes('localhost:3001') || config.url.includes('192.168.0.243:3001');
33
+ 		const isMockRequest = config.url.includes('localhost:3001') || 
34
+ 		                      config.url.includes('192.168.0.243:3001') ||
35
+ 		                      config.url.startsWith('/prod-api');
34 36
  		if (!isFullUrl && !isMockRequest) {
35 37
  			config.url = baseURL + config.url;
36 38
  		}