|
|
|
@ -69,15 +69,15 @@ |
|
|
|
<input type="text" v-else disabled :value="value[1].productSn" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 318rpx;padding-left: 20rpx;"> |
|
|
|
</view> |
|
|
|
<view style="display: flex;height: 55rpx;line-height: 55rpx;" v-if="value[1].isNew"> |
|
|
|
分类: <text style="color: #777;padding-left: 20rpx;">{{value[1].categoryName}}</text> |
|
|
|
<uni-icons type="compose" color="#777" size='25' @tap="toggle('typePopup',value[0])"></uni-icons> |
|
|
|
分类: <text style="color: #777;padding-left: 20rpx;">{{value[1].categoryName==null?'':value[1].categoryName}}</text> |
|
|
|
<uni-icons type="compose" color="#777" size='25' @tap="toggle('typePopup',value[0])"></uni-icons> |
|
|
|
</view> |
|
|
|
<view style="display: flex;height: 55rpx;line-height: 55rpx;"> |
|
|
|
单价:<input type="digit" v-model="value[1].purchasePrice" @blur="clickCollapse($event,value[0])" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 300rpx;padding-left: 20rpx;"> |
|
|
|
<view v-if='userType==0' style="display: flex;height: 55rpx;line-height: 55rpx;"> |
|
|
|
单价:<input type="digit" v-model="value[1].purchasePrice" @blur="clickCollapse($event,value[0])" @focus="obtainPrice($event,'danjia',value[0])" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 300rpx;padding-left: 20rpx;"> |
|
|
|
</view> |
|
|
|
<view style="display: flex;height: 55rpx;line-height: 55rpx;"> |
|
|
|
批发价: <input type="digit" @blur="PriceAndWho($event,value[0],'pi')" v-model="value[1].wholesalePrice" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;"> |
|
|
|
零售价:<input type="digit" @blur="PriceAndWho($event,value[0])" v-model="value[1].lsprice" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;"> |
|
|
|
批发价: <input type="digit" @blur="PriceAndWho($event,value[0],'pi')" @focus="obtainPrice($event,'pifa',value[0])" v-model="value[1].wholesalePrice" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;"> |
|
|
|
零售价:<input type="digit" @blur="PriceAndWho($event,value[0])" @focus="obtainPrice($event,'lingshou',value[0])" v-model="value[1].lsprice" style="height: 55rpx;border-bottom: 1px solid #eee;color:#777;width: 100rpx;padding-left: 20rpx;"> |
|
|
|
</view> |
|
|
|
<view @tap="AiAddSpec(value[1])" style="height: 27px;width: 70px;background: #088FEB;color: #fff;border-radius: 5px;text-align: center;position: absolute;top: 130rpx;right: 0px;line-height: 54rpx;"> |
|
|
|
添加规格 |
|
|
|
@ -109,19 +109,19 @@ |
|
|
|
</view> |
|
|
|
<view class="content-box" style="margin-bottom:110rpx;"> |
|
|
|
<view class="price-box-list"> |
|
|
|
<view class="content-list"> |
|
|
|
<view class="content-list" v-if="userType == 0"> |
|
|
|
<view class="list-name">应付金额</view> |
|
|
|
<view class="list-val"> |
|
|
|
<input type="text" placeholder="请输入应付金额" v-model="shouldPay" @blur="changessPrice($event)"> |
|
|
|
<input type="text" placeholder="请输入应付金额" v-model="shouldPay" @focus="obtainPrice($event,'shouldPay')" @blur="changessPrice($event)"> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="content-list"> |
|
|
|
<view class="content-list" v-if="userType == 0"> |
|
|
|
<view class="list-name">已付金额</view> |
|
|
|
<view class="list-val"> |
|
|
|
<input type="text" placeholder="请输入已付金额" v-model="alreadyPay" @blur="changePay($event)"> |
|
|
|
<input type="text" placeholder="请输入已付金额" v-model="alreadyPay" @focus="obtainPrice($event,'alreadyPay')" @blur="changePay($event)"> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="content-list"> |
|
|
|
<view class="content-list" v-if="userType == 0"> |
|
|
|
<view class="list-name">欠款</view> |
|
|
|
<view class="list-val"> |
|
|
|
<input type="text" v-model="noPay" disabled> |
|
|
|
@ -146,7 +146,7 @@ |
|
|
|
<view class="bottom-box"> |
|
|
|
<view class="bottom-left"> |
|
|
|
<text>合计:{{totalAmount}}</text> |
|
|
|
<text style="color: #ffa200;">¥{{shouldPay}}</text> |
|
|
|
<text style="color: #ffa200;" v-if="userType == 0">¥{{shouldPay}}</text> |
|
|
|
</view> |
|
|
|
<view class="bottom-right"> |
|
|
|
<button class="bottom-btn" @tap='inventorySubmit'>入库</button> |
|
|
|
@ -154,7 +154,7 @@ |
|
|
|
</view> |
|
|
|
<!-- 弹出层 --> |
|
|
|
<view> |
|
|
|
<uni-popup ref="shopPopup" background-color="#fff" @change="change"> |
|
|
|
<uni-popup ref="shopPopup" background-color="#fff" @change="clickClose"> |
|
|
|
<view class="shop-popup-content"> |
|
|
|
<view class="shop-popup-title"> |
|
|
|
<view class="shop-popup-title-left"> |
|
|
|
@ -198,7 +198,7 @@ |
|
|
|
<view @tap="minusNum" class="zuni-numbox__minus zuni-numbox-btns" style="background: #f5f5f5;"> |
|
|
|
<text class="zuni-numbox--text">-</text> |
|
|
|
</view> |
|
|
|
<input v-model="allChangeNum" @blur="allChange" class="zuni-numbox__value" type="number" /> |
|
|
|
<input v-model="allChangeNum" @blur="allChange" @focus="obtainPrice($event,'zongjishu')" class="zuni-numbox__value" type="number" /> |
|
|
|
<view @tap="plusNum" class="zuni-numbox__plus zuni-numbox-btns" style="background: #f5f5f5;"> |
|
|
|
<text class="zuni-numbox--text">+</text> |
|
|
|
</view> |
|
|
|
@ -374,7 +374,8 @@ |
|
|
|
<view class="voice-model" v-if="recordState == true"> |
|
|
|
<img src="/static/images/maikefeng.png" alt=""> |
|
|
|
<view class="voice-text">语音识别中...</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="mask-model" v-if="isVoice">貌似没有检测到您上次的语音录入信息,正在反复识别中</view> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -390,6 +391,7 @@ |
|
|
|
computed: mapState(['shopName']), |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isVoice:false, |
|
|
|
allChangeNum:0, |
|
|
|
voiceText:'', |
|
|
|
khName: [], |
|
|
|
@ -399,7 +401,8 @@ |
|
|
|
noPay: 0, |
|
|
|
alreadyPay: '', |
|
|
|
realAmount: 0, |
|
|
|
shouldPay: '', |
|
|
|
shouldPay: '', |
|
|
|
userType:'', |
|
|
|
totalAmount: 0, |
|
|
|
index: '', |
|
|
|
index1: '', |
|
|
|
@ -423,6 +426,7 @@ |
|
|
|
dataObj: new Map(), |
|
|
|
isPlusAndMinus:false, |
|
|
|
indexList:[], |
|
|
|
evalue:[], |
|
|
|
attributeValue:[], |
|
|
|
specifications:'', |
|
|
|
currentAnchor: '', |
|
|
|
@ -495,21 +499,17 @@ |
|
|
|
this.merge = 0 |
|
|
|
return; |
|
|
|
} |
|
|
|
if(this.carList1 == ''){ |
|
|
|
console.log('回来') |
|
|
|
} |
|
|
|
if(uni.getStorageSync('carList1') != ''){ |
|
|
|
this.carList1 = uni.getStorageSync('carList1') |
|
|
|
}else{ |
|
|
|
this.carList1 = this.carList1 |
|
|
|
|
|
|
|
} |
|
|
|
console.log('拿数据',this.carList1) |
|
|
|
} |
|
|
|
this.khName = JSON.parse(JSON.stringify(this.khName)) || '' |
|
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].purchasePrice || 0, //进货价 |
|
|
|
purchasePrice: this.userType == 0?this.carList1[i].purchasePrice:'', //进货价 |
|
|
|
price1: 0, |
|
|
|
price:this.carList1[i].price, |
|
|
|
productCount: 0, |
|
|
|
@ -518,31 +518,14 @@ |
|
|
|
productId: this.carList1[i].productId == null ? '' : this.carList1[i].productId, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice || 0, |
|
|
|
categoryName:'', |
|
|
|
categoryName:this.carList1[i].categoryName, |
|
|
|
categoryId:this.carList1[i].categoryId, |
|
|
|
lsprice: this.carList1[i].price || 0, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
productSn: this.carList1[i].productSn, |
|
|
|
stockLogList: new Map(), |
|
|
|
stockLogList1: [] |
|
|
|
} |
|
|
|
|
|
|
|
// let attrMap = new Map() |
|
|
|
// let newSaleDetailDTOList = [] |
|
|
|
// for(let m = 0; m < item.saleDetailDTOList[i].stockLogList1.length; m++){ |
|
|
|
// if(attrMap.has(item.saleDetailDTOList[i].stockLogList1[m].attributeList) == true){ |
|
|
|
// let hasCount = attrMap.get(item.saleDetailDTOList[i].stockLogList1[m].attributeList) |
|
|
|
// let trueCount = hasCount.split('-')[0] |
|
|
|
// let lastConut = Number(trueCount) + Number(item.saleDetailDTOList[i].stockLogList1[m].productCount) |
|
|
|
// newSaleDetailDTOList[hasCount.split('-')[1]].productCount = lastConut |
|
|
|
// }else{ |
|
|
|
// newSaleDetailDTOList.push(item.saleDetailDTOList[i].stockLogList1[m]) |
|
|
|
// attrMap.set(item.saleDetailDTOList[i].stockLogList1[m].attributeList,item.saleDetailDTOList[i].stockLogList1[m].productCount+'-'+m) |
|
|
|
// } |
|
|
|
// } |
|
|
|
// obj.saleDetailQueryDTO = newSaleDetailDTOList |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
for (let m = 0; m < this.carList1[i].saleDetailQueryDTO.length; m++) { |
|
|
|
let productCount = this.carList1[i].saleDetailQueryDTO[m].productCount |
|
|
|
if(obj.stockLogList.has(this.carList1[i].saleDetailQueryDTO[m].attributeList) ==true){ |
|
|
|
@ -592,7 +575,7 @@ |
|
|
|
} |
|
|
|
} else { //商品不同 |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].purchasePrice || 0, //进货价 |
|
|
|
purchasePrice: this.userType == 0?this.carList1[i].purchasePrice:'', //进货价 |
|
|
|
price1: 0, |
|
|
|
price:this.carList1[i].price, |
|
|
|
productCount: 0, |
|
|
|
@ -601,7 +584,7 @@ |
|
|
|
isNew:this.carList1[i].isNew, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice || 0, |
|
|
|
categoryName:'', |
|
|
|
categoryName:this.carList1[i].categoryName, |
|
|
|
categoryId:this.carList1[i].categoryId, |
|
|
|
lsprice: this.carList1[i].price || 0, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
@ -650,14 +633,14 @@ |
|
|
|
console.log(this.carList) |
|
|
|
}, |
|
|
|
onLoad(options) { |
|
|
|
|
|
|
|
this.userType=uni.getStorageSync('type') |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
AiVoice(){ |
|
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
for (let i = 0; i < this.carList1.length; i++) { |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].purchasePrice || 0, //进货价 |
|
|
|
purchasePrice: this.userType == 0?this.carList1[i].purchasePrice:'', //进货价 |
|
|
|
price1: 0, |
|
|
|
price:this.carList1[i].price, |
|
|
|
productCount: 0, |
|
|
|
@ -666,7 +649,7 @@ |
|
|
|
productId: this.carList1[i].productId == null ? '' : this.carList1[i].productId, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice || 0, |
|
|
|
categoryName:'', |
|
|
|
categoryName:this.carList1[i].categoryName, |
|
|
|
categoryId:this.carList1[i].categoryId, |
|
|
|
lsprice: this.carList1[i].price || 0, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
@ -741,7 +724,7 @@ |
|
|
|
} |
|
|
|
} else { //商品不同 |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.carList1[i].purchasePrice || 0, //进货价 |
|
|
|
purchasePrice: this.userType == 0?this.carList1[i].purchasePrice:'', //进货价 |
|
|
|
price1: 0, |
|
|
|
price:this.carList1[i].price, |
|
|
|
productCount: 0, |
|
|
|
@ -750,7 +733,7 @@ |
|
|
|
isNew:this.carList1[i].isNew, |
|
|
|
productName: this.carList1[i].productName, |
|
|
|
wholesalePrice: this.carList1[i].wholesalePrice || 0, |
|
|
|
categoryName:'', |
|
|
|
categoryName:this.carList1[i].categoryName, |
|
|
|
categoryId:this.carList1[i].categoryId, |
|
|
|
lsprice: this.carList1[i].price || 0, |
|
|
|
productPicture: this.carList1[i].productPicture, |
|
|
|
@ -941,8 +924,56 @@ |
|
|
|
}, |
|
|
|
//确认语音输入的内容 |
|
|
|
setDetail(e) { |
|
|
|
if(this.voiceText ==''){ |
|
|
|
this.tui.toast('识别内容不能为空') |
|
|
|
return |
|
|
|
} |
|
|
|
let convertedStr = this.convertChineseToArabic(this.voiceText); |
|
|
|
this.getMsg = this.spliceMsg(convertedStr) |
|
|
|
if(convertedStr.indexOf('点') != -1){ |
|
|
|
convertedStr = this.replaceCharAfterNumber(convertedStr,'点','.') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf(',名称') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/,名称/g,'名称') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('名称,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/名称,/g,'名称') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('名称') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/名称/g,',名称:') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf(',单价') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/,单价/g,'单价') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('单价,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/单价,/g,'单价') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('单价') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/单价/g,',单价:') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf(',数量') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/,数量/g,'数量') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('数量,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/数量,/g,'数量') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('数量') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/数量/g,',数量:') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('货号,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/货号,/g,'货号') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('货号') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/货号/g,'货号:') |
|
|
|
} |
|
|
|
//名称111,白色M码1一件 |
|
|
|
convertedStr = this.convertStringCorrectly(convertedStr) |
|
|
|
convertedStr = this.spliceMsg(convertedStr) |
|
|
|
if(convertedStr.indexOf(',') == 0){ |
|
|
|
console.log('位置',convertedStr.indexOf(',')) |
|
|
|
convertedStr = convertedStr.substr(1) |
|
|
|
console.log('位置',convertedStr) |
|
|
|
} |
|
|
|
this.getMsg = convertedStr |
|
|
|
this.tui.request("/purchaseOcrPicture/callWithMessageOfPurchase", "POST", { |
|
|
|
questionMsg:this.getMsg |
|
|
|
}, false, true).then((res) => { |
|
|
|
@ -954,10 +985,11 @@ |
|
|
|
// uni.setStorageSync('AiInventoryId', res.result.purchase.id) |
|
|
|
for(let i=0;i<purchaseDetails.length;i++){ |
|
|
|
let data = { |
|
|
|
id: purchaseDetails[i].productId?purchaseDetails[i].productId:purchaseDetails[i].id, |
|
|
|
id: "", |
|
|
|
price: purchaseDetails[i].price, |
|
|
|
productCount: 0, |
|
|
|
categoryId:purchaseDetails[i].categoryId, |
|
|
|
categoryName:purchaseDetails[i].categoryName, |
|
|
|
wholesalePrice: purchaseDetails[i].wholesalePrice, |
|
|
|
purchasePrice:purchaseDetails[i].purchasePrice, |
|
|
|
isNew: purchaseDetails[i].productId==null?true:false, |
|
|
|
@ -968,12 +1000,20 @@ |
|
|
|
supplierName: purchaseDetails[i].supplierName, |
|
|
|
saleDetailQueryDTO: [] |
|
|
|
} |
|
|
|
if(purchaseDetails[i].productId){ |
|
|
|
data.id = purchaseDetails[i].productId |
|
|
|
}else if(purchaseDetails[i].productSn == '' || purchaseDetails[i].productSn == null || purchaseDetails[i].productSn == '货号'){ |
|
|
|
data.id = purchaseDetails[i].productName |
|
|
|
}else if(purchaseDetails[i].productSn){ |
|
|
|
data.id = purchaseDetails[i].productSn |
|
|
|
} |
|
|
|
console.log('货号',data) |
|
|
|
for(let m=0;m<purchaseDetails[i].stockLogList1.length;m++){ |
|
|
|
let list = { |
|
|
|
attributeList: purchaseDetails[i].stockLogList1[m].attributeList, |
|
|
|
attributeList: this.getAttribute(purchaseDetails[i].stockLogList1[m].attributeList), |
|
|
|
productCount:purchaseDetails[i].stockLogList1[m].productCount || purchaseDetails[i].stockLogList1[m].productCounts, |
|
|
|
productNum:'', |
|
|
|
name: this.sliceMsg(purchaseDetails[i].stockLogList1[m].attributeList), |
|
|
|
name: this.sliceMsg(this.getAttribute(purchaseDetails[i].stockLogList1[m].attributeList)), |
|
|
|
price: purchaseDetails[i].stockLogList1[m].purchasePrice |
|
|
|
} |
|
|
|
data.productCount += purchaseDetails[i].stockLogList1[m].productCount |
|
|
|
@ -1213,10 +1253,29 @@ |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
allChange(e){ |
|
|
|
if(this.linshiPrice == e.target.value){ |
|
|
|
this.allChangeNum = e.target.value |
|
|
|
}else{ |
|
|
|
if(e.target.value == ''){ |
|
|
|
this.allChangeNum = this.linshiPrice |
|
|
|
}else{ |
|
|
|
this.allChangeNum = e.target.value |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
//监听到输入框改变,给所有的都赋值 |
|
|
|
if(this.isPlusAndMinus == false){ |
|
|
|
for(var i=0;i<this.temporaryList.length;i++){ |
|
|
|
this.temporaryList[i].productCount = Number(e.detail.value) |
|
|
|
if(this.evalue.length == 0){ |
|
|
|
this.temporaryList[i].productCount = Number(this.allChangeNum) |
|
|
|
}else{ |
|
|
|
for(var j=0;j<this.evalue.length;j++){ |
|
|
|
if(this.evalue[j] == this.temporaryList[i].name){ |
|
|
|
this.temporaryList[i].productCount = Number(this.allChangeNum) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for(var m=0;m<this.pageOldTemList.length;m++){ |
|
|
|
if(this.temporaryList[i].attributeList == this.pageOldTemList[m].attributeList){ |
|
|
|
this.pageOldTemList[m].productCount = this.temporaryList[i].productCount |
|
|
|
@ -1232,15 +1291,48 @@ |
|
|
|
this.isPlusAndMinus == false |
|
|
|
this.temporaryChange() |
|
|
|
}, |
|
|
|
obtainPrice(e,type,num){ |
|
|
|
console.log("获得焦点",this.carList) |
|
|
|
console.log("获得焦点",e.target.value) |
|
|
|
this.linshiPrice = e.target.value |
|
|
|
if(type=='danjia'){ |
|
|
|
this.carList.get(num).purchasePrice = '' |
|
|
|
}else if(type=='pifa'){ |
|
|
|
this.carList.get(num).wholesalePrice = '' |
|
|
|
}else if(type=='lingshou'){ |
|
|
|
this.carList.get(num).lsprice = '' |
|
|
|
this.$forceUpdate() |
|
|
|
}else if(type=='zongjishu'){ |
|
|
|
this.allChangeNum = '' |
|
|
|
}else if(type=='shouldPay'){ |
|
|
|
this.shouldPay = '' |
|
|
|
}else if(type=='alreadyPay'){ |
|
|
|
this.alreadyPay = '' |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
plusNum(){ |
|
|
|
this.isPlusAndMinus == true |
|
|
|
//监听到点击+的操作,给所有的都+1 |
|
|
|
for(var i=0;i<this.temporaryList.length;i++){ |
|
|
|
if(this.temporaryList[i].productCount == undefined){ |
|
|
|
this.temporaryList[i].productCount = 1 |
|
|
|
if(this.evalue.length == 0){ |
|
|
|
if(this.temporaryList[i].productCount == undefined){ |
|
|
|
this.temporaryList[i].productCount = 1 |
|
|
|
}else{ |
|
|
|
this.temporaryList[i].productCount++ |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.temporaryList[i].productCount++ |
|
|
|
for(var j=0;j<this.evalue.length;j++){ |
|
|
|
if(this.evalue[j] == this.temporaryList[i].name){ |
|
|
|
if(this.temporaryList[i].productCount == undefined){ |
|
|
|
this.temporaryList[i].productCount = 1 |
|
|
|
}else{ |
|
|
|
this.temporaryList[i].productCount++ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for(var m=0;m<this.pageOldTemList.length;m++){ |
|
|
|
if(this.temporaryList[i].attributeList == this.pageOldTemList[m].attributeList){ |
|
|
|
this.pageOldTemList[m].productCount = this.temporaryList[i].productCount |
|
|
|
@ -1258,7 +1350,16 @@ |
|
|
|
this.isPlusAndMinus == true |
|
|
|
//监听到点击-的操作,给所有的都-1 |
|
|
|
for(var i=0;i<this.temporaryList.length;i++){ |
|
|
|
this.temporaryList[i].productCount-- |
|
|
|
if(this.evalue.length == 0){ |
|
|
|
this.temporaryList[i].productCount-- |
|
|
|
}else{ |
|
|
|
for(var j=0;j<this.evalue.length;j++){ |
|
|
|
if(this.evalue[j] == this.temporaryList[i].name){ |
|
|
|
this.temporaryList[i].productCount-- |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
for(var m=0;m<this.pageOldTemList.length;m++){ |
|
|
|
if(this.temporaryList[i].attributeList == this.pageOldTemList[m].attributeList){ |
|
|
|
this.pageOldTemList[m].productCount = this.temporaryList[i].productCount |
|
|
|
@ -1301,7 +1402,7 @@ |
|
|
|
|
|
|
|
resultList = this.combination(this.goodsList); |
|
|
|
} |
|
|
|
var evalue = [] |
|
|
|
this.evalue = [] |
|
|
|
var value = [] |
|
|
|
for (var m = 0; m < resultList.length; m++) { |
|
|
|
var name = '' |
|
|
|
@ -1317,7 +1418,7 @@ |
|
|
|
} |
|
|
|
value1 += "}" |
|
|
|
value.push(value1) |
|
|
|
evalue.push(name) |
|
|
|
this.evalue.push(name) |
|
|
|
} |
|
|
|
|
|
|
|
if (jishuqi == 0) { |
|
|
|
@ -1330,7 +1431,7 @@ |
|
|
|
attributeList: value[i], |
|
|
|
productCount: this.temporaryNum, |
|
|
|
productNum: this.productNum, |
|
|
|
name: evalue[i], |
|
|
|
name: this.evalue[i], |
|
|
|
price: this.purchasePrice |
|
|
|
} |
|
|
|
this.temporaryList.push(this.attributeList); |
|
|
|
@ -1348,7 +1449,7 @@ |
|
|
|
attributeList: value[i], |
|
|
|
productCount: newProductCount || 0, |
|
|
|
productNum: this.productNum, |
|
|
|
name: evalue[i], |
|
|
|
name: this.evalue[i], |
|
|
|
price: this.purchasePrice |
|
|
|
} |
|
|
|
|
|
|
|
@ -1438,30 +1539,39 @@ |
|
|
|
this.$refs.mergePopup.open() |
|
|
|
}else if(type=='center'){ |
|
|
|
this.initRecord(); |
|
|
|
this.voiceText = ' ' |
|
|
|
this.voiceText = '' |
|
|
|
this.$refs.popup.open(type) |
|
|
|
} |
|
|
|
}, |
|
|
|
//按住语音识别,开始 |
|
|
|
kaishi() { |
|
|
|
this.recordState = true |
|
|
|
uni.vibrateShort(); |
|
|
|
manager.start({ |
|
|
|
duration: 60000, |
|
|
|
lang: "zh_CN" |
|
|
|
}); |
|
|
|
if(this.isVoice == false){ |
|
|
|
this.recordState = true |
|
|
|
uni.vibrateShort(); |
|
|
|
manager.start({ |
|
|
|
duration: 60000, |
|
|
|
lang: "zh_CN" |
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
//松开语音识别,结束 |
|
|
|
jieshu() { |
|
|
|
this.recordState = false |
|
|
|
manager.stop() |
|
|
|
}, |
|
|
|
//语音内容为空 |
|
|
|
showRecordEmptyTip() { |
|
|
|
uni.showToast({ |
|
|
|
title: "请重新说一遍", |
|
|
|
icon: 'error' |
|
|
|
}) |
|
|
|
isCharPrecededByNumber(str, char) { |
|
|
|
const regex = new RegExp(`\\d${char}`, 'g'); |
|
|
|
return regex.test(str); |
|
|
|
}, |
|
|
|
|
|
|
|
replaceCharAfterNumber(str, charToFind, charToReplace) { |
|
|
|
// 正则表达式匹配字符前是否有数字,并且该字符与charToFind相同 |
|
|
|
const regex = new RegExp(`\\d${charToFind}`, 'g'); |
|
|
|
// 使用replace方法进行替换 |
|
|
|
return str.replace(regex, (match) => { |
|
|
|
// 将匹配到的字符中的指定字符替换为charToReplace |
|
|
|
return match.replace(charToFind, charToReplace); |
|
|
|
}); |
|
|
|
}, |
|
|
|
//语音识别功能初始化 |
|
|
|
initRecord() { |
|
|
|
@ -1469,11 +1579,51 @@ |
|
|
|
manager.stop() |
|
|
|
// 识别结束事件 |
|
|
|
manager.onStop = (res) => { |
|
|
|
if (res.result == '') { |
|
|
|
that.showRecordEmptyTip() |
|
|
|
return |
|
|
|
} |
|
|
|
let convertedStr = this.spliceMsg(this.convertChineseToArabic(res.result)); |
|
|
|
console.log(convertedStr) |
|
|
|
if(convertedStr.indexOf('点') != -1){ |
|
|
|
convertedStr = that.replaceCharAfterNumber(convertedStr,'点','.') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf(',名称') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/,名称/g,'名称') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('名称,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/名称,/g,'名称') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('名称') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/名称/g,',名称:') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf(',单价') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/,单价/g,'单价') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('单价,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/单价,/g,'单价') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('单价') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/单价/g,',单价:') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf(',数量') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/,数量/g,'数量') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('数量,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/数量,/g,'数量') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('数量') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/数量/g,',数量:') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('货号,') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/货号,/g,'货号') |
|
|
|
} |
|
|
|
if(convertedStr.indexOf('货号') != -1){ |
|
|
|
convertedStr = convertedStr.replace(/货号/g,'货号:') |
|
|
|
} |
|
|
|
convertedStr = this.convertStringCorrectly(convertedStr) |
|
|
|
|
|
|
|
if(convertedStr.indexOf(',') == 0){ |
|
|
|
console.log('位置',convertedStr.indexOf(',')) |
|
|
|
convertedStr = convertedStr.substr(1) |
|
|
|
} |
|
|
|
|
|
|
|
if(that.voiceText == '' || that.voiceText == null){ |
|
|
|
that.voiceText = convertedStr |
|
|
|
}else{ |
|
|
|
@ -1483,6 +1633,18 @@ |
|
|
|
|
|
|
|
// 识别错误事件 |
|
|
|
manager.onError = (res) => { |
|
|
|
if(res.retcode == '-30011'){ |
|
|
|
that.isVoice = true |
|
|
|
} |
|
|
|
if(res.retcode == '-30004'){ |
|
|
|
// uni.hideLoading() |
|
|
|
that.isVoice = false |
|
|
|
uni.hideToast() |
|
|
|
uni.showToast({ |
|
|
|
title: "未识别到声音信息,请重新录入", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
} |
|
|
|
if (res.retcode == '-40001') { |
|
|
|
uni.showToast({ |
|
|
|
title: '使用次数超限制,请联系管理员!', |
|
|
|
@ -1491,12 +1653,26 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
getAttribute(str){ |
|
|
|
str = str.replace(/"色"(?![^{]*": *"色")/g, '"均色"'); |
|
|
|
str = str.replace(/"码"(?![^{]*": *"码")/g, '"均码"'); |
|
|
|
return str |
|
|
|
}, |
|
|
|
//清空语音输入的文字 |
|
|
|
clearText(){ |
|
|
|
this.voiceText = '' |
|
|
|
}, |
|
|
|
//正则匹配处理“2十9”等情况 |
|
|
|
convertStringCorrectly(str) { |
|
|
|
var regexForSingleTen = /(\d+)十(?!\d)/g; |
|
|
|
var regexForFollowedByDigit = /(\d+)十(?=\d)/g; |
|
|
|
var step1Result = str.replace(regexForSingleTen, '$10'); |
|
|
|
var finalResult = step1Result.replace(regexForFollowedByDigit, '$1'); |
|
|
|
|
|
|
|
return finalResult; |
|
|
|
}, |
|
|
|
spliceMsg(res){ |
|
|
|
let regex = /嗯|啊|儿|各|阿|恩/g; |
|
|
|
let regex = /嗯|啊|儿|阿|恩/g; |
|
|
|
return res.replace(regex, '') |
|
|
|
}, |
|
|
|
convertChineseToArabic(str) { |
|
|
|
@ -1733,12 +1909,16 @@ |
|
|
|
this.zNum += this.temporaryList[i].productCount || 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
clickClose(){ |
|
|
|
this.evalue = [] |
|
|
|
this.allChangeNum = 0 |
|
|
|
}, |
|
|
|
//弹窗选择规格后,点击弹窗中选好了按钮 |
|
|
|
temporaryCheck() { |
|
|
|
uni.showLoading({ |
|
|
|
title: '加载中...' |
|
|
|
}) |
|
|
|
this.evalue = [] |
|
|
|
console.log(this.temporaryList) |
|
|
|
let that = this, |
|
|
|
carList1 = [] |
|
|
|
@ -1750,7 +1930,7 @@ |
|
|
|
productName: this.goodsDetail.productName, |
|
|
|
wholesalePrice: this.goodsDetail.wholesalePrice, |
|
|
|
purchasePrice:this.goodsDetail.purchasePrice, |
|
|
|
categoryName:'', |
|
|
|
categoryName:this.goodsDetail.categoryName, |
|
|
|
categoryId:this.carList1.categoryId, |
|
|
|
lsprice: this.goodsDetail.price, |
|
|
|
productSn: this.goodsDetail.productSn, |
|
|
|
@ -1772,14 +1952,14 @@ |
|
|
|
if (this.carList.size == 0) { //当前页没有数据 |
|
|
|
for (let i = 0; i < carList1.length; i++) { |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.goodsDetail.purchasePrice, //进货价 |
|
|
|
purchasePrice: this.userType == 0?this.goodsDetail.purchasePrice:'', //进货价 |
|
|
|
price:this.goodsDetail.price, |
|
|
|
price1:0, |
|
|
|
productCount: 0, |
|
|
|
id: carList1[i].id, |
|
|
|
productId: carList1[i].id, |
|
|
|
wholesalePrice: this.goodsDetail.wholesalePrice, |
|
|
|
categoryName:'', |
|
|
|
categoryName:this.goodsDetail.categoryName, |
|
|
|
categoryId:this.goodsDetail.categoryId, |
|
|
|
lsprice: this.goodsDetail.price, |
|
|
|
productName: carList1[i].productName, |
|
|
|
@ -1846,7 +2026,7 @@ |
|
|
|
} |
|
|
|
} else { //商品不同 |
|
|
|
let obj = { |
|
|
|
purchasePrice: this.goodsDetail.purchasePrice, //进货价 |
|
|
|
purchasePrice: this.userType == 0?this.goodsDetail.purchasePrice:'', //进货价 |
|
|
|
price:this.goodsDetail.price, |
|
|
|
price1: 0, |
|
|
|
productCount: 0, |
|
|
|
@ -1883,7 +2063,18 @@ |
|
|
|
uni.hideLoading(); |
|
|
|
}, 500) |
|
|
|
}, |
|
|
|
changessPrice() { |
|
|
|
changessPrice(e) { |
|
|
|
if(this.linshiPrice == e.target.value){ |
|
|
|
this.shouldPay = e.target.value |
|
|
|
}else{ |
|
|
|
if(e.target.value == ''){ |
|
|
|
this.shouldPay = this.linshiPrice |
|
|
|
}else{ |
|
|
|
this.shouldPay = e.target.value |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
this.alreadyPay = this.shouldPay |
|
|
|
this.noPay = this.shouldPay - this.alreadyPay; |
|
|
|
}, |
|
|
|
//货号是否重复 |
|
|
|
@ -1908,14 +2099,24 @@ |
|
|
|
}, |
|
|
|
//计算欠款 |
|
|
|
changePay(e) { |
|
|
|
this.alreadyPay = Number(e.target.value) > Number(this.shouldPay) ? this.shouldPay : e.target.value |
|
|
|
if(this.linshiPrice == e.target.value){ |
|
|
|
this.alreadyPay = e.target.value |
|
|
|
}else if(Number(e.detail.value) > Number(this.shouldPay)){ |
|
|
|
this.alreadyPay = this.shouldPay |
|
|
|
}else{ |
|
|
|
if(e.target.value == ''){ |
|
|
|
this.alreadyPay = this.linshiPrice |
|
|
|
}else{ |
|
|
|
this.alreadyPay = e.target.value |
|
|
|
} |
|
|
|
} |
|
|
|
this.noPay = this.shouldPay - this.alreadyPay |
|
|
|
this.noPay = this.noPay.toFixed(2) |
|
|
|
}, |
|
|
|
//跳转选择供应商 |
|
|
|
goPopleList(popleType) { |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/index/peopleList?popleType=' + popleType |
|
|
|
url: '/package1/index/peopleList?popleType=' + popleType |
|
|
|
}) |
|
|
|
}, |
|
|
|
//删除整条商品 |
|
|
|
@ -1975,37 +2176,62 @@ |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
async inventorySubmit() { |
|
|
|
if (this.khName == '' || this.carList == '') { |
|
|
|
uni.showToast({ |
|
|
|
title: "请选择供应商后入库~", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
let that = this; |
|
|
|
}, |
|
|
|
gysList(){ |
|
|
|
let that = this; |
|
|
|
this.tui.request("/app/supplier/getByCondition", "post", { |
|
|
|
searchStr:'默认供应商', |
|
|
|
pageNumber: 1, |
|
|
|
pageSize: 10 |
|
|
|
}, false, true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
if(res.result.content.length == 0){ |
|
|
|
that.tui.request("/app/supplier/save", "post", { |
|
|
|
consigneeMobile: '', |
|
|
|
consigneeName: '默认供应商', |
|
|
|
address1: '', |
|
|
|
address: '', |
|
|
|
province: '', |
|
|
|
city: '', |
|
|
|
area: '' |
|
|
|
}, false,true).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
that.gysList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
that.khName = res.result.content[0] |
|
|
|
that.goRuku() |
|
|
|
} |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
async goRuku(){ |
|
|
|
let that = this; |
|
|
|
let purchase = { |
|
|
|
// id:uni.getStorageSync('AiInventoryId'), |
|
|
|
alreadyPay: this.alreadyPay == '' ? 0 : this.alreadyPay, //已付金额 |
|
|
|
noPay: this.noPay == '' ? 0 : this.noPay, //欠款 |
|
|
|
shouldPay: this.shouldPay, //应付金额 |
|
|
|
totalAmount: this.totalAmount, //总数量 |
|
|
|
remark: this.remark, |
|
|
|
otherPay: this.otherPay == '' ? 0 : this.otherPay, |
|
|
|
supplierId: this.khName.id, //供应商id和姓名 |
|
|
|
supplierName: this.khName.consigneeName |
|
|
|
} |
|
|
|
// id:uni.getStorageSync('AiInventoryId'), |
|
|
|
alreadyPay: this.alreadyPay == '' ? 0 : this.alreadyPay, //已付金额 |
|
|
|
noPay: this.noPay == '' ? 0 : this.noPay, //欠款 |
|
|
|
shouldPay: this.shouldPay, //应付金额 |
|
|
|
totalAmount: this.totalAmount, //总数量 |
|
|
|
remark: this.remark, |
|
|
|
otherPay: this.otherPay == '' ? 0 : this.otherPay, |
|
|
|
supplierId: this.khName.id, //供应商id和姓名 |
|
|
|
supplierName: this.khName.consigneeName |
|
|
|
} |
|
|
|
let purchaseDetails = []; |
|
|
|
let jishuqi = 0 |
|
|
|
let jishuqi = 0 |
|
|
|
this.carList.forEach(function(value, key) { |
|
|
|
if(value.productName == ''){ |
|
|
|
uni.showToast({ |
|
|
|
title: "品名必须维护~", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
// if(value.productName == ''){ |
|
|
|
// uni.showToast({ |
|
|
|
// title: "品名必须维护~", |
|
|
|
// icon: 'none' |
|
|
|
// }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
if(value.productSn == ''){ |
|
|
|
uni.showToast({ |
|
|
|
title: value.productName + "的货号必须维护~", |
|
|
|
@ -2013,51 +2239,58 @@ |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(value.wholesalePrice ==null || value.wholesalePrice ==undefined || value.wholesalePrice <= 0 || value.wholesalePrice == ""){ |
|
|
|
uni.showToast({ |
|
|
|
title: value.productName + "的批发价必须维护~", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if(value.lsprice ==null || value.lsprice ==undefined || value.lsprice <= 0 || value.lsprice == ""){ |
|
|
|
uni.showToast({ |
|
|
|
title: value.productName + "的零售价必须维护~", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
}else{ |
|
|
|
// if(value.wholesalePrice ==null || value.wholesalePrice ==undefined || value.wholesalePrice <= 0 || value.wholesalePrice == ""){ |
|
|
|
// uni.showToast({ |
|
|
|
// title: value.productName + "的批发价必须维护~", |
|
|
|
// icon: 'none' |
|
|
|
// }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
// if(value.lsprice ==null || value.lsprice ==undefined || value.lsprice <= 0 || value.lsprice == ""){ |
|
|
|
// uni.showToast({ |
|
|
|
// title: value.productName + "的零售价必须维护~", |
|
|
|
// icon: 'none' |
|
|
|
// }) |
|
|
|
// return |
|
|
|
// }else{ |
|
|
|
value.price = value.lsprice |
|
|
|
} |
|
|
|
// } |
|
|
|
value.stockLogList1 = [] |
|
|
|
if (value.purchasePrice == '' || value.purchasePrice == 0) { |
|
|
|
uni.showToast({ |
|
|
|
title: value.productName + "的价格必须维护~", |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
// if (value.purchasePrice == '' || value.purchasePrice == 0) { |
|
|
|
// uni.showToast({ |
|
|
|
// title: value.productName + "的价格必须维护~", |
|
|
|
// icon: 'none' |
|
|
|
// }) |
|
|
|
// return |
|
|
|
// } |
|
|
|
if((value.categoryId == '' && value.productId == '') || (value.categoryId == null && value.productId == '')){ |
|
|
|
that.tui.toast(value.productName + "分类未维护~") |
|
|
|
return; |
|
|
|
} |
|
|
|
value.stockLogList.forEach(function(values, keys) { |
|
|
|
if (values <= 0) { |
|
|
|
that.tui.toast("入库数量不能为零~") |
|
|
|
return; |
|
|
|
} |
|
|
|
let obj = { |
|
|
|
productCount: values.productCount, |
|
|
|
attributeList: keys |
|
|
|
} |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
} |
|
|
|
value.stockLogList.forEach(function(values, keys) { |
|
|
|
if (values <= 0) { |
|
|
|
that.tui.toast("入库数量不能为零~") |
|
|
|
return; |
|
|
|
} |
|
|
|
let obj = { |
|
|
|
productCount: values.productCount, |
|
|
|
attributeList: keys |
|
|
|
} |
|
|
|
value.stockLogList1.push(obj) |
|
|
|
}) |
|
|
|
// delete value.id; |
|
|
|
// delete value.id; |
|
|
|
purchaseDetails.push(value) |
|
|
|
jishuqi ++ |
|
|
|
jishuqi ++ |
|
|
|
}) |
|
|
|
if(jishuqi == this.carList.size){ |
|
|
|
await this.goInventory(purchase,purchaseDetails) |
|
|
|
} |
|
|
|
}, |
|
|
|
async inventorySubmit() { |
|
|
|
if (this.khName == '') { |
|
|
|
await this.gysList() |
|
|
|
}else{ |
|
|
|
this.goRuku() |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
@ -2068,18 +2301,45 @@ |
|
|
|
}, |
|
|
|
//编辑每一个的单价 |
|
|
|
clickCollapse(e,id) { |
|
|
|
this.carList.get(id).purchasePrice = Number(e.detail.value) |
|
|
|
if(this.linshiPrice == e.target.value){ |
|
|
|
this.carList.get(id).purchasePrice = e.target.value |
|
|
|
}else{ |
|
|
|
if(e.detail.value == ''){ |
|
|
|
this.carList.get(id).purchasePrice = this.linshiPrice |
|
|
|
}else{ |
|
|
|
this.carList.get(id).purchasePrice = Number(e.detail.value) |
|
|
|
} |
|
|
|
} |
|
|
|
this.carList.get(id).price1 = this.carList.get(id).productCount * this.carList.get(id).purchasePrice |
|
|
|
this.getAllPrice() |
|
|
|
}, |
|
|
|
//编辑每一个的批和零售 |
|
|
|
PriceAndWho(e,id,type) { |
|
|
|
if(type == 'pi'){ |
|
|
|
this.carList.get(id).wholesalePrice = Number(e.detail.value) |
|
|
|
if(this.linshiPrice == e.target.value){ |
|
|
|
this.carList.get(id).wholesalePrice = e.target.value |
|
|
|
}else{ |
|
|
|
if(e.detail.value == ''){ |
|
|
|
this.carList.get(id).wholesalePrice = this.linshiPrice |
|
|
|
}else{ |
|
|
|
this.carList.get(id).wholesalePrice = Number(e.detail.value) |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
this.carList.get(id).price = Number(e.detail.value) |
|
|
|
this.carList.get(id).lsprice = Number(e.detail.value) |
|
|
|
if(this.linshiPrice == e.target.value){ |
|
|
|
this.carList.get(id).price = e.target.value |
|
|
|
this.carList.get(id).lsprice = e.target.value |
|
|
|
}else{ |
|
|
|
if(e.detail.value == ''){ |
|
|
|
this.carList.get(id).price = this.linshiPrice |
|
|
|
this.carList.get(id).lsprice = this.linshiPrice |
|
|
|
}else{ |
|
|
|
this.carList.get(id).price = Number(e.detail.value) |
|
|
|
this.carList.get(id).lsprice = Number(e.detail.value) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
}, |
|
|
|
//计算总金额和总数量 |
|
|
|
getAllPrice() { |
|
|
|
@ -2656,5 +2916,21 @@ |
|
|
|
height: 180rpx; |
|
|
|
background: #eee; |
|
|
|
border-radius: 50%; |
|
|
|
} |
|
|
|
.mask-model{ |
|
|
|
width: 60%; |
|
|
|
height: 100rpx; |
|
|
|
position: fixed; |
|
|
|
top: 0; |
|
|
|
left: 0; |
|
|
|
right: 0; |
|
|
|
bottom: 0; |
|
|
|
margin: auto; |
|
|
|
text-align: center; |
|
|
|
background: rgba(0,0,0,0.7); |
|
|
|
color: #eee; |
|
|
|
padding: 5px; |
|
|
|
border-radius: 5px; |
|
|
|
z-index: 99; |
|
|
|
} |
|
|
|
</style> |