wangfukang 3 years ago
parent
commit
c1bffc5f0d
  1. BIN
      package1/.DS_Store
  2. 134
      package1/AI/AIHangOrderList.vue
  3. 10
      package1/AI/AIInventoryList.vue
  4. 76
      package1/AI/AIPicture.vue
  5. 13
      package1/AI/AiChangeGoods.vue
  6. 125
      package1/AI/AiChat.vue
  7. 3311
      package1/AI/addAiList.vue
  8. 584
      package1/AI/voiceInventory.vue
  9. 488
      package1/inventory/addGoods.vue
  10. 1
      package1/inventory/batchPrint.vue
  11. 39
      package1/inventory/gategory.vue
  12. 12
      package1/inventory/inventoryConfirm.vue
  13. 2
      package1/staff/addStaff.vue
  14. 2
      package1/stock/addStock.vue
  15. 2
      package1/stock/stockDetail.vue

BIN
package1/.DS_Store

Binary file not shown.

134
package1/AI/AIHangOrderList.vue

@ -162,7 +162,7 @@
<view class="voice-text">语音识别中...</view>
</view>
<!-- 弹出层 -->
<uni-popup ref="shopPopup" background-color="#fff" @change="allChangeNum = 0">
<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">
@ -217,7 +217,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" @focus="obtainPrice($event,'zongjishu')" @blur="allChange" 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>
@ -231,7 +231,7 @@
<view class="shop-checkList-box">
<text style="width: 300rpx;display: inline-block;">{{item.name}}</text> <text style="color:#777;font-size: 12px;">{{item.productNum==null?'无库存':item.productNum}}</text>
</view>
<uni-number-box max='1000000' v-model="item.productCount" @change="temporaryChange" />
<uni-number-box max='1000000' min="-10000" v-model="item.productCount" @change="temporaryChange" />
</view>
</view>
</view>
@ -266,7 +266,8 @@
@tap.stop="checkPay(purchasePrice)">确定</view>
</view>
</view>
</uni-popup>
</uni-popup>
<view class="mask-model" v-if="isVoice">貌似没有检测到您上次的语音录入信息,正在反复识别中</view>
</view>
</template>
@ -279,12 +280,14 @@
data() {
return {
khName:[],
isVoice:false,
regList:[],
pageNumber: 1,
status: 'loadmore',
recordState: false,
voiceText: ' ',
list: [],
linshiPrice:0,
value: '',
isInventory:true,
temporaryNum: 0,
@ -425,34 +428,25 @@
},
//按住语音识别,开始
kaishi() {
this.recordState = true
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'
})
},
//语音识别功能初始化
initRecord() {
let that = this;
manager.stop()
// 识别结束事件
manager.onStop = (res) => {
if (res.result == '') {
that.showRecordEmptyTip()
return
}
if(that.voiceText == ''){
that.voiceText = res.result
}else if(that.voiceText == null){
@ -465,6 +459,17 @@
// 识别错误事件
manager.onError = (res) => {
if(res.retcode == '-30011'){
that.isVoice = true
}
if(res.retcode == '-30004'){
that.isVoice = false
uni.hideToast()
uni.showToast({
title: "未识别到声音信息,请重新录入",
icon: 'none'
})
}
if (res.retcode == '-40001') {
uni.showToast({
title: '使用次数超限制,请联系管理员!',
@ -554,7 +559,7 @@
resultList = this.combination(this.goodsList);
}
var evalue = []
this.evalue = []
var value = []
for (var m = 0; m < resultList.length; m++) {
var name = ''
@ -570,7 +575,7 @@
}
value1 += "}"
value.push(value1)
evalue.push(name)
this.evalue.push(name)
}
// if (jishuqi == 0) {
@ -592,7 +597,7 @@
attributeList: value[i],
productCount: this.temporaryNum,
productNum: null,
name: evalue[i],
name: this.evalue[i],
price: this.purchasePrice
}
this.temporaryList.push(this.attributeList);
@ -683,8 +688,13 @@
}
this.zPrice = this.zNum * this.purchasePrice
},
clickClose(){
this.evalue = []
this.allChangeNum = 0
},
//弹窗选择规格后,点击弹窗中选好了按钮
temporaryCheck() {
this.evalue = []
if (this.storageType == 0 && this.purchasePrice == 0) {
uni.showToast({
title: "请输入实际价格!",
@ -760,12 +770,12 @@
AiOpenOrder(type){
if(type=='AI'){
uni.navigateTo({
url: '/pages/index/peopleList?popleType=khName'
url: '/package1/index/peopleList?popleType=khName'
})
}else{
uni.setStorageSync('hangOrderType','scanCode')
uni.navigateTo({
url: '/pages/index/peopleList?popleType=khName'
url: '/package1/index/peopleList?popleType=khName'
})
}
},
@ -1094,11 +1104,35 @@
})
return result;
},
obtainPrice(e,type,num){
this.linshiPrice = e.target.value
if(type=='zongjishu'){
this.allChangeNum = ''
}
},
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)
}
}
}
}
}
this.isPlusAndMinus == false
@ -1108,11 +1142,24 @@
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++
}
}
}
}
}
this.temporaryChange()
},
@ -1120,7 +1167,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--
}
}
}
}
this.temporaryChange()
},
@ -1757,5 +1813,21 @@
.zuni-numbox .zuni-numbox--disabled {
color: #c0c0c0 !important;
cursor: not-allowed;
}
.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>

10
package1/AI/AIInventoryList.vue

@ -156,6 +156,7 @@
price: this.purchaseDetails[i].price,
productCount: 0,
categoryId:this.purchaseDetails[i].categoryId,
categoryName:this.purchaseDetails[i].categoryName,
wholesalePrice: this.purchaseDetails[i].wholesalePrice,
purchasePrice:this.purchaseDetails[i].purchasePrice,
isNew: this.purchaseDetails[i].productId==null?true:false,
@ -168,10 +169,10 @@
}
for(let m=0;m<this.purchaseDetails[i].stockLogList1.length;m++){
let list = {
attributeList: this.purchaseDetails[i].stockLogList1[m].attributeList,
attributeList: this.getAttribute(this.purchaseDetails[i].stockLogList1[m].attributeList),
productCount:this.purchaseDetails[i].stockLogList1[m].productCount || this.purchaseDetails[i].stockLogList1[m].productCounts,
productNum:'',
name: this.sliceMsg(this.purchaseDetails[i].stockLogList1[m].attributeList),
name: this.sliceMsg(this.getAttribute(this.purchaseDetails[i].stockLogList1[m].attributeList)),
price: this.purchaseDetails[i].stockLogList1[m].purchasePrice
}
data.productCount += this.purchaseDetails[i].stockLogList1[m].productCount
@ -187,6 +188,11 @@
}, 300)
},
getAttribute(str){
str = str.replace(/"色"(?![^{]*": *"色")/g, '"均色"');
str = str.replace(/"码"(?![^{]*": *"码")/g, '"均码"');
return str
},
goInventory(){
uni.setStorageSync('carList1', this.carList1)
uni.navigateTo({

76
package1/AI/AIPicture.vue

@ -49,7 +49,7 @@
</view>
<image show-menu-by-longpress :src="item.ocrPicture" @load='loadImg' @tap="showImage(item.ocrPicture)"></image>
<uni-easyinput type='number' prefixIcon="compose" v-model='item.count'
placeholder="请输入规格数量"></uni-easyinput>
placeholder="请输入规格数量" @blur="numChange('zhu',item,index)"></uni-easyinput>
</view>
<view v-for="(items,indexs) in item.children" :key="indexs"
style="width: 200rpx;height: 280rpx;position: relative;background: #fff;margin-left: 20rpx;border-radius: 10px;">
@ -58,7 +58,7 @@
</view>
<image show-menu-by-longpress :src="items.ocrPicture" @load='loadImg' @tap="showImage(items.ocrPicture)"
style="width: 200rpx;height: 200rpx;padding: 5px;"></image>
<uni-easyinput type='number' v-model='items.count' placeholder="子图规格数量"></uni-easyinput>
<uni-easyinput type='number' v-model='items.count' placeholder="子图规格数量" @blur="numChange('zi',item,index,items,indexs)"></uni-easyinput>
</view>
<view @tap="addSonImg(item.id)"
style="width: 200rpx;height: 219rpx;background: rgba(255,255,255,0.4);margin: 0 20rpx;border-radius: 10px;font-size: 24rpx;color: #777;text-align: center;">
@ -113,13 +113,13 @@
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
采购价:
</text>
<input v-model="price" type="digit" placeholder="请输入价格" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="price" @focus="obtainPrice($event,'price')" @blur="changessPrice($event,'price')" type="digit" placeholder="请输入价格" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
<view style="padding-left: 20rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
数量:
</text>
<input v-model="productCount" type="digit" placeholder="请输入数量" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
<input v-model="productCount" @focus="obtainPrice($event,'productCount')" @blur="changessPrice($event)" type="digit" placeholder="请输入数量" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
<view style="padding-left: 40rpx;display: flex;height: 80rpx;width: 50%;line-height: 80rpx;margin-top: 20rpx;float: left;">
<text style="display:inline-block;width:100rpx;font-size:22rpx;">
@ -167,8 +167,8 @@
</view>
</uni-popup>
<view v-if="isTake" style="position: fixed;width: 100%;height: 100%;z-index: 100;top: 0;">
<camera device-position="back" flash="off" style="width: 100%; height: 100%;"></camera>
<view style="width: 100%;height: 120rpx;position: fixed;bottom:200rpx;">
<camera device-position="back" output-dimension='max' @initdone='showBtn' flash="off" style="width: 100%; height: 100%;"></camera>
<view style="width: 100%;height: 120rpx;position: fixed;bottom:200rpx;" v-if="isShow == true">
<view @tap="takePhoto" style="width: 120rpx;height: 120rpx;border-radius: 120rpx;background: #fff;margin: 0 auto;border: 2px solid #eee;">
<view style="width: 116rpx;height: 116rpx;border-radius: 116rpx;background: #fff;margin: 0 auto;border: 1px solid #fff;"></view>
</view>
@ -191,6 +191,7 @@
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/44e7ccc2fae74db593bd1a10f538e2de.jpg',
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/2a55142e562b4ea480ce553c8b84d092.jpg'
],
isShow:false,
focus:false,
purchaseOcrPictureList: [],
parentPicturePath: '',
@ -294,6 +295,30 @@
// this.focus = true
// this.$refs.inputText.focus();
},
numChange(type,item,index,items,indexs){
if(type == 'zhu'){
if(item.count > 20){
uni.showModal({
title: '提示',
showCancel:false,
content: '规格数不能超过20,例:“黑色M码”这种为一个规格,“黑色S码”或“白色L码”则为另外的规格,请以此种颜色+尺码组合为一种的方式来计数',
success: function (res) {}
});
this.purchaseOcrPictureList[index].count = ''
}
}else if(type == 'zi'){
if(items.count > 20){
uni.showModal({
title: '提示',
showCancel:false,
content: '规格数不能超过20,例:“黑色M码”这种为一个规格,“黑色S码”或“白色L码”则为另外的规格,请以此种颜色+尺码组合为一种的方式来计数',
success: function (res) {}
});
this.purchaseOcrPictureList[index].children[indexs].count = ''
}
}
},
shurukuang(){
if(this.name == 'productSn'){
this.productSn = this.nameText
@ -388,6 +413,10 @@
// }
}
});
},
showBtn(){
this.isShow = true
uni.hideLoading();
},
async upLoadImg(type) {
uni.showLoading({
@ -478,6 +507,41 @@
}
});
},
obtainPrice(e,type,num){
console.log("获得焦点")
this.linshiPrice = e.target.value
if(type=='price'){
this.price = ''
}else if(type=='productCount'){
this.productCount = ''
}
},
changessPrice(e,type) {
if(type == 'price'){
if(this.linshiPrice == e.target.value){
this.price = e.target.value
}else{
if(e.target.value == ''){
this.price = this.linshiPrice
}else{
this.price = e.target.value
}
}
}else{
if(this.linshiPrice == e.target.value){
this.productCount = e.target.value
}else{
if(e.target.value == ''){
this.productCount = this.linshiPrice
}else{
this.productCount = e.target.value
}
}
}
},
cameraUpload(){
let that = this;

13
package1/AI/AiChangeGoods.vue

@ -20,14 +20,17 @@
<view class="content-right">
<view class="right-box" v-for="(item,index) in shopList" :key="index" @tap="backPrevPage(item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.inStorageStatus == 0"
@tap.stop="clickMask(item)"></view>
<!-- <view class="shop-mask" v-if="item.delFlag == 0 || item.inStorageStatus == 0"
@tap.stop="clickMask(item)"></view> -->
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>
</view>
<view class="box-right">
<view class="box-right-name">{{item.productName}}</view>
<view class="box-right-name">
{{item.productName}}
<text style="color: red;" v-if="item.delFlag == 0">(已下架)</text>
</view>
<view class="box-right-num">{{item.productSn}}</view>
<view class="box-right-price">
<view class="price-box">
@ -51,8 +54,8 @@
</view>
<view class="right-box" v-for="(item,index) in shopList1" :key="index" @tap="backPrevPage(item)">
<!-- 当商品的delFlag=0和未入库状态时,显示此遮罩,点击弹出弹窗提示不能操作 -->
<view class="shop-mask" v-if="item.delFlag == 0 || item.inStorageStatus == 0"
@tap.stop="clickMask(item)"></view>
<!-- <view class="shop-mask" v-if="item.delFlag == 0 || item.inStorageStatus == 0"
@tap.stop="clickMask(item)"></view> -->
<view class="box-left">
<img class="img-radius" :src="item.productPicture" alt="" v-if="item.productPicture">
<view class="noPic" v-else>暂无图片</view>

125
package1/AI/AiChat.vue

@ -84,7 +84,8 @@
</view>
</view>
</view>
</uni-popup>
</uni-popup>
<view class="mask-model" v-if="isNoVoice">貌似没有检测到您上次的语音录入信息,正在反复识别中</view>
</view>
</template>
@ -96,6 +97,7 @@
data() {
return {
isVoice:true,
isNoVoice:false,
height:0,
khName:{},
msgList:[],
@ -133,8 +135,17 @@
close(){
this.$refs.popup.close()
},
//正则匹配处理“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) {
@ -150,7 +161,30 @@
},
inputSaveText(){
let convertedStr = this.convertChineseToArabic(this.editText);
let 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,',数量:')
}
convertedStr = this.convertStringCorrectly(convertedStr)
convertedStr = this.spliceMsg(convertedStr)
if(convertedStr.indexOf(',') == 0){
convertedStr = convertedStr.substr(1)
}
let getMsg = convertedStr
if(this.editText == ''){
return;
}
@ -162,35 +196,62 @@
},
//按住语音识别,开始
kaishi() {
this.recordState = true
manager.start({
duration: 60000,
lang: "zh_CN"
});
if(this.isNoVoice == false){
this.recordState = true
uni.vibrateShort();
manager.start({
duration: 60000,
lang: "zh_CN"
});
}
},
//松开语音识别,结束
jieshu() {
this.recordState = false
manager.stop()
},
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() {
let that = this;
manager.stop()
// 识别结束事件
manager.onStop = (res) => {
if (res.result == '') {
uni.showToast({
title: "请重新说一遍",
icon: 'error'
})
return
}
let convertedStr = this.convertChineseToArabic(res.result);
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,',数量:')
}
convertedStr = this.convertStringCorrectly(convertedStr)
convertedStr = this.spliceMsg(convertedStr)
if(convertedStr.indexOf(',') == 0){
console.log('位置',convertedStr.indexOf(','))
convertedStr = convertedStr.substr(1)
}
let data = {
text:this.spliceMsg(convertedStr)
text:convertedStr
}
that.msgList.push(data)
that.$forceUpdate()
@ -199,6 +260,18 @@
// 识别错误事件
manager.onError = (res) => {
if(res.retcode == '-30011'){
that.isNoVoice = true
}
if(res.retcode == '-30004'){
// uni.hideLoading()
that.isNoVoice = false
uni.hideToast()
uni.showToast({
title: "未识别到声音信息,请重新录入",
icon: 'none'
})
}
if (res.retcode == '-40001') {
uni.showToast({
title: '使用次数超限制,请联系管理员!',
@ -405,5 +478,21 @@
color: #fff;
line-height: 80rpx;
margin-top: 50rpx;
}
.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>

3311
package1/AI/addAiList.vue

File diff suppressed because it is too large

584
package1/AI/voiceInventory.vue

@ -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>

488
package1/inventory/addGoods.vue

@ -16,17 +16,12 @@
<uni-forms-item label="货号" name="productSn" required>
<uni-easyinput type="text" v-model="formData.productSn" @blur="getSnIsRepeat" placeholder="请输入货号" trim="all" />
</uni-forms-item>
<uni-forms-item label="商品条码" name="barcode">
<uni-easyinput type="text" v-model="formData.barcode" placeholder="可以扫码商品条码添加" trim="all" />
<u-icon name="camera" size="36" @tap.stop='scanCodeAdd'></u-icon>
</uni-forms-item>
<uni-forms-item label="批发价" name="wholesalePrice" required>
<uni-easyinput type="digit" v-model="formData.wholesalePrice" placeholder="请输入批发价" trim="all" />
</uni-forms-item>
<uni-forms-item label="市场价" name="price" required>
<uni-easyinput type="digit" v-model="formData.price" placeholder="请输入零售价" trim="all" />
<uni-forms-item label="批发价" name="wholesalePrice">
<!-- <uni-easyinput type="digit" v-model="formData.wholesalePrice" placeholder="请输入批发价" trim="all" /> -->
<input type="digit" class="content-input" v-model="formData.wholesalePrice" @focus="obtainPrice($event,'wholesalePrice')" @blur="changessPrice($event,'wholesalePrice')" placeholder="请输入批发价">
</uni-forms-item>
<uni-forms-item label="分类" name="categoryId" required v-if="dataList == ''">
<uni-forms-item label="分类" name="categoryId" v-if="dataList == ''">
<!-- <uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择分类" @change="categoryChange(formData.categoryId)"></uni-data-select> -->
<view class="content-list">
@ -39,6 +34,27 @@
</view>
</view>
</uni-forms-item>
<uni-forms-item label="添加规格" name="categoryId" v-if="dataList == ''">
<!-- <uni-data-select class="uni-data-select" :localdata="categoryList" v-model="formData.categoryId"
placeholder="请选择分类" @change="categoryChange(formData.categoryId)"></uni-data-select> -->
<view class="content-list">
<view class="list-val">
<input type="text" placeholder="点击选择规格" disabled
style="border-bottom: 1px solid #fff;text-align: center;"
@tap="ejectRuleSelect">
<!-- <uni-icons type="right" size="16"
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons> -->
</view>
</view>
</uni-forms-item>
<uni-forms-item label="商品条码" name="barcode">
<uni-easyinput type="text" v-model="formData.barcode" placeholder="可以扫码商品条码添加" trim="all" />
<u-icon name="camera" size="36" @tap.stop='scanCodeAdd'></u-icon>
</uni-forms-item>
<uni-forms-item label="市场价" name="price">
<!-- <uni-easyinput type="digit" v-model="formData.price" placeholder="请输入零售价" trim="all" /> -->
<input type="digit" class="content-input" v-model="formData.price" @focus="obtainPrice($event,'price')" @blur="changessPrice($event,'price')" placeholder="请输入零售价">
</uni-forms-item>
<uni-forms-item label="尾货预警" name="salesWeek">
<!-- <uni-easyinput type="digit" v-model="formData.salesWeek" placeholder="请输入零售价" trim="all" /> -->
<uni-datetime-picker type="date" :clear-icon="false" v-model="formData.salesWeek" />
@ -57,7 +73,40 @@
<view v-else>
<button @tap.stop="submit()">保存</button>
</view>
</view>
</view>
<!-- 添加分类弹出层 -->
<uni-popup ref="addTypeDialog" background-color="#fff">
<view class="add-popup-content">
<view class="add-popup-title">
<text>添加规格</text>
<uni-icons @tap='close' type="closeempty" color='red' size="16"
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view class="add-popup-container">
<!-- <view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text>
</view> -->
<!-- <input type="text" v-model="typeText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;"
placeholder="请输入分类名称"> -->
<ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
<view class="name">{{item.name}}</view>
<u-icon size="20" name="plus" color="#5fd9ee"
@tap="toggle(index) "></u-icon>
</view>
<view class="content-fur">
<view class="content-low" :class="item1.checked?'checked':''" v-for="(item1,index1) in item.list" :key="index1"
@tap.stop="addMultipleType(item,item1.value,index1)">{{item1.value}}</view>
</view>
</li>
</ul>
<view class="add-popup-bottom">
<view class="add-popup-btn" @tap="dialogInputConfirm()">确认</view>
</view>
</view>
</view>
</uni-popup>
<!-- <u-modal v-model="show" :content="content"></u-modal> -->
</view>
</template>
@ -69,16 +118,143 @@
fileList1: [],
formData: {
productName: '',
price: '',
price: 0,
productSn: '',
wholesalePrice: '',
wholesalePrice: 0,
productPicture: '',
productIntro: '',
categoryId: '',
salesWeek: '',
tailWarn: '',
barcode:''
},
},
defaultList:[{
name:'颜色',
list:[{
value:'均色',
checked:false,
},{
value:'白色',
checked:false,
},{
value:'黑色',
checked:false,
},{
value:'浅蓝',
checked:false,
},{
value:'蓝色',
checked:false,
},{
value:'灰色',
checked:false,
},{
value:'咖色',
checked:false,
},{
value:'紫色',
checked:false,
},{
value:'红色',
checked:false,
},{
value:'米色',
checked:false,
}]
},{
name:'尺码',
list:[{
value:'均码',
checked:false,
},{
value:'XS码',
checked:false
},{
value:'S码',
checked:false,
},{
value:'M码',
checked:false,
},{
value:'L码',
checked:false,
},{
value:'XL码',
checked:false,
},{
value:'2XL码',
checked:false,
},{
value:'3XL码',
checked:false,
},{
value:'4XL码',
checked:false,
},{
value:'25码',
checked:false
},{
value:'26码',
checked:false
},{
value:'27码',
checked:false
},{
value:'28码',
checked:false
},{
value:'29码',
checked:false
},{
value:'30码',
checked:false
},{
value:'31码',
checked:false
},{
value:'32码',
checked:false
},{
value:'33码',
checked:false
},{
value:'34码',
checked:false
},{
value:'35码',
checked:false
},{
value:'36码',
checked:false
},{
value:'37码',
checked:false
},{
value:'38码',
checked:false
},{
value:'39码',
checked:false
},{
value:'40码',
checked:false
},{
value:'41码',
checked:false
},{
value:'42码',
checked:false
},{
value:'43码',
checked:false
},{
value:'44码',
checked:false
},{
value:'45码',
checked:false
}]
}],
categoryList: [],
productId:'',
arrtList: [],
@ -86,7 +262,8 @@
arrtChange: [],
categoryId:'',
dataList:[],
type:'add',
type:'add',
multipleList:[],
rules: {
categoryId: {
rules: [{
@ -94,18 +271,18 @@
errorMessage: '请选择商品分类',
}, ],
},
price: {
rules: [{
required: true,
errorMessage: '请填写市场价',
}, ],
},
wholesalePrice: {
rules: [{
required: true,
errorMessage: '请填写批发价',
}, ],
},
// price: {
// rules: [{
// required: true,
// errorMessage: '请填写市场价',
// }, ],
// },
// wholesalePrice: {
// rules: [{
// required: true,
// errorMessage: '请填写批发价',
// }, ],
// },
productSn: {
rules: [{
required: true,
@ -154,9 +331,25 @@
this.formData.categoryId = this.dataList.categoryId
this.formData.salesWeek = this.dataList.salesWeek
this.formData.tailWarn = this.dataList.tailWarn
}
}
this.getGategoryList()
},
methods: {
methods: {
//初始化获取分类列表
getGategoryList() {
this.tui.request("/app/productCategory/list", "get", {
// shopId: 1,
}, false, true).then((res) => {
if (res.code == 200) {
if(res.result.length > 0){
this.typeItem = res.result[0]
this.formData.categoryId = this.typeItem.id
}
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
// 删除图片
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
@ -187,6 +380,104 @@
}))
fileListLen++
}
},
obtainPrice(e,type,num){
console.log("获得焦点")
this.linshiPrice = e.target.value
if(type=='price'){
this.formData.price = ''
}else if(type=='wholesalePrice'){
this.formData.wholesalePrice = ''
}
},
dialogInputConfirm(e) {
let that = this;
if(that.multipleList == ''){
that.multipleList = [{
attributeName:'颜色',
productAttributeValueVoList:[{
checked: true,
value: "均色"
}]
},{
attributeName:'尺码',
productAttributeValueVoList:[{
checked: true,
value: "均码"
}]
}]
}else{
for(let i=0;i<that.multipleList.length;i++){
if(that.multipleList[i].productAttributeValueVoList == ''){
if(that.multipleList[i].attributeName == '颜色'){
that.multipleList[i].productAttributeValueVoList = [{
checked: true,
value: "均色"
}]
}else{
that.multipleList[i].productAttributeValueVoList = [{
checked: true,
value: "均码"
}]
}
}else{
if(that.multipleList.length != 2){
if(that.multipleList[i].attributeName == '颜色'){
let data = {
attributeName:'尺码',
productAttributeValueVoList:[{
checked: true,
value: "均码"
}]
}
that.multipleList.push(data)
}else{
let data = {
attributeName:'颜色',
productAttributeValueVoList:[{
checked: true,
value: "均码"
}]
}
that.multipleList.push(data)
}
}
}
}
}
for(var i=0;i<that.defaultList.length;i++){
for(var m=0;m<that.defaultList[i].list.length;m++){
that.defaultList[i].list[m].checked = false
}
}
console.log('multipleList',that.multipleList)
that.$refs.addTypeDialog.close()
},
changessPrice(e,type) {
if(type == 'price'){
if(this.linshiPrice == e.target.value){
this.formData.price = e.target.value
}else{
if(e.target.value == ''){
this.formData.price = this.linshiPrice
}else{
this.formData.price = e.target.value
}
}
}else{
if(this.linshiPrice == e.target.value){
this.formData.wholesalePrice = e.target.value
}else{
if(e.target.value == ''){
this.formData.wholesalePrice = this.linshiPrice
}else{
this.formData.wholesalePrice = e.target.value
}
}
}
},
uploadFilePromise(url) {
@ -225,6 +516,9 @@
}
})
},
ejectRuleSelect(){
this.$refs.addTypeDialog.open('bottom')
},
// 触发提交表单
submit() {
@ -233,14 +527,15 @@
this.$refs.form.validate().then(res => {
if(that.dataList !=''){
url = '/app/product/edit'
res.id = that.dataList.id
this.formData.id = that.dataList.id
}else{
url = '/app/product/save'
this.formData.purchasePrice = 0
}
if(res.productPicture == ''){
res.productPicture = ''
}
that.tui.request(url, "post", res, false, false).then((res1) => {
that.tui.request(url, "post", this.formData, false, false).then((res1) => {
if (res1.code == 200) {
uni.navigateBack({
delta: 1
@ -286,7 +581,57 @@
})
}
})
}
},
//选择多个规格保存
addMultipleType(item,item1,index){
item.list[index].checked = !item.list[index].checked
var list = []
if(this.multipleList == ''){
list.push(item.list[index])
var data = {
attributeName:item.name,
productAttributeValueVoList: list
}
this.multipleList.push(data)
}else{
for(var i=0;i<this.multipleList.length;i++){
if(this.multipleList[i].attributeName == item.name){ //同种分类
for(var m=0;m<this.multipleList[i].productAttributeValueVoList.length;m++){
if(this.multipleList[i].productAttributeValueVoList[m].value == item.list[index].value){ //规格相同
this.multipleList[i].productAttributeValueVoList.splice(m,1)
return;
}else{ //规格不同
if(m+1 == this.multipleList[i].productAttributeValueVoList.length){
this.multipleList[i].productAttributeValueVoList.push(item.list[index])
return;
}
}
}
}else{ //不同分类
if(this.multipleList.length == i+1){
list.push(item.list[index])
var data = {
attributeName:item.name,
productAttributeValueVoList: list
}
this.multipleList.push(data)
return;
}
}
}
}
},
}
}
</script>
@ -339,6 +684,11 @@
width: 160rpx;
height: 160rpx;
}
.checked{
background: #60F3FF !important;
color: #fff !important;
border-radius: 5px !important;
}
.content-list {
height: 70rpx;
border: 1px solid #eee;
@ -350,5 +700,79 @@
color: #fff;
background: #5fd9ee;
border-radius: 10px;
}
.content-input {
width: auto;
position: relative;
overflow: hidden;
flex: 1;
line-height: 1;
font-size: 14px;
height: 35px;
border: 2px solid #eee;
padding-left: 20rpx;
border-radius: 5px;
}
.add-popup-content {
align-items: center;
justify-content: center;
padding: 15px;
width: 100%;
height: 1050rpx;
background-color: #fff;
}
.add-popup-title {
font-size: 36rpx;
font-weight: bold;
text-align: center;
position: relative;
}
.add-popup-container {
margin-top: 20rpx;
}
.add-popup-bottom {
display: flex;
height: 80rpx;
color: #fff;
line-height: 80rpx;
margin-top: 50rpx;
}
.add-popup-btn {
flex: 1;
text-align: center;
background: linear-gradient(90deg, #60F3FF, #088FEB);
}
.title-fur {
width: 95%;
height: 70rpx;
margin: 0 auto;
border-bottom: 1px solid #eee;
.name {
font-size: 30rpx;
width: 90%;
float: left;
height: 70rpx;
line-height: 70rpx;
}
}
.content-fur {
padding-bottom: 25rpx;
}
.content-low {
width: auto;
border: 1px solid #eee;
display: inline-block;
min-width: 90rpx;
padding: 5rpx;
font-size: 35rpx;
text-align: center;
color: #777;
margin: 20rpx 0 0 20rpx;
border-radius: 5px;
}
</style>

1
package1/inventory/batchPrint.vue

@ -350,6 +350,7 @@
this.bufferData.push(strCmd);
}
that.$nextTick(()=>{
console.log('bufferData',that.bufferData)
that.$refs.payDialog.close();
that.bufferData = []
uni.navigateBack({

39
package1/inventory/gategory.vue

@ -8,9 +8,12 @@
<li v-for="(item, index) in indexList" :key="index" @tap="clickList(item)">
<view class="name">
<text>{{item.categoryName}}</text>
<u-icon name="edit-pen-fill" size="22" @tap.stop="inputDialogToggle('edit', item)"></u-icon>
</view>
<button class="bj-btn" @tap.stop="goGategoryLow(item.id)">编辑规格</button>
</view>
<view class="bj-btn" @tap.stop="inputDialogToggle('edit', item)">
<u-icon name="edit-pen-fill" size="22"></u-icon>
</view>
<!-- <button @tap.stop="goGategoryLow(item.id)">编辑规格</button> -->
</li>
</ul>
</view>
@ -47,12 +50,12 @@
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;"></uni-icons>
</view>
<view class="add-popup-container">
<view>
<!-- <view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text>
</view>
</view> -->
<input type="text" v-model="typeText" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;"
placeholder="请输入分类名称">
<ul>
<!-- <ul>
<li v-for="(item,index) in defaultList" :key="index">
<view class="title-fur">
<view class="name">{{item.name}}</view>
@ -64,7 +67,7 @@
@tap.stop="addMultipleType(item,item1.value,index1)">{{item1.value}}</view>
</view>
</li>
</ul>
</ul> -->
<view class="add-popup-bottom">
<view class="add-popup-btn" @tap="dialogInputConfirm(typeText)">确认</view>
</view>
@ -73,7 +76,7 @@
</uni-popup>
<!-- 查看商品库存弹出层 -->
<uni-popup ref="carPopup" background-color="#fff">
<view class="popup-content" style="height:auto !important;">
<view class="popup-content" style="height:auto !important;max-height: 1000rpx;overflow: scroll;">
<view style="font-size: 36rpx;font-weight: bold;text-align: center;">提示</view>
<view v-if="goodsList !=''"
style="width:100%;font-weight:bold;text-align: center;font-size: 28rpx;margin: 20rpx 0;">
@ -187,13 +190,13 @@
value:'XL码',
checked:false,
},{
value:'XXL码',
value:'2XL码',
checked:false,
},{
value:'XXXL码',
value:'3XL码',
checked:false,
},{
value:'XXXXL码',
value:'4XL码',
checked:false,
},{
value:'25码',
@ -305,7 +308,7 @@
this.inputVal = '';
this.isOpenId = item;
this.dialogTit = '输入分类名'
this.$refs.addTypeDialog.open('bottom')
this.$refs.addTypeDialog.open('center')
}
},
@ -540,12 +543,9 @@
},
//选择多个规格保存
addMultipleType(item,item1,index){
item.list[index].checked = !item.list[index].checked
var list = []
if(this.multipleList == ''){
list.push(item.list[index])
var data = {
attributeName:item.name,
@ -687,10 +687,9 @@
}
.bj-btn {
width: 120rpx;
width: 80rpx;
height: 60rpx;
font-size: 26rpx;
background: red;
margin: 20rpx 0;
float: left;
padding: 0;
@ -698,7 +697,7 @@
}
.name {
width: 75%;
width: 86%;
float: left;
display: flex;
}
@ -771,8 +770,8 @@
align-items: center;
justify-content: center;
padding: 15px;
width: 100%;
height: 1300rpx;
width: 500rpx;
height: 350rpx;
background-color: #fff;
}

12
package1/inventory/inventoryConfirm.vue

@ -23,21 +23,21 @@
</view>
</view>
<view class="tui-goods-info" style="width: 95%;margin: 0 auto;">
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">应付金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ purchase.shouldPay == null ?'暂无':purchase.shouldPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">已付金额</view>
<view class="tui-goods-price">
<view class="tui-size-24">¥</view>
<view class="tui-price-large">{{ purchase.alreadyPay == null ?'暂无':purchase.alreadyPay }}</view>
</view>
</view>
<view class="tui-price-flex tui-size32" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-price-flex tui-size32" v-if="userType == 0" style="height: 80rpx;line-height: 80rpx;">
<view class="tui-flex-shrink">欠款</view>
<view class="tui-goods-price tui-primary-color">
<view class="tui-size-24">¥</view>
@ -75,7 +75,8 @@
return {
purchase:'',
purchaseDetails:'',
aiinventory:0 //1是AI入库 0是普通入库
aiinventory:0, //1是AI入库 0是普通入库
userType:1
}
},
filters: {
@ -93,7 +94,8 @@
onLoad(option) {
this.purchaseDetails = JSON.parse(option.purchaseDetails)
this.purchase = JSON.parse(option.purchase)
this.aiinventory = option.aiinventory
this.aiinventory = option.aiinventory
this.userType = uni.getStorageSync('type')
},
methods: {
inventorySubmit() {

2
package1/staff/addStaff.vue

@ -81,7 +81,7 @@
let url;
if(this.type=='edit'){
url = '/app/common/user/edit'
this.addForm.username = this.mobile
this.addForm.username = this.addForm.mobile
this.addForm.id = this.id
}else{
url = '/app/common/user/add'

2
package1/stock/addStock.vue

@ -118,7 +118,7 @@
<view class="checkList-box">
{{item1.stockCount}}
</view>
<uni-number-box max="100000" v-model="item1.pdNum" />
<uni-number-box min="-10000" max="100000" v-model="item1.pdNum" />
</view>
</view>
</view>

2
package1/stock/stockDetail.vue

@ -30,7 +30,7 @@
{{item.stockCount}}
</view>
<view style="width: 27%;font-size: 26rpx;padding-top: 5px;">
<uni-number-box :min="-1000000" max='1000000' v-model="item.pdNum" />
<uni-number-box min="-10000" max='1000000' v-model="item.pdNum" />
</view>
</view>
</view>

Loading…
Cancel
Save