wangfukang 3 years ago
parent
commit
998f335454
  1. 24
      package1/AI/AIHangOrderList.vue
  2. 4
      package1/AI/AiChat.vue
  3. 44
      package1/inventory/gategory.vue
  4. 44
      package1/inventory/gategoryLow.vue

24
package1/AI/AIHangOrderList.vue

@ -77,6 +77,10 @@
<view class="btn" @tap.stop="delItem(item.id)" style="background: linear-gradient(90deg, #FF9797, #FFC1E0);">
删除
</view>
<view v-if="item.aiFlag != 0" style="height: 100rpx;line-height: 92rpx;">
<radio :value="isInventory" @tap="invenRadio" :checked="isInventory" style="margin-left: 30rpx;"/>
未入库规格不显示
</view>
</view>
<view class="order-collapse-item" v-if="item.isCollapse">
<view class="collapse-1">
@ -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){

4
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(){

44
package1/inventory/gategory.vue

@ -21,10 +21,19 @@
@confirm="dialogInputConfirm" @close="dialogClose">
</uni-popup-dialog>
</uni-popup>
<uni-popup ref="delDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
cancelText="删除" @confirm="dialogInputConfirm" @close="dialogDel">
</uni-popup-dialog>
<uni-popup ref="delDialog" type="dialog">
<view class="type-popup" style="width:600rpx;margin-bottom: 0;border-radius: 0;height: 400rpx;border-radius: 10px;">
<view style="height: 80rpx;font-size: 36rpx;font-weight: bold;line-height: 80rpx;text-align: center;">
修改规格值
</view>
<view style="width: 90%;margin: 80rpx auto;">
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入规格值" />
</view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;background: linear-gradient(90deg, #60F3FF, #088FEB);color: #fff;display: flex;position: absolute;bottom: 0;">
<view style="width:50%;" @tap="dialogDel">删除</view>
<view style="width:50%;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view>
</view>
</view>
</uni-popup>
<!-- 添加分类弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
@ -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;
}
</style>

44
package1/inventory/gategoryLow.vue

@ -25,10 +25,19 @@
</view>
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此分类?'" showCancelButton="true" @cancel="show = false"
@confirm="delItemModal"></u-modal>
<uni-popup ref="inputDialog" type="dialog">
<uni-popup-dialog ref="inputClose" mode="input" :title="dialogTit" :value="inputVal" placeholder="请输入名称"
@confirm="dialogInputConfirm" @close="dialogClose">
</uni-popup-dialog>
<uni-popup ref="inputDialog" type="dialog">
<view class="type-popup" style="width:600rpx;margin-bottom: 0;border-radius: 0;height: 400rpx;border-radius: 10px;">
<view style="height: 80rpx;font-size: 36rpx;font-weight: bold;line-height: 80rpx;text-align: center;">
新增规格
</view>
<view style="width: 90%;margin: 80rpx auto;">
<uni-easyinput type="text" v-model="categoryText" @blur="handleBlur" placeholder="请输入规格值" />
</view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;background: linear-gradient(90deg, #60F3FF, #088FEB);color: #fff;display: flex;position: absolute;bottom: 0;">
<view style="width:50%;" @tap="$refs.inputDialog.close()">取消</view>
<view style="width:50%;background: linear-gradient(90deg, #FF9797, #FFC1E0);" @tap="dialogInputConfirm">确认</view>
</view>
</view>
</uni-popup>
<!-- 查看商品库存弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
@ -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;
}
</style>
Loading…
Cancel
Save