|
@@ -37,12 +37,12 @@
|
|
|
<span style="color:#888;font-size: 14px;margin-left: 10px">装箱数:{{selectProduct.packqty}}</span>
|
|
|
<span style="color:#888;font-size: 14px;margin-left: 10px">库存:
|
|
|
<template v-if="usertype === 0 || usertype === 1">
|
|
|
- <span>{{ selectProduct.cansaleqty }}</span>
|
|
|
+ <span>{{ stockData.invbal_qty }}</span>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <span v-if="selectProduct.stockstatus === '紧缺'" style="color: red">{{selectProduct.stockstatus}}</span>
|
|
|
- <span v-else-if="selectProduct.stockstatus === '充足'" style="color: green">{{selectProduct.stockstatus}}</span>
|
|
|
- <span v-else>{{selectProduct.stockstatus}}</span>
|
|
|
+ <span v-if="stockData.stockstatus === '紧缺'" style="color: red">{{stockData.stockstatus}}</span>
|
|
|
+ <span v-else-if="stockData.stockstatus === '充足'" style="color: green">{{stockData.stockstatus}}</span>
|
|
|
+ <span v-else>{{stockData.stockstatus}}</span>
|
|
|
</template>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -133,6 +133,7 @@ export default {
|
|
|
actTradefield:'',
|
|
|
usertype:"",
|
|
|
length:"",
|
|
|
+ stockData:'',
|
|
|
param: {
|
|
|
"id": "20230629154503",
|
|
|
"content": {
|
|
@@ -171,6 +172,7 @@ export default {
|
|
|
this.actTradefield = this.detail?this.detail[0].tradefield?this.detail[0].tradefield[0].tradefield:'':''
|
|
|
this.count = this.detail[0].orderminqty*/
|
|
|
this.queryDetail(res.data[0].itemid)
|
|
|
+ this.queryStock(res.data[0].itemid)
|
|
|
},
|
|
|
async queryDetail(itemid){
|
|
|
if (this.$route.query.sys_enterpriseid){
|
|
@@ -209,6 +211,16 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ /*查询库存状态*/
|
|
|
+ async queryStock(id){
|
|
|
+ const res = await this.$api.requested({
|
|
|
+ "id": 20220923155302,
|
|
|
+ "content": {
|
|
|
+ "itemid":id
|
|
|
+ },
|
|
|
+ })
|
|
|
+ this.stockData = res.data
|
|
|
+ },
|
|
|
countChange (num) {
|
|
|
this.count = num
|
|
|
},
|
|
@@ -235,6 +247,7 @@ export default {
|
|
|
this.count = data.orderminqty*/
|
|
|
console.log(this.count)
|
|
|
this.queryDetail(data.itemid)
|
|
|
+ this.queryStock(data.itemid)
|
|
|
},
|
|
|
|
|
|
async addCart () {
|