Bladeren bron

feat:更新

zhangxin 1 maand geleden
bovenliggende
commit
abf0ba7d0c

+ 101 - 16
components/add-inquiry-dialog/index.vue

@@ -1,10 +1,10 @@
1 1
 <template>
2 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">
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 4
             <view class="modal_wrap">
5 5
                 <text @click="handleBrandClick" class="item" :class="info.dictLabel ? 'brand' : 'brand placeholder'">{{ info.dictLabel || '品牌' }}</text>
6 6
                 <text class="divider">|</text>
7
-                <u--input placeholder="型号" class="item" border="none" v-model="info.model" clearable></u--input>
7
+                <u--input placeholder="型号" class="item" border="none" v-model="info.model" clearable @blur="handleModelBlur"></u--input>
8 8
                 <text class="divider">|</text>
9 9
                 <u--input class="code-input item" placeholder="编码" border="none" v-model="info.code" clearable></u--input>
10 10
             </view>
@@ -18,6 +18,10 @@
18 18
                 ></u-upload>
19 19
             </view>
20 20
             <u--input v-if="editOrAdd === 'edit'" class="price" placeholder="价格" border="bottom" v-model="info.price" clearable></u--input>
21
+            <view class="charts_box" v-show="chartShow">
22
+                <qiun-data-charts type="line" :chartData="chartData" canvasId="trendChart" :opts="opts" :ontouch="true"
23
+                    width="700rpx" height="200rpx" backgroundColor="#ffffff" />
24
+            </view>
21 25
         </u-modal>
22 26
         <brandList ref="brandListRef" @selectedBrand="handleSelectedBrand"></brandList>
23 27
 	</view>
@@ -49,8 +53,12 @@ export default {
49 53
             type: Object,
50 54
             default: () => {}
51 55
         },
52
-
56
+        type: {
57
+            type: Number,
58
+            default: 1
59
+        },
53 60
 	},
61
+    emits: ['submitSuccess'],
54 62
 	data() {
55 63
 		return {
56 64
 			showModal: false,
@@ -68,6 +76,40 @@ export default {
68 76
                     { required: true, message: '请输入品牌', trigger: 'blur' }
69 77
                 ]
70 78
             },
79
+            chartData:{},
80
+            opts: {
81
+                color: ["#f9ae3d"],
82
+                padding: [10, 10, 0, 0],
83
+                dataLabel: false,
84
+                dataPointShape: false,
85
+                enableScroll: true,
86
+                legend: {
87
+                    show: false
88
+                },
89
+                xAxis: {
90
+                    disableGrid: true,
91
+                    scrollShow: true,
92
+                    itemCount: 7
93
+                },
94
+                yAxis: {
95
+                    gridType: "dash",
96
+                    dashLength: 7,
97
+                    axisLabel:{
98
+                        show: false
99
+                    }
100
+                },
101
+                extra: {
102
+                    line: {
103
+                        type: "curve",
104
+                        width: 3,
105
+                        activeType: "hollow",
106
+                        linearType: "custom",
107
+                        onShadow: true,
108
+                        animation: "horizontal"
109
+                    }
110
+                }
111
+            },
112
+            chartShow: false
71 113
 		}
72 114
 	},
73 115
 	watch: {
@@ -81,9 +123,15 @@ export default {
81 123
 	methods: {
82 124
         // 编辑回显
83 125
         initData() {
84
-            if (this.editOrAdd === 'edit') {
85
-                this.info = JSON.parse(JSON.stringify(this.editInfo))
86
-            }
126
+            this.$nextTick(()=>{
127
+                if (this.editOrAdd === 'edit') {
128
+                    this.info = JSON.parse(JSON.stringify(this.editInfo))
129
+                    this.showModal = true;
130
+                    if(this.info.model && this.info.dictValue){
131
+                        this.getChartData()
132
+                    }
133
+                }
134
+            })
87 135
         },
88 136
         // 获取删除图片信息
89 137
         getDeleteImgInfo(info) {
@@ -130,13 +178,13 @@ export default {
130 178
                 })
131 179
                 return
132 180
             }
133
-            if(this.info.imgsUrl.length == 0){
134
-                uni.showToast({
135
-                    title: '请上传图片',
136
-                    icon: 'none'
137
-                })
138
-                return
139
-            }
181
+            // if(this.info.imgsUrl.length == 0){
182
+            //     uni.showToast({
183
+            //         title: '请上传图片',
184
+            //         icon: 'none'
185
+            //     })
186
+            //     return
187
+            // }
140 188
             const data = {
141 189
                 clueId: this.clueId,
142 190
                 dictValue: this.info.dictValue,
@@ -145,7 +193,9 @@ export default {
145 193
                 code: this.info.code,
146 194
                 id: this.editOrAdd === 'edit' ? this.info.id : '',
147 195
                 price: this.editOrAdd === 'edit' ? this.info.price : '',
148
-                imgsUrl:this.info.imgsUrl
196
+                imgsUrl:this.info.imgsUrl,
197
+                status: this.editOrAdd === 'edit' ? '2' : '1',
198
+                type: this.type
149 199
             }
150 200
             uni.$u.api.addInquiry(data).then(res => {
151 201
                 if (res.code == 200) {
@@ -154,16 +204,16 @@ export default {
154 204
                         icon: 'success'
155 205
                     })
156 206
                     this.closeDialog()
157
-                    this.$emit('addSuccess')
207
+                    this.$emit('submitSuccess')
158 208
                 }
159 209
             })
160 210
         },
161 211
         showDialog() {
162
-            this.showModal = true;
163 212
             if (this.editOrAdd === 'edit') {
164 213
                 this.initData();
165 214
             }else{
166 215
                 this.clearForm()
216
+                this.showModal = true;
167 217
             }
168 218
         },
169 219
         clearForm() {
@@ -179,6 +229,41 @@ export default {
179 229
         },
180 230
         closeDialog() {
181 231
             this.showModal = false;
232
+            this.chartShow = false
233
+            this.chartData = {}
234
+        },
235
+        handleModelBlur() {
236
+            if (this.info.model !== ''){
237
+                this.getChartData()
238
+            }
239
+        },
240
+        getChartData() {
241
+            uni.$u.api.inquiryChart({
242
+                dictValue: this.info.dictValue,
243
+                model: this.info.model,
244
+            }).then(res => {
245
+                if (res.code == 200) {
246
+                    
247
+                    let data = {
248
+                        categories: res.data.map(item=>item.recycleTime),
249
+                        series: [
250
+                            {
251
+                                name: this.info.model+'价格趋势',
252
+                                data: res.data.map(item=>item.costPrice),
253
+                                setShadow: [
254
+                                    3,
255
+                                    8,
256
+                                    15,
257
+                                    "#f9ae3d"
258
+                                ],
259
+                            }
260
+                        ]
261
+                    }
262
+                    this.chartData = JSON.parse(JSON.stringify(data))
263
+                    this.chartShow = true
264
+                }
265
+            })
266
+            
182 267
         },
183 268
 	}
184 269
 };

+ 14 - 6
components/custom-tab-select/index.vue

@@ -3,14 +3,14 @@
3 3
     <view 
4 4
       class="tab-item"
5 5
       :class="{ 
6
-        'tab-item--active': isMultiple ? activeValues.includes(item.value) : activeValue === item.value,
6
+        'tab-item--active': isMultiple ? activeValues.includes(item[valueKey]) : activeValue === item[valueKey],
7 7
         'tab-item--multiple': isMultiple
8 8
       }"
9 9
       v-for="(item, index) in tabList"
10 10
       :key="index"
11 11
       @click="handleTabClick(item)"
12 12
     >
13
-      <text class="tab-item__text">{{ item.name }}</text>
13
+      <text class="tab-item__text">{{ item[labelKey] }}</text>
14 14
       <!-- <view v-if="isMultiple" class="tab-item__checkbox" :class="{ 'tab-item__checkbox--checked': activeValues.includes(item.value) }">
15 15
         <view v-if="activeValues.includes(item.value)" class="tab-item__checkbox-inner"></view>
16 16
       </view> -->
@@ -47,6 +47,14 @@ export default {
47 47
     isClear: {
48 48
       type: Boolean,
49 49
       default: false
50
+    },
51
+    valueKey: {
52
+      type: String,
53
+      default: "value"
54
+    },
55
+    labelKey: {
56
+      type: String,
57
+      default: "name"
50 58
     }
51 59
   },
52 60
   computed: {
@@ -121,15 +129,15 @@ export default {
121 129
       }
122 130
     },
123 131
     handleSingleSelect(item) {
124
-      this.activeValue = item.value;
125
-      this.$emit("tabChange", item.value);
132
+      this.activeValue = item[this.valueKey];
133
+      this.$emit("tabChange", item[this.valueKey]);
126 134
     },
127 135
     handleMultipleSelect(item) {
128
-      const index = this.activeValues.indexOf(item.value);
136
+      const index = this.activeValues.indexOf(item[this.valueKey]);
129 137
       if (index > -1) {
130 138
         this.activeValues.splice(index, 1);
131 139
       } else {
132
-        this.activeValues.push(item.value);
140
+        this.activeValues.push(item[this.valueKey]);
133 141
       }
134 142
       this.$emit("tabChange", [...this.activeValues]);
135 143
     }

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

@@ -6,7 +6,10 @@
6 6
             <view class="list_item" v-for="(item, index) in list" :key="index" @click="handleClick(item)">
7 7
                 <view class="list_item_top">
8 8
                     <view class="top_left">
9
-                        <text class="name">{{ item.dictLabel }}</text>
9
+                        <view class="name">
10
+                            <view>{{ item.dictLabel }}</view>
11
+                            <view v-if="item.price">¥{{ item.price }}</view>
12
+                        </view>
10 13
                         <text class="desc">{{ type == '1' ? '意向' : item.model }}</text>
11 14
                     </view>
12 15
                     <view class="top_right">
@@ -31,8 +34,7 @@
31 34
             <show-emtry v-if="list.length === 0"></show-emtry>
32 35
         </scroll-view>
33 36
 
34
-        <add-inquiry-dialog ref="addInquiryDialog" editOrAdd="edit" :editInfo="editInfo" @success="handleInquirySuccess"
35
-            @addSuccess="handleInquiryCancel" />
37
+        <add-inquiry-dialog ref="addInquiryDialog" editOrAdd="edit" :editInfo="editInfo" :type="type" @submitSuccess="onRefresh"/>
36 38
     </view>
37 39
 </template>
38 40
 <script>

+ 5 - 11
components/inquiry-verification-list/mixins/inquiryVerificationList.js

@@ -16,10 +16,6 @@ export default {
16 16
             total: 0,
17 17
         }
18 18
     },
19
-    mounted() {
20
-        this.getList();
21
-    },
22
-    
23 19
     methods: {
24 20
         onRefresh() {
25 21
             this.queryParams.pageNum = 1;
@@ -46,13 +42,11 @@ export default {
46 42
             this.getList();
47 43
         },
48 44
         formtterStatus(status) {
49
-            switch (status) {
50
-                case '1':
51
-                    return '待询价'
52
-                case '2':
53
-                    return '待核价'//待核价=询价完成
54
-                case '3':
55
-                    return '核价完成'
45
+            if(this.type == 1){
46
+                return status == '1' ? '待询价' : '询价完成'
47
+            }
48
+            if(this.type == 2){
49
+                return status == '1' ? '待核价' : '核价完成'
56 50
             }
57 51
         },
58 52
         handleClick(item) {

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

@@ -34,6 +34,9 @@
34 34
                         font-size: 32rpx;
35 35
                         font-weight: bold;
36 36
                         color: #111827;
37
+                        display: flex;
38
+                        align-items: center;
39
+                        gap: 10rpx;
37 40
                     }
38 41
 
39 42
                     .desc {

+ 11 - 11
mock/mockData.js

@@ -694,11 +694,11 @@ const mockDataList = {
694 694
   '/warehouse/wareHouseAdd': {
695 695
     method: 'post',
696 696
     data:{
697
-      goodPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//商品图片
698
-      desc:'',//商品描述
699
-      type:'1',//商品分类 1-腕表 2-箱包 3-珠宝 4-鞋靴 5-配饰 6-服饰 7-其他
700
-      dictLabel:'Rolex',//商品名称
701
-      dictValue:'12345',//商品名称id
697
+      goodPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//商品图片 必填
698
+      desc:'',//商品描述 必填
699
+      type:'1244',//商品分类 必填 1244-收单类  1245-维修类 1246-销售类
700
+      dictLabel:'Rolex',//商品名称 必填
701
+      dictValue:'12345',//商品名称id 必填
702 702
       series:'',//系列
703 703
       model:'',//型号
704 704
       dialType:'',//机芯类型
@@ -708,14 +708,14 @@ const mockDataList = {
708 708
       size:'',//尺寸
709 709
       yardage:'',//尺码
710 710
       price:'',//官方指导价
711
-      productCondition:'',//商品成色 1-闲置未使用 2-二手
711
+      productCondition:'',//商品成色 必填 1-闲置未使用 2-二手 
712 712
       detailPicFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//细节图片
713 713
       title:'',//商品标题
714 714
       productNo:'',//商品货号
715
-      productAttribute:'1',//商品属性 1-自有商品 2-寄卖商品 3-质押商品 4-其它
716
-      stock:'',//库存数量
715
+      productAttribute:'1',//商品属性 必填 1-自有商品 2-寄卖商品 3-质押商品 4-其它
716
+      stock:'',//库存数量 必填
717 717
       costPrice:'',//总成本价
718
-      samePrice:'',//同行价格
718
+      peerPrice:'',//同行价格
719 719
       agentPrice:'',//代理价格
720 720
       salePrice:'',//销售价格
721 721
       productPosition:'',//商品位置
@@ -723,12 +723,12 @@ const mockDataList = {
723 723
       identifyingPerson:'',//鉴定人员
724 724
       identifyingPersonId:'',//鉴定人员id
725 725
       recycleType:'1',//回收类型 1-线上 2-同行 3-门店 4-其它
726
-      label:'1',//标签 1-完美 2-假货 3-重复 4-亏损 5-其他
726
+      label:'1',//标签 1-完美 2-普通 3-瑕疵 4-假货 5-亏损
727 727
       recyclePerson:'',//回收人员
728 728
       recyclePersonId:'',//回收人员id
729 729
       recycleBottomDesc:'',//回收留底图描述
730 730
       recycleBottomFileList:['https://xiaohulu-crm.oss-cn-shanghai.aliyuncs.com/crm/2026/01/06/1767677335839-1767677330379.jpg'],//回收留底图
731
-      recycleTime:'2026-01-06',//回收时间
731
+      recycleTime:'2026-01-06',//回收时间 必填
732 732
       indentifyCode:'',//独立编码
733 733
       targetAudience:'general',// general-通用 man-男 woman-女
734 734
       productCard:'',//商品保卡 has-有 no-无

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

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
 	<view class="post_item">
3 3
 		<view class="post_top">
4
-			<view class="top_left">{{ item.name }}</view>
4
+			<view class="top_left">{{ item.name }}  <text v-if="item.price">¥{{ item.price }}</text></view>
5 5
 			<view class="top_right">{{ item.assignStateCode === '1' ? "已分配" : "未分配" }}</view>
6 6
 		</view>
7 7
 		<view class="post_info">
@@ -58,7 +58,7 @@
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
+		<add-inquiry-dialog ref="inquiryDialog" :clueId="clueId" :editOrAdd="editOrAdd" :editInfo="editInfo" @success="handleInquirySuccess" @cancel="handleInquiryCancel" :type="1"/>
62 62
 	</view>
63 63
 </template>
64 64
 
@@ -89,6 +89,8 @@ export default {
89 89
 		return {
90 90
 			caseStatusDicts: [],
91 91
 			clueId: '',
92
+			editOrAdd: 'add',
93
+			editInfo: {}
92 94
 		}
93 95
 	},
94 96
 	methods: {
@@ -162,7 +164,24 @@ export default {
162 164
 		// 询价
163 165
 		async handleInquiry(item) {
164 166
 			this.clueId = item.id
165
-			this.$refs.inquiryDialog.showDialog()
167
+			if(Number(item.count) > 0){//count 默认是0,新增之后变为1,之后每编辑一次就会+1
168
+				const data = {
169
+					clueId: item.id,
170
+					type:1
171
+				}
172
+				this.editOrAdd = 'edit'
173
+				uni.$u.api.inquiryDetail(data).then(res=>{
174
+					if(res.code === 200){
175
+						this.$nextTick(()=>{
176
+							this.editInfo = res.data
177
+							this.$refs.inquiryDialog.showDialog()
178
+						})
179
+					}
180
+				})
181
+			}else if(!item.count){
182
+				this.editOrAdd = 'add'
183
+				this.$refs.inquiryDialog.showDialog()
184
+			}
166 185
 		},
167 186
 		// 询价成功
168 187
 		handleInquirySuccess() {

+ 10 - 3
pages/inquiry/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
     <view class="page-container">
3
-        <inquiryVerificationList :type="type" ref="inquiryVerificationListRef"></inquiryVerificationList>
3
+        <inquiryVerificationList :type="type" ref="inquiryRef"></inquiryVerificationList>
4 4
     </view>
5 5
 </template>
6 6
 <script>
@@ -15,8 +15,15 @@
15 15
             }
16 16
         },
17 17
         onPullDownRefresh() {
18
-            this.$refs.inquiryVerificationListRef.onRefresh();
19
-            uni.stopPullDownRefresh();
18
+            this.$nextTick(()=>{
19
+                this.$refs.inquiryRef.onRefresh();
20
+                uni.stopPullDownRefresh();
21
+            })
22
+        },
23
+        onShow() {
24
+            this.$nextTick(()=>{
25
+                this.$refs.inquiryRef.getList();
26
+            })
20 27
         },
21 28
     }
22 29
 </script>

+ 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("退出成功");

+ 10 - 3
pages/verification/index.vue

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
     <view class="page-container">
3
-        <inquiryVerificationList :type="type" ref="inquiryVerificationListRef"></inquiryVerificationList>
3
+        <inquiryVerificationList :type="type" ref="verificationRef"></inquiryVerificationList>
4 4
     </view>
5 5
 </template>
6 6
 <script>
@@ -15,8 +15,15 @@
15 15
             }
16 16
         },
17 17
         onPullDownRefresh() {
18
-            this.$refs.inquiryVerificationListRef.onRefresh();
19
-            uni.stopPullDownRefresh();
18
+            this.$nextTick(()=>{
19
+                this.$refs.verificationRef.onRefresh();
20
+                uni.stopPullDownRefresh();
21
+            })
22
+        },
23
+        onShow() {
24
+            this.$nextTick(()=>{
25
+                this.$refs.verificationRef.getList();
26
+            })
20 27
         },
21 28
     }
22 29
 </script>

+ 43 - 56
pages/wareHouse/components/add.vue

@@ -27,12 +27,14 @@
27 27
                         </view>
28 28
                     </u-form-item>
29 29
                     <u-form-item label="商品图片" prop="imgs" borderBottom>
30
-                        <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
31
-                            @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
32
-                            :images="formData.goodPicFileList" :previewEnabled="true" :imageWidth="150"
33
-                            :imageHeight="150"></ImgsRowScroll>
34
-                        <u-upload @afterRead="afterReadGoodPic" name="3" multiple :maxCount="9"
35
-                            :previewFullImage="true"></u-upload>
30
+                        <view class="imgs_scroll">
31
+                            <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
32
+                                @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
33
+                                :images="formData.goodPicFileList" :previewEnabled="true" :imageWidth="150"
34
+                                :imageHeight="150"></ImgsRowScroll>
35
+                            <u-upload @afterRead="afterReadGoodPic" name="3" multiple :maxCount="9"
36
+                                :previewFullImage="true"></u-upload>
37
+                        </view>
36 38
                     </u-form-item>
37 39
                     <u-form-item label="商品描述(详细的描述让用户更好的了解您的产品)" required prop="desc" borderBottom>
38 40
                         <u--textarea v-model="formData.desc" clearable placeholder="95新 WHZ19219H
@@ -41,7 +43,7 @@
41 43
                         配件中溯卡" count autoHeight maxlength="250" height="100" confirmType="done"></u--textarea>
42 44
                     </u-form-item>
43 45
                     <u-form-item label="商品分类" required prop="type" borderBottom>
44
-                        <TabSelect :tabList="typeList" :isClear="typeIsClear" @tabChange="handleTabChangeType"
46
+                        <TabSelect :tabList="typeList" :isClear="typeIsClear" @tabChange="handleTabChangeType" labelKey="dictLabel" valueKey="dictValue"
45 47
                             :colNum="4" mode="single">
46 48
                         </TabSelect>
47 49
                     </u-form-item>
@@ -82,7 +84,7 @@
82 84
                             @tabChange="handleTabChangeProductCondition" :colNum="2" mode="single"></TabSelect>
83 85
                     </u-form-item>
84 86
                     <u-form-item label="细节图" borderBottom>
85
-                        <view class="detail_pic_container">
87
+                        <!-- <view class="detail_pic_container"> -->
86 88
                             <!-- <view>
87 89
                                 <text class="tip">视频:</text>
88 90
                                 <ImgsRowScroll v-if="formData.detailVideoFileList.length > 0" :isShowDeleteIcon="true"
@@ -91,15 +93,17 @@
91 93
                                     :imageHeight="150" accept="video"></ImgsRowScroll>
92 94
                                 <u-upload @afterRead="afterReadDeatilVideo"  name="2" multiple :maxCount="10" accept="video"></u-upload>
93 95
                             </view> -->
94
-                            <view>
96
+                            <!-- <view> -->
95 97
                                 <!-- <text class="tip">图片:</text> -->
96
-                                <ImgsRowScroll v-if="formData.detailPicFileList.length > 0" :isShowDeleteIcon="true"
97
-                                    @deleteImgInfo="getDeleteDetailPicInfo" imgMode="aspectFill" :totalWidth="400"
98
-                                    :images="formData.detailPicFileList" :previewEnabled="true" :imageWidth="150"
99
-                                    :imageHeight="150"></ImgsRowScroll>
100
-                                <u-upload @afterRead="afterReadDetailPic" name="1" multiple :maxCount="10"></u-upload>
101
-                            </view>
102
-                        </view>
98
+                                <view class="imgs_scroll">
99
+                                    <ImgsRowScroll v-if="formData.detailPicFileList.length > 0" :isShowDeleteIcon="true"
100
+                                        @deleteImgInfo="getDeleteDetailPicInfo" imgMode="aspectFill" :totalWidth="400"
101
+                                        :images="formData.detailPicFileList" :previewEnabled="true" :imageWidth="150"
102
+                                        :imageHeight="150"></ImgsRowScroll>
103
+                                    <u-upload @afterRead="afterReadDetailPic" name="1" multiple :maxCount="10"></u-upload>
104
+                                </view>
105
+                            <!-- </view> -->
106
+                        <!-- </view> -->
103 107
                     </u-form-item>
104 108
                     <u-form-item label="商品标题" borderBottom>
105 109
                         <u--textarea v-model="formData.title" clearable :placeholder="titlePlaceholder" count autoHeight
@@ -120,7 +124,7 @@
120 124
                         <u--input v-model="formData.costPrice" placeholder="请输入" clearable border="none"></u--input>
121 125
                     </u-form-item>
122 126
                     <u-form-item label="同行价格" class="u-form-item-row" borderBottom>
123
-                        <u--input v-model="formData.samePrice" placeholder="请输入" clearable border="none"></u--input>
127
+                        <u--input v-model="formData.peerPrice" placeholder="请输入" clearable border="none"></u--input>
124 128
                     </u-form-item>
125 129
                     <u-form-item label="代理价格" class="u-form-item-row" borderBottom>
126 130
                         <u--input v-model="formData.agentPrice" placeholder="请输入" clearable border="none"></u--input>
@@ -161,7 +165,7 @@
161 165
                         <view class="recycle_bottom_desc">
162 166
                             <u--textarea v-model="formData.recycleBottomDesc" clearable count autoHeight maxlength="250"
163 167
                                 height="100" confirmType="done"></u--textarea>
164
-                            <view>
168
+                            <view class="imgs_scroll">
165 169
                                 <ImgsRowScroll v-if="formData.recycleBottomPicList.length > 0" :isShowDeleteIcon="true"
166 170
                                     @deleteImgInfo="getDeleteRecycleBottomPicInfo" imgMode="aspectFill"
167 171
                                     :totalWidth="400" :images="formData.recycleBottomPicList" :previewEnabled="true"
@@ -200,12 +204,14 @@
200 204
                             border="none"></u--input>
201 205
                     </u-form-item>
202 206
                     <u-form-item label="保卡图片或独立编码照片留底(仅内部人员可见)" borderBottom>
203
-                        <ImgsRowScroll v-if="formData.productCardPicFileList.length > 0" :isShowDeleteIcon="true"
204
-                            @deleteImgInfo="getDeleteProductCardPicInfo" imgMode="aspectFill" :totalWidth="400"
205
-                            :images="formData.productCardPicFileList" :previewEnabled="true" :imageWidth="150"
206
-                            :imageHeight="150"></ImgsRowScroll>
207
-                        <u-upload @afterRead="afterReadProductCardPic" name="3" multiple :maxCount="9"
208
-                            :previewFullImage="true"></u-upload>
207
+                        <view class="imgs_scroll">
208
+                            <ImgsRowScroll v-if="formData.productCardPicFileList.length > 0" :isShowDeleteIcon="true"
209
+                                @deleteImgInfo="getDeleteProductCardPicInfo" imgMode="aspectFill" :totalWidth="400"
210
+                                :images="formData.productCardPicFileList" :previewEnabled="true" :imageWidth="150"
211
+                                :imageHeight="150"></ImgsRowScroll>
212
+                            <u-upload @afterRead="afterReadProductCardPic" name="3" multiple :maxCount="9"
213
+                                :previewFullImage="true"></u-upload>
214
+                        </view>
209 215
                     </u-form-item>
210 216
                     <u-form-item label="商品标签" class="u-form-item-row" borderBottom>
211 217
                         <u--input v-model="formData.productTag" placeholder="请输入" clearable border="none"></u--input>
@@ -218,7 +224,7 @@
218 224
                         <view class="recycle_bottom_desc">
219 225
                             <u--textarea v-model="formData.productDesc" clearable count autoHeight maxlength="250"
220 226
                                 height="100" confirmType="done"></u--textarea>
221
-                            <view>
227
+                            <view class="imgs_scroll">
222 228
                                 <ImgsRowScroll v-if="formData.productDescPicFileList.length > 0"
223 229
                                     :isShowDeleteIcon="true" @deleteImgInfo="getDeleteProductDescPicInfo"
224 230
                                     imgMode="aspectFill" :totalWidth="400" :images="formData.productDescPicFileList"
@@ -337,36 +343,7 @@ export default {
337 343
             },
338 344
             recycleTimeShow: false,
339 345
             titlePlaceholder: '如不填,自动截取商品描述前50字',
340
-            typeList: [
341
-                {
342
-                    name: '腕表',
343
-                    value: '1',
344
-                },
345
-                {
346
-                    name: '箱包',
347
-                    value: '2',
348
-                },
349
-                {
350
-                    name: '珠宝',
351
-                    value: '3',
352
-                },
353
-                {
354
-                    name: '鞋靴',
355
-                    value: '4',
356
-                },
357
-                {
358
-                    name: '配饰',
359
-                    value: '5',
360
-                },
361
-                {
362
-                    name: '服饰',
363
-                    value: '6',
364
-                },
365
-                {
366
-                    name: '其他',
367
-                    value: '7',
368
-                },
369
-            ],
346
+            typeList: [],
370 347
             productConditionList: [
371 348
                 {
372 349
                     name: '闲置未使用',
@@ -471,7 +448,15 @@ export default {
471 448
 
472 449
         }
473 450
     },
451
+    onLoad() {
452
+        this.getTypeList();
453
+    },
474 454
     methods: {
455
+        getTypeList(){
456
+            this.$getDicts("crm_form_category").then(res => {
457
+                this.typeList = res
458
+            })
459
+        },
475 460
         // 提交表单
476 461
         submitForm(submitType) {
477 462
             this.$refs.addForm.validate().then((valid) => {
@@ -479,11 +464,14 @@ export default {
479 464
                     if (this.formData.title == '') {
480 465
                         this.formData.title = this.formData.desc.substring(0, 50);
481 466
                     }
467
+                    this.formData.recycleTime = this.$dayjs(this.formData.recycleTime).format('YYYY-MM-DD')
482 468
                     const data = {
483 469
                         ...this.formData,
484 470
                         submitType: submitType, //提交类型 onlyIn:仅入库 inAndUp:入库并上架
485 471
                         continuousWarehousing: this.continuousWarehousing[0] || '0',//是否连续入库 1:是 0:否
486 472
                     }
473
+                    console.log(data);
474
+                    
487 475
                     uni.$u.api.wareHouseAdd(data).then(res => {
488 476
                         console.log(res);
489 477
                         if (res.code === 200) {
@@ -597,7 +585,6 @@ export default {
597 585
         // 商品分类
598 586
         handleTabChangeType(e) {
599 587
             this.formData.type = e;
600
-            console.log(e, this.formData.type);
601 588
             this.$refs.addForm.validateField('type')
602 589
         },
603 590
         // 商品成色

+ 93 - 56
pages/wareHouse/components/detail.vue

@@ -66,26 +66,26 @@
66 66
             </view>
67 67
             <view class="info_row">
68 68
                 <view class="info_label">独立编码</view>
69
-                <view class="info_value code" @click.stop="toggleEditField('code', coreInfo.code)">
70
-                    <u-input v-if="editMode.code" v-model="tempValues.code" :autoFocus="true"
71
-                        @blur="!globalEditMode && saveEditField('code', tempValues.code, 'code')" />
72
-                    <span v-else>{{ coreInfo.code || '-' }}</span>
69
+                <view class="info_value code" @click.stop="toggleEditField('indentifyCode', coreInfo.indentifyCode)">
70
+                    <u-input v-if="editMode.indentifyCode" v-model="tempValues.indentifyCode" :autoFocus="true"
71
+                        @blur="!globalEditMode && saveEditField('indentifyCode', tempValues.indentifyCode, 'indentifyCode')" />
72
+                    <span v-else>{{ coreInfo.indentifyCode || '-' }}</span>
73 73
                 </view>
74 74
             </view>
75 75
             <view class="info_row">
76 76
                 <view class="info_label">入库日期</view>
77
-                <view class="info_value">{{ coreInfo.warehouseDate || '-' }}</view>
77
+                <view class="info_value">{{ coreInfo.createTime || '-' }}</view>
78 78
             </view>
79 79
             <view class="info_row">
80 80
                 <view class="info_label">付款方式</view>
81
-                <view class="info_value">{{ coreInfo.payType || '-' }}</view>
81
+                <view class="info_value">{{ payTypeFormatter(coreInfo.payType) }}</view>
82 82
             </view>
83 83
             <view class="info_row col">
84 84
                 <view class="info_label">备注信息</view>
85
-                <view class="info_value note" @click.stop="toggleEditField('note', coreInfo.note)">
86
-                    <textarea v-if="editMode.note" v-model="tempValues.note" :autoFocus="true" rows="3"
87
-                        @blur="!globalEditMode && saveEditField('note', tempValues.note, 'note')" />
88
-                    <span v-else>{{ coreInfo.note || '-' }}</span>
85
+                <view class="info_value note" @click.stop="toggleEditField('desc', coreInfo.desc)">
86
+                    <textarea v-if="editMode.desc" v-model="tempValues.desc" :autoFocus="true" rows="3"
87
+                        @blur="!globalEditMode && saveEditField('desc', tempValues.desc, 'desc')" />
88
+                    <span v-else>{{ coreInfo.desc || '-' }}</span>
89 89
                 </view>
90 90
             </view>
91 91
         </view>
@@ -95,21 +95,21 @@
95 95
             <view class="section_title">财务与价格</view>
96 96
             <view class="price_group">
97 97
                 <view class="price_item">
98
-                    <view class="price_label">原始成本</view>
98
+                    <view class="price_label">总成本价</view>
99 99
                     <view class="price_value original"
100
-                        @click.stop="toggleEditField('originalCost', coreInfo.originalCost)">
101
-                        <u-input v-if="editMode.originalCost" v-model="tempValues.originalCost" :autoFocus="true"
102
-                            @blur="!globalEditMode && saveEditField('originalCost', tempValues.originalCost, 'originalCost')" />
103
-                        <span v-else>¥{{ coreInfo.originalCost || '-' }}</span>
100
+                        @click.stop="toggleEditField('costPrice', coreInfo.costPrice)">
101
+                        <u-input v-if="editMode.costPrice" v-model="tempValues.costPrice" :autoFocus="true"
102
+                            @blur="!globalEditMode && saveEditField('costPrice', tempValues.costPrice, 'costPrice')" />
103
+                        <span v-else>¥{{ coreInfo.costPrice || '-' }}</span>
104 104
                     </view>
105 105
                 </view>
106 106
                 <view class="price_item">
107
-                    <view class="price_label">附加成本</view>
107
+                    <view class="price_label">同行价格</view>
108 108
                     <view class="price_value additional"
109
-                        @click.stop="toggleEditField('additionalCost', coreInfo.additionalCost)">
110
-                        <u-input v-if="editMode.additionalCost" v-model="tempValues.additionalCost" :autoFocus="true"
111
-                            @blur="!globalEditMode && saveEditField('additionalCost', tempValues.additionalCost, 'additionalCost')" />
112
-                        <span v-else>¥{{ coreInfo.additionalCost || '-' }}</span>
109
+                        @click.stop="toggleEditField('peerPrice', coreInfo.peerPrice)">
110
+                        <u-input v-if="editMode.peerPrice" v-model="tempValues.peerPrice" :autoFocus="true"
111
+                            @blur="!globalEditMode && saveEditField('peerPrice', tempValues.peerPrice, 'peerPrice')" />
112
+                        <span v-else>¥{{ coreInfo.peerPrice || '-' }}</span>
113 113
                     </view>
114 114
                 </view>
115 115
             </view>
@@ -123,32 +123,42 @@
123 123
                     </view>
124 124
                 </view>
125 125
                 <view class="price_item">
126
-                    <view class="price_label">建议售价</view>
126
+                    <view class="price_label">销售价格</view>
127 127
                     <view class="price_value suggested"
128
-                        @click.stop="toggleEditField('suggestedPrice', coreInfo.suggestedPrice)">
129
-                        <u-input v-if="editMode.suggestedPrice" v-model="tempValues.suggestedPrice" :autoFocus="true"
130
-                            @blur="!globalEditMode && saveEditField('suggestedPrice', tempValues.suggestedPrice, 'suggestedPrice')" />
131
-                        <span v-else>¥{{ coreInfo.suggestedPrice || '-' }}</span>
128
+                        @click.stop="toggleEditField('salePrice', coreInfo.salePrice)">
129
+                        <u-input v-if="editMode.price" v-model="tempValues.salePrice" :autoFocus="true"
130
+                            @blur="!globalEditMode && saveEditField('salePrice', tempValues.salePrice, 'salePrice')" />
131
+                        <span v-else>¥{{ coreInfo.salePrice || '-' }}</span>
132 132
                     </view>
133 133
                 </view>
134 134
             </view>
135
+            <view class="price_group">
136
+                <view class="price_item">
137
+                    <view class="price_label">官方指导价</view>
138
+                    <view class="price_value original" @click.stop="toggleEditField('price', coreInfo.price)">
139
+                        <u-input v-if="editMode.price" v-model="tempValues.price" :autoFocus="true"
140
+                            @blur="!globalEditMode && saveEditField('price', tempValues.price, 'price')" />
141
+                        <span v-else>¥{{ coreInfo.price || '-' }}</span>
142
+                    </view>
143
+                </view>
144
+                <view class="price_item"></view>
145
+            </view>
135 146
         </view>
136 147
 
137 148
         <!-- 溯源与位置区域 -->
138
-        <view class="traceability_location">
149
+        <view class="traceability_productPosition">
139 150
             <view class="section_title">溯源与位置</view>
140 151
             <view class="info_row">
141 152
                 <view class="info_label">商品位置</view>
142
-                <view class="info_value" @click.stop="toggleEditField('location', coreInfo.location)">
143
-                    <u-input v-if="editMode.location" v-model="tempValues.location" :autoFocus="true"
144
-                        @blur="!globalEditMode && saveEditField('location', tempValues.location, 'location')" />
145
-                    <span v-else>{{ coreInfo.location || '-' }}</span>
153
+                <view class="info_value" @click.stop="toggleEditField('productPosition', coreInfo.productPosition)">
154
+                    <u-input v-if="editMode.productPosition" v-model="tempValues.productPosition" :autoFocus="true"
155
+                        @blur="!globalEditMode && saveEditField('productPosition', tempValues.productPosition, 'productPosition')" />
156
+                    <span v-else>{{ coreInfo.productPosition || '-' }}</span>
146 157
                 </view>
147 158
             </view>
148 159
             <view class="info_row">
149 160
                 <view class="info_label">回收人员</view>
150 161
                 <view class="info_value" @click.stop="showRecyclePersonPicker">
151
-                    <!-- <u-input v-if="editMode.recyclePerson" v-model="tempValues.recyclePerson" :autoFocus="true" @blur="!globalEditMode && saveEditField('recyclePerson', tempValues.recyclePerson, 'recyclePerson')" /> -->
152 162
                     <span>{{ coreInfo.recyclePerson || '-' }}</span>
153 163
                     <personPicker ref="recyclePersonPickerRef" title="请选择回收人员"
154 164
                         @selectPerson="handleSelectRecyclePerson">
@@ -158,7 +168,6 @@
158 168
             <view class="info_row">
159 169
                 <view class="info_label">鉴定人员</view>
160 170
                 <view class="info_value" @click.stop="showIdentifyingPersonPicker">
161
-                    <!-- <u-input v-if="editMode.identifyingPerson" v-model="tempValues.identifyingPerson" :autoFocus="true" @blur="!globalEditMode && saveEditField('identifyingPerson', tempValues.identifyingPerson, 'identifyingPerson')" /> -->
162 171
                     <span>{{ coreInfo.identifyingPerson || '-' }}</span>
163 172
                     <personPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员"
164 173
                         @selectPerson="handleSelectIdentifyingPerson"></personPicker>
@@ -220,13 +229,14 @@ export default {
220 229
             // 编辑状态管理
221 230
             editMode: {
222 231
                 model: false,
223
-                code: false,
224
-                note: false,
225
-                originalCost: false,
226
-                additionalCost: false,
232
+                indentifyCode: false,
233
+                desc: false,
234
+                costPrice: false,
235
+                peerPrice: false,
227 236
                 agentPrice: false,
228
-                suggestedPrice: false,
229
-                location: false,
237
+                salePrice: false,
238
+                price: false,
239
+                productPosition: false,
230 240
             },
231 241
             // 全局编辑模式
232 242
             globalEditMode: false,
@@ -247,6 +257,24 @@ export default {
247 257
         this.getGoodsDetail();
248 258
     },
249 259
     methods: {
260
+        payTypeFormatter(val){
261
+            switch (val) {
262
+                case '1':
263
+                    return '微信'
264
+                case '2':
265
+                    return '支付宝'
266
+                case '3':
267
+                    return '银行卡'
268
+                case '4':
269
+                    return '现金'
270
+                case '5':
271
+                    return '数字货币'
272
+                case '6':
273
+                    return '挂账'
274
+                default:
275
+                    return '-'
276
+            }
277
+        },
250 278
         // 锁单
251 279
         lockGoods() {
252 280
             uni.$u.api.wareHouseLock({
@@ -296,7 +324,7 @@ export default {
296 324
                 userId: this.$store.state.user.userInfo.userId,
297 325
             }).then(res => {
298 326
                 this.coreInfo = res.data;
299
-                this.imgsUrl = res.data.imgsUrl || [];
327
+                this.imgsUrl = res.data.goodPicFileList || [];
300 328
                 this.lockStatus = res.data.lockStatus;
301 329
                 this.downStatus = res.data.downStatus;
302 330
             });
@@ -316,11 +344,11 @@ export default {
316 344
                 dictLabel: this.coreInfo.dictLabel,
317 345
                 dictValue: this.coreInfo.dictValue,
318 346
                 model: this.coreInfo.model,
319
-                totalCost: Number(this.coreInfo.originalCost) + Number(this.coreInfo.additionalCost),
320
-                suggestedPrice: this.coreInfo.suggestedPrice,
347
+                agentPrice: this.coreInfo.agentPrice,
348
+                price: this.coreInfo.price,
321 349
                 recyclePerson: this.coreInfo.recyclePerson,
322 350
                 recyclePersonId: this.coreInfo.recyclePersonId,
323
-                warehouseDate: this.coreInfo.warehouseDate,
351
+                createTime: this.coreInfo.createTime,
324 352
             }
325 353
             uni.navigateTo({
326 354
                 url: '/pages/wareHouse/components/openOrder?params=' + JSON.stringify(params),
@@ -338,6 +366,13 @@ export default {
338 366
 
339 367
         // 立即下架按钮
340 368
         handleOffShelf() {
369
+            if (this.lockStatus === '1') {
370
+                uni.showToast({
371
+                    title: '已锁单,不能下架',
372
+                    icon: 'none'
373
+                })
374
+                return
375
+            }
341 376
             uni.$u.api.wareHouseDown({
342 377
                 id: this.goodsId,
343 378
                 downStatus: this.downStatus === '1' ? '0' : '1',
@@ -375,13 +410,14 @@ export default {
375 410
             // 设置所有可编辑字段为编辑状态
376 411
             this.editMode = {
377 412
                 model: true,
378
-                code: true,
379
-                note: true,
380
-                originalCost: true,
381
-                additionalCost: true,
413
+                indentifyCode: true,
414
+                desc: true,
415
+                costPrice: true,
416
+                peerPrice: true,
382 417
                 agentPrice: true,
383
-                suggestedPrice: true,
384
-                location: true,
418
+                salePrice: true,
419
+                price: true,
420
+                productPosition: true,
385 421
             };
386 422
             // 保存所有字段的临时值
387 423
             this.tempValues = { ...this.coreInfo }
@@ -395,19 +431,20 @@ export default {
395 431
         submitEdit(info) {
396 432
             const data = {
397 433
                 id: this.goodsId,
398
-                imgsUrl: this.imgsUrl,
434
+                goodPicFileList: this.imgsUrl,
399 435
                 dictLabel: info.dictLabel,
400 436
                 dictValue: info.dictValue,
401 437
                 model: info.model,
402
-                code: info.code,
403
-                warehouseDate: info.warehouseDate,
438
+                indentifyCode: info.indentifyCode,
439
+                createTime: info.createTime,
404 440
                 payType: info.payType,
405
-                note: info.note,
406
-                originalCost: info.originalCost,
407
-                additionalCost: info.additionalCost,
441
+                desc: info.desc,
442
+                costPrice: info.costPrice,
443
+                peerPrice: info.peerPrice,
408 444
                 agentPrice: info.agentPrice,
409
-                suggestedPrice: info.suggestedPrice,
410
-                location: info.location,
445
+                salePrice: info.salePrice,
446
+                price: info.price,
447
+                productPosition: info.productPosition,
411 448
                 recyclePerson: info.recyclePerson,
412 449
                 recyclePersonId: info.recyclePersonId,
413 450
                 identifyingPerson: info.identifyingPerson,

+ 45 - 57
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
-            <image class="header_img" :src="openOrderForm.url" alt=""></image>
6
+            <image class="header_img" :src="openOrderForm.url || '/static/no-img.png'" alt=""></image>
7 7
             <view class="header_box">
8 8
                <view class="title">
9 9
                   {{ openOrderForm.dictLabel }} | {{ openOrderForm.model }}
@@ -11,29 +11,29 @@
11 11
                <view class="header_detail_box">
12 12
                   <view class="total_cost">
13 13
                      <view class="total_cost_title">系统总成本</view>
14
-                     <view class="total_cost_price">¥{{ openOrderForm.totalCost }}</view>
14
+                     <view class="total_cost_price">¥{{ openOrderForm.agentPrice }}</view>
15 15
                   </view>
16 16
                   <view class="advice_price">
17 17
                      <view class="advice_price_title">建议标价</view>
18
-                     <view class="advice_price_price">¥{{ openOrderForm.suggestedPrice }}</view>
18
+                     <view class="advice_price_price">¥<u--input v-model="openOrderForm.price" placeholder="请输入建议标价" border="none" type="number"></u--input></view>
19 19
                   </view>
20 20
                </view>
21 21
             </view>
22 22
          </view>
23 23
          <u--form labelPosition="top" :model="openOrderForm" :rules="rules" ref="openOrderForm" label-width="200rpx">
24 24
             <view class="card_item">
25
-               <u-form-item label="成交金额" required prop="price">
26
-                  ¥<u--input v-model="openOrderForm.price" border="none" type="number"></u--input>
25
+               <u-form-item label="成交金额" required prop="dealPrice">
26
+                  ¥<u--input v-model="openOrderForm.dealPrice" placeholder="请输入成交金额" border="none" type="number"></u--input>
27 27
                </u-form-item>
28 28
             </view>
29 29
             <view class="card_item">
30 30
                <u-form-item label="开单数量">
31
-                  <u-number-box v-model="openOrderForm.quantity"></u-number-box>
31
+                  <u-number-box v-model="openOrderForm.quantity" button-size="26"></u-number-box>
32 32
                </u-form-item>
33 33
             </view>
34 34
             <view class="card_item">
35 35
                <u-form-item label="订单类型">
36
-                  <TabSelect :tabList="tabList" mode="single" :colNum="4" :defaultIndex="1"
36
+                  <TabSelect :tabList="orderTypeList" mode="single" :colNum="4" :defaultIndex="1" labelKey="dictLabel" valueKey="dictValue"
37 37
                      @tabChange="changeOrderType">
38 38
                   </tabSelect>
39 39
                </u-form-item>
@@ -48,8 +48,8 @@
48 48
                   </view>
49 49
                   <view class="sales_person_box" @click="dateShow = true">
50 50
                      <u-icon name="calendar" size="36rpx" color="#374151"></u-icon>
51
-                     <view class="text">{{ openOrderForm.warehouseDate }}</view>
52
-                     <u-datetime-picker :show="dateShow" v-model="openOrderForm.warehouseDate" mode="date" @confirm="confirmDate"
51
+                     <view class="text">{{ openOrderForm.orderDate }}</view>
52
+                     <u-datetime-picker :show="dateShow" v-model="openOrderForm.orderDate" mode="date" @confirm="confirmDate"
53 53
                         @close="closeDate" @cancel="closeDate"></u-datetime-picker>
54 54
                   </view>
55 55
 
@@ -71,11 +71,13 @@
71 71
             </view>
72 72
             <view class="card_item">
73 73
                <u-form-item label="支付凭证上传">
74
-                  <ImgsRowScroll v-if="payTypeProofPicFileList.length > 0" :isShowDeleteIcon="true"
75
-                     @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
76
-                     :images="payTypeProofPicFileList" :previewEnabled="true" :imageWidth="150" :imageHeight="150">
77
-                  </ImgsRowScroll>
78
-                  <u-upload @afterRead="afterReadpayTypeProofPic" name="1" multiple :maxCount="10"></u-upload>
74
+                  <view class="imgs_scroll">
75
+                     <ImgsRowScroll v-if="payTypeProofPicFileList.length > 0" :isShowDeleteIcon="true"
76
+                        @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
77
+                        :images="payTypeProofPicFileList" :previewEnabled="true" :imageWidth="150" :imageHeight="150">
78
+                     </ImgsRowScroll>
79
+                     <u-upload @afterRead="afterReadpayTypeProofPic" name="1" multiple :maxCount="10"></u-upload>
80
+                  </view>
79 81
                </u-form-item>
80 82
             </view>
81 83
             <view class="card_item">
@@ -93,7 +95,7 @@
93 95
       <view class="bottom_box">
94 96
          <view class="bottom_box_item">
95 97
             <view class="bottom_box_item_title">实收总计</view>
96
-            <view class="bottom_box_item_price">¥{{ openOrderForm.price * openOrderForm.quantity || 0 }}</view>
98
+            <view class="bottom_box_item_price">¥{{ openOrderForm.dealPrice * openOrderForm.quantity || 0 }}</view>
97 99
          </view>
98 100
          <u-button color="#3c9cff" type="primary" @click="submitForm" icon="checkmark">确认开单</u-button>
99 101
       </view>
@@ -113,45 +115,24 @@ export default {
113 115
       return {
114 116
          payTypeProofPicFileList: [],
115 117
          openOrderForm: {
116
-            // url: '',
117
-            // dictLabel: '',
118
-            // dictValue: '',
119
-            // model: '',
120
-            // totalCost: '',
121
-            // suggestedPrice: '',
122
-            // price: null,
123
-            // quantity: 1,
124
-            // recyclePerson: '',
125
-            // recyclePersonId: '',
126
-            // orderType: [],
127
-            // warehouseDate: '',
128
-            // payTypeTab: 1,
129
-            // afterSaleTab: [],
130
-            // remark: '',
131
-            // address: '',
118
+            url: '',
119
+            dictLabel: '',
120
+            dictValue: '',
121
+            model: '',
122
+            agentPrice: '',
123
+            price: null,
124
+            dealPrice: null,
125
+            quantity: 1,
126
+            recyclePerson: '',
127
+            recyclePersonId: '',
128
+            orderType: '',
129
+            orderDate: this.$dayjs().format('YYYY-MM-DD'),
130
+            payTypeTab: 1,
131
+            afterSaleTab: [],
132
+            remark: '',
133
+            address: '',
132 134
          },
133
-         tabList: [
134
-            {
135
-               name: '零售',
136
-               value: 1,
137
-            },
138
-            {
139
-               name: '寄卖',
140
-               value: 2,
141
-            },
142
-            {
143
-               name: '同行',
144
-               value: 3,
145
-            },
146
-            {
147
-               name: '退货',
148
-               value: 4,
149
-            },
150
-            {
151
-               name: '质押',
152
-               value: 5,
153
-            },
154
-         ],
135
+         orderTypeList: [],
155 136
          payTypeTabList: [
156 137
             {
157 138
                name: '微信',
@@ -201,7 +182,7 @@ export default {
201 182
             },
202 183
          ],
203 184
          rules: {
204
-            price: [
185
+            dealPrice: [
205 186
                { required: true, message: '请输入成交金额', trigger: ['blur'] },
206 187
             ],
207 188
          },
@@ -211,14 +192,19 @@ export default {
211 192
    onLoad() {
212 193
       const params = this.$route.query.params
213 194
       if (params) {
214
-         // this.openOrderForm = 
215 195
          this.openOrderForm.quantity = 1
216 196
          Object.keys(JSON.parse(params)).forEach(key => {
217 197
             this.openOrderForm[key] = JSON.parse(params)[key]
218 198
          })
199
+         this.getOrderTypeList()
219 200
       }
220 201
    },
221 202
    methods: {
203
+      getOrderTypeList() {
204
+         this.$getDicts("crm_sendOrder_type").then(res => {
205
+            this.orderTypeList = res
206
+         })
207
+      },
222 208
       changeOrderType(val) {
223 209
          this.openOrderForm.orderType = val
224 210
       },
@@ -235,13 +221,15 @@ export default {
235 221
       handleSelectRecyclePerson(person) {
236 222
          this.openOrderForm.recyclePerson = person.label
237 223
          this.openOrderForm.recyclePersonId = person.id
224
+         console.log(this.openOrderForm);
225
+         
238 226
       },
239 227
       handleClickOutside() {
240 228
          this.personShow = false
241 229
       },
242 230
       confirmDate(val) {
243 231
          this.$nextTick(() => {
244
-            this.openOrderForm.warehouseDate = this.$dayjs(val.value).format('YYYY-MM-DD');
232
+            this.openOrderForm.orderDate = this.$dayjs(val.value).format('YYYY-MM-DD');
245 233
          })
246 234
          this.dateShow = false
247 235
       },
@@ -267,7 +255,7 @@ export default {
267 255
                const data = {
268 256
                   ...this.openOrderForm,
269 257
                   payTypeProofPicFileList: this.payTypeProofPicFileList,
270
-                  amountReceived: Number(this.openOrderForm.price) * Number(this.openOrderForm.quantity),
258
+                  amountReceived: Number(this.openOrderForm.dealPrice) * Number(this.openOrderForm.quantity),
271 259
                }
272 260
                uni.$u.api.wareHouseOpenOrder(data).then(res => {
273 261
                   if (res.code === 200) {

+ 20 - 19
pages/wareHouse/index.vue

@@ -34,7 +34,7 @@
34 34
 			</view>
35 35
 
36 36
 			<view class="category-tabs-wrap">
37
-				<u-tabs :list="tabList" :is-scroll="true" active-color="#007aff" inactive-color="#666666" font-size="28rpx"
37
+				<u-tabs :list="tabList" :is-scroll="true" active-color="#007aff" inactive-color="#666666" font-size="28rpx" keyName="dictLabel"
38 38
 					border-bottom="none" @change="switchTab" class="u-tabs-custom"></u-tabs>
39 39
 			</view>
40 40
 
@@ -61,12 +61,13 @@
61 61
 			<scroll-view class="goods-list" scroll-y @scrolltolower="handleLoadMore" enable-back-to-top>
62 62
 				<view @click="handleToDetail(goods)" class="goods-item" v-for="(goods, goodsIndex) in goodsList" :key="`goods-${goodsIndex}`">
63 63
 					<view class="goods-img-container">
64
-						<image class="goods-img" :src="goods.imgUrl" mode="aspectFill" lazy-load></image>
64
+						<image class="goods-img" :src="goods.goodPicFileList[0] ? goods.goodPicFileList[0] : '/static/no-img.png'" mode="aspectFill" lazy-load></image>
65
+						<!-- <image class="goods-img" src="/static/no-img.png" mode="aspectFill" lazy-load></image> -->
65 66
 						<view :class="['stock-indicator', goods.downStatus == '1' ? 'up-indicator' : 'down-indicator']"></view>
66 67
 					</view>
67 68
 
68 69
 					<view class="goods-info">
69
-						<text class="goods-brand">{{ goods.name || '' }}</text>
70
+						<text class="goods-brand">{{ goods.dictLabel || '' }}</text>
70 71
 						<text class="goods-name">{{ goods.model || '' }}</text>
71 72
 
72 73
 						<view class="price-group">
@@ -77,7 +78,7 @@
77 78
 								</view>
78 79
 								<view class="price-item">
79 80
 									<text class="price-type">销售价</text>
80
-									<text class="price sales">¥{{ priceVisible ? goods.salesPrice || '-' : '****' }}</text>
81
+									<text class="price sales">¥{{ priceVisible ? goods.salePrice || '-' : '****' }}</text>
81 82
 								</view>
82 83
 							</view>
83 84
 							<view class="price-items">
@@ -92,11 +93,11 @@
92 93
 							</view>
93 94
 						</view>
94 95
 
95
-						<view class="others">
96
+						<!-- <view class="others">
96 97
 							<view class="other-item stock" >得</view>
97 98
 							<view class="other-item">得</view>
98 99
 							<view class="other-item">得</view>
99
-						</view>
100
+						</view> -->
100 101
 					</view>
101 102
 					<view class="more">
102 103
 						<view></view>
@@ -127,7 +128,7 @@ export default {
127 128
 	data() {
128 129
 		return {
129 130
 			searchString:'',//搜索编号、名称、品牌...
130
-			category:1,
131
+			type:'',
131 132
 			searchInfo:{},
132 133
 			pageNum:1,
133 134
 			pageSize:10,
@@ -141,16 +142,7 @@ export default {
141 142
 				outStockToday: '-',
142 143
 				totalNum: '-'
143 144
 			},
144
-			tabList: [
145
-				{ name: "全部", id: 1 },
146
-				{ name: "腕表", id: 2 },
147
-				{ name: "箱包", id: 3 },
148
-				{ name: "珠宝", id: 4 },
149
-				{ name: "鞋靴", id: 5 },
150
-				{ name: "配饰", id: 6 },
151
-				{ name: "服饰", id: 7 },
152
-				{ name: "其它", id: 8 }
153
-			],
145
+			tabList: [],
154 146
 			goodsList: [
155 147
 				// {
156 148
 				// 	id:'123456754',//商品库存id
@@ -201,7 +193,16 @@ export default {
201 193
 			total:0
202 194
 		};
203 195
 	},
196
+	onLoad() {
197
+		this.getTypeList();
198
+	},
204 199
 	methods: {
200
+		getTypeList(){
201
+            this.$getDicts("crm_form_category").then(res => {
202
+                this.tabList = res
203
+				this.tabList.unshift({ dictLabel: "全部", dictValue: '' })
204
+            })
205
+        },
205 206
 		uploadTestAfter(info){
206 207
 			console.log(info);
207 208
 			info.file.forEach(item=>{
@@ -220,7 +221,7 @@ export default {
220 221
 			{
221 222
 				searchString:this.searchString,
222 223
 				sortType:this.curSortType.id,
223
-				category:this.category,
224
+				type:this.type,
224 225
 				...this.searchInfo
225 226
 			}).then(res => {
226 227
 				if(this.pageNum == 1){
@@ -248,7 +249,7 @@ export default {
248 249
 			this.getList();
249 250
 		},
250 251
 		switchTab(item) {
251
-			this.category = item.id;
252
+			this.type = item.dictValue;
252 253
 			this.handleSearch();
253 254
 		},
254 255
 		handleToDetail(item) {

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

@@ -19,6 +19,11 @@
19 19
                 font-size:24rpx;
20 20
             }
21 21
         }
22
+        .imgs_scroll{
23
+            width: calc(100vw - 80rpx);
24
+            display: flex;
25
+            gap: 20rpx;
26
+        }
22 27
     }
23 28
 }
24 29
 

+ 3 - 3
pages/wareHouse/styles/detail.scss

@@ -234,8 +234,8 @@
234 234
         }
235 235
         
236 236
         .price_group {
237
-            display: flex;
238
-            justify-content: space-between;
237
+            display: grid;
238
+            grid-template-columns: 1fr 1fr;
239 239
             margin-bottom: 24rpx;
240 240
             
241 241
             &:last-child {
@@ -287,7 +287,7 @@
287 287
     }
288 288
     
289 289
     // 溯源与位置区域样式
290
-    .traceability_location {
290
+    .traceability_productPosition {
291 291
         background-color: #ffffff;
292 292
         margin: 20rpx;
293 293
         padding: 30rpx;

+ 13 - 2
pages/wareHouse/styles/openOrder.scss

@@ -40,8 +40,8 @@
40 40
                 }
41 41
 
42 42
                 .header_detail_box {
43
-                    display: flex;
44
-                    justify-content: space-between;
43
+                    display: grid;
44
+                    grid-template-columns: 1fr 1fr;
45 45
                     align-items: center;
46 46
                     padding: 20rpx 0;
47 47
                     width: 100%;
@@ -79,9 +79,15 @@
79 79
                         }
80 80
 
81 81
                         .advice_price_price {
82
+                            display: flex;
83
+                            align-items: center;
82 84
                             color: #d0a10d;
83 85
                             font-size: 30rpx;
84 86
                             font-weight: 600;
87
+                            ::v-deep .uni-input-input {
88
+                                width: 100rpx;
89
+                                color: #d0a10d;
90
+                            }
85 91
                         }
86 92
                     }
87 93
                 }
@@ -117,6 +123,11 @@
117 123
                     .uni-input-wrapper {
118 124
                         font-size: 40rpx;
119 125
                     }
126
+                    .imgs_scroll{
127
+                        width: calc(100vw - 80rpx);
128
+                        display: flex;
129
+                        gap: 20rpx;
130
+                    }
120 131
                 }
121 132
             }
122 133
 

+ 3 - 1
utils/api.js

@@ -123,7 +123,9 @@ const install = (Vue, vm) => {
123 123
 		getPersonLatestClue:(params)=>http.get(store.state.user.path+'/personCenter/getPersonLatestClue',{ params }),//个人中心-获取最新线索
124 124
 		getPersonRanking:(params)=>http.get(store.state.user.path+'/personCenter/getPersonRanking',{ params }),//个人中心-获取个人排名
125 125
 		getWareHouseCard:(params)=>http.get(store.state.user.path+'/warehouse/getWareHouseCard',{ params }),//仓库中心-获取仓库信息
126
-		addInquiry:(data)=>http.post(store.state.user.path+'/inquiryCenter/addInquiry',data),//添加询价
126
+		inquiryChart:(data)=>http.post(store.state.user.path+'/wareHouse/getPriceChart',data),//询价中心-获取询价图表数据
127
+		addInquiry:(data)=>http.post(store.state.user.path+'/inquiryCenter/addInquiry',data),//添加/编辑询价 有id是编辑 没有id是添加
128
+		inquiryDetail:(data)=>http.post(store.state.user.path+'/inquiryCenter/getInquiryDetail',data),//询价详情
127 129
 		inquiryVerificationList:(params,data)=>http.post(store.state.user.path+'/inquiryCenter/inquiryVerificationList?' + qs.stringify(params), data),//  询价/核价列表
128 130
 		wareHouseList:(params,data)=>http.post(store.state.user.path+'/warehouse/wareHouseList?' + qs.stringify(params), data),//仓库中心-获取仓库列表
129 131
 		wareHouseDetail:(params)=>http.get(store.state.user.path+'/warehouse/wareHouseDetail',{ params }),//仓库中心-获取仓库详情