diff --git a/pages/stock/list.vue b/pages/stock/list.vue index 5a69ffb..51174d7 100644 --- a/pages/stock/list.vue +++ b/pages/stock/list.vue @@ -207,6 +207,8 @@ export default{ this.detail=e if(this.formData.substanceType==1){ this.fields.number.suffix=(e.specDescribe.match(/\/(.+)/)||['',''])[1] + }else{ + this.fields.number.suffix="kg" } this.formData.goodsId=e.id }) @@ -216,7 +218,8 @@ export default{ async init(){ var res=await request("/common/api/dict/queryDictItemByDictCode",{ method:"post", - params:{dictCode: ({out:"out_type",in:"in_type"})[this.mode]} + //农产品前面加上product_ + params: {dictCode: (this.formData.substanceType=="2"?"product_":"")+({out:"out_type",in:"in_type"})[this.mode]} }) if(res.statu){ this.fields.inOutType.columns=[res.data] diff --git a/pages/stock/prodWarehouse.vue b/pages/stock/prodWarehouse.vue index 12ec6c6..ca05039 100644 --- a/pages/stock/prodWarehouse.vue +++ b/pages/stock/prodWarehouse.vue @@ -71,7 +71,7 @@ export default { //入库类型 var res=await request("/common/api/dict/queryDictItemByDictCode",{ method:"post", - params:{dictCode:"in_type"} + params:{dictCode:"product_in_type"} }) if(res.statu){ this.fields.inOutType.columns=[res.data]