瀏覽代碼

修改数量

shish 6 月之前
父節點
當前提交
489b3b916b
共有 1 個文件被更改,包括 12 次插入1 次删除
  1. 12 1
      hdApp/src/pagesPurchase/xj.vue

+ 12 - 1
hdApp/src/pagesPurchase/xj.vue

@@ -98,7 +98,18 @@ export default {
 			})
 		},
 		confirmClearXj(){
-			uni.removeStorageSync("ghsColorItem"+this.option.ghsId)
+
+            let saveInfo = uni.getStorageSync("ghsColorItem"+this.option.ghsId)
+            let ptItemId = this.option.ptItemId ? this.option.ptItemId : 0
+            if (!this.$util.isEmpty(saveInfo)) {
+				saveInfo.forEach((colorItem, colorIndex) => {
+					if (colorItem.ptItemId == ptItemId) {
+						saveInfo.splice(colorIndex, 1)
+					}
+				})
+				uni.setStorageSync("ghsColorItem"+this.option.ghsId, saveInfo)
+            }
+
 			if(!this.$util.isEmpty(this.numList)){
 				this.numList.forEach((item,index,arr)=>{
 					arr[index]=''