|
|
@@ -52,7 +52,7 @@
|
|
|
import { mapGetters } from "vuex";
|
|
|
import { getSonList,delMsItem } from "@/api/item"
|
|
|
import { batchChangePrice } from '@/api/product'
|
|
|
- import { checkOrderApi } from "@/api/inventory";
|
|
|
+ import { sendItemStock } from "@/api/inventory";
|
|
|
export default {
|
|
|
name: "sendStock",
|
|
|
components: {
|
|
|
@@ -176,7 +176,10 @@
|
|
|
this.$msg('请填写数量和价格')
|
|
|
return false
|
|
|
}
|
|
|
-
|
|
|
+ if(this.remain<0){
|
|
|
+ this.$msg('超过库存总数量')
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.$util.confirmModal({content:'确认分配?'},() => {
|
|
|
uni.showLoading({mask:true})
|
|
|
let jsonPriceList = JSON.stringify(priceList);
|
|
|
@@ -185,7 +188,7 @@
|
|
|
|
|
|
let jsonStock = JSON.stringify(stockList);
|
|
|
let name = this.option.name ? this.option.name : ''
|
|
|
- checkOrderApi({changeType:'add',pdType:'',itemInfo:jsonStock,remark:name+'分配增加库存'}).then(res => {
|
|
|
+ sendItemStock({pdType:'',itemInfo:jsonStock,remark:name+'分配增加库存'}).then(res => {
|
|
|
if(res.code == 1){
|
|
|
this.$msg(res.msg)
|
|
|
setTimeout(function(){
|