优化调整报修完结物品查询

This commit is contained in:
905166056 2021-04-22 17:15:07 +08:00
parent 1d69fc35f7
commit 80231931b7
3 changed files with 25 additions and 17 deletions

View File

@ -191,8 +191,8 @@ export function finishRepair(_that){
msg = "请选择商品类型"; msg = "请选择商品类型";
}else if (_data.useNumber < 1){ }else if (_data.useNumber < 1){
msg = "商品数量不能为零"; msg = "商品数量不能为零";
}else if (_data.useNumber > _that.goods.stock){ // }else if (_data.useNumber > _that.goods.stock){
msg = "库存不足"; // msg = "库存不足";
}else if (!_data.isCustom && !_data.conditions.resId){ }else if (!_data.isCustom && !_data.conditions.resId){
msg = "请选择商品"; msg = "请选择商品";
}else if (_data.isCustom && !_data.customGoodsName){ }else if (_data.isCustom && !_data.customGoodsName){

View File

@ -78,8 +78,10 @@ export default {
uploadVideo: baseUrl + "callComponent/upload/uploadVedio/upload", uploadVideo: baseUrl + "callComponent/upload/uploadVedio/upload",
queryRoomRenovationRecordDetail: baseUrl + "app/roomRenovation/queryRoomRenovationRecordDetail", queryRoomRenovationRecordDetail: baseUrl + "app/roomRenovation/queryRoomRenovationRecordDetail",
// 报修相关信息(维修类型/状态/商品类型... // 报修相关信息(维修类型/状态/商品类型...
queryRepairInfo: baseUrl + "callComponent/core/list", // queryRepairInfo: baseUrl + "callComponent/core/list",
queryResourceStoreResName: baseUrl + "app/resourceStore/queryResourceStoreResName", queryRepairInfo: baseUrl + "callComponent/resourceStoreTypeManage/list",
// queryResourceStoreResName: baseUrl + "app/resourceStore/queryResourceStoreResName",
queryResourceStoreResName: baseUrl + "callComponent/resourceStore.listUserStorehouses",
// 查询费用项(水电部分) // 查询费用项(水电部分)
queryFeeTypesItems: baseUrl + "callComponent/roomCreateFeeAdd/list", queryFeeTypesItems: baseUrl + "callComponent/roomCreateFeeAdd/list",
queryPreMeterWater: baseUrl + "app/meterWater/queryPreMeterWater", queryPreMeterWater: baseUrl + "app/meterWater/queryPreMeterWater",

View File

@ -272,12 +272,15 @@
_loadRepairGoodsType: function(){ _loadRepairGoodsType: function(){
let _that = this; let _that = this;
let _data = { let _data = {
name: "resource_store", // name: "resource_store",
type: "goods_type" // type: "goods_type"
page: 1,
row: 100,
communityId: this.factory.getCurrentCommunity().communityId,
}; };
queryRepairInfo(this, _data) queryRepairInfo(this, _data)
.then(function(res) { .then(function(res) {
_that.goodsTypeCloums = _that.goodsTypeCloums.concat(res); _that.goodsTypeCloums = _that.goodsTypeCloums.concat(res.data);
}); });
}, },
@ -285,7 +288,10 @@
let _that = this; let _that = this;
let _data = { let _data = {
resId: "", resId: "",
goodsType: this.goodsType goodsType: this.goodsType,
page: 1,
row: 100,
communityId: this.factory.getCurrentCommunity().communityId,
}; };
queryResourceStoreResName(this, _data) queryResourceStoreResName(this, _data)
.then(function(res) { .then(function(res) {
@ -307,7 +313,7 @@
} }
_that.goodsCloums = _that.goodsCloums.concat(_data); _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: '自定义'}]); _that.goodsCloums = _that.goodsCloums.concat([{resName: '自定义'}]);
} }
}); });
@ -341,7 +347,7 @@
return; return;
} }
let selected = this.goodsTypeCloums[this.goodsTypeIndex] // let selected = this.goodsTypeCloums[this.goodsTypeIndex] //
this.goodsType = selected.statusCd //id this.goodsType = selected.goodsType //id
this._loadRepairGoods(); this._loadRepairGoods();
}, },
@ -391,13 +397,13 @@
}, },
numInc: function(){ numInc: function(){
if(this.useNumber >= this.goods.stock){ // if(this.useNumber >= this.goods.stock){
uni.showToast({ // uni.showToast({
title: '库存不足', // title: '',
icon: 'none' // icon: 'none'
}) // })
return; // return;
} // }
this.useNumber += 1; this.useNumber += 1;
this._updateTotalAmount(); this._updateTotalAmount();
}, },