|
|
@@ -297,6 +297,37 @@ export default {
|
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
// this.$forceUpdate();
|
|
|
},
|
|
|
+
|
|
|
+ addCustomNumEvent(item,params1) {
|
|
|
+ const list = this.selectList;
|
|
|
+
|
|
|
+ // if (!has) {}
|
|
|
+ let info = { classId: item.classId, id: item.id };
|
|
|
+
|
|
|
+ const classInfo =
|
|
|
+ this.productInfo &&
|
|
|
+ this.productInfo.find(element => {
|
|
|
+ return element.classId == item.classId && element.child;
|
|
|
+ });
|
|
|
+ if (classInfo) {
|
|
|
+ info = classInfo.child.find(ele => {
|
|
|
+ return ele.id == item.id;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ let params = {
|
|
|
+ ...info,
|
|
|
+ bigCount: 0, //扎数
|
|
|
+ smallCount: 0, //支数
|
|
|
+ autoPrice: 0 //调价价格
|
|
|
+ };
|
|
|
+ list.push(params);
|
|
|
+ this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
+ this.$nextTick(()=>{
|
|
|
+ this.customNum(params1)
|
|
|
+ })
|
|
|
+ // this.$forceUpdate();
|
|
|
+ },
|
|
|
/**
|
|
|
* 减去商品
|
|
|
*/
|
|
|
@@ -358,6 +389,11 @@ export default {
|
|
|
this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
// this.$forceUpdate();
|
|
|
},
|
|
|
+ //减去所有商品
|
|
|
+ delAllEvent(item) {
|
|
|
+ const list = [];
|
|
|
+ this.setSelectInfoByType({ type: this.pageType, info: list });
|
|
|
+ },
|
|
|
// /**
|
|
|
// * 删除商品
|
|
|
// */
|