zhangxin 1 mēnesi atpakaļ
vecāks
revīzija
02c1004470

+ 21 - 17
pages/wareHouse/components/add.vue

@@ -26,7 +26,7 @@
26 26
                                 @click="handlePasteRecognition(recognitionContent)"></u-button>
27 27
                         </view>
28 28
                     </u-form-item>
29
-                    <u-form-item label="商品图片" prop="imgs" borderBottom>
29
+                    <u-form-item required label="商品图片" prop="goodPicFileList" borderBottom>
30 30
                         <view class="imgs_scroll">
31 31
                             <ImgsRowScroll v-if="formData.goodPicFileList.length > 0" :isShowDeleteIcon="true"
32 32
                                 @deleteImgInfo="getDeleteGoodPicInfo" imgMode="aspectFill" :totalWidth="400"
@@ -44,7 +44,7 @@
44 44
                     </u-form-item>
45 45
                     <u-form-item label="商品分类" required prop="type" borderBottom>
46 46
                         <TabSelect :tabList="typeList" :isClear="typeIsClear" @tabChange="handleTabChangeType" labelKey="dictLabel" valueKey="dictValue"
47
-                            :colNum="4" mode="single">
47
+                            :colNum="4" mode="single" echoInfo="1">
48 48
                         </TabSelect>
49 49
                     </u-form-item>
50 50
                     <u-form-item label="品牌" required prop="dictLabel" class="u-form-item-row" borderBottom
@@ -81,7 +81,7 @@
81 81
                     </u-form-item>
82 82
                     <u-form-item label="商品成色" required prop="productCondition" borderBottom>
83 83
                         <TabSelect :tabList="productConditionList" :isClear="productConditionIsClear"
84
-                            @tabChange="handleTabChangeProductCondition" :colNum="2" mode="single"></TabSelect>
84
+                            @tabChange="handleTabChangeProductCondition" :colNum="2" mode="single" echoInfo="1"></TabSelect>
85 85
                     </u-form-item>
86 86
                     <u-form-item label="细节图" borderBottom>
87 87
                         <!-- <view class="detail_pic_container"> -->
@@ -114,11 +114,11 @@
114 114
                     </u-form-item>
115 115
                     <u-form-item label="商品属性" required prop="productAttribute" borderBottom>
116 116
                         <TabSelect :tabList="productAttributeList"  :colNum="4" mode="single"
117
-                            :isClear="productAttributeIsClear" @tabChange="handleTabChangeProductAttribute">
117
+                            :isClear="productAttributeIsClear" @tabChange="handleTabChangeProductAttribute" echoInfo="1">
118 118
                         </TabSelect>
119 119
                     </u-form-item>
120 120
                     <u-form-item label="库存数量" required prop="stock" class="u-form-item-row" borderBottom>
121
-                        <u--input v-model="formData.stock" placeholder="请输入" clearable border="none"></u--input>
121
+                        <u--input v-model="formData.stock" placeholder="请输入" clearable border="none" type="number"></u--input>
122 122
                     </u-form-item>
123 123
                     <u-form-item label="总成本价" class="u-form-item-row" borderBottom>
124 124
                         <u--input v-model="formData.costPrice" placeholder="请输入" clearable border="none"></u--input>
@@ -271,9 +271,9 @@ export default {
271 271
             formData: {
272 272
                 goodPicFileList: [],//商品图片
273 273
                 desc: '',
274
-                type: '',
275
-                dictLabel: '',
276
-                dictValue: '',
274
+                type: '1',
275
+                dictLabel: '艾美',
276
+                dictValue: '88',
277 277
                 series: '',
278 278
                 model: '',
279 279
                 dialType: '',
@@ -283,11 +283,12 @@ export default {
283 283
                 size: '',
284 284
                 yardage: '',
285 285
                 price: '',
286
-                productCondition: '',
286
+                productCondition: '1',
287 287
                 detailPicFileList: [],//细节图片
288 288
                 // detailVideoFileList:[],
289 289
                 productNo: '',
290
-                stock: null,
290
+                productAttribute: '1',
291
+                stock: 1,
291 292
                 costPrice: '',
292 293
                 samePrice: '',
293 294
                 agentPrice: '',
@@ -316,7 +317,7 @@ export default {
316 317
             continuousWarehousing: [],//是否连续入库 1:是 0:否
317 318
             rules: {
318 319
                 goodPicFileList: [
319
-                    { required: true, message: '请上传商品图片', trigger: 'blur' },
320
+                    { required: true, message: '请上传商品图片', trigger: 'change' },
320 321
                 ],
321 322
                 desc: [
322 323
                     { required: true, message: '请输入商品描述', trigger: 'blur' },
@@ -334,7 +335,7 @@ export default {
334 335
                     { required: true, message: '请选择商品属性', trigger: 'blur' },
335 336
                 ],
336 337
                 stock: [
337
-                    { required: true, message: '请输入库存数量', trigger: 'blur' },
338
+                    { required: true, message: '请输入库存数量' },
338 339
                 ],
339 340
                 recycleTime: [
340 341
                     { required: true, message: '请选择回收时间', trigger: 'blur' },
@@ -459,6 +460,8 @@ export default {
459 460
         },
460 461
         // 提交表单
461 462
         submitForm(submitType) {
463
+            console.log(this.formData);
464
+            
462 465
             this.$refs.addForm.validate().then((valid) => {
463 466
                 if (valid) {
464 467
                     if (this.formData.title == '') {
@@ -498,9 +501,9 @@ export default {
498 501
             this.formData = {
499 502
                 goodPicFileList: [],//商品图片
500 503
                 desc: '',
501
-                type: '',
502
-                dictLabel: '',
503
-                dictValue: '',
504
+                type: '1',
505
+                dictLabel: '艾美',
506
+                dictValue: '88',
504 507
                 series: '',
505 508
                 model: '',
506 509
                 dialType: '',
@@ -510,11 +513,12 @@ export default {
510 513
                 size: '',
511 514
                 yardage: '',
512 515
                 price: '',
513
-                productCondition: '',
516
+                productCondition: '1',
514 517
                 detailPicFileList: [],//细节图片
515 518
                 // detailVideoFileList:[],
516 519
                 productNo: '',
517
-                stock: null,
520
+                productAttribute: '1',
521
+                stock: 1,
518 522
                 costPrice: '',
519 523
                 samePrice: '',
520 524
                 agentPrice: '',

+ 36 - 12
pages/wareHouse/components/detail.vue

@@ -12,7 +12,7 @@
12 12
 
13 13
         <!-- 立即下架按钮 -->
14 14
         <view class="immediate_off_shelf">
15
-            <u-button type="error" shape="circle" size="large" @click="handleOffShelf">
15
+            <u-button type="error" shape="circle" size="large" @click="handleOffShelf" :disabled="lockStatus === '1'">
16 16
                 <u-icon :name="downStatus == '0' ? 'arrow-upward' : 'arrow-downward'" size="38rpx"
17 17
                     color="#ffffff"></u-icon>
18 18
                 <text>{{ downStatus == '0' ? '立即上架' : '立即下架' }}</text>
@@ -25,7 +25,7 @@
25 25
                 <u-icon name="download" size="44rpx" color="#606266"></u-icon>
26 26
                 <text class="action_text">下载图文</text>
27 27
             </view>
28
-            <view class="action_item">
28
+            <view class="action_item" @click="handleShare">
29 29
                 <u-icon name="share" size="44rpx" color="#606266"></u-icon>
30 30
                 <text class="action_text">分享</text>
31 31
             </view>
@@ -39,7 +39,7 @@
39 39
                     <u-upload @afterRead="afterRead" multiple></u-upload>
40 40
                 </u-modal>
41 41
             </view>
42
-            <view class="action_item">
42
+            <view class="action_item" @click="handleCutImg">
43 43
                 <u-icon name="cut" size="44rpx" color="#606266"></u-icon>
44 44
                 <text class="action_text">智能抠图</text>
45 45
             </view>
@@ -126,7 +126,7 @@
126 126
                     <view class="price_label">销售价格</view>
127 127
                     <view class="price_value suggested"
128 128
                         @click.stop="toggleEditField('salePrice', coreInfo.salePrice)">
129
-                        <u-input v-if="editMode.price" v-model="tempValues.salePrice" :autoFocus="true"
129
+                        <u-input v-if="editMode.salePrice" v-model="tempValues.salePrice" :autoFocus="true"
130 130
                             @blur="!globalEditMode && saveEditField('salePrice', tempValues.salePrice, 'salePrice')" />
131 131
                         <span v-else>¥{{ coreInfo.salePrice || '-' }}</span>
132 132
                     </view>
@@ -257,6 +257,20 @@ export default {
257 257
         this.getGoodsDetail();
258 258
     },
259 259
     methods: {
260
+        // 分享
261
+        handleShare() {
262
+            uni.showToast({
263
+                title: '分享功能暂未开放',
264
+                icon: 'none'
265
+            })
266
+        },
267
+        // 智能抠图
268
+        handleCutImg() {
269
+            uni.showToast({
270
+                title: '智能抠图功能暂未开放',
271
+                icon: 'none'
272
+            })
273
+        },
260 274
         payTypeFormatter(val){
261 275
             switch (val) {
262 276
                 case '1':
@@ -281,11 +295,20 @@ export default {
281 295
                 id: this.goodsId,
282 296
                 lockStatus: this.lockStatus === '1' ? '0' : '1',
283 297
             }).then(res => {
284
-                uni.showToast({
285
-                    title: this.lockStatus === '1' ? '解锁成功' : '锁单成功',
286
-                    icon: 'success'
287
-                })
288
-                this.getGoodsDetail();
298
+                if(res.code === 200){
299
+                    uni.showToast({
300
+                        type: "success",
301
+                        title: this.lockStatus === '1' ? '解锁成功' : '锁单成功',
302
+                        icon: 'success'
303
+                    })
304
+                    this.getGoodsDetail();
305
+                }else{
306
+                    uni.showToast({
307
+                        type: "error",
308
+                        title: res.msg || '操作失败',
309
+                        icon: false
310
+                    })
311
+                }
289 312
             })
290 313
         },
291 314
         showRecyclePersonPicker() {
@@ -376,9 +399,9 @@ export default {
376 399
             uni.$u.api.wareHouseDown({
377 400
                 id: this.goodsId,
378 401
                 downStatus: this.downStatus === '1' ? '0' : '1',
379
-            }).then(res => {
402
+            }).then(() => {
380 403
                 uni.showToast({
381
-                    title: this.downStatus === '1' ? '上架成功' : '下架成功',
404
+                    title: this.downStatus === '1' ? '下架成功' : '上架成功',
382 405
                     icon: 'success'
383 406
                 })
384 407
                 this.getGoodsDetail();
@@ -450,6 +473,8 @@ export default {
450 473
                 identifyingPerson: info.identifyingPerson,
451 474
                 identifyingPersonId: info.identifyingPersonId,
452 475
             }
476
+            console.log('修改图片',data);
477
+            
453 478
             uni.$u.api.wareHouseUpdate(data).then(res => {
454 479
                 uni.showToast({
455 480
                     title: '编辑成功',
@@ -556,7 +581,6 @@ export default {
556 581
                 uni.$u.api.uploadFile(item.url).then((res) => {
557 582
                     this.tempImgsUrl.push({url:res.data.url});
558 583
                     uni.$u.toast("文件上传成功");
559
-                    this.showEditImgsModal = false;
560 584
                 }).catch(() => {
561 585
                     uni.$u.toast("上传文件失败");
562 586
                 })

+ 7 - 4
pages/wareHouse/components/openOrder.vue

@@ -15,7 +15,7 @@
15 15
                   </view>
16 16
                   <view class="advice_price">
17 17
                      <view class="advice_price_title">建议标价</view>
18
-                     <view class="advice_price_price">¥<u--input v-model="openOrderForm.price" placeholder="请输入建议标价" border="none" type="number"></u--input></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>
@@ -23,7 +23,7 @@
23 23
          <u--form labelPosition="top" :model="openOrderForm" :rules="rules" ref="openOrderForm" label-width="200rpx">
24 24
             <view class="card_item">
25 25
                <u-form-item label="成交金额" required prop="dealPrice">
26
-                  ¥<u--input v-model="openOrderForm.dealPrice" placeholder="请输入成交金额" border="none" type="number"></u--input>
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">
@@ -189,13 +189,16 @@ export default {
189 189
          dateShow: false,
190 190
       }
191 191
    },
192
-   onLoad() {
193
-      const params = this.$route.query.params
192
+   onLoad(options) {
193
+      const params = options.params || '{}'
194
+      
194 195
       if (params) {
195 196
          this.openOrderForm.quantity = 1
196 197
          Object.keys(JSON.parse(params)).forEach(key => {
197 198
             this.openOrderForm[key] = JSON.parse(params)[key]
198 199
          })
200
+         console.log(this.openOrderForm);
201
+         
199 202
          this.getOrderTypeList()
200 203
       }
201 204
    },

+ 3 - 5
pages/wareHouse/index.vue

@@ -102,9 +102,7 @@
102 102
 					<view class="more">
103 103
 						<view></view>
104 104
 						<!-- <u-icon name="more-dot-fill" size="16" color="#666666"></u-icon> -->
105
-						<text class="goods-stock"
106
-							v-if="goods.stock !== null && goods.stock !== undefined && goods.stock > 0">数量:{{ goods.stock
107
-							}}</text>
105
+						<text class="goods-stock">数量:{{ goods.stock}}</text>
108 106
 					</view>
109 107
 				</view>
110 108
 				<show-emtry v-if="goodsList.length === 0"></show-emtry>
@@ -199,8 +197,8 @@ export default {
199 197
 	methods: {
200 198
 		getTypeList(){
201 199
             this.$getDicts("crm_form_category").then(res => {
202
-                this.tabList = res
203
-				this.tabList.unshift({ dictLabel: "全部", dictValue: '' })
200
+                this.tabList = [...res]
201
+                this.tabList.unshift({ dictLabel: "全部", dictValue: '' })
204 202
             })
205 203
         },
206 204
 		uploadTestAfter(info){

+ 1 - 1
utils/api.js

@@ -123,7 +123,7 @@ 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
-		inquiryChart:(data)=>http.post(store.state.user.path+'/wareHouse/getPriceChart',data),//询价中心-获取询价图表数据
126
+		inquiryChart:(data)=>http.post(store.state.user.path+'/warehouse/getPriceChart',data),//询价中心-获取询价图表数据
127 127
 		addInquiry:(data)=>http.post(store.state.user.path+'/inquiryCenter/addInquiry',data),//添加/编辑询价 有id是编辑 没有id是添加
128 128
 		inquiryDetail:(data)=>http.post(store.state.user.path+'/inquiryCenter/getInquiryDetail',data),//询价详情
129 129
 		inquiryVerificationList:(params,data)=>http.post(store.state.user.path+'/inquiryCenter/inquiryVerificationList?' + qs.stringify(params), data),//  询价/核价列表