mirror of
https://gitee.com/java110/PropertyApp.git
synced 2026-02-23 21:36:39 +08:00
优化调整报修完结物品查询
This commit is contained in:
parent
1d69fc35f7
commit
80231931b7
@ -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){
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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();
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user