diff --git a/canteen/common/http.interceptor.js b/canteen/common/http.interceptor.js index 626c332..c8274e5 100644 --- a/canteen/common/http.interceptor.js +++ b/canteen/common/http.interceptor.js @@ -34,7 +34,7 @@ const install = (Vue, vm) => { } else if (res.code == 9999) { vm.$redirectToLogin('登录超时, 请重新登录'); return false; - }else { + } else { vm.$msg(res.msg); return false; } diff --git a/canteen/pages/classification/warehouse.vue b/canteen/pages/classification/warehouse.vue index 06dc6cd..0321a70 100644 --- a/canteen/pages/classification/warehouse.vue +++ b/canteen/pages/classification/warehouse.vue @@ -16,6 +16,7 @@ {{ item.material_name }}·{{ item.spec_name }} 批次号:{{ item.batch_sn }} + 入库时间:{{ item.in_warehouse_time }} diff --git a/canteen/pages/delivery/apply.vue b/canteen/pages/delivery/apply.vue index 0ebf0cb..ba654aa 100644 --- a/canteen/pages/delivery/apply.vue +++ b/canteen/pages/delivery/apply.vue @@ -166,21 +166,46 @@ // 保存,出库 save(_t){ console.log("dddddd", this.contents) + // return if(this.contents.length <= 0) { return this.$msg('您未选择物资') } - let list = this.contents.map(item => { - return { - m_id: item.material_id, - m_spec_id: item.spec_id, - purchase_id: item.purchase_id, - out_number: Number(item.delivery_number.value) || 1, - warehouse_id: item.order_id || 0, - tax_price: item.tax_price || '', // TODO 添加物资页面未返回价格,默认空 - non_tax_price: item.non_tax_price || '', - m_unit_id: item.m_unit_id || 0 + + var list = [] + for(var i;i< this.contents.length;i++) { + console.log('出库数量') + return + if(Number(this.contents[i].delivery_number.value) > this.contents[i].stock) { + this.$msg('库存数不足'+this.contents[i].stock) + return } - }); + list.push({ + m_id: this.contents[i].material_id, + m_spec_id: this.contents[i].spec_id, + purchase_id: this.contents[i].purchase_id, + out_number: Number(this.contents[i].delivery_number.value) || 1, + warehouse_id: this.contents[i].order_id || 0, + tax_price: this.contents[i].tax_price || '', // TODO 添加物资页面未返回价格,默认空 + non_tax_price: this.contents[i].non_tax_price || '', + m_unit_id: this.contents[i].m_unit_id || 0 + }) + } + // let list = this.contents.map(item => { + // if(Number(item.delivery_number.value) > item.stock) { + // this.$msg('库存数不足'+item.stock) + // return + // } + // return { + // m_id: item.material_id, + // m_spec_id: item.spec_id, + // purchase_id: item.purchase_id, + // out_number: Number(item.delivery_number.value) || 1, + // warehouse_id: item.order_id || 0, + // tax_price: item.tax_price || '', // TODO 添加物资页面未返回价格,默认空 + // non_tax_price: item.non_tax_price || '', + // m_unit_id: item.m_unit_id || 0 + // } + // }); console.log('==========',list) let _api = this.API.API_CANTEEN_WAREHOUSEOUT; diff --git a/canteen/pages/delivery/detail.vue b/canteen/pages/delivery/detail.vue index 8f02dc1..1a1547d 100644 --- a/canteen/pages/delivery/detail.vue +++ b/canteen/pages/delivery/detail.vue @@ -1,9 +1,9 @@