Procházet zdrojové kódy

feat:仓库数据如果未入库点击进入编辑页面,如果已经入库进入详情页面

zhangxin před 1 měsícem
rodič
revize
bd3db47575

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

@@ -89,14 +89,13 @@ export default {
89
                 xAxis: {
89
                 xAxis: {
90
                     disableGrid: true,
90
                     disableGrid: true,
91
                     scrollShow: true,
91
                     scrollShow: true,
92
-                    itemCount: 7
92
+                    itemCount: 10,
93
+                    rotateLabel: true,
94
+                    rotateAngle: 45,
93
                 },
95
                 },
94
                 yAxis: {
96
                 yAxis: {
95
                     gridType: "dash",
97
                     gridType: "dash",
96
                     dashLength: 7,
98
                     dashLength: 7,
97
-                    axisLabel:{
98
-                        show: false
99
-                    }
100
                 },
99
                 },
101
                 extra: {
100
                 extra: {
102
                     line: {
101
                     line: {
@@ -244,17 +243,16 @@ export default {
244
         },
243
         },
245
         getChartData() {
244
         getChartData() {
246
             uni.$u.api.inquiryChart({
245
             uni.$u.api.inquiryChart({
247
-                dictValue: this.info.dictValue,
248
                 model: this.info.model,
246
                 model: this.info.model,
249
             }).then(res => {
247
             }).then(res => {
250
                 if (res.code == 200) {
248
                 if (res.code == 200) {
251
-                    
249
+                    const reverseData = res.data.reverse()
252
                     let data = {
250
                     let data = {
253
-                        categories: res.data.map(item=>item.recycleTime),
251
+                        categories: reverseData.map(item=>item.recycleTime),
254
                         series: [
252
                         series: [
255
                             {
253
                             {
256
-                                name: this.info.model+'价格趋势',
257
-                                data: res.data.map(item=>item.costPrice),
254
+                                name: this.info.model+'价格',
255
+                                data: reverseData.map(item=>item.price),
258
                                 setShadow: [
256
                                 setShadow: [
259
                                     3,
257
                                     3,
260
                                     8,
258
                                     8,

+ 2 - 2
pages.json

@@ -174,9 +174,9 @@
174
 			}
174
 			}
175
 		},
175
 		},
176
 		{
176
 		{
177
-			"path": "pages/wareHouse/components/add",
177
+			"path": "pages/wareHouse/components/edit",
178
 			"style": {
178
 			"style": {
179
-				"navigationBarTitleText": "仓库新增",
179
+				"navigationBarTitleText": "仓库编辑",
180
 				"enablePullDownRefresh": false,
180
 				"enablePullDownRefresh": false,
181
 				"navigationStyle": "custom"
181
 				"navigationStyle": "custom"
182
 			}
182
 			}

+ 67 - 18
pages/wareHouse/components/detail.vue

@@ -12,7 +12,7 @@
12
 
12
 
13
         <!-- 立即下架按钮 -->
13
         <!-- 立即下架按钮 -->
14
         <view class="immediate_off_shelf">
14
         <view class="immediate_off_shelf">
15
-            <u-button type="error" shape="circle" size="large" @click="handleOffShelf" :disabled="lockStatus === '1'">
15
+            <u-button type="error" shape="circle" size="large" @click="handleOffShelf" :disabled="lockStatus === '1' || globalEditMode">
16
                 <u-icon :name="downStatus == '0' ? 'arrow-upward' : 'arrow-downward'" size="38rpx"
16
                 <u-icon :name="downStatus == '0' ? 'arrow-upward' : 'arrow-downward'" size="38rpx"
17
                     color="#ffffff"></u-icon>
17
                     color="#ffffff"></u-icon>
18
                 <text>{{ downStatus == '0' ? '立即上架' : '立即下架' }}</text>
18
                 <text>{{ downStatus == '0' ? '立即上架' : '立即下架' }}</text>
@@ -73,6 +73,10 @@
73
                 </view>
73
                 </view>
74
             </view>
74
             </view>
75
             <view class="info_row">
75
             <view class="info_row">
76
+                <view class="info_label">是否入库</view>
77
+                <view class="info_value">{{ stockStatusFormatter(coreInfo.stockStatus) }}</view>
78
+            </view>
79
+            <view class="info_row">
76
                 <view class="info_label">入库日期</view>
80
                 <view class="info_label">入库日期</view>
77
                 <view class="info_value">{{ coreInfo.createTime || '-' }}</view>
81
                 <view class="info_value">{{ coreInfo.createTime || '-' }}</view>
78
             </view>
82
             </view>
@@ -188,22 +192,28 @@
188
         </view>
192
         </view>
189
 
193
 
190
         <!-- 底部功能按钮栏 -->
194
         <!-- 底部功能按钮栏 -->
191
-        <view class="bottom_bar">
192
-            <view class="bar_item" @click.stop="globalEditMode ? handleClickOutside() : enterGlobalEdit()">
195
+        <view :class="['bottom_bar', { 'fourPart': coreInfo.stockStatus === '1', 'fivePart': coreInfo.stockStatus === '0' }]">
196
+            <view class="bar_item" @click.stop="globalEditMode ? confirmGlobalEdit() : enterGlobalEdit()">
193
                 <u-icon :name="globalEditMode ? 'checkbox-mark' : 'edit-pen'" size="46rpx"
197
                 <u-icon :name="globalEditMode ? 'checkbox-mark' : 'edit-pen'" size="46rpx"
194
                     :color="globalEditMode ? '#10b981' : '#9ca3af'"></u-icon>
198
                     :color="globalEditMode ? '#10b981' : '#9ca3af'"></u-icon>
195
                 <text class="bar_text">{{ globalEditMode ? '确定' : '编辑' }}</text>
199
                 <text class="bar_text">{{ globalEditMode ? '确定' : '编辑' }}</text>
196
             </view>
200
             </view>
197
-            <view class="bar_item" @click.stop="lockGoods">
201
+            <view :class="['bar_item', { 'disabled': globalEditMode}]" @click.stop="lockGoods">
198
                 <u-icon :name="lockStatus === '1' ? 'lock-open' : 'lock'" size="46rpx" color="#9ca3af"></u-icon>
202
                 <u-icon :name="lockStatus === '1' ? 'lock-open' : 'lock'" size="46rpx" color="#9ca3af"></u-icon>
199
                 <text class="bar_text">{{ lockStatus === '1' ? '解锁' : '锁单' }}</text>
203
                 <text class="bar_text">{{ lockStatus === '1' ? '解锁' : '锁单' }}</text>
200
             </view>
204
             </view>
201
-            <view class="bar_item">
202
-                <image class="bar_icon" src="../../../static//icons/print.png" alt=""></image>
205
+            <view :class="['bar_item', { 'disabled': globalEditMode}]">
206
+                <image class="bar_icon" src="../../../static/icons/print.png" alt=""></image>
203
                 <text class="bar_text">打印</text>
207
                 <text class="bar_text">打印</text>
204
             </view>
208
             </view>
205
-            <view :class="['bar_item', { 'disabled': lockStatus === '1' }]" @click="handleOpenOrder">
206
-                <view class="primary">
209
+            <view class="bar_item" v-if="coreInfo.stockStatus === '0'" @click.stop="handleConfirmStockIn">
210
+                <view class="primary blue">
211
+                    <image class="bar_img" src="../../../static/icons/stockIn.png" alt=""></image>
212
+                    <text class="bar_text">确认入库</text>
213
+                </view>
214
+            </view>
215
+            <view :class="['bar_item', { 'disabled': lockStatus === '1' ||  globalEditMode}]" @click="handleOpenOrder">
216
+                <view class="primary orange">
207
                     <u-icon name="bag" size="44rpx" color="#fff"></u-icon>
217
                     <u-icon name="bag" size="44rpx" color="#fff"></u-icon>
208
                     <text class="bar_text">开单</text>
218
                     <text class="bar_text">开单</text>
209
                 </view>
219
                 </view>
@@ -271,6 +281,17 @@ export default {
271
                 icon: 'none'
281
                 icon: 'none'
272
             })
282
             })
273
         },
283
         },
284
+        // 是否入库格式化
285
+        stockStatusFormatter(val){
286
+            switch (val) {
287
+                case '1':
288
+                    return '已入库'
289
+                case '0':
290
+                    return '未入库'
291
+                default:
292
+                    return '-'
293
+            }
294
+        },
274
         payTypeFormatter(val){
295
         payTypeFormatter(val){
275
             switch (val) {
296
             switch (val) {
276
                 case '1':
297
                 case '1':
@@ -291,6 +312,13 @@ export default {
291
         },
312
         },
292
         // 锁单
313
         // 锁单
293
         lockGoods() {
314
         lockGoods() {
315
+            if (this.globalEditMode) {
316
+                uni.showToast({
317
+                    title: '编辑状态下不能操作',
318
+                    icon: 'none'
319
+                })
320
+                return
321
+            }
294
             uni.$u.api.wareHouseLock({
322
             uni.$u.api.wareHouseLock({
295
                 id: this.goodsId,
323
                 id: this.goodsId,
296
                 lockStatus: this.lockStatus === '1' ? '0' : '1',
324
                 lockStatus: this.lockStatus === '1' ? '0' : '1',
@@ -358,6 +386,13 @@ export default {
358
                 })
386
                 })
359
                 return
387
                 return
360
             }
388
             }
389
+            if (this.globalEditMode) {
390
+                uni.showToast({
391
+                    title: '编辑状态下不能开单',
392
+                    icon: 'none'
393
+                })
394
+                return
395
+            }
361
             const params = {
396
             const params = {
362
                 id: this.goodsId,
397
                 id: this.goodsId,
363
                 url: this.imgsUrl[0]?.url,
398
                 url: this.imgsUrl[0]?.url,
@@ -374,6 +409,10 @@ export default {
374
                 url: '/pages/wareHouse/components/openOrder?params=' + JSON.stringify(params),
409
                 url: '/pages/wareHouse/components/openOrder?params=' + JSON.stringify(params),
375
             });
410
             });
376
         },
411
         },
412
+        handleConfirmStockIn(){
413
+            this.coreInfo.stockStatus = '1';
414
+            this.submitEdit(this.coreInfo)
415
+        },
377
         viewLog() {
416
         viewLog() {
378
             uni.$u.api.wareHouseLog({
417
             uni.$u.api.wareHouseLog({
379
                 id: this.goodsId,
418
                 id: this.goodsId,
@@ -393,6 +432,13 @@ export default {
393
                 })
432
                 })
394
                 return
433
                 return
395
             }
434
             }
435
+            if (this.globalEditMode) {
436
+                uni.showToast({
437
+                    title: '编辑状态下不能操作',
438
+                    icon: 'none'
439
+                })
440
+                return
441
+            }
396
             uni.$u.api.wareHouseDown({
442
             uni.$u.api.wareHouseDown({
397
                 id: this.goodsId,
443
                 id: this.goodsId,
398
                 downStatus: this.downStatus === '1' ? '0' : '1',
444
                 downStatus: this.downStatus === '1' ? '0' : '1',
@@ -474,6 +520,7 @@ export default {
474
                 recyclePersonId: info.recyclePersonId,
520
                 recyclePersonId: info.recyclePersonId,
475
                 identifyingPerson: info.identifyingPerson,
521
                 identifyingPerson: info.identifyingPerson,
476
                 identifyingPersonId: info.identifyingPersonId,
522
                 identifyingPersonId: info.identifyingPersonId,
523
+                stockStatus: info.stockStatus,
477
             }
524
             }
478
             uni.$u.api.wareHouseUpdate(data).then(res => {
525
             uni.$u.api.wareHouseUpdate(data).then(res => {
479
                 uni.showToast({
526
                 uni.showToast({
@@ -491,16 +538,7 @@ export default {
491
         },
538
         },
492
         // 点击页面其他地方保存所有编辑
539
         // 点击页面其他地方保存所有编辑
493
         handleClickOutside() {
540
         handleClickOutside() {
494
-            if (this.globalEditMode) {
495
-                this.submitEdit(this.tempValues)
496
-                // 全局编辑模式下,点击外部区域重置所有编辑
497
-                this.globalEditMode = false;
498
-                // 退出所有编辑状态
499
-                this.resetEditMode();
500
-                // 清空临时值,恢复初始状态
501
-                this.tempValues = {};
502
-
503
-            } else {
541
+            if (!this.globalEditMode) {
504
                 // 保存当前正在编辑的字段
542
                 // 保存当前正在编辑的字段
505
                 Object.keys(this.editMode).forEach(key => {
543
                 Object.keys(this.editMode).forEach(key => {
506
                     if (this.editMode[key]) {
544
                     if (this.editMode[key]) {
@@ -508,8 +546,19 @@ export default {
508
                     }
546
                     }
509
                 });
547
                 });
510
             }
548
             }
549
+            // 当globalEditMode为true时,不执行任何操作
511
 
550
 
512
         },
551
         },
552
+        // 确认全局编辑
553
+        confirmGlobalEdit() {
554
+            this.submitEdit(this.tempValues)
555
+            // 重置全局编辑模式
556
+            this.globalEditMode = false;
557
+            // 退出所有编辑状态
558
+            this.resetEditMode();
559
+            // 清空临时值,恢复初始状态
560
+            this.tempValues = {};
561
+        },
513
         handleDownload() {
562
         handleDownload() {
514
             if (this.imgsUrl.length == 0) {
563
             if (this.imgsUrl.length == 0) {
515
                 uni.showToast({
564
                 uni.showToast({

+ 113 - 63
pages/wareHouse/components/add.vue

@@ -37,14 +37,16 @@
37
                         </view>
37
                         </view>
38
                     </u-form-item>
38
                     </u-form-item>
39
                     <u-form-item label="商品描述(详细的描述让用户更好的了解您的产品)" required prop="desc" borderBottom>
39
                     <u-form-item label="商品描述(详细的描述让用户更好的了解您的产品)" required prop="desc" borderBottom>
40
-                        <u--textarea v-model="formData.desc" clearable placeholder="95新 WHZ19219H
41
-                        CHANEL香奈儿链条单肩包
40
+                        <u--textarea v-model="formData.desc" clearable placeholder="95新 WHZ19219H CHANEL香奈儿链条单肩包
42
                         21开 牛皮 尺寸25 4 15
41
                         21开 牛皮 尺寸25 4 15
43
                         配件中溯卡" count autoHeight maxlength="250" height="100" confirmType="done"></u--textarea>
42
                         配件中溯卡" count autoHeight maxlength="250" height="100" confirmType="done"></u--textarea>
44
                     </u-form-item>
43
                     </u-form-item>
44
+                    <u-form-item label="来源" prop="origin" borderBottom>
45
+                        <u--textarea v-model="formData.origin" clearable placeholder="请输入来源" count autoHeight maxlength="250" height="100" confirmType="done"></u--textarea>
46
+                    </u-form-item>
45
                     <u-form-item label="商品分类" required prop="type" borderBottom>
47
                     <u-form-item label="商品分类" required prop="type" borderBottom>
46
-                        <TabSelect :tabList="typeList" :isClear="typeIsClear" @tabChange="handleTabChangeType" labelKey="dictLabel" valueKey="dictValue"
47
-                            :colNum="4" mode="single" echoInfo="1">
48
+                        <TabSelect :tabList="typeList" :isClear="typeIsClear" @tabChange="handleTabChangeType"
49
+                            labelKey="dictLabel" valueKey="dictValue" :colNum="4" mode="single" :echoInfo="echoInfoType">
48
                         </TabSelect>
50
                         </TabSelect>
49
                     </u-form-item>
51
                     </u-form-item>
50
                     <u-form-item label="品牌" required prop="dictLabel" class="u-form-item-row" borderBottom
52
                     <u-form-item label="品牌" required prop="dictLabel" class="u-form-item-row" borderBottom
@@ -81,11 +83,12 @@
81
                     </u-form-item>
83
                     </u-form-item>
82
                     <u-form-item label="商品成色" required prop="productCondition" borderBottom>
84
                     <u-form-item label="商品成色" required prop="productCondition" borderBottom>
83
                         <TabSelect :tabList="productConditionList" :isClear="productConditionIsClear"
85
                         <TabSelect :tabList="productConditionList" :isClear="productConditionIsClear"
84
-                            @tabChange="handleTabChangeProductCondition" :colNum="2" mode="single" echoInfo="1"></TabSelect>
86
+                            @tabChange="handleTabChangeProductCondition" :colNum="2" mode="single" :echoInfo="echoInfoProductCondition">
87
+                        </TabSelect>
85
                     </u-form-item>
88
                     </u-form-item>
86
                     <u-form-item label="细节图" borderBottom>
89
                     <u-form-item label="细节图" borderBottom>
87
                         <!-- <view class="detail_pic_container"> -->
90
                         <!-- <view class="detail_pic_container"> -->
88
-                            <!-- <view>
91
+                        <!-- <view>
89
                                 <text class="tip">视频:</text>
92
                                 <text class="tip">视频:</text>
90
                                 <ImgsRowScroll v-if="formData.detailVideoFileList.length > 0" :isShowDeleteIcon="true"
93
                                 <ImgsRowScroll v-if="formData.detailVideoFileList.length > 0" :isShowDeleteIcon="true"
91
                                     @deleteVideoInfo="getDeleteDetailVideoInfo" imgMode="aspectFill" :totalWidth="400"
94
                                     @deleteVideoInfo="getDeleteDetailVideoInfo" imgMode="aspectFill" :totalWidth="400"
@@ -93,16 +96,16 @@
93
                                     :imageHeight="150" accept="video"></ImgsRowScroll>
96
                                     :imageHeight="150" accept="video"></ImgsRowScroll>
94
                                 <u-upload @afterRead="afterReadDeatilVideo"  name="2" multiple :maxCount="10" accept="video"></u-upload>
97
                                 <u-upload @afterRead="afterReadDeatilVideo"  name="2" multiple :maxCount="10" accept="video"></u-upload>
95
                             </view> -->
98
                             </view> -->
96
-                            <!-- <view> -->
97
-                                <!-- <text class="tip">图片:</text> -->
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> -->
99
+                        <!-- <view> -->
100
+                        <!-- <text class="tip">图片:</text> -->
101
+                        <view class="imgs_scroll">
102
+                            <ImgsRowScroll v-if="formData.detailPicFileList.length > 0" :isShowDeleteIcon="true"
103
+                                @deleteImgInfo="getDeleteDetailPicInfo" imgMode="aspectFill" :totalWidth="400"
104
+                                :images="formData.detailPicFileList" :previewEnabled="true" :imageWidth="150"
105
+                                :imageHeight="150"></ImgsRowScroll>
106
+                            <u-upload @afterRead="afterReadDetailPic" name="1" multiple :maxCount="10"></u-upload>
107
+                        </view>
108
+                        <!-- </view> -->
106
                         <!-- </view> -->
109
                         <!-- </view> -->
107
                     </u-form-item>
110
                     </u-form-item>
108
                     <u-form-item label="商品标题" borderBottom>
111
                     <u-form-item label="商品标题" borderBottom>
@@ -113,12 +116,14 @@
113
                         <u--input v-model="formData.productNo" placeholder="请输入" clearable border="none"></u--input>
116
                         <u--input v-model="formData.productNo" placeholder="请输入" clearable border="none"></u--input>
114
                     </u-form-item>
117
                     </u-form-item>
115
                     <u-form-item label="商品属性" required prop="productAttribute" borderBottom>
118
                     <u-form-item label="商品属性" required prop="productAttribute" borderBottom>
116
-                        <TabSelect :tabList="productAttributeList"  :colNum="4" mode="single"
117
-                            :isClear="productAttributeIsClear" @tabChange="handleTabChangeProductAttribute" echoInfo="1">
119
+                        <TabSelect :tabList="productAttributeList" :colNum="4" mode="single"
120
+                            :isClear="productAttributeIsClear" @tabChange="handleTabChangeProductAttribute"
121
+                            :echoInfo="echoInfoProductAttribute">
118
                         </TabSelect>
122
                         </TabSelect>
119
                     </u-form-item>
123
                     </u-form-item>
120
                     <u-form-item label="库存数量" required prop="stock" class="u-form-item-row" borderBottom>
124
                     <u-form-item label="库存数量" required prop="stock" class="u-form-item-row" borderBottom>
121
-                        <u--input v-model="formData.stock" placeholder="请输入" clearable border="none" type="number"></u--input>
125
+                        <u--input v-model="formData.stock" placeholder="请输入" clearable border="none"
126
+                            type="number"></u--input>
122
                     </u-form-item>
127
                     </u-form-item>
123
                     <u-form-item label="总成本价" class="u-form-item-row" borderBottom>
128
                     <u-form-item label="总成本价" class="u-form-item-row" borderBottom>
124
                         <u--input v-model="formData.costPrice" placeholder="请输入" clearable border="none"></u--input>
129
                         <u--input v-model="formData.costPrice" placeholder="请输入" clearable border="none"></u--input>
@@ -140,24 +145,30 @@
140
                         <u--input v-model="formData.watchYear" placeholder="请输入" clearable border="none"></u--input>
145
                         <u--input v-model="formData.watchYear" placeholder="请输入" clearable border="none"></u--input>
141
                     </u-form-item>
146
                     </u-form-item>
142
                     <u-form-item label="鉴定人员" class="u-form-item-row" borderBottom @click="identifyingPersonClick">
147
                     <u-form-item label="鉴定人员" class="u-form-item-row" borderBottom @click="identifyingPersonClick">
143
-                        <Cell :val="formData.identifyingPerson" :isDelete="true" @handleClear="clear('identifyingPerson')"></Cell>
148
+                        <Cell :val="formData.identifyingPerson" :isDelete="true"
149
+                            @handleClear="clear('identifyingPerson')"></Cell>
144
                         <PersonPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员"
150
                         <PersonPicker ref="identifyingPersonPickerRef" title="请选择鉴定人员"
145
                             @selectPerson="handleSelectIdentifyingPerson"></PersonPicker>
151
                             @selectPerson="handleSelectIdentifyingPerson"></PersonPicker>
146
                     </u-form-item>
152
                     </u-form-item>
153
+                    <u-form-item label="是否入库" borderBottom required prop="stockStatus">
154
+                        <TabSelect :tabList="stockStatusList" :colNum="2" mode="single" :isClear="stockStatusIsClear" :echoInfo="echoInfoStockStatus"
155
+                            @tabChange="handleTabChangeStockStatus"></TabSelect>
156
+                    </u-form-item>
147
                     <u-form-item label="回收类型" borderBottom>
157
                     <u-form-item label="回收类型" borderBottom>
148
-                        <TabSelect :tabList="recycleTypeList" :colNum="4" mode="single" 
149
-                            :isClear="recycleTypeIsClear" @tabChange="handleTabChangeRecycleType">
158
+                        <TabSelect :tabList="recycleTypeList" :colNum="4" mode="single" :isClear="recycleTypeIsClear"
159
+                            @tabChange="handleTabChangeRecycleType">
150
                         </TabSelect>
160
                         </TabSelect>
151
                     </u-form-item>
161
                     </u-form-item>
152
                     <u-form-item label="标签" borderBottom>
162
                     <u-form-item label="标签" borderBottom>
153
-                        <TabSelect :tabList="labelList" :colNum="4" mode="single" 
154
-                            :isClear="labelIsClear" @tabChange="handleTabChangeLabel">
163
+                        <TabSelect :tabList="labelList" :colNum="5" mode="single" :isClear="labelIsClear"
164
+                            @tabChange="handleTabChangeLabel">
155
                         </TabSelect>
165
                         </TabSelect>
156
                     </u-form-item>
166
                     </u-form-item>
157
                     <u-form-item label="回收人员" class="u-form-item-row" borderBottom @click="recyclePersonClick">
167
                     <u-form-item label="回收人员" class="u-form-item-row" borderBottom @click="recyclePersonClick">
158
                         <!-- <u--input v-model="formData.recyclePerson" disabledColor="#fff" disabled clearable
168
                         <!-- <u--input v-model="formData.recyclePerson" disabledColor="#fff" disabled clearable
159
                             border="none"></u--input> -->
169
                             border="none"></u--input> -->
160
-                        <Cell :val="formData.recyclePerson" :isDelete="true" @handleClear="clear('recyclePerson')"></Cell>
170
+                        <Cell :val="formData.recyclePerson" :isDelete="true" @handleClear="clear('recyclePerson')">
171
+                        </Cell>
161
                         <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员"
172
                         <PersonPicker ref="recyclePersonPickerRef" title="请选择回收人员"
162
                             @selectPerson="handleSelectRecyclePerson"></PersonPicker>
173
                             @selectPerson="handleSelectRecyclePerson"></PersonPicker>
163
                     </u-form-item>
174
                     </u-form-item>
@@ -235,17 +246,16 @@
235
                         </view>
246
                         </view>
236
                     </u-form-item>
247
                     </u-form-item>
237
                     <u-form-item label="付款方式">
248
                     <u-form-item label="付款方式">
238
-                        <TabSelect :tabList="paymentTabList" :echoInfo="payTypeEcho" :colNum="4" mode="single" 
249
+                        <TabSelect :tabList="paymentTabList" :echoInfo="payTypeEcho" :colNum="4" mode="single"
239
                             :isClear="payTypeIsClear" @tabChange="handlePayTypeTabChange">
250
                             :isClear="payTypeIsClear" @tabChange="handlePayTypeTabChange">
240
                         </TabSelect>
251
                         </TabSelect>
241
                     </u-form-item>
252
                     </u-form-item>
242
                 </u--form>
253
                 </u--form>
243
             </view>
254
             </view>
244
-
245
         </view>
255
         </view>
246
-        <view class="btn_group">
247
-            <u-button plain type="primary" @click="submitForm('onlyIn')">仅入库</u-button>
248
-            <u-button type="primary" @click="submitForm('inAndUp')">入库并上架</u-button>
256
+        <view :class="['btn_group', {'col-2': formData.stockStatus == '1'}]">
257
+            <u-button plain type="primary" @click="submitForm('onlyIn')">{{ formData.stockStatus == '0' ? '待入库' : '仅入库' }}</u-button>
258
+            <u-button type="primary" @click="submitForm('inAndUp')" v-if="formData.stockStatus == '1'">入库并上架</u-button>
249
         </view>
259
         </view>
250
     </view>
260
     </view>
251
 </template>
261
 </template>
@@ -271,6 +281,7 @@ export default {
271
             formData: {
281
             formData: {
272
                 goodPicFileList: [],//商品图片
282
                 goodPicFileList: [],//商品图片
273
                 desc: '',
283
                 desc: '',
284
+                origin: '',
274
                 type: '1',
285
                 type: '1',
275
                 dictLabel: '艾美',
286
                 dictLabel: '艾美',
276
                 dictValue: '88',
287
                 dictValue: '88',
@@ -297,6 +308,7 @@ export default {
297
                 watchYear: '',
308
                 watchYear: '',
298
                 identifyingPerson: '',
309
                 identifyingPerson: '',
299
                 identifyingPersonId: '',
310
                 identifyingPersonId: '',
311
+                stockStatus: '0',
300
                 recycleType: '',
312
                 recycleType: '',
301
                 recyclePerson: '',
313
                 recyclePerson: '',
302
                 recyclePersonId: '',
314
                 recyclePersonId: '',
@@ -320,25 +332,28 @@ export default {
320
                     { required: true, message: '请上传商品图片' },
332
                     { required: true, message: '请上传商品图片' },
321
                 ],
333
                 ],
322
                 desc: [
334
                 desc: [
323
-                    { required: true, message: '请输入商品描述', trigger: 'blur' },
335
+                    { required: true, message: '请输入商品描述', trigger: ['blur', 'change'] },
324
                 ],
336
                 ],
325
                 type: [
337
                 type: [
326
-                    { required: true, message: '请选择商品分类', trigger: 'blur' },
338
+                    { required: true, message: '请选择商品分类', trigger: ['blur', 'change'] },
327
                 ],
339
                 ],
328
                 dictLabel: [
340
                 dictLabel: [
329
-                    { required: true, message: '请选择品牌', trigger: 'blur' },
341
+                    { required: true, message: '请选择品牌', trigger: ['blur', 'change'] },
330
                 ],
342
                 ],
331
                 productCondition: [
343
                 productCondition: [
332
-                    { required: true, message: '请选择商品成色', trigger: 'blur' },
344
+                    { required: true, message: '请选择商品成色', trigger: ['blur', 'change'] },
333
                 ],
345
                 ],
334
                 productAttribute: [
346
                 productAttribute: [
335
-                    { required: true, message: '请选择商品属性', trigger: 'blur' },
347
+                    { required: true, message: '请选择商品属性', trigger: ['blur', 'change'] },
336
                 ],
348
                 ],
337
                 stock: [
349
                 stock: [
338
                     { required: true, message: '请输入库存数量' },
350
                     { required: true, message: '请输入库存数量' },
339
                 ],
351
                 ],
352
+                stockStatus: [
353
+                    { required: true, message: '请选择是否入库', trigger: [ 'change'] },
354
+                ],
340
                 recycleTime: [
355
                 recycleTime: [
341
-                    { required: true, message: '请选择回收时间', trigger: 'blur' },
356
+                    { required: true, message: '请选择回收时间', trigger: ['blur', 'change'] },
342
                 ],
357
                 ],
343
 
358
 
344
             },
359
             },
@@ -373,6 +388,16 @@ export default {
373
                     value: '4',
388
                     value: '4',
374
                 },
389
                 },
375
             ],
390
             ],
391
+            stockStatusList: [
392
+                {
393
+                    name: '待入库',
394
+                    value: '0',
395
+                },
396
+                {
397
+                    name: '已入库',
398
+                    value: '1',
399
+                },
400
+            ],
376
             recycleTypeList: [
401
             recycleTypeList: [
377
                 {
402
                 {
378
                     name: '线上',
403
                     name: '线上',
@@ -391,26 +416,26 @@ export default {
391
                     value: '4',
416
                     value: '4',
392
                 },
417
                 },
393
             ],
418
             ],
394
-            labelList:[
419
+            labelList: [
395
                 {
420
                 {
396
-                    name:'完美',
397
-                    value:'1',
421
+                    name: '完美',
422
+                    value: '1',
398
                 },
423
                 },
399
                 {
424
                 {
400
-                    name:'普通',
401
-                    value:'2',
425
+                    name: '普通',
426
+                    value: '2',
402
                 },
427
                 },
403
                 {
428
                 {
404
-                    name:'瑕疵',
405
-                    value:'3',
429
+                    name: '瑕疵',
430
+                    value: '3',
406
                 },
431
                 },
407
                 {
432
                 {
408
-                    name:'假货',
409
-                    value:'4',
433
+                    name: '假货',
434
+                    value: '4',
410
                 },
435
                 },
411
                 {
436
                 {
412
-                    name:'亏损',
413
-                    value:'5',
437
+                    name: '亏损',
438
+                    value: '5',
414
                 },
439
                 },
415
             ],
440
             ],
416
             paymentTabList: [
441
             paymentTabList: [
@@ -443,25 +468,44 @@ export default {
443
             productConditionIsClear: false,//商品成色是否清空
468
             productConditionIsClear: false,//商品成色是否清空
444
             productAttributeIsClear: false,//商品属性是否清空
469
             productAttributeIsClear: false,//商品属性是否清空
445
             recycleTypeIsClear: false,//回收类型是否清空
470
             recycleTypeIsClear: false,//回收类型是否清空
471
+            stockStatusIsClear: false,//是否入库是否清空
446
             labelIsClear: false,//商品标签是否清空
472
             labelIsClear: false,//商品标签是否清空
447
             payTypeIsClear: false,//付款方式是否清空
473
             payTypeIsClear: false,//付款方式是否清空
448
-            payTypeEcho: ''//付款方式识别回显
449
-
474
+            payTypeEcho: '',//付款方式识别回显
475
+            echoInfoType:'',//入库回显的时候 类型回显
476
+            echoInfoProductAttribute:'',//入库回显的时候 商品属性回显
477
+            echoInfoProductCondition:'',//入库回显的时候 商品成色回显
478
+            echoInfoStockStatus:'',//入库回显的时候 是否入库回显
450
         }
479
         }
451
     },
480
     },
452
-    onLoad() {
481
+    onLoad(options) {
453
         this.getTypeList();
482
         this.getTypeList();
483
+        this.$nextTick(()=>{
484
+            if(options.formType == 'add'){
485
+                this.clearForm()
486
+            }else if(options.formType == 'edit'){
487
+                uni.$u.api.wareHouseDetail({
488
+                    id: options.id,
489
+                    userId: this.$store.state.user.userInfo.userId,
490
+                }).then(res => {
491
+                    const key = ['costPrice','dictLabel','dictValue','goodPicFileList','indexntifuCode','origin','stockStatus']
492
+                    key.forEach(item => {
493
+                        this.formData[item] = res.data[item]
494
+                    })
495
+                    this.recycleTime = this.$dayjs(res.data.recycleTime).format('YYYY-MM-DD') || ''
496
+                    this.echoInfoType = res.data.type || '1'
497
+                });
498
+            }
499
+        })
454
     },
500
     },
455
     methods: {
501
     methods: {
456
-        getTypeList(){
502
+        getTypeList() {
457
             this.$getDicts("crm_form_category").then(res => {
503
             this.$getDicts("crm_form_category").then(res => {
458
                 this.typeList = res
504
                 this.typeList = res
459
             })
505
             })
460
         },
506
         },
461
         // 提交表单
507
         // 提交表单
462
         submitForm(submitType) {
508
         submitForm(submitType) {
463
-            console.log(this.formData);
464
-            
465
             this.$refs.addForm.validate().then((valid) => {
509
             this.$refs.addForm.validate().then((valid) => {
466
                 if (valid) {
510
                 if (valid) {
467
                     if (this.formData.title == '') {
511
                     if (this.formData.title == '') {
@@ -470,13 +514,10 @@ export default {
470
                     this.formData.recycleTime = this.$dayjs(this.formData.recycleTime).format('YYYY-MM-DD')
514
                     this.formData.recycleTime = this.$dayjs(this.formData.recycleTime).format('YYYY-MM-DD')
471
                     const data = {
515
                     const data = {
472
                         ...this.formData,
516
                         ...this.formData,
473
-                        submitType: submitType, //提交类型 onlyIn:仅入库 inAndUp:入库并上架
517
+                        submitType: submitType, //提交类型 onlyIn:仅入库/暂存入库 inAndUp:入库并上架
474
                         continuousWarehousing: this.continuousWarehousing[0] || '0',//是否连续入库 1:是 0:否
518
                         continuousWarehousing: this.continuousWarehousing[0] || '0',//是否连续入库 1:是 0:否
475
                     }
519
                     }
476
-                    console.log(data);
477
-                    
478
                     uni.$u.api.wareHouseAdd(data).then(res => {
520
                     uni.$u.api.wareHouseAdd(data).then(res => {
479
-                        console.log(res);
480
                         if (res.code === 200) {
521
                         if (res.code === 200) {
481
                             uni.$u.toast('新增成功');
522
                             uni.$u.toast('新增成功');
482
                             if (data.continuousWarehousing == '0') {
523
                             if (data.continuousWarehousing == '0') {
@@ -501,6 +542,7 @@ export default {
501
             this.formData = {
542
             this.formData = {
502
                 goodPicFileList: [],//商品图片
543
                 goodPicFileList: [],//商品图片
503
                 desc: '',
544
                 desc: '',
545
+                origin: '',
504
                 type: '1',
546
                 type: '1',
505
                 dictLabel: '艾美',
547
                 dictLabel: '艾美',
506
                 dictValue: '88',
548
                 dictValue: '88',
@@ -527,6 +569,7 @@ export default {
527
                 watchYear: '',
569
                 watchYear: '',
528
                 identifyingPerson: '',
570
                 identifyingPerson: '',
529
                 identifyingPersonId: '',
571
                 identifyingPersonId: '',
572
+                stockStatus: '0',
530
                 recycleType: '',
573
                 recycleType: '',
531
                 label: '',
574
                 label: '',
532
                 recyclePerson: '',
575
                 recyclePerson: '',
@@ -545,14 +588,17 @@ export default {
545
                 productDescPicFileList: [],//商品备注图片
588
                 productDescPicFileList: [],//商品备注图片
546
                 payType: '',
589
                 payType: '',
547
             }
590
             }
548
-            this.typeIsClear = true;
549
-            this.productConditionIsClear = true;
550
-            this.productAttributeIsClear = true;
551
             this.recycleTypeIsClear = true;
591
             this.recycleTypeIsClear = true;
552
             this.payTypeIsClear = true;
592
             this.payTypeIsClear = true;
553
             this.labelIsClear = true;
593
             this.labelIsClear = true;
594
+            this.echoInfoType = '1';//类型默认第一项
595
+            this.echoInfoProductCondition = '1';//商品成色默认第一项
596
+            this.echoInfoProductAttribute = '1';//商品属性默认第一项
597
+            this.echoInfoStockStatus = '0';//是否入库默认第一项
554
             this.continuousWarehousing = [];
598
             this.continuousWarehousing = [];
555
-            this.$refs.addForm.resetFields();
599
+            this.$nextTick(()=>{
600
+                this.$refs.addForm.resetFields();
601
+            })
556
         },
602
         },
557
         // 选择品牌
603
         // 选择品牌
558
         handleSelectedBrand(info) {
604
         handleSelectedBrand(info) {
@@ -601,6 +647,10 @@ export default {
601
             this.formData.productAttribute = e;
647
             this.formData.productAttribute = e;
602
             this.$refs.addForm.validateField('productAttribute')
648
             this.$refs.addForm.validateField('productAttribute')
603
         },
649
         },
650
+        // 是否入库
651
+        handleTabChangeStockStatus(e) {
652
+            this.formData.stockStatus = e;
653
+        },
604
         // 回收类型
654
         // 回收类型
605
         handleTabChangeRecycleType(e) {
655
         handleTabChangeRecycleType(e) {
606
             this.formData.recycleType = e;
656
             this.formData.recycleType = e;
@@ -761,7 +811,7 @@ export default {
761
                     this.formData.dictLabel = result['品牌'];
811
                     this.formData.dictLabel = result['品牌'];
762
                 }
812
                 }
763
                 if (result['来源']) {
813
                 if (result['来源']) {
764
-                    this.formData.desc = result['来源'];
814
+                    this.formData.origin = result['来源'];
765
                 }
815
                 }
766
                 if (result['实价']) {
816
                 if (result['实价']) {
767
                     this.formData.costPrice = result['实价'];
817
                     this.formData.costPrice = result['实价'];
@@ -806,5 +856,5 @@ export default {
806
 }
856
 }
807
 </script>
857
 </script>
808
 <style lang="scss" scoped>
858
 <style lang="scss" scoped>
809
-@import '../styles/add.scss';
859
+@import '../styles/edit.scss';
810
 </style>
860
 </style>

+ 64 - 0
pages/wareHouse/components/moreInfo.vue

@@ -0,0 +1,64 @@
1
+<template>
2
+    <u-modal :show="show">
3
+        <div class="more-info">
4
+            <view class="modal-item">
5
+                <text>品牌:</text>
6
+                <text>{{ moreOptions.dictLabel || '-' }}</text>
7
+            </view>
8
+            <view class="modal-item">
9
+                <text>来源:</text>
10
+                <text>{{ moreOptions.origin || '-' }}</text>
11
+            </view>
12
+            <view class="modal-item">
13
+                <text>实价:</text>
14
+                <text>¥{{ moreOptions.costPrice || '-' }}</text>
15
+            </view>
16
+            <view class="modal-item">
17
+                <text>型号:</text>
18
+                <text>{{ moreOptions.model || '-' }}</text>
19
+            </view>
20
+            <view class="modal-item">
21
+                <text>编码:</text>
22
+                <text>{{ moreOptions.indentifyCode || '-' }}</text>
23
+            </view>
24
+            <view class="modal-item">
25
+                <text>日期:</text>
26
+                <text>{{ recycleTimeFormatter(moreOptions.recycleTime) || '-' }}</text>
27
+            </view>
28
+            <view class="modal-item">
29
+                <text>备注:</text>
30
+                <text>{{ moreOptions.productDesc || '-' }}</text>
31
+            </view>
32
+        </div>
33
+    </u-modal>
34
+</template>
35
+
36
+<script>
37
+export default {
38
+    name: 'MoreInfo',
39
+    props: {
40
+        moreOptions: {
41
+            type: Object,
42
+            default: () => { }
43
+        }
44
+    },
45
+    data() {
46
+        return {
47
+            show: false,
48
+        }
49
+    },
50
+    methods: {
51
+        showMoreInfo() {
52
+            this.show = true;
53
+        },
54
+        recycleTimeFormatter(val) {
55
+            if (val) {
56
+                return this.$dayjs(val).format('YYYY-MM-DD HH:mm:ss')
57
+            }
58
+            return '-'
59
+        }
60
+    }
61
+}
62
+</script>
63
+
64
+<style lang="scss" scoped></style>

+ 24 - 1
pages/wareHouse/components/searchFilter.vue

@@ -29,6 +29,9 @@
29
             <u-form-item label="商品属性" labelWidth="70">
29
             <u-form-item label="商品属性" labelWidth="70">
30
                 <TabSelect :tabList="productAttributeList" :colNum="3" :echoInfo="formData.productAttribute" mode="multiple" @tabChange="handleTabChangeProductAttribute"></TabSelect>
30
                 <TabSelect :tabList="productAttributeList" :colNum="3" :echoInfo="formData.productAttribute" mode="multiple" @tabChange="handleTabChangeProductAttribute"></TabSelect>
31
             </u-form-item>
31
             </u-form-item>
32
+            <u-form-item label="是否入库" labelWidth="70">
33
+                <TabSelect :tabList="stockStatusList" :colNum="4" :echoInfo="formData.stockStatus" mode="single" @tabChange="handleTabChangeStockStatus"></TabSelect>
34
+            </u-form-item>
32
         </u--form>
35
         </u--form>
33
         <view class="btns">
36
         <view class="btns">
34
             <u-button text="重置" @click="resetForm"></u-button>
37
             <u-button text="重置" @click="resetForm"></u-button>
@@ -66,6 +69,7 @@ export default {
66
                 identifyingPerson:'',
69
                 identifyingPerson:'',
67
                 identifyingPersonId: '',
70
                 identifyingPersonId: '',
68
                 productAttribute: [],
71
                 productAttribute: [],
72
+                stockStatus: '',
69
             },
73
             },
70
             recycleTimeDefault: new Date().getTime(),
74
             recycleTimeDefault: new Date().getTime(),
71
             recycleTimeShow: false,
75
             recycleTimeShow: false,
@@ -88,6 +92,21 @@ export default {
88
                     value: '4',
92
                     value: '4',
89
                 },
93
                 },
90
             ],
94
             ],
95
+            stockStatusList: [
96
+                {
97
+                    name: '全部',
98
+                    value: '',
99
+                },
100
+                {
101
+                    name: '待入库',
102
+                    value: '0',
103
+                },
104
+                {
105
+                    name: '已入库',
106
+                    value: '1',
107
+                },
108
+
109
+            ],
91
         }
110
         }
92
     },
111
     },
93
     props: {
112
     props: {
@@ -110,7 +129,8 @@ export default {
110
                 recyclePersonId: '',
129
                 recyclePersonId: '',
111
                 identifyingPerson:'',
130
                 identifyingPerson:'',
112
                 identifyingPersonId: '',
131
                 identifyingPersonId: '',
113
-                productAttribute: '',
132
+                productAttribute: [],
133
+                stockStatus: '',
114
             };
134
             };
115
             this.recycleTimeDefault = new Date().getTime();
135
             this.recycleTimeDefault = new Date().getTime();
116
         },
136
         },
@@ -173,6 +193,9 @@ export default {
173
         handleTabChangeProductAttribute(e) {
193
         handleTabChangeProductAttribute(e) {
174
             this.formData.productAttribute = e;
194
             this.formData.productAttribute = e;
175
         },
195
         },
196
+        handleTabChangeStockStatus(e) {
197
+            this.formData.stockStatus = e;
198
+        },
176
     }
199
     }
177
 }
200
 }
178
 </script>
201
 </script>

binární
pages/wareHouse/imgs/1.jpg


+ 31 - 13
pages/wareHouse/index.vue

@@ -59,7 +59,7 @@
59
 			</view>
59
 			</view>
60
 
60
 
61
 			<scroll-view class="goods-list" scroll-y @scrolltolower="handleLoadMore" enable-back-to-top>
61
 			<scroll-view class="goods-list" scroll-y @scrolltolower="handleLoadMore" enable-back-to-top>
62
-				<view @click="handleToDetail(goods)" class="goods-item" v-for="(goods, goodsIndex) in goodsList" :key="`goods-${goodsIndex}`">
62
+				<view @click="clickItem(goods)" class="goods-item" v-for="(goods, goodsIndex) in goodsList" :key="`goods-${goodsIndex}`">
63
 					<view class="goods-img-container">
63
 					<view class="goods-img-container">
64
 						<image class="goods-img" :src="goods.imgUrl ? goods.imgUrl : '/static/no-img.png'" mode="aspectFill" lazy-load></image>
64
 						<image class="goods-img" :src="goods.imgUrl ? goods.imgUrl : '/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
 						<!-- <image class="goods-img" src="/static/no-img.png" mode="aspectFill" lazy-load></image> -->
@@ -100,28 +100,26 @@
100
 						</view> -->
100
 						</view> -->
101
 					</view>
101
 					</view>
102
 					<view class="more">
102
 					<view class="more">
103
-						<view></view>
104
-						<!-- <u-icon name="more-dot-fill" size="16" color="#666666"></u-icon> -->
103
+						<u-icon name="more-dot-fill" size="16" color="#666666" @click="showMoreOptions(goods)"></u-icon>
105
 						<text class="goods-stock">数量:{{ goods.stock}}</text>
104
 						<text class="goods-stock">数量:{{ goods.stock}}</text>
106
 					</view>
105
 					</view>
107
 				</view>
106
 				</view>
108
-				<show-emtry v-if="goodsList.length === 0"></show-emtry>
109
 			</scroll-view>
107
 			</scroll-view>
110
-			
111
 		</view>
108
 		</view>
112
 		<!-- 添加按钮 -->
109
 		<!-- 添加按钮 -->
113
-		<view class="add-button" @click="handleAdd">
110
+		<view class="add-button" @click="handleEdit">
114
 			<u-icon name="plus" size="36" color="#ffffff"></u-icon>
111
 			<u-icon name="plus" size="36" color="#ffffff"></u-icon>
115
 		</view>
112
 		</view>
113
+		<!-- <moreInfo ref="moreInfoRef" :moreOptions="moreOptions"></moreInfo> -->
116
 	</view>
114
 	</view>
117
-	
118
 </template>
115
 </template>
119
-
120
 <script>
116
 <script>
121
 	import searchFilter from './components/searchFilter.vue'
117
 	import searchFilter from './components/searchFilter.vue'
118
+	import moreInfo from './components/moreInfo.vue'
122
 export default {
119
 export default {
123
 	components: {
120
 	components: {
124
 		searchFilter,
121
 		searchFilter,
122
+		moreInfo,
125
 	},
123
 	},
126
 	data() {
124
 	data() {
127
 		return {
125
 		return {
@@ -188,13 +186,19 @@ export default {
188
 			]],
186
 			]],
189
 			priceVisible:true,
187
 			priceVisible:true,
190
 			searchPopShow:false,
188
 			searchPopShow:false,
191
-			total:0
189
+			total:0,
190
+			moreOptions:{},
191
+			moreOptionsShow:false,	
192
 		};
192
 		};
193
 	},
193
 	},
194
 	onLoad() {
194
 	onLoad() {
195
 		this.getTypeList();
195
 		this.getTypeList();
196
 	},
196
 	},
197
 	methods: {
197
 	methods: {
198
+		showMoreOptions(goods){
199
+			this.moreOptions = goods;
200
+			this.$refs.moreInfoRef.showMoreInfo();
201
+		},
198
 		getTypeList(){
202
 		getTypeList(){
199
             this.$getDicts("crm_form_category").then(res => {
203
             this.$getDicts("crm_form_category").then(res => {
200
                 this.tabList = [...res]
204
                 this.tabList = [...res]
@@ -250,15 +254,29 @@ export default {
250
 			this.type = item.dictValue;
254
 			this.type = item.dictValue;
251
 			this.handleSearch();
255
 			this.handleSearch();
252
 		},
256
 		},
257
+		clickItem(item){
258
+			// 如果是待入库商品,点击后跳转到添加页面补全信息
259
+			if(item.stockStatus === '0'){
260
+				this.handleEdit(item)
261
+			}else{
262
+				this.handleToDetail(item);
263
+			}
264
+		},
253
 		handleToDetail(item) {
265
 		handleToDetail(item) {
254
 			uni.navigateTo({
266
 			uni.navigateTo({
255
 				url: `/pages/wareHouse/components/detail?id=${item.id}`,
267
 				url: `/pages/wareHouse/components/detail?id=${item.id}`,
256
 			});
268
 			});
257
 		},
269
 		},
258
-		handleAdd() {
259
-			uni.navigateTo({
260
-				url: `/pages/wareHouse/components/add`
261
-			});
270
+		handleEdit(item) {
271
+			if(item.id){
272
+				uni.navigateTo({
273
+					url: `/pages/wareHouse/components/edit?formType=edit&id=${item.id}`
274
+				});
275
+			}else{
276
+				uni.navigateTo({
277
+					url: `/pages/wareHouse/components/edit?formType=add`
278
+				});
279
+			}
262
 		},
280
 		},
263
 		// 获取仓库卡片数据
281
 		// 获取仓库卡片数据
264
 		getCard() {
282
 		getCard() {

+ 22 - 6
pages/wareHouse/styles/detail.scss

@@ -114,11 +114,15 @@
114
         right: 0;
114
         right: 0;
115
         height: 120rpx;
115
         height: 120rpx;
116
         background-color: #fff;
116
         background-color: #fff;
117
-        display: flex;
118
-        align-items: center;
119
-        justify-content: space-around;
117
+        display: grid;
118
+        padding-right:10rpx;
120
         box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
119
         box-shadow: 0 -2rpx 10rpx rgba(0, 0, 0, 0.1);
121
-        
120
+        &.fourPart{
121
+            grid-template-columns: 1fr 1fr 1fr 1fr;
122
+        }
123
+        &.fivePart{
124
+            grid-template-columns: 1fr 1fr 1fr 1.5fr 1fr;
125
+        }
122
         .bar_item{
126
         .bar_item{
123
             flex: 1;
127
             flex: 1;
124
             height: 100%;
128
             height: 100%;
@@ -133,14 +137,26 @@
133
                 gap: 8rpx;
137
                 gap: 8rpx;
134
                 padding: 14rpx 22rpx;
138
                 padding: 14rpx 22rpx;
135
                 border-radius: 20rpx;
139
                 border-radius: 20rpx;
136
-                background-color: #ca8a04;
137
-                box-shadow: 0 10px 15px -3px #fef08a, 0 4px 6px -4px #fef08a;
140
+                height:46rpx;
138
                 .bar_text{
141
                 .bar_text{
139
                     margin-top: 0;
142
                     margin-top: 0;
140
                     color: #ffffff;
143
                     color: #ffffff;
141
                     font-size: 23rpx;
144
                     font-size: 23rpx;
142
                 }
145
                 }
143
             }
146
             }
147
+            .orange{
148
+                background-color: #ca8a04;
149
+                box-shadow: 0 10px 15px -3px #fef08a, 0 4px 6px -4px #fef08a;
150
+            }
151
+
152
+            .blue{
153
+                background-color: #007bff;
154
+                box-shadow: 0 10px 15px -3px #93c5fd, 0 4px 6px -4px #93c5fd;
155
+                .bar_img{
156
+                    width: 34rpx;
157
+                    height: 40rpx;
158
+                }
159
+            }
144
             
160
             
145
             .bar_text{
161
             .bar_text{
146
                 margin-top: 8rpx;
162
                 margin-top: 8rpx;

+ 3 - 1
pages/wareHouse/styles/add.scss

@@ -32,12 +32,14 @@
32
     bottom: 0;
32
     bottom: 0;
33
     padding: 20rpx;
33
     padding: 20rpx;
34
     display: grid;
34
     display: grid;
35
-    grid-template-columns: 1fr 1fr;
36
     gap: 10px;
35
     gap: 10px;
37
     box-shadow: 0 4px 25px 2px rgba(0, 0, 0, 0.1);
36
     box-shadow: 0 4px 25px 2px rgba(0, 0, 0, 0.1);
38
     background: #fff;
37
     background: #fff;
39
     z-index: 1;
38
     z-index: 1;
40
     width:fill-available;
39
     width:fill-available;
40
+    &.col-2{
41
+        grid-template-columns: 1fr 1fr;
42
+    }
41
 }
43
 }
42
 
44
 
43
 ::v-deep .u-form-item {
45
 ::v-deep .u-form-item {

binární
static/icons/stockIn.png


+ 2 - 2
store/modules/user.js

@@ -28,8 +28,8 @@ export default {
28
 		netConfig: {
28
 		netConfig: {
29
 			// http://59.42.9.166:9520/proxy
29
 			// http://59.42.9.166:9520/proxy
30
 			// http://10.0.7.100:9500
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
 			// ip : "/api", // 测试环境ip
33
 			// ip : "/api", // 测试环境ip
34
 			// ip : "http://47.113.184.101", // 测试环境ip
34
 			// ip : "http://47.113.184.101", // 测试环境ip
35
 			// ip: "http://172.16.7.200", // ip
35
 			// ip: "http://172.16.7.200", // ip