From 80231931b738332c8b4f334225611a7effb6f0d4 Mon Sep 17 00:00:00 2001 From: 905166056 <905166056@qq.com> Date: Thu, 22 Apr 2021 17:15:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B0=83=E6=95=B4=E6=8A=A5?= =?UTF-8?q?=E4=BF=AE=E5=AE=8C=E7=BB=93=E7=89=A9=E5=93=81=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/repair/repair.js | 4 ++-- constant/url.js | 6 ++++-- pages/repairHandle/repairHandle.vue | 32 +++++++++++++++++------------ 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/api/repair/repair.js b/api/repair/repair.js index 5c27d4d..38c6f56 100644 --- a/api/repair/repair.js +++ b/api/repair/repair.js @@ -191,8 +191,8 @@ export function finishRepair(_that){ msg = "请选择商品类型"; }else if (_data.useNumber < 1){ msg = "商品数量不能为零"; - }else if (_data.useNumber > _that.goods.stock){ - msg = "库存不足"; + // }else if (_data.useNumber > _that.goods.stock){ + // msg = "库存不足"; }else if (!_data.isCustom && !_data.conditions.resId){ msg = "请选择商品"; }else if (_data.isCustom && !_data.customGoodsName){ diff --git a/constant/url.js b/constant/url.js index 67e2540..6dfaee5 100644 --- a/constant/url.js +++ b/constant/url.js @@ -78,8 +78,10 @@ export default { uploadVideo: baseUrl + "callComponent/upload/uploadVedio/upload", queryRoomRenovationRecordDetail: baseUrl + "app/roomRenovation/queryRoomRenovationRecordDetail", // 报修相关信息(维修类型/状态/商品类型...) - queryRepairInfo: baseUrl + "callComponent/core/list", - queryResourceStoreResName: baseUrl + "app/resourceStore/queryResourceStoreResName", + // queryRepairInfo: baseUrl + "callComponent/core/list", + queryRepairInfo: baseUrl + "callComponent/resourceStoreTypeManage/list", + // queryResourceStoreResName: baseUrl + "app/resourceStore/queryResourceStoreResName", + queryResourceStoreResName: baseUrl + "callComponent/resourceStore.listUserStorehouses", // 查询费用项(水电部分) queryFeeTypesItems: baseUrl + "callComponent/roomCreateFeeAdd/list", queryPreMeterWater: baseUrl + "app/meterWater/queryPreMeterWater", diff --git a/pages/repairHandle/repairHandle.vue b/pages/repairHandle/repairHandle.vue index 75171f3..b5cd15e 100644 --- a/pages/repairHandle/repairHandle.vue +++ b/pages/repairHandle/repairHandle.vue @@ -272,12 +272,15 @@ _loadRepairGoodsType: function(){ let _that = this; let _data = { - name: "resource_store", - type: "goods_type" + // name: "resource_store", + // type: "goods_type" + page: 1, + row: 100, + communityId: this.factory.getCurrentCommunity().communityId, }; queryRepairInfo(this, _data) .then(function(res) { - _that.goodsTypeCloums = _that.goodsTypeCloums.concat(res); + _that.goodsTypeCloums = _that.goodsTypeCloums.concat(res.data); }); }, @@ -285,7 +288,10 @@ let _that = this; let _data = { resId: "", - goodsType: this.goodsType + goodsType: this.goodsType, + page: 1, + row: 100, + communityId: this.factory.getCurrentCommunity().communityId, }; queryResourceStoreResName(this, _data) .then(function(res) { @@ -307,7 +313,7 @@ } _that.goodsCloums = _that.goodsCloums.concat(_data); // 如果是“其他类” 追加 “自定义” 选项 - if(_that.goodsTypeCloums[_that.goodsTypeIndex].statusCd == '1003'){ + if(_that.goodsTypeCloums[_that.goodsTypeIndex].goodsType == '1003'){ _that.goodsCloums = _that.goodsCloums.concat([{resName: '自定义'}]); } }); @@ -341,7 +347,7 @@ return; } let selected = this.goodsTypeCloums[this.goodsTypeIndex] //获取选中的数组 - this.goodsType = selected.statusCd //选中的id + this.goodsType = selected.goodsType //选中的id this._loadRepairGoods(); }, @@ -391,13 +397,13 @@ }, numInc: function(){ - if(this.useNumber >= this.goods.stock){ - uni.showToast({ - title: '库存不足', - icon: 'none' - }) - return; - } + // if(this.useNumber >= this.goods.stock){ + // uni.showToast({ + // title: '库存不足', + // icon: 'none' + // }) + // return; + // } this.useNumber += 1; this._updateTotalAmount(); },