@@ -185,7 +185,13 @@ export default {
},
changeCustomerFn(info) {
+ console.log(info,'this.form')
+ const product = this.selectList.map(ele => {
+ return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
+ });
let params = {
+ customId:info.id,
+ product:JSON.stringify(product),
province: info.province,
city:info.city,
address:info.address,
@@ -88,6 +88,10 @@ export default {
type: Boolean,
default: false
+ offVerifyRepertory: {
+ type: Boolean,
+ default: false
+ },
data() {
return {
@@ -143,6 +147,14 @@ export default {
}
addEvents() {
+ const ratio = Number(this.info.ratio);
+ if(this.offVerifyRepertory){
+ if (Number(this.bigCount) * ratio + Number(this.smallCount) >Number(this.info.bigNum) * ratio + Number(this.info.smallNum)) {
+ this.$msg("库存不足");
+ return
+ }
+
this.animationFun('add');
// let params = {
// ...this.info,
@@ -48,6 +48,7 @@
>
<Commondity
:info="productItem"
+ :offVerifyRepertory="true"
:bigCount="
getSelectItemById(productItem.id, classItem.classId).bigCount
"