|
|
@@ -159,6 +159,7 @@ export default {
|
|
|
// },
|
|
|
],
|
|
|
isModel: false,
|
|
|
+ offVerifyRepertory: true,
|
|
|
isSmallCount:false,//是否是小单位(支)
|
|
|
customData: {
|
|
|
bigCount: 0,
|
|
|
@@ -199,33 +200,29 @@ export default {
|
|
|
if (val.index === 0) {
|
|
|
this.modalCancel();
|
|
|
} else {
|
|
|
- const {
|
|
|
- bigCount,
|
|
|
- smallCount,
|
|
|
- bigNum,
|
|
|
- bigUnit,
|
|
|
- smallNum,
|
|
|
- smallUnit,
|
|
|
- ratio
|
|
|
- } = this.customData;
|
|
|
- const ratioNum = Number(ratio);
|
|
|
-
|
|
|
- //超过库存时 设置为库存最大值
|
|
|
- if (
|
|
|
- Number(bigCount) * ratioNum + Number(smallCount) >
|
|
|
- Number(bigNum) * ratioNum + Number(smallNum)
|
|
|
- ) {
|
|
|
- uni.showToast({
|
|
|
- title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,
|
|
|
- icon: "none"
|
|
|
- });
|
|
|
- this.customData.bigCount = 0;
|
|
|
- this.customData.smallCount = 0;
|
|
|
- this.delAllEvent(this.customData)
|
|
|
- } else {
|
|
|
- this.updateItemEvent(this.customData);
|
|
|
- this.modalCancel();
|
|
|
- }
|
|
|
+ this.updateItemEvent(this.customData);
|
|
|
+ this.modalCancel();
|
|
|
+ // const {
|
|
|
+ // bigCount,
|
|
|
+ // smallCount,
|
|
|
+ // bigNum,
|
|
|
+ // bigUnit,
|
|
|
+ // smallNum,
|
|
|
+ // smallUnit,
|
|
|
+ // ratio
|
|
|
+ // } = this.customData;
|
|
|
+ // const ratioNum = Number(ratio);
|
|
|
+ //
|
|
|
+ // //超过库存时 设置为库存最大值
|
|
|
+ // if (Number(bigCount) * ratioNum + Number(smallCount) > Number(bigNum) * ratioNum + Number(smallNum)) {
|
|
|
+ // uni.showToast({title: `库存只有${bigNum}${bigUnit}${smallNum}${smallUnit}`,icon: "none"});
|
|
|
+ // this.customData.bigCount = 0;
|
|
|
+ // this.customData.smallCount = 0;
|
|
|
+ // this.delAllEvent(this.customData)
|
|
|
+ // } else {
|
|
|
+ // this.updateItemEvent(this.customData);
|
|
|
+ // this.modalCancel();
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
|