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

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 = "请选择商品类型";
}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){

View File

@ -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",

View File

@ -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();
},