wangfukang 3 years ago
parent
commit
1aba41aa03
  1. 147
      package1/AI/AIHangOrderList.vue
  2. 6
      package1/AI/AIInventoryList.vue
  3. 267
      package1/AI/AIPicture.vue
  4. 23
      package1/AI/AiChat.vue
  5. 5
      package1/inventory/batchPrint.vue
  6. 15
      package1/inventory/gategory.vue
  7. 11
      package1/inventory/gategoryLow.vue
  8. 9
      package1/stock/addStock.vue
  9. 16
      package1/stock/addStockList.vue

147
package1/AI/AIHangOrderList.vue

@ -162,7 +162,7 @@
<view class="voice-text">语音识别中...</view>
</view>
<!-- 弹出层 -->
<uni-popup ref="shopPopup" background-color="#fff">
<uni-popup ref="shopPopup" background-color="#fff" @change="allChangeNum = 0">
<view class="shop-popup-content">
<view class="shop-popup-title">
<view class="shop-popup-title-left">
@ -175,18 +175,19 @@
<view class="shop-popup-title-right-box">{{goodsDetail.productSn}}</view>
<view class="popup-title-right-box" style="color: darkorange;"
@tap="inputDialogToggle('payDialog')">
<text style="margin-right:20rpx;color:#000;">¥{{purchasePrice}}</text>
<text style="margin-right:20rpx;">修改价格</text>
</view>
</view>
</view>
<view class="shop-popup-container" style="position: relative;">
<view class="shop-purchase-price" v-if="storageType == 0">
<!-- <view class="shop-purchase-price" v-if="storageType == 0">
<view style="margin-right: 20rpx;">实际价格</view>
<uni-easyinput type="digit" v-model="purchasePrice" @blur="checkPay(purchasePrice)" placeholder="请输入实际价格" />
</view>
</view> -->
<view @tap="saveCheck"
style="position: absolute;top: 110rpx;right: 20rpx;color: #088FEB;text-decoration: underline;">
style="position: absolute;top: 10rpx;right: 20rpx;color: #088FEB;text-decoration: underline;">
保存已选
</view>
<ul style="border-top:20rpx;">
@ -197,9 +198,12 @@
<view class="shop-attrs">
<uni-data-checkbox v-model="value" :localdata="range"
></uni-data-checkbox>
<text v-for="(itemTag, index1) in items.value" :key="index1"
<view class="suibian" v-for="(itemTag, index1) in items.value" :key="index1"
@tap.stop="attrNameChange(index,itemTag.value,index1) "
:class="itemTag.isChecked ? 'checkedText' : '' "> {{itemTag.value}}</text>
:class="itemTag.isChecked ? 'checkedText' : '' " style="position: relative;">
{{itemTag.value}}
<view class="kucun" v-if="itemTag.isKucun"></view>
</view>
</view>
</li>
</ul>
@ -209,7 +213,16 @@
<text style="width: 300rpx;display: inline-block;font-size: 30rpx;font-weight: bold;padding-left: 40rpx;">规格</text>
<text style="font-size: 30rpx;color: #000;font-weight: bold;width: 110rpx;display: inline-block;text-align: right;">库存</text>
</view>
<uni-number-box max='1000000' @minus='minusNum' @plus="plusNum" v-model="allChangeNum" @blur="allChange" />
<view class="zuni-numbox">
<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" />
<view @tap="plusNum" class="zuni-numbox__plus zuni-numbox-btns" style="background: #f5f5f5;">
<text class="zuni-numbox--text">+</text>
</view>
</view>
<!-- <uni-number-box max='1000000' @minus='minusNum' @plus="plusNum" v-model="allChangeNum" @blur="allChange" /> -->
</view>
<view class="shop-checkList" v-for="(item,index) in temporaryList" :key="index">
<view @tap.stop="delCarData(index)" style="margin-right: 20rpx;width: 7%;">
@ -246,6 +259,12 @@
<view class="popup-pay-container" @tap="checkPay(goodsDetail.wholesalePrice)">
<text style="display: inline-block">批发价:¥{{goodsDetail.wholesalePrice}}</text>
</view>
<view class="popup-pay-container" style="background: #fff;display: flex;width: 100%;">
<input type="digit" style="height: 100rpx;line-height: 100rpx;color:#000;width: 296rpx;" placeholder="请输入价格"
@input="changePay">
<view style="flex: 1;color: #fff;background: #088FEB;border-radius: 10px;width: 144rpx;"
@tap.stop="checkPay(purchasePrice)">确定</view>
</view>
</view>
</uni-popup>
</view>
@ -253,7 +272,8 @@
<script>
var plugin = requirePlugin("WechatSI")
let manager = plugin.getRecordRecognitionManager()
let manager = plugin.getRecordRecognitionManager()
import base from '@/utils/ossUploadFile/base64.js';
export default {
components: {},
data() {
@ -268,6 +288,7 @@
value: '',
isInventory:true,
temporaryNum: 0,
customPrice: 0, //选择自定义金额
goodsDetail: [],
attrNameList: [],
temporaryList: [],
@ -289,6 +310,8 @@
newTemList: [],
pecsList: [],
dataObj: new Map(),
yanseList:new Map(),
chimaList:new Map(),
allChangeNum:0,
isPlusAndMinus:false,
shopName:'',
@ -462,22 +485,23 @@
success: (res) => {
that.hangId = item.id
if(res.scanType == "QR_CODE"){ //二维码
let shopId = res.result.split(',')[1]
let shopId = base.decode(res.result.split(',')[1])
if(shopId == uni.getStorageSync('shopId')){
that.productId = res.result.split(',')[0]
that.toggle('bottom', res.result.split(',')[0]);
that.productId = base.decode(res.result.split(',')[0])
that.toggle('bottom', base.decode(res.result.split(',')[0]));
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
that.carList.push(item.saleDetailDTOList[i])
}
}
}else{
that.tui.toast('您的店铺中暂无该商品!')
setTimeout(res=>{
that.tui.toast('您的店铺中暂无该商品!')
},1000)
}
}else{
that.tui.request("/app/product/getByBarcode", "POST", {
barcode:res.result
barcode:base.decode(res.result)
}, false, true).then((res1) => {
if (res1.code == 200) {
that.productId = res1.result[0].id
@ -648,6 +672,10 @@
// }
},
//输入商品自定义金额
changePay(e) {
this.purchasePrice = e.detail.value
},
temporaryChange(val) {
this.zNum = 0
for (var i = 0; i < this.temporaryList.length; i++) {
@ -943,15 +971,16 @@
this.$refs.payDialog.open()
},
//通过商品id查询商品详细信息
getById(id) {
async getById(id) {
this.temporaryList = []
this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => {
await this.tui.request("/app/product/getById/" + id, "POST", {}, false, true).then((res) => {
if (res.code == 200) {
if(res.result.delFlag ==0 || res.result.purchasePrice==null || res.result.inStorageStatus == 0){
this.tui.toast("请将商品上架或入库后再操作!")
return
}
this.goodsDetail = res.result;
this.purchasePrice = this.goodsDetail.wholesalePrice
this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", {
categoryId: this.goodsDetail.categoryId
}, false, true).then((res1) => {
@ -996,11 +1025,43 @@
},
//库存商品详情
getKCList(id) {
this.yanseList = new Map()
this.chimaList = new Map()
console.log('goodsDetail',this.goodsDetail)
this.tui.request("/app/stock/productCount", "GET", {
productId: id
}, false, true).then((res) => {
if (res.code == 200) {
this.pecsList = res.result
for(let i=0;i<res.result.length;i++){
let attributeList = JSON.parse(res.result[i].attributeList)
Object.keys(attributeList).forEach(key => {
if(key == '颜色'){
if(this.yanseList.has(attributeList[key]) != true){
this.yanseList.set(attributeList[key],attributeList[key])
}
}else{
if(this.chimaList.has(attributeList[key]) != true){
this.chimaList.set(attributeList[key],attributeList[key])
}
}
})
}
for(let i=0;i<this.goodsDetail.attributeList[0].value.length;i++){ //颜色
if(this.yanseList.has(this.goodsDetail.attributeList[0].value[i].value) == true){
this.goodsDetail.attributeList[0].value[i].isKucun = true
}
}
for(let i=0;i<this.goodsDetail.attributeList[1].value.length;i++){ //尺码
if(this.chimaList.has(this.goodsDetail.attributeList[1].value[i].value) == true){
this.goodsDetail.attributeList[1].value[i].isKucun = true
}
}
console.log('颜色',this.yanseList)
console.log('尺码',this.chimaList)
console.log('颜色',this.goodsDetail)
} else {
this.tui.toast(res.message)
}
@ -1575,7 +1636,7 @@
}
.shop-attrs {
text {
.suibian {
display: inline-block;
border: 1px solid #5fd9ee;
margin: 20rpx;
@ -1583,13 +1644,12 @@
margin-left: 0;
background-color: #fff;
color: #5fd9ee;
padding: 0 10px;
min-width: 100rpx;
width: auto;
line-height: 70rpx;
line-height: 35px;
height: 70rpx;
text-align: center;
border-radius: 20rpx;
padding: 0 20rpx;
}
.checkedText {
@ -1650,5 +1710,52 @@
background-repeat: no-repeat;
background-size: 100%;
margin: 7px;
}
.kucun{
background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/9428d632981647728829da336a1d24b3.png) no-repeat;
width: 50rpx;
height: 25rpx;
position: absolute;
top: -14rpx;
right: -15rpx;
background-size: 100%;
}
.zuni-numbox {
height: 60rpx;
display: flex;
flex-direction: row;
}
.zuni-numbox-btns {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
padding: 0 8px;
cursor: pointer;
}
.zuni-numbox__value {
margin: 0 2px;
width: 40px;
text-align: center;
font-size: 20px;
line-height: 30px;
height: 60rpx;
border-left-width: 0;
border-right-width: 0;
}
.zuni-numbox--text {
line-height: 20px;
font-size: 32px;
font-weight: 300;
}
.zuni-numbox .zuni-numbox--disabled {
color: #c0c0c0 !important;
cursor: not-allowed;
}
</style>

6
package1/AI/AIInventoryList.vue

@ -123,7 +123,7 @@
return name;
},
async montageData(id){
this.tui.request("/app/purchase/getPurchaseAllDataOfAi?id=" + id, "POST", {}, false, false)
await this.tui.request("/app/purchase/getPurchaseAllDataOfAi?id=" + id, "POST", {}, false, false)
.then((res) => {
this.purchaseDetails = res.result.purchaseDetails
uni.setStorageSync('AiInventoryId', res.result.purchase.id)
@ -146,7 +146,7 @@
for(let m=0;m<this.purchaseDetails[i].stockLogList1.length;m++){
let list = {
attributeList: this.purchaseDetails[i].stockLogList1[m].attributeList,
productCount:this.purchaseDetails[i].stockLogList1[m].productCount,
productCount:this.purchaseDetails[i].stockLogList1[m].productCount || this.purchaseDetails[i].stockLogList1[m].productCounts,
productNum:'',
name: this.sliceMsg(this.purchaseDetails[i].stockLogList1[m].attributeList),
price: this.purchaseDetails[i].stockLogList1[m].purchasePrice
@ -159,7 +159,7 @@
}
}).catch((res) => {})
setTimeout(res => {
await setTimeout(res => {
this.goInventory()
}, 300)

267
package1/AI/AIPicture.vue

@ -67,7 +67,7 @@
</view>
<view style="height:200rpx;"></view>
</view>
<view class="bottom-box" @tap="identify">
<view class="bottom-box" @tap="clickAiBtn">
<view class="run-line"></view>
<img class="bottom-img"
src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/27e2655fe19f454d93970f968d91fbef.png" alt="" />
@ -80,6 +80,65 @@
<view @tap="upLoadImg('xuan')" class="popup-photo">从相册选择</view>
<view @tap="$refs.popup.close()" class="popup-photo" style="border-bottom:0;border-top:10px solid #eee;">取消</view>
</view>
</uni-popup>
<!-- 打印选择框 -->
<uni-popup ref="productDialog" background-color="#fff">
<view class="popup-pay-content" :style="{background:'url('+purchaseOcrPictureList[0].ocrPicture+') no-repeat;background-size: 100%;'}">
<view style="height: 750rpx;margin-top: 550rpx;z-index: 99;background: #fff;border-top: 1px solid #eee;">
<view class="popup-pay-title" style="margin-top: 50rpx;">
<text>识别规则示例</text>
</view>
<view class="content-fur">
<view>为了提高识别的准确率,请您找一款商品的一条规格信息作为AI识别的示例填入,图片中没有的信息不填</view>
<!-- <view>
<image :src="purchaseOcrPictureList[0].ocrPicture" style="width: 100%;height: 50rpx;background-size: 100%;background-repeat: no-repeat;"></image>
</view> -->
</view>
<view style="height: 350rpx;">
<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;">
货号:
</text>
<input v-model="productSn" type="text" 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="productName" type="text" 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;">
采购价:
</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;">
</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;">
</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;">
颜色:
</text>
<input v-model="color" type="text" 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="size" type="text" placeholder="请输入尺码" style="display: flex;height: 80rpx;width: 200rpx;line-height: 80rpx;padding-left: 20rpx;border: 1px solid #eee;">
</view>
</view>
<view class="popup-pay-container" @tap="identify">
确认
</view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -98,11 +157,24 @@
purchaseOcrPictureList: [],
parentPicturePath: '',
parentId: '',
newSubmit: []
newSubmit: [],
productSn:"",
productName:"",
price:"",
productCount:"",
color:"",
size:""
}
},
onShow() {
uni.authorize({
scope: 'scope.writePhotosAlbum',
success() {
},fail(){
this.tui.toast("您未授权,AI入库功能可能会出现错误")
}
})
},
onLoad() {
@ -114,57 +186,94 @@
},
splitData(str) {
return str.split('/')[3].split('.')[0]
},
clickAiBtn(){
console.log()
this.newSubmit = []
if (this.purchaseOcrPictureList.length == 0) {
this.tui.toast("请选择要上传的图片")
return
}
for (let i = 0; i < this.purchaseOcrPictureList.length; i++) {
if (this.purchaseOcrPictureList[i].count == 0 || this.purchaseOcrPictureList[i].count == '') {
this.tui.toast("请输入数量")
return
} else {
let data = {
ocrPicture: this.purchaseOcrPictureList[i].ocrPicture,
count: this.purchaseOcrPictureList[i].count,
parentPicturePath: ''
}
this.newSubmit.push(data)
if (this.purchaseOcrPictureList[i].children.length > 0) {
for (let m = 0; m < this.purchaseOcrPictureList[i].children.length; m++) {
if (this.purchaseOcrPictureList[i].children[m].count == 0 || this.purchaseOcrPictureList[i]
.children[m].count == '') {
this.tui.toast("请输入子图片的规格数量")
return
} else {
let data = {
ocrPicture: this.purchaseOcrPictureList[i].children[m].ocrPicture,
count: this.purchaseOcrPictureList[i].children[m].count,
parentPicturePath: this.purchaseOcrPictureList[i].ocrPicture
}
this.newSubmit.push(data)
}
}
}
}
}
this.$refs.productDialog.open('bottom')
},
identify() {
this.newSubmit = []
if (this.purchaseOcrPictureList.length == 0) {
this.tui.toast("请选择要上传的图片")
return
identify() {
let num = 0
if(this.productSn == ""){
num += 1
}
if(this.productName == ""){
num += 1
}
if(this.price == ""){
num += 1
}
if(this.productCount == ""){
num += 1
}
if(this.color == ""){
num += 1
}
if(this.size == ""){
num += 1
}
for (let i = 0; i < this.purchaseOcrPictureList.length; i++) {
if (this.purchaseOcrPictureList[i].count == 0 || this.purchaseOcrPictureList[i].count == '') {
this.tui.toast("请输入数量")
return
} else {
let data = {
ocrPicture: this.purchaseOcrPictureList[i].ocrPicture,
count: this.purchaseOcrPictureList[i].count,
parentPicturePath: ''
}
this.newSubmit.push(data)
if (this.purchaseOcrPictureList[i].children.length > 0) {
for (let m = 0; m < this.purchaseOcrPictureList[i].children.length; m++) {
if (this.purchaseOcrPictureList[i].children[m].count == 0 || this.purchaseOcrPictureList[i]
.children[m].count == '') {
this.tui.toast("请输入子图片的规格数量")
return
} else {
let data = {
ocrPicture: this.purchaseOcrPictureList[i].children[m].ocrPicture,
count: this.purchaseOcrPictureList[i].children[m].count,
parentPicturePath: this.purchaseOcrPictureList[i].ocrPicture
}
this.newSubmit.push(data)
}
}
}
}
if(num == 6){
this.tui.toast("未输入规格信息")
return
}else{
this.tui.request("/purchaseOcrPicture/batchSave", "POST", {
orderId: "",
purchaseOcrPictureList: this.newSubmit,
purchaseOcrExample:{
productSn:this.productSn,
productName:this.productName,
price:this.price,
productCount:this.productCount,
color:this.color,
size:this.size
}
}, false, false).then((res) => {
if (res.code == 200) {
uni.navigateBack({
delta: 1
})
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
}
this.tui.request("/purchaseOcrPicture/batchSave", "POST", {
orderId: "",
purchaseOcrPictureList: this.newSubmit
}, false, false).then((res) => {
if (res.code == 200) {
uni.navigateBack({
delta: 1
})
} else {
this.tui.toast(res.message)
}
}).catch((res) => {})
},
backPage() {
uni.navigateBack({
@ -172,7 +281,8 @@
})
},
//点击图片放大
showImage(img) {
showImage(img) {
console.log(this.purchaseOcrPictureList)
uni.previewImage({
urls: [img],
current: img
@ -223,7 +333,7 @@
that.upLoadFile(res1.tempFiles[0].tempFilePath)
}
})
},300)
},600)
}
})
}else if(type == 'xuan'){
@ -655,5 +765,58 @@
font-size: 36rpx;
font-weight: 800;
border-bottom: 1px solid #eee;
}
.popup-pay-content {
align-items: center;
justify-content: center;
// padding: 15px;
width: 100%;
height: 1300rpx;
max-height: 1300rpx;
// overflow: scroll;
overflow: hidden;
background-color: #fff;
}
.popup-pay-title {
font-size: 30rpx;
font-weight: bold;
text-align: center;
position: relative;
border-bottom: 1px solid #eee;
padding-bottom: 20rpx;
}
.popup-pay-container {
margin: 40rpx auto 0;
height: 100rpx;
border-radius: 10px;
background: #088FEB;
line-height: 100rpx;
text-align: center;
border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
color: #fff;
width: 90%;
}
.checked{
background: #60F3FF;
color: #fff !important;
}
.content-fur {
border-bottom: 1px solid #eee;
display: flex;
line-height: 50rpx;
padding: 20rpx;
}
.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;
}
</style>

23
package1/AI/AiChat.vue

@ -37,10 +37,13 @@
<view style="width: 100%;height: 100rpx;text-align: center;font-size: 11px;color: #777;line-height: 100rpx;">
点击可编辑语音输入的内容~
</view>
<view style="width: 526rpx;text-align: right;float: right;margin-right:20rpx;">
<view @tap="editTextBtn(item,index)" v-for="(item,index) in msgList" :key="index" style="display: inline-block;width: auto;height: auto;min-height: 80rpx;min-width:270rpx;line-height: 80rpx;background: linear-gradient(127.96deg, #6585fa 0%, #6ad5fe 100%);color: #fff;padding:0 20rpx;border-radius: 10px;border-bottom-right-radius: 0;margin-bottom: 40rpx;">
{{item.text}}
<view style="width: 526rpx;float: right;margin-right:20rpx;text-align: left;padding-bottom: 60rpx;">
<view style="width: 526rpx;display: block;float: right;" v-for="(item,index) in msgList" :key="index">
<view @tap="editTextBtn(item,index)" style="display: inline-block;width: auto;height: auto;min-height: 40px;background: linear-gradient(127.96deg, #6585fa 0%, #6ad5fe 100%);color: #fff;padding: 20rpx 10px;border-radius: 10px;border-bottom-right-radius: 0;margin-bottom: 20px;float: right;">
{{item.text}}
</view>
</view>
</view>
</view>
<view @tap="addReg" style="width: 150rpx;position: absolute;bottom: 86px;z-index: 99;right: 10px;height: 60rpx;text-align: center;line-height: 60rpx;color: #fff;border-radius: 5px;background: linear-gradient(90deg, #FF9797, #FFC1E0);">
@ -98,11 +101,11 @@
msgList:[],
editText:'',
index:'',
recordState: false,
recordState: false
}
},
onShow() {
},
onLoad(option) {
this.height = wx.getSystemInfoSync().windowHeight
@ -137,9 +140,10 @@
convertChineseToArabic(str) {
const chineseNumToArabic = {
'零': 0, '一': 1, '二': 2, '两': 2, '三': 3,
'四': 4, '五': 5, '六': 6, '七': 7, '八': 8, '九': 9,'杠':'-','刚':'-','军色':'均色'
'四': 4, '五': 5, '六': 6, '七': 7, '八': 8,
'九': 9,'杠':'-','刚':'-','军色':'均色','叉':'X','金色':'均色','井':'#'
};
const regex = /(零|一|二|两|三|四|五|六|七|八|九|杠|刚|军色)/g;
const regex = /(零|一|二|两|三|四|五|六|七|八|九|杠|刚|军色|叉|金色|井)/g;
return str.replace(regex, match => chineseNumToArabic[match]);
},
inputSaveText(){
@ -181,9 +185,10 @@
})
return
}
let convertedStr = this.convertChineseToArabic(res.result);
let data = {
text:this.spliceMsg(res.result)
text:this.spliceMsg(convertedStr)
}
that.msgList.push(data)
that.$forceUpdate()

5
package1/inventory/batchPrint.vue

@ -103,7 +103,8 @@
<script>
import util from '@/components/kk-printer/utils/util.js';
import * as blesdk from '@/components/kk-printer/utils/bluetoolth.js';
import kkPrinter from '@/components/kk-printer/index.vue';
import kkPrinter from '@/components/kk-printer/index.vue';
import base from '@/utils/ossUploadFile/base64.js';
export default {
data() {
return {
@ -343,7 +344,7 @@
strCmd += blesdk.addCPCLText('0', '230', '24', '0', 0, '零售价:'+(item.lsprice || item.price))
}
strCmd += blesdk.addCPCLQRCode(200, 140, 'H', '1', 6, [this.purchase!=''?item.productId:item.id,this.shopId]) //二维码
strCmd += blesdk.addCPCLQRCode(220, 160, 'H', '1', 4, [this.purchase!=''?base.encode(item.productId):base.encode(item.id),base.encode(this.shopId)]) //二维码
strCmd += blesdk.addCPCLLocation(0); //对齐指令 0-左对齐 1-右对齐 2-居中
strCmd += blesdk.addCPCLPrint();
this.bufferData.push(strCmd);

15
package1/inventory/gategory.vue

@ -22,11 +22,14 @@
</uni-popup-dialog>
</uni-popup>
<uni-popup ref="delDialog" type="dialog">
<view class="type-popup" style="width:600rpx;margin-bottom: 0;border-radius: 0;height: 400rpx;border-radius: 10px;">
<view style="height: 80rpx;font-size: 36rpx;font-weight: bold;line-height: 80rpx;text-align: center;">
<view class="type-popup" style="width:100%;margin-bottom: 0;border-radius: 0;height: 450rpx;border-radius: 10px;">
<view style="height: 120rpx;font-size: 36rpx;font-weight: bold;line-height: 120rpx;text-align: center;">
修改规格值
</view>
<view style="width: 90%;margin: 80rpx auto;">
<view style="height: 80rpx;font-size: 28rpx;line-height: 80rpx;text-align: center;">
请在下方输入框中输入新规格
</view>
<view style="width: 90%;margin: 20px auto 0;">
<uni-easyinput type="text" v-model="inputVal" @blur="handleBlur" placeholder="请输入规格值" />
</view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;background: linear-gradient(90deg, #60F3FF, #088FEB);color: #fff;display: flex;position: absolute;bottom: 0;">
@ -47,7 +50,7 @@
<view>
<text style="color:red;font-size:22rpx;">*您可以点击默认项快捷添加分类,如没有想要的快捷项,可以手动输入</text>
</view>
<input type="text" style="width: 100%;border: 1px solid #eee;height: 80rpx;padding-left: 20rpx;margin:20rpx 0;font-size: 25rpx;line-height: 80rpx;" v-model="typeText"
<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">
@ -297,7 +300,7 @@
if (type == 'edit') {
this.inputVal = item.categoryName;
this.editItem = item;
this.$refs.delDialog.open()
this.$refs.delDialog.open('bottom')
} else if (type == 'add') {
this.inputVal = '';
this.isOpenId = item;
@ -440,7 +443,7 @@
}
}
that.tui.request("/app/productCategory/batchSaveCategoryAndAttribute", "post", {
categoryName: this.inputVal,
categoryName: e,
productAttributeOfAddVos:that.multipleList
}, false, false).then((res) => {
if (res.code == 200) {

11
package1/inventory/gategoryLow.vue

@ -26,11 +26,14 @@
<u-modal :show="show" :title="'删除'" :content="'是否确认删除此分类?'" showCancelButton="true" @cancel="show = false"
@confirm="delItemModal"></u-modal>
<uni-popup ref="inputDialog" type="dialog">
<view class="type-popup" style="width:600rpx;margin-bottom: 0;border-radius: 0;height: 400rpx;border-radius: 10px;">
<view style="height: 80rpx;font-size: 36rpx;font-weight: bold;line-height: 80rpx;text-align: center;">
<view class="type-popup" style="width:100%;margin-bottom: 0;border-radius: 0;height: 450rpx;border-radius: 10px;">
<view style="height: 120rpx;font-size: 36rpx;font-weight: bold;line-height: 120rpx;text-align: center;">
新增规格
</view>
<view style="width: 90%;margin: 80rpx auto;">
<view style="height: 80rpx;font-size: 28rpx;line-height: 80rpx;text-align: center;">
请在下方输入框中输入新规格
</view>
<view style="width: 90%;margin: 20px auto 0;">
<uni-easyinput type="text" v-model="categoryText" @blur="handleBlur" placeholder="请输入规格值" />
</view>
<view style="width: 100%;height: 90rpx;line-height: 90rpx;text-align: center;border-radius: 0;background: linear-gradient(90deg, #60F3FF, #088FEB);color: #fff;display: flex;position: absolute;bottom: 0;">
@ -192,7 +195,7 @@
this.inputVal = item.attributeName;
this.editItem = item;
}
this.$refs.inputDialog.open()
this.$refs.inputDialog.open('bottom')
},
handleBlur(e){
this.categoryText = e.detail.value

9
package1/stock/addStock.vue

@ -137,7 +137,8 @@
</view>
</template>
<script>
<script>
import base from '@/utils/ossUploadFile/base64.js';
export default {
components: {},
data() {
@ -348,9 +349,11 @@
scanCode() {
uni.scanCode({
success: (res) => {
this.tui.request("/app/product/getById/" + res.result.split(',')[0], "POST", {}, false, true).then((res1) => {
this.tui.request("/app/product/getById/" + base.decode(res.result.split(',')[0]), "POST", {
}, false, true).then((res1) => {
if (res1.code == 200) {
let shopId = res.result.split(',')[1]
let shopId = base.decode(res.result.split(',')[1])
if(shopId == uni.getStorageSync('shopId')){
uni.navigateTo({
url: '/package1/stock/stockDetail?item=' + JSON.stringify(res1.result)

16
package1/stock/addStockList.vue

@ -86,10 +86,12 @@
</view>
</template>
<script>
<script>
import {
mapState
} from 'vuex';
} from 'vuex';
import base from '@/utils/ossUploadFile/base64.js';
export default {
computed: mapState(['shopName']),
data() {
@ -176,10 +178,10 @@
success: (res) => {
if (res.scanType == "QR_CODE") { //二维码
let shopId = res.result.split(',')[1]
let shopId = base.decode(res.result.split(',')[1])
if (shopId == uni.getStorageSync('shopId')) {
that.productId = res.result.split(',')[0]
that.getById(res.result.split(',')[0]);
that.productId = base.decode(res.result.split(',')[0])
that.getById(base.decode(res.result.split(',')[0]));
if (item.saleDetailDTOList) {
for (let i = 0; i < item.saleDetailDTOList.length; i++) {
that.carList.push(item.saleDetailDTOList[i])
@ -189,9 +191,9 @@
that.tui.toast('您的店铺中暂无该商品!')
}
} else {
that.productId = res.result
that.productId = base.decode(res.result)
that.tui.request("/app/product/getByBarcode", "POST", {
barcode: res.result
barcode: base.decode(res.result)
}, false, true).then((res1) => {
if (res1.code == 200) {
if (res1.result == '') {

Loading…
Cancel
Save