diff --git a/package1/AI/AIHangOrderList.vue b/package1/AI/AIHangOrderList.vue index 0fea9ce..42b9438 100644 --- a/package1/AI/AIHangOrderList.vue +++ b/package1/AI/AIHangOrderList.vue @@ -77,6 +77,10 @@ 删除 + + + 未入库规格不显示 + @@ -262,6 +266,7 @@ voiceText: ' ', list: [], value: '', + isInventory:true, temporaryNum: 0, goodsDetail: [], attrNameList: [], @@ -445,6 +450,10 @@ } } }, + //AI挂单,无库存不显示radio,所有颜色所有尺码,无库存太多删除麻烦 + invenRadio(){ + this.isInventory = !this.isInventory + }, //扫一扫功能 scanCodeAdd(item) { let that = this; @@ -815,7 +824,19 @@ let newSaleDetailDTOList = [] let num = 0 for(let m = 0; m < item.saleDetailDTOList[i].stockLogList1.length; m++){ - if(item.saleDetailDTOList[i].stockLogList1[m].stockCount != null){ + if(this.isInventory == true && item.aiFlag != "0"){ + if(item.saleDetailDTOList[i].stockLogList1[m].stockCount != null){ + if(attrMap.has(item.saleDetailDTOList[i].stockLogList1[m].attributeList) == true){ + let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList) + newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount].productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount) + }else{ + item.saleDetailDTOList[i].stockLogList1[m].name = this.sliceMsg(item.saleDetailDTOList[i].stockLogList1[m].attributeList) + newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m]) + attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList,num) + num++ + } + } + }else{ if(attrMap.has(item.saleDetailDTOList[i].stockLogList1[m].attributeList) == true){ let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList) newSaleDetailDTOList[hasCount].productCount = Number(newSaleDetailDTOList[hasCount].productCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount) @@ -827,6 +848,7 @@ } } + } if(newSaleDetailDTOList.length != 0){ diff --git a/package1/AI/AiChat.vue b/package1/AI/AiChat.vue index 032aa90..88c3f7e 100644 --- a/package1/AI/AiChat.vue +++ b/package1/AI/AiChat.vue @@ -137,9 +137,9 @@ convertChineseToArabic(str) { const chineseNumToArabic = { '零': 0, '一': 1, '二': 2, '两': 2, '三': 3, - '四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9,'杠':'-','刚':'-' + '四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9,'杠':'-','刚':'-','军色':'均色' }; - const regex = /(零|一|二|两|三|四|五|六|七|八|九|杠|刚)/g; + const regex = /(零|一|二|两|三|四|五|六|七|八|九|杠|刚|军色)/g; return str.replace(regex, match => chineseNumToArabic[match]); }, inputSaveText(){ diff --git a/package1/inventory/gategory.vue b/package1/inventory/gategory.vue index c65a3df..16d7af2 100644 --- a/package1/inventory/gategory.vue +++ b/package1/inventory/gategory.vue @@ -21,10 +21,19 @@ @confirm="dialogInputConfirm" @close="dialogClose"> - - - + + + + 修改规格值 + + + + + + 删除 + 确认 + + @@ -299,6 +308,9 @@ }, close(){ this.$refs.addTypeDialog.close() + }, + handleBlur(e){ + this.inputVal = e.detail.value }, //查询分类下有没有库存 getTypeToNum(id) { @@ -428,12 +440,14 @@ } } that.tui.request("/app/productCategory/batchSaveCategoryAndAttribute", "post", { - categoryName: e, + categoryName: this.inputVal, productAttributeOfAddVos:that.multipleList }, false, false).then((res) => { if (res.code == 200) { that.tui.toast("添加成功") that.$refs.addTypeDialog.close() + + that.getGategoryList() } else { that.tui.toast("添加失败") @@ -451,7 +465,7 @@ break; case 'edit': that.tui.request("/app/productCategory/edit", "post", { - categoryName: e, + categoryName: this.inputVal, id: that.editItem.id }, false, true).then((res) => { if (res.code == 200) { @@ -469,8 +483,10 @@ }).catch((res) => {}) break; default: - } - that.$refs.inputClose.val = '' + } + that.$refs.delDialog.close() + that.$refs.inputClose.val = '' + this.inputVal = "" }, //点击取消按钮 dialogClose() { @@ -496,7 +512,9 @@ title: "删除成功", icon: 'none' }) - this.$refs.carPopup.close() + this.$refs.carPopup.close() + this.$refs.delDialog.close() + } else { uni.showToast({ title: "删除失败", @@ -806,5 +824,13 @@ text-align: center; color: #777; margin: 20rpx 0 0 20rpx; + } + .type-popup{ + width: 500rpx; + height: auto; + background: #fff; + border-radius: 10px; + position: relative; + margin-bottom: 40rpx; } \ No newline at end of file diff --git a/package1/inventory/gategoryLow.vue b/package1/inventory/gategoryLow.vue index 50c7044..ff47d0b 100644 --- a/package1/inventory/gategoryLow.vue +++ b/package1/inventory/gategoryLow.vue @@ -25,10 +25,19 @@ - - - + + + + 新增规格 + + + + + + 取消 + 确认 + + @@ -87,7 +96,8 @@ delType: '', dialogTit: '输入分类名', categoryId: '', - goodsList: [] + goodsList: [], + categoryText:'' } }, computed: { @@ -183,13 +193,16 @@ this.editItem = item; } this.$refs.inputDialog.open() + }, + handleBlur(e){ + this.categoryText = e.detail.value }, dialogInputConfirm(e) { switch (this.typeModel) { case 'add': this.tui.request("/app/productCategory/save", "post", { - categoryName: e + categoryName: this.categoryText }, false, true).then((res) => { if (res.code == 200) { @@ -209,7 +222,7 @@ break; case 'edit': this.tui.request("/app/productCategory/edit", "post", { - categoryName: e, + categoryName: this.categoryText, id: this.editItem.id }, false, true).then((res) => { if (res.code == 200) { @@ -237,7 +250,7 @@ } } this.tui.request("/app/productAttribute/save", "post", { - attributeName: e, + attributeName: this.categoryText, categoryId: this.isOpenId }, false, true).then((res) => { if (res.code == 200) { @@ -263,7 +276,7 @@ return } this.tui.request("/app/productAttributeValue/save", "post", { - value: e, + value: this.categoryText, attributeId: this.isOpenId }, false, true).then((res) => { if (res.code == 200) { @@ -271,7 +284,8 @@ uni.showToast({ title: "添加成功", icon: 'none' - }) + }) + this.$refs.inputDialog.close() } else { uni.showToast({ title: res.message, @@ -282,7 +296,7 @@ break; case 'attrEdit': this.tui.request("/app/productAttribute/edit", "post", { - attributeName: e, + attributeName: this.categoryText, categoryId: this.editItem.categoryId, id: this.editItem.id }, false, true).then((res) => { @@ -549,5 +563,13 @@ flex: 1; text-align: center; background: linear-gradient(90deg, #60F3FF, #088FEB); + } + .type-popup{ + width: 500rpx; + height: auto; + background: #fff; + border-radius: 10px; + position: relative; + margin-bottom: 40rpx; } \ No newline at end of file