Selaa lähdekoodia

feat:询价核价接口联调

zhangxin 1 kuukausi sitten
vanhempi
commit
72890d56c4

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

@@ -130,6 +130,13 @@ export default {
130 130
                 })
131 131
                 return
132 132
             }
133
+            if(this.info.imgsUrl.length == 0){
134
+                uni.showToast({
135
+                    title: '请上传图片',
136
+                    icon: 'none'
137
+                })
138
+                return
139
+            }
133 140
             const data = {
134 141
                 clueId: this.clueId,
135 142
                 dictValue: this.info.dictValue,

+ 3 - 3
components/brand-list/index.scss

@@ -26,8 +26,8 @@
26 26
                 align-items: center;
27 27
 
28 28
                 .brand_img {
29
-                    width: 100rpx;
30
-                    height: 100rpx;
29
+                    width: 160rpx;
30
+                    height: 80rpx;
31 31
                 }
32 32
 
33 33
                 .brand_name {
@@ -77,7 +77,7 @@
77 77
     gap: 20rpx;
78 78
     padding: 16rpx;
79 79
     border-bottom: 1rpx solid #f0eded;
80
-    img{
80
+    .brand_img{
81 81
         width: 160rpx;
82 82
         height: 80rpx;
83 83
     }

+ 3 - 3
components/brand-list/index.vue

@@ -11,7 +11,7 @@
11 11
                 <u-search placeholder="搜索" v-model="keyword" @custom="handleSearch" @change="handleSearch"></u-search>
12 12
                 <view class="suggest_list">
13 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="">
14
+                        <image class="brand_img" :src="item.imgUrl ? item.imgUrl : '/static/no-img.png'" alt=""></image>
15 15
                         <view class="brand_name">{{ item.dictLabel }}</view>
16 16
                     </view>
17 17
                 </view>
@@ -26,7 +26,7 @@
26 26
                         <u-index-anchor :text="indexList[index]"></u-index-anchor>
27 27
                         <!-- #endif -->
28 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="">
29
+                            <image class="brand_img" :src="cell.imgUrl ? cell.imgUrl : '/static/no-img.png'" alt=""></image>
30 30
                             {{ cell.dictLabel }}
31 31
                         </view>
32 32
                     </u-index-item>
@@ -82,7 +82,7 @@ export default {
82 82
             this.$getDicts('crm_form_brand').then(res => {
83 83
                 this.filterData(res)
84 84
                 this.list = res
85
-                this.adviceList = res.filter(item => item.remark == 'R')
85
+                this.adviceList = res.filter(item => item.recommend)
86 86
             })
87 87
         },
88 88
         filterData(res){

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

@@ -1,4 +1,6 @@
1 1
 .imgs-row-scroll {
2
+	width: 100%;
3
+    overflow: auto;
2 4
 	::v-deep .uni-scroll-view {
3 5
 		height: 100% !important;
4 6
 	}

+ 2 - 3
components/inquiry-verification-list/index.vue

@@ -10,8 +10,7 @@
10 10
                         <text class="desc">{{ type == '1' ? '意向' : item.model }}</text>
11 11
                     </view>
12 12
                     <view class="top_right">
13
-                        <text :class="['status', type == '1' ? 'inquiry' : 'verification']">{{
14
-                            formtterStatus(item.status) }}</text>
13
+                        <u-tag plain plainFill :text="formtterStatus(item.status)" :type="item.status == '1' ? 'warning' : item.status == '2' ? 'primary' : 'success'"></u-tag>
15 14
                     </view>
16 15
                 </view>
17 16
                 <view class="imgs">
@@ -25,7 +24,7 @@
25 24
                     </view>
26 25
                     <view class="bottom">
27 26
                         <u-icon name="clock" size="16" color="#9ca3af"></u-icon>
28
-                        <text class="time">{{ item.date }}</text>
27
+                        <text class="time">{{ item.updateTime }}</text>
29 28
                     </view>
30 29
                 </view>
31 30
             </view>

+ 7 - 3
components/inquiry-verification-list/mixins/inquiryVerificationList.js

@@ -43,14 +43,18 @@ export default {
43 43
         formtterStatus(status) {
44 44
             switch (status) {
45 45
                 case '1':
46
-                    return this.type == '1' ? '待询价' : '待核价';
46
+                    return '待询价'
47 47
                 case '2':
48
-                    return this.type == '1' ? '询价完成' : '核价完成';
48
+                    return '待核价'//待核价=询价完成
49
+                case '3':
50
+                    return '核价完成'
49 51
             }
50 52
         },
51 53
         handleClick(item) {
52 54
             this.editInfo = item;
53
-            this.$refs.addInquiryDialog.showDialog();
55
+            this.$nextTick(() => {
56
+                this.$refs.addInquiryDialog.showDialog();
57
+            })
54 58
         },
55 59
         handleInquirySuccess() {
56 60
             this.$refs.addInquiryDialog.closeDialog();

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

@@ -46,26 +46,6 @@
46 46
                     display: flex;
47 47
                     flex-direction: column;
48 48
                     justify-content: flex-end;
49
-
50
-                    .status {
51
-                        font-size: 24rpx;
52
-                        padding: 6rpx 12rpx;
53
-                        border-radius: 12rpx;
54
-                        border: 2rpx solid #2563eb;
55
-                        font-weight: 600;
56
-                    }
57
-
58
-                    .inquiry {
59
-                        color: #2563eb;
60
-                        background-color: #eff6ff;
61
-                        border-color: #dceafe;
62
-                    }
63
-
64
-                    .verification {
65
-                        color: #ed590e;
66
-                        background-color: #fff7ed;
67
-                        border-color: #fff2e2;
68
-                    }
69 49
                 }
70 50
 
71 51
             }

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

@@ -23,7 +23,7 @@
23 23
             <!-- 条数统计 -->
24 24
             <view class="card_item card_item_full">
25 25
                 <view class="card_header count">
26
-                    <img src="../../../static/icons/statistics.png" alt="" width="16px" height="16px">
26
+                    <image class="count_icon" src="../../../static/icons/statistics.png" alt=""></image>
27 27
                     <text class="card_title">条数统计</text>
28 28
                 </view>
29 29
                 <view class="card_content">
@@ -74,7 +74,7 @@
74 74
                     <view class="ranking_stats">
75 75
                         <view class="ranking_info">
76 76
                             <view class="ranking_icon">
77
-                                <img src="../../../static/icons/trophy.png" alt="" width="16px" height="16px">
77
+                                <image class="ranking_icon_img" src="../../../static/icons/trophy.png" alt=""></image>
78 78
                             </view>
79 79
                             <view class="ranking_info_text">
80 80
                                 <text class="card_title">当前排名</text>
@@ -98,7 +98,7 @@
98 98
             <!-- 折线图 -->
99 99
             <view class="card_item">
100 100
                 <view class="chart_header">
101
-                    <img src="../../../static/icons/line.png" alt="" width="16px" height="16px">
101
+                    <image class="chart_icon" src="../../../static/icons/line.png" alt=""></image>
102 102
                     <text class="card_title">近7天排名折线图</text>
103 103
                 </view>
104 104
                 <view class="charts_box">

+ 12 - 0
pages/person/cards/styles/index.scss

@@ -56,6 +56,10 @@
56 56
       font-weight: 600;
57 57
       color: #333333;
58 58
     }
59
+    .count_icon{
60
+      width: 30rpx;
61
+      height: 30rpx;
62
+    }
59 63
   }
60 64
   
61 65
   // 卡片内容样式
@@ -150,6 +154,10 @@
150 154
       justify-content: center;
151 155
       align-items: center;
152 156
       margin-right: 20rpx;
157
+      .ranking_icon_img{
158
+        width: 30rpx;
159
+        height: 30rpx;
160
+      }
153 161
     }
154 162
     .ranking_info {
155 163
       display: flex;
@@ -214,6 +222,10 @@
214 222
     font-weight: 600;
215 223
     display: flex;
216 224
     align-items: center;
225
+    .chart_icon{
226
+      width: 40rpx;
227
+      height: 40rpx;
228
+    }
217 229
     .card_title{
218 230
       margin-left: 10rpx;
219 231
     }

+ 3 - 3
pages/setting/index.vue

@@ -71,9 +71,9 @@
71 71
 			},
72 72
 			confirm() {
73 73
 				// 停止电话监听
74
-				this.$store.dispatch("call/stopPhoneListener").catch(error => {
75
-					console.error('退出登录时停止电话监听失败:', error);
76
-				});
74
+				// this.$store.dispatch("call/stopPhoneListener").catch(error => {
75
+				// 	console.error('退出登录时停止电话监听失败:', error);
76
+				// });
77 77
 				
78 78
 				this.$store.dispatch("user/logout").then(()=>{
79 79
 					uni.$u.toast("退出成功");

+ 1 - 1
pages/wareHouse/components/detail.vue

@@ -190,7 +190,7 @@
190 190
                 <text class="bar_text">{{ lockStatus === '1' ? '解锁' : '锁单' }}</text>
191 191
             </view>
192 192
             <view class="bar_item">
193
-                <img src="../../../static//icons/print.png" alt="" width="20px" height="20px">
193
+                <image class="bar_icon" src="../../../static//icons/print.png" alt=""></image>
194 194
                 <text class="bar_text">打印</text>
195 195
             </view>
196 196
             <view :class="['bar_item', { 'disabled': lockStatus === '1' }]" @click="handleOpenOrder">

+ 16 - 1
pages/wareHouse/components/fakeRegistration.vue

@@ -25,7 +25,7 @@
25 25
           </template>
26 26
           <template #cell-phone="{ row, rowIndex }">
27 27
             <view v-double-tap="() => editCell(row, rowIndex)"">
28
-            <u--input v-if="row.edit" border="surround" v-model="row.phone"></u--input>
28
+            <u--input v-if="row.edit" border="surround" v-model="row.phone" type="number"></u--input>
29 29
               <view v-else>{{ row.phone }}</view>
30 30
             </view>
31 31
           </template>
@@ -110,6 +110,8 @@ export default {
110 110
               this.$set(this.tableData[0], 'edit', false)
111 111
               this.isAdd = false
112 112
               uni.$u.toast('新增成功')
113
+              this.pageNum = 1
114
+              this.getWareHouseFakeList()
113 115
             }
114 116
           })
115 117
         }
@@ -121,6 +123,7 @@ export default {
121 123
               this.$set(this.tableData[this.editIndex], 'edit', false)
122 124
               this.isEdit = false
123 125
               uni.$u.toast('编辑成功')
126
+              this.getWareHouseFakeList()
124 127
             }
125 128
           })
126 129
         }
@@ -135,10 +138,22 @@ export default {
135 138
         uni.$u.toast('请输入身份证号')
136 139
         return false
137 140
       }
141
+      // 身份证号正则校验
142
+      const idCardRegex = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
143
+      if (!idCardRegex.test(row.idCard)) {
144
+        uni.$u.toast('请输入有效的身份证号')
145
+        return false
146
+      }
138 147
       if (row.phone == '') {
139 148
         uni.$u.toast('请输入电话')
140 149
         return false
141 150
       }
151
+      // 电话号码正则校验
152
+      const phoneRegex = /^1[3-9]\d{9}$/
153
+      if (!phoneRegex.test(row.phone)) {
154
+        uni.$u.toast('请输入有效的电话号码')
155
+        return false
156
+      }
142 157
       if (row.itemName == '') {
143 158
         uni.$u.toast('请输入物品')
144 159
         return false

+ 1 - 1
pages/wareHouse/components/openOrder.vue

@@ -3,7 +3,7 @@
3 3
       <u-navbar class="nav-bar" title="销售业务开单" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
4 4
       <view class="open_order_content">
5 5
          <view class="header">
6
-            <img :src="openOrderForm.url" alt="">
6
+            <image class="header_img" :src="openOrderForm.url" alt=""></image>
7 7
             <view class="header_box">
8 8
                <view class="title">
9 9
                   {{ openOrderForm.dictLabel }} | {{ openOrderForm.model }}

+ 8 - 8
pages/wareHouse/index.vue

@@ -73,21 +73,21 @@
73 73
 							<view class="price-items">
74 74
 								<view class="price-item">
75 75
 									<text class="price-type">成本价</text>
76
-									<text class="price">¥{{ priceVisible ? goods.costPrice : '****' }}</text>
76
+									<text class="price">¥{{ priceVisible ? goods.costPrice || '-' : '****' }}</text>
77 77
 								</view>
78 78
 								<view class="price-item">
79 79
 									<text class="price-type">销售价</text>
80
-									<text class="price sales">¥{{ priceVisible ? goods.salesPrice : '****' }}</text>
80
+									<text class="price sales">¥{{ priceVisible ? goods.salesPrice || '-' : '****' }}</text>
81 81
 								</view>
82 82
 							</view>
83 83
 							<view class="price-items">
84 84
 								<view class="price-item">
85 85
 									<text class="price-type">同行价</text>
86
-									<text class="price">¥{{ priceVisible ? goods.peerPrice : '****' }}</text>
86
+									<text class="price">¥{{ priceVisible ? goods.peerPrice || '-' : '****' }}</text>
87 87
 								</view>
88 88
 								<view class="price-item">
89 89
 									<text class="price-type">代理价</text>
90
-									<text class="price">¥{{ priceVisible ? goods.agentPrice : '****' }}</text>
90
+									<text class="price">¥{{ priceVisible ? goods.agentPrice || '-' : '****' }}</text>
91 91
 								</view>
92 92
 							</view>
93 93
 						</view>
@@ -257,7 +257,6 @@ export default {
257 257
 			});
258 258
 		},
259 259
 		handleAdd() {
260
-			console.log("点击添加按钮");
261 260
 			uni.navigateTo({
262 261
 				url: `/pages/wareHouse/components/add`
263 262
 			});
@@ -287,10 +286,11 @@ export default {
287 286
 			});
288 287
 		},
289 288
 	},
290
-	mounted() {
291
-		this.getCard();
289
+	onShow() {
290
+		this.pageNum = 1;
292 291
 		this.getList();
293
-	}
292
+		this.getCard();
293
+	},
294 294
 };
295 295
 </script>
296 296
 

+ 5 - 0
pages/wareHouse/styles/detail.scss

@@ -154,6 +154,11 @@
154 154
                 cursor: not-allowed;
155 155
                 opacity: 0.5;
156 156
             }
157
+
158
+            .bar_icon{
159
+                width: 40rpx;
160
+                height: 40rpx;
161
+            }
157 162
         }
158 163
     }
159 164
     

+ 1 - 1
pages/wareHouse/styles/openOrder.scss

@@ -10,7 +10,7 @@
10 10
             border-radius: 20rpx;
11 11
             margin: 20rpx;
12 12
 
13
-            img {
13
+            .header_img {
14 14
                 width: 150rpx;
15 15
                 height: 150rpx;
16 16
                 border-radius: 20rpx;

+ 2 - 2
store/modules/user.js

@@ -28,8 +28,8 @@ export default {
28 28
 		netConfig: {
29 29
 			// http://59.42.9.166:9520/proxy
30 30
 			// http://10.0.7.100:9500
31
-			// ip: "https://crm.nanjingshiyu.com/prod-api", // ip
32
-			ip: "https://crmtest.nanjingshiyu.com/prod-api", // 测试环境ip
31
+			ip: "https://crm.nanjingshiyu.com/prod-api", // ip
32
+			// ip: "https://crmtest.nanjingshiyu.com/prod-api", // 测试环境ip
33 33
 			// ip : "/api", // 测试环境ip
34 34
 			// ip : "http://47.113.184.101", // 测试环境ip
35 35
 			// ip: "http://172.16.7.200", // ip