diff --git a/package1/AI/AIPicture.vue b/package1/AI/AIPicture.vue
index 4ad9f66..c35b781 100644
--- a/package1/AI/AIPicture.vue
+++ b/package1/AI/AIPicture.vue
@@ -21,9 +21,9 @@
欢迎使用Ai助手,为了提高图片识别准确率,建议您按照以下要求上传图片:
1.每张图片建议您裁剪到20个规格或以下
2.确保最后一款商品规格截取完整
- 3.每张图片输入对应的规格数量
- 4.图片越清晰角度越正识别准确率越高,建议使用原相机拍照并在相册内截图后上传
- 5.如果拍照后找不到所拍照片,打开微信的设置-通用-照片、视频里面的照片,点击开启后重启微信即可
+ 3.每张图片输入对应的规格数量
+ 4.图片越清晰角度越正识别准确率越高,建议使用原相机拍照并在相册内截图后上传
+ 5.如果拍照后找不到所拍照片,打开微信的设置-通用-照片、视频里面的照片,点击开启后重启微信即可
6.点击可查看使用教程
@@ -37,7 +37,7 @@
上传图片
-
+
(←点击此处添加主图)
@@ -47,25 +47,27 @@
-
-
+
+
-
-
+
+
点击添加子图
-
+
@@ -73,109 +75,136 @@
Ai识别
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -190,33 +219,34 @@
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/5444bab7df8d47e09c831c054b6e447b.jpg',
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/44e7ccc2fae74db593bd1a10f538e2de.jpg',
'https://jewel-shop.oss-cn-beijing.aliyuncs.com/2a55142e562b4ea480ce553c8b84d092.jpg'
- ],
- isShow:false,
- focus:false,
+ ],
+ isShow: false,
+ focus: false,
purchaseOcrPictureList: [],
parentPicturePath: '',
parentId: '',
- newSubmit: [],
- productSn:"",
- productName:"",
- price:"",
- productCount:"",
- color:"",
- size:"",
- keyBoardHeight:0,
- name:'',
- nameText:'',
- isTake:false
+ newSubmit: [],
+ productSn: "",
+ productName: "",
+ price: "",
+ productCount: "",
+ color: "",
+ size: "",
+ keyBoardHeight: 0,
+ name: '',
+ nameText: '',
+ isTake: false
}
},
onShow() {
- uni.authorize({
- scope: 'scope.writePhotosAlbum',
- success() {
-
- },fail(){
- this.tui.toast("您未授权,AI入库功能可能会出现错误")
- }
+ uni.authorize({
+ scope: 'scope.writePhotosAlbum',
+ success() {
+
+ },
+ fail() {
+ this.tui.toast("您未授权,AI入库功能可能会出现错误")
+ }
})
},
onLoad() {
@@ -229,164 +259,164 @@
},
splitData(str) {
return str.split('/')[3].split('.')[0]
- },
- clickAiBtn(){
- 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: '',
- ocrPictureOrder:i == 0 ? "" : i + 1
- }
- 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,
- ocrPictureOrder:i == 0 ? "" : (i + 1) + '-' + (m+1)
- }
- this.newSubmit.push(data)
- }
- }
- }
- }
- }
-
- this.$refs.productDialog.open('bottom')
- },
- clickInput(name){
- this.name = name
- if(this.name == 'productSn'){
- this.nameText = this.productSn
- }else if(this.name == 'productName'){
- this.nameText = this.productName
- }else if(this.name == 'price'){
- this.nameText = this.price
- }else if(this.name == 'productCount'){
- this.nameText = this.productCount
- }else if(this.name == 'color'){
- this.nameText = this.color
- }else if(this.name == 'size'){
- this.nameText = this.size
- }
- this.$refs.tanDialog.open('bottom');
-
- this.focus = false
- this.$nextTick(() => {
- this.focus = true
- })
- // 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
- }else if(this.name == 'productName'){
- this.productName = this.nameText
- }else if(this.name == 'price'){
- this.price = this.nameText
- }else if(this.name == 'productCount'){
- this.productCount = this.nameText
- }else if(this.name == 'color'){
- this.color = this.nameText
- }else if(this.name == 'size'){
- this.size = this.nameText
- }
- this.name = ""
- this.nameText = ""
- this.$refs.tanDialog.close()
- },
- loadImg(){
- uni.hideLoading();
},
- identify() {
+ clickAiBtn() {
+ 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: '',
+ ocrPictureOrder: i == 0 ? "" : i + 1
+ }
+ 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,
+ ocrPictureOrder: i == 0 ? "" : (i + 1) + '-' + (m + 1)
+ }
+ this.newSubmit.push(data)
+ }
+ }
+ }
+ }
+ }
+
+ this.$refs.productDialog.open('bottom')
+ },
+ clickInput(name) {
+ this.name = name
+ if (this.name == 'productSn') {
+ this.nameText = this.productSn
+ } else if (this.name == 'productName') {
+ this.nameText = this.productName
+ } else if (this.name == 'price') {
+ this.nameText = this.price
+ } else if (this.name == 'productCount') {
+ this.nameText = this.productCount
+ } else if (this.name == 'color') {
+ this.nameText = this.color
+ } else if (this.name == 'size') {
+ this.nameText = this.size
+ }
+ this.$refs.tanDialog.open('bottom');
+
+ this.focus = false
+ this.$nextTick(() => {
+ this.focus = true
+ })
+ // 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
+ } else if (this.name == 'productName') {
+ this.productName = this.nameText
+ } else if (this.name == 'price') {
+ this.price = this.nameText
+ } else if (this.name == 'productCount') {
+ this.productCount = this.nameText
+ } else if (this.name == 'color') {
+ this.color = this.nameText
+ } else if (this.name == 'size') {
+ this.size = this.nameText
+ }
+ this.name = ""
+ this.nameText = ""
+ this.$refs.tanDialog.close()
+ },
+ loadImg() {
+ uni.hideLoading();
+ },
+ 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
+ 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(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 == '' ? '均码' : this.productCount,
- color:this.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) => {})
+ if (this.size == "") {
+ num += 1
}
-
+ 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 == '' ? '均码' : this.productCount,
+ color: this.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) => {})
+ }
+
},
backPage() {
uni.navigateBack({
@@ -399,189 +429,194 @@
urls: [img],
current: img
})
- },
- toggle(){
- let that = this;
- uni.getSystemInfo({
- success: function (res) {
- that.$refs.popup.open('bottom')
-
- }
- });
- },
- showBtn(){
- this.isShow = true
- uni.hideLoading();
},
- async upLoadImg(type) {
- uni.showLoading({
- title: '加载中...',
- mask:true
+ toggle() {
+ let that = this;
+ uni.getSystemInfo({
+ success: function(res) {
+ that.$refs.popup.open('bottom')
+
+ }
+ });
+ },
+ showBtn() {
+ this.isShow = true
+ uni.hideLoading();
+ },
+ async upLoadImg(type) {
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
})
- let that = this;
- if(type == 'ios'){
- uni.chooseMedia({
- count: 1,
- mediaType: ['image'],
- sourceType: ['camera','album'],
- camera: 'back',
- success(res) {
- that.upLoadFile(res.tempFiles[0].tempFilePath)
- },fail(){
- uni.hideLoading();
- }
- })
- }else if(type == 'pai'){
- uni.authorize({
- scope: 'scope.writePhotosAlbum',
- success() {
- that.isTake = true
- uni.hideLoading();
- },fail(){
- that.tui.toast("您未授权,AI入库功能可能会出现错误")
- }
- })
- }else if(type == 'xuan'){
- uni.chooseMedia({
- count: 1,
- mediaType: ['image'],
- sourceType: ['album'],
- success(res1) {
- that.upLoadFile(res1.tempFiles[0].tempFilePath)
- },fail(){
- uni.hideLoading();
- }
- })
- }
- await this.$refs.popup.close()
+ let that = this;
+ if (type == 'ios') {
+ uni.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
+ sourceType: ['camera', 'album'],
+ camera: 'back',
+ success(res) {
+ that.upLoadFile(res.tempFiles[0].tempFilePath)
+ },
+ fail() {
+ uni.hideLoading();
+ }
+ })
+ } else if (type == 'pai') {
+ uni.authorize({
+ scope: 'scope.writePhotosAlbum',
+ success() {
+ that.isTake = true
+ uni.hideLoading();
+ },
+ fail() {
+ that.tui.toast("您未授权,AI入库功能可能会出现错误")
+ }
+ })
+ } else if (type == 'xuan') {
+ uni.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
+ sourceType: ['album'],
+ success(res1) {
+ that.upLoadFile(res1.tempFiles[0].tempFilePath)
+ },
+ fail() {
+ uni.hideLoading();
+ }
+ })
+ }
+ await this.$refs.popup.close()
// uni.hideLoading();
- },
- async takePhoto(){
- let that = this;
- const ctx = uni.createCameraContext();
- await ctx.takePhoto({
- quality: 'high',
- success: (res) => {
- let ttt = that
- uni.saveImageToPhotosAlbum({
- filePath: res.tempImagePath,
- success: function () {
- ttt.cameraUpload()
- }
- });
- },fail(err){
- that.isTake = false
- }
- });
-
- },
- obtainPrice(e,type,num){
- 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;
- uni.chooseMedia({
- count: 1,
- mediaType: ['image'],
- sourceType: ['album'],
- success(res1) {
- that.isTake = false
- that.upLoadFile(res1.tempFiles[0].tempFilePath)
- },fail(){
- that.isTake = false
- uni.hideLoading();
- },complete(res){
- }
- })
- },
- async upLoadFile(path){
- let that = this;
- uni.showLoading({
- title: '加载中...',
- mask:true
- })
- let hiver_token = uni.getStorageSync("hiver_token")
- await uni.uploadFile({
- url: that.tui.interfaceUrl() + '/upload/file',
- filePath: path,
- name: 'file',
- header: {
- "content-type": "multipart/form-data",
- 'accessToken': hiver_token
- },
- formData: {},
- success: (uploadFileRes) => {
-
- let path = JSON.parse(uploadFileRes.data)
-
- if (that.parentId != '') {
- for (let i = 0; i < that.purchaseOcrPictureList
- .length; i++) {
- if (that.purchaseOcrPictureList[i].id ==
- that.parentId) {
- let data = {
- ocrPicture: path.result,
- count: '',
- }
- that.purchaseOcrPictureList[i].children
- .push(data)
- }
- }
- } else {
- let data = {
- ocrPicture: path.result,
- count: '',
- id: that.splitData(path.result),
- children: []
- }
- that.purchaseOcrPictureList.push(data)
- }
-
-
- },
- fail: (err) => {
- uni.hideLoading();
- uni.showToast({
- title: JSON.stringify(err),
- icon: 'none'
- })
- }
- });
- await setTimeout(res=>{
- that.parentId = ''
- // uni.hideLoading();
- },1000)
+ },
+ async takePhoto() {
+ let that = this;
+ const ctx = uni.createCameraContext();
+ await ctx.takePhoto({
+ quality: 'high',
+ success: (res) => {
+ let ttt = that
+ uni.saveImageToPhotosAlbum({
+ filePath: res.tempImagePath,
+ success: function() {
+ ttt.cameraUpload()
+ }
+ });
+ },
+ fail(err) {
+ that.isTake = false
+ }
+ });
+
+ },
+ obtainPrice(e, type, num) {
+ 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;
+ uni.chooseMedia({
+ count: 1,
+ mediaType: ['image'],
+ sourceType: ['album'],
+ success(res1) {
+ that.isTake = false
+ that.upLoadFile(res1.tempFiles[0].tempFilePath)
+ },
+ fail() {
+ that.isTake = false
+ uni.hideLoading();
+ },
+ complete(res) {}
+ })
+ },
+ async upLoadFile(path) {
+ let that = this;
+ uni.showLoading({
+ title: '加载中...',
+ mask: true
+ })
+ let hiver_token = uni.getStorageSync("hiver_token")
+ await uni.uploadFile({
+ url: that.tui.interfaceUrl() + '/upload/file',
+ filePath: path,
+ name: 'file',
+ header: {
+ "content-type": "multipart/form-data",
+ 'accessToken': hiver_token
+ },
+ formData: {},
+ success: (uploadFileRes) => {
+
+ let path = JSON.parse(uploadFileRes.data)
+
+ if (that.parentId != '') {
+ for (let i = 0; i < that.purchaseOcrPictureList
+ .length; i++) {
+ if (that.purchaseOcrPictureList[i].id ==
+ that.parentId) {
+ let data = {
+ ocrPicture: path.result,
+ count: '',
+ }
+ that.purchaseOcrPictureList[i].children
+ .push(data)
+ }
+ }
+ } else {
+ let data = {
+ ocrPicture: path.result,
+ count: '',
+ id: that.splitData(path.result),
+ children: []
+ }
+ that.purchaseOcrPictureList.push(data)
+ }
+
+
+ },
+ fail: (err) => {
+ uni.hideLoading();
+ uni.showToast({
+ title: JSON.stringify(err),
+ icon: 'none'
+ })
+ }
+ });
+ await setTimeout(res => {
+ that.parentId = ''
+ // uni.hideLoading();
+ }, 1000)
},
delImage(index) {
let that = this;
@@ -594,27 +629,27 @@
}
}
})
- },
- getKeyBoardHeight(e){
- this.keyBoardHeight = e.detail.height
- },
- delSonImage(index,indexs) {
- let that = this;
-
- uni.showModal({
- title: "提示",
- content: "确定删除该子图吗?",
- success: function(res) {
- if (res.confirm) {
- that.purchaseOcrPictureList[index].children.splice(indexs, 1);
- }
- }
- })
- },
- goTutorial(){
- uni.navigateTo({
- url: `/package1/other/tutorialList`
- })
+ },
+ getKeyBoardHeight(e) {
+ this.keyBoardHeight = e.detail.height
+ },
+ delSonImage(index, indexs) {
+ let that = this;
+
+ uni.showModal({
+ title: "提示",
+ content: "确定删除该子图吗?",
+ success: function(res) {
+ if (res.confirm) {
+ that.purchaseOcrPictureList[index].children.splice(indexs, 1);
+ }
+ }
+ })
+ },
+ goTutorial() {
+ uni.navigateTo({
+ url: `/package1/other/tutorialList`
+ })
}
}
}
@@ -890,10 +925,10 @@
position: absolute;
top: 0;
left: 190rpx;
- height: 100%;
-
- uni-icons{
- float: left;
+ height: 100%;
+
+ uni-icons {
+ float: left;
}
}
@@ -938,66 +973,95 @@
100% {
transform: rotate(360deg);
}
- }
- .popup-photo{
- height: 110rpx;
- line-height: 110rpx;
- text-align: center;
- 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;
+ }
+
+ .popup-photo {
+ height: 110rpx;
+ line-height: 110rpx;
+ text-align: center;
+ 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;
+ }
+
+ .popup-pay-shili {
+ height: 750rpx;
+ margin-top: 550rpx;
+ z-index: 99;
+ background: #fff;
+ border-top: 1px solid #eee;
+ }
+
+ @media screen and (min-width: 470px) {
+
+ /* 适配宽度为375px及以上的屏幕 */
+ .popup-pay-content {
+ height: 1000rpx;
+ }
+ .popup-pay-shili{
+ height: 750rpx;
+ margin-top: 260rpx;
+ z-index: 99;
+ background: #fff;
+ border-top: 1px solid #eee;
+ }
}
\ No newline at end of file
diff --git a/package1/AI/voiceInventory.vue b/package1/AI/voiceInventory.vue
index 0469a11..bb0f08a 100644
--- a/package1/AI/voiceInventory.vue
+++ b/package1/AI/voiceInventory.vue
@@ -4147,4 +4147,32 @@
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
+ @media screen and (min-width: 470px) {
+
+ /* 适配宽度为375px及以上的屏幕 */
+ .shop-popup-content {
+ height: 900rpx;
+ }
+ .voice-popup-content{
+ align-items: center;
+ justify-content: center;
+ padding: 15px;
+ width: 400rpx;
+ border-radius: 10px;
+ height: 500rpx;
+ background-color: #fff;
+ }
+ .voice-popup-container textarea{
+ height: 200rpx !important;
+ }
+ .voice-btn{
+ position: absolute;
+ bottom: -190rpx;
+ left: 30%;
+ width: 130rpx;
+ height: 130rpx;
+ background: #eee;
+ border-radius: 50%;
+ }
+ }
\ No newline at end of file
diff --git a/package1/inventory/gategory.vue b/package1/inventory/gategory.vue
index 32b720b..e046617 100644
--- a/package1/inventory/gategory.vue
+++ b/package1/inventory/gategory.vue
@@ -8,12 +8,9 @@
{{item.categoryName}}
-
-
-
-
-
-
+
+
+
@@ -50,12 +47,12 @@
style="height:40rpx;line-height: 40rpx;position: absolute !important;bottom:0;right: 30rpx;">
-
+
@@ -76,7 +73,7 @@
-
-
-
-
+
+
+
@@ -208,7 +220,7 @@
@@ -255,8 +270,9 @@
-
-
+
+
@@ -265,52 +281,52 @@
components: {},
data() {
return {
- indexList: [],
- focus:false,
+ indexList: [],
+ focus: false,
pageNum: 1, //分页的页码
- shopList: [],
- shopList1:[],
- show:false,
+ shopList: [],
+ shopList1: [],
+ show: false,
categoryId: '', //分类id
searchName: '', //搜索框输入值
shopId: '', //店铺id,
checkbox: [], //需要分享的商品id
- temporaryNum: 0,
- allChangeNum:0,
- defaultText:0,
- oneGoodsSpec:[],
+ temporaryNum: 0,
+ allChangeNum: 0,
+ defaultText: 0,
+ oneGoodsSpec: [],
goodsDetail: [],
- attrNameList: [],
- keyboard:'',
- oneGoodsName:'',
- temporaryList: [],
- isPlusAndMinus:false,
+ attrNameList: [],
+ keyboard: '',
+ oneGoodsName: '',
+ temporaryList: [],
+ isPlusAndMinus: false,
carList: [],
attributeList: [],
- purchasePrice: 0,
- keyboardIndex:'',
+ purchasePrice: 0,
+ keyboardIndex: '',
zPrice: 0,
- zNum: 0,
- goodsNum:'',
- storageType: '',
- keyboardNum:"",
+ zNum: 0,
+ goodsNum: '',
+ storageType: '',
+ keyboardNum: "",
carNum: 0,
carType: 0,
- type: '',
- productId:'',
- productNum:null,
- height:0,
- pecsList:[],
- // status: 'loadmore',
- pageOldTemList:[],
- oldTemList:[],
- goodsList:[],
- evalue:[],
- newTemList:[],
- dataObj :new Map(),
- gateType:'',
- yanseList:new Map(),
- chimaList:new Map()
+ type: '',
+ productId: '',
+ productNum: null,
+ height: 0,
+ pecsList: [],
+ // status: 'loadmore',
+ pageOldTemList: [],
+ oldTemList: [],
+ goodsList: [],
+ evalue: [],
+ newTemList: [],
+ dataObj: new Map(),
+ gateType: '',
+ yanseList: new Map(),
+ chimaList: new Map()
}
},
filters: {
@@ -324,18 +340,18 @@
}
return name;
}
- },
- onReachBottom() {
- if (this.pageNum >= this.pages) return;
- // this.status = 'loading';
- this.pageNum ++;
- this.getShareList();
},
- onLoad() {
+ onReachBottom() {
+ if (this.pageNum >= this.pages) return;
+ // this.status = 'loading';
+ this.pageNum++;
+ this.getShareList();
+ },
+ onLoad() {
this.height = wx.getSystemInfoSync().windowHeight
this.getGategoryList()
- this.storageType = uni.getStorageSync('type')
- uni.setStorageSync('clearMsg','1')
+ this.storageType = uni.getStorageSync('type')
+ uni.setStorageSync('clearMsg', '1')
},
methods: {
//初始化获取分类列表
@@ -356,274 +372,275 @@
this.tui.toast(res.message)
}
}).catch((res) => {})
- },
- // 按键被点击(点击退格键不会触发此事件)
- valChange(val) {
- // 将每次按键的值拼接到value变量中,注意+=写法
- this.keyboardNum += val
- if(this.keyboard == 'goodsNum'){
- this.goodsNum = this.keyboardNum
- }
- },
- // 退格键被点击
- backspace(val) {
- this.keyboardNum = val
- this.goodsNum = val
- console.log(val)
- },
- //保存已选
- saveCheck(){
- this.pageOldTemList = this.temporaryList
- for(var i=0;i 0 && notChcek){
- this.newTemList.push(this.oldTemList[i]);
- }
- }
-
- for (var i = 0; i < this.pageOldTemList.length; i++) {
- let oldAttributeList = '';
- let oldProductCount = '';
- let notChcek = true;
- for (var m = 0; m < this.newTemList.length; m++) {
- if(this.pageOldTemList[i].attributeList == this.newTemList[m].attributeList){
- this.newTemList[m].productCount = this.pageOldTemList[i].productCount
- notChcek = false;
- }
- }
- if(this.newTemList.length > 0 && notChcek){
- this.newTemList.push(this.pageOldTemList[i]);
- }
- }
- }
- this.$nextTick(()=>{
- for(var i=0;i 0 && notChcek) {
+ this.newTemList.push(this.oldTemList[i]);
+ }
+ }
+
+ for (var i = 0; i < this.pageOldTemList.length; i++) {
+ let oldAttributeList = '';
+ let oldProductCount = '';
+ let notChcek = true;
+ for (var m = 0; m < this.newTemList.length; m++) {
+ if (this.pageOldTemList[i].attributeList == this.newTemList[m].attributeList) {
+ this.newTemList[m].productCount = this.pageOldTemList[i].productCount
+ notChcek = false;
+ }
+ }
+ if (this.newTemList.length > 0 && notChcek) {
+ this.newTemList.push(this.pageOldTemList[i]);
+ }
+ }
+ }
+ this.$nextTick(() => {
+ for (var i = 0; i < this.temporaryList.length; i++) {
+ for (var m = 0; m < this.pecsList.length; m++) {
+ if (this.temporaryList[i].attributeList == this.pecsList[m].attributeList) {
+ this.temporaryList[i].productNum = this.pecsList[m].stockCount
+ }
+ this.$forceUpdate()
+ }
+ }
+ })
+
+ if (this.newTemList.length != 0) {
+ this.temporaryList = this.newTemList;
+ this.oldTemList = []
+ this.newTemList = []
}
- setTimeout(res => {
- uni.hideLoading();
+ setTimeout(res => {
+ uni.hideLoading();
}, 200)
},
temporaryChange(val) {
@@ -641,93 +658,93 @@
uni.navigateBack({
delta: 1
})
- },
- //顶部搜索框
- search(e) {
- if(e.value == ''){
- this.searchName = ""
- this.getShareList()
- }else{
- this.searchName = e.value
- this.getShareList('search')
-
- }
- },
- //清空搜索条件
- clearSearch(){
- this.searchName = ''
- this.getShareList()
+ },
+ //顶部搜索框
+ search(e) {
+ if (e.value == '') {
+ this.searchName = ""
+ this.getShareList()
+ } else {
+ this.searchName = e.value
+ this.getShareList('search')
+
+ }
+ },
+ //清空搜索条件
+ clearSearch() {
+ this.searchName = ''
+ this.getShareList()
},
//点击分类获取商品列表
getShareList(type) {
- let data = {}
- if(type=='search'){
- this.gateType = 'search'
- data = {
- categoryId: "",
- searchStr: this.searchName,
- pageNum: 1,
- pageSize: '10'
- }
- }else{
- this.gateType = ''
- data = {
- categoryId: this.categoryId,
- searchStr: this.searchName,
- pageNum: this.pageNum,
- pageSize: '10'
- }
- }
- this.tui.request("/app/product/getShareList", "POST", data, false, false).then((res) => {
- if (res.code == 200) {
- if(type=='search'){
- this.shopList = []
- this.status = 'nomore';
- if (this.pages == 1) {
- this.shopList1 = res.result.records
- } else {
- this.shopList1 = [...this.shopList1, ...res.result.records]
- }
- this.pages = res.result.pages
- }else{
- this.shopList1 = []
- this.status = 'nomore';
- if (this.pages == 1) {
- this.shopList = res.result.records
- } else {
- this.shopList = [...this.shopList, ...res.result.records]
- }
- this.pages = res.result.pages
- }
- } else {
- this.tui.toast(res.message)
- }
+ let data = {}
+ if (type == 'search') {
+ this.gateType = 'search'
+ data = {
+ categoryId: "",
+ searchStr: this.searchName,
+ pageNum: 1,
+ pageSize: '10'
+ }
+ } else {
+ this.gateType = ''
+ data = {
+ categoryId: this.categoryId,
+ searchStr: this.searchName,
+ pageNum: this.pageNum,
+ pageSize: '10'
+ }
+ }
+ this.tui.request("/app/product/getShareList", "POST", data, false, false).then((res) => {
+ if (res.code == 200) {
+ if (type == 'search') {
+ this.shopList = []
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.shopList1 = res.result.records
+ } else {
+ this.shopList1 = [...this.shopList1, ...res.result.records]
+ }
+ this.pages = res.result.pages
+ } else {
+ this.shopList1 = []
+ this.status = 'nomore';
+ if (this.pages == 1) {
+ this.shopList = res.result.records
+ } else {
+ this.shopList = [...this.shopList, ...res.result.records]
+ }
+ this.pages = res.result.pages
+ }
+ } else {
+ this.tui.toast(res.message)
+ }
}).catch((res) => {})
},
change() {
this.oldTemList = []
- },
- keyboardConfirm(){
- if(this.keyboardNum != ''){
- if(this.keyboard == 'goodsNum'){
- this.goodsNum = Number(this.keyboardNum)
- }else if(this.keyboard == 'zongjishu'){
- this.allChange( Number(this.keyboardNum))
- }else if(this.keyboard == 'danjishu'){
- this.numChange( Number(this.keyboardNum),this.keyboardIndex)
- }else if(this.keyboard == 'chejishu'){
- this.chenumChange( Number(this.keyboardNum),this.keyboardIndex[0],this.keyboardIndex[1])
- }
- }
-
-
- this.show = false
- this.keyboardNum = ''
- },
- keyCancel(){
- console.log("点击取消")
- this.show = false
- this.keyboardNum = ''
+ },
+ keyboardConfirm() {
+ if (this.keyboardNum != '') {
+ if (this.keyboard == 'goodsNum') {
+ this.goodsNum = Number(this.keyboardNum)
+ } else if (this.keyboard == 'zongjishu') {
+ this.allChange(Number(this.keyboardNum))
+ } else if (this.keyboard == 'danjishu') {
+ this.numChange(Number(this.keyboardNum), this.keyboardIndex)
+ } else if (this.keyboard == 'chejishu') {
+ this.chenumChange(Number(this.keyboardNum), this.keyboardIndex[0], this.keyboardIndex[1])
+ }
+ }
+
+
+ this.show = false
+ this.keyboardNum = ''
+ },
+ keyCancel() {
+ console.log("点击取消")
+ this.show = false
+ this.keyboardNum = ''
},
carChange(e, index, index1) {
this.carNum = 0
@@ -749,239 +766,239 @@
}
this.$refs.carPopup.open('bottom')
this.carType = this.carList.length
- } else {
- uni.showLoading({
- title: '加载中...'
- })
- this.productId = item.id
- this.goodsList = []
+ } else {
+ uni.showLoading({
+ title: '加载中...'
+ })
+ this.productId = item.id
+ this.goodsList = []
this.allChangeNum = 0
this.checkGoods(item);
}
},
//选择商品查询商品规格
- async checkGoods(item) {
- uni.showLoading({
- title: '加载中...'
+ async checkGoods(item) {
+ uni.showLoading({
+ title: '加载中...'
})
- let that = this;
- this.goodsDetail = item;
- this.temporaryList = []
- this.pageOldTemList = []
- if (this.carList != '') {
- this.zNum = 0
- for (let i = 0; i < this.carList.length; i++) {
- if (item.id == this.carList[i].id) {
- this.goodsNum = this.carList[i].saleDetailQueryDTO[0].productCount
- this.zNum = this.carList[i].num
- this.temporaryList = this.carList[i].saleDetailQueryDTO
- this.pageOldTemList = this.carList[i].saleDetailQueryDTO
- this.oldTemList = this.carList[i].saleDetailQueryDTO
- }
- }
-
- }
- await this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", {
- categoryId: this.goodsDetail.attrId
- }, false, true).then((res1) => {
- if (res1.code == 200) {
- if (typeof(res1.result.attributeAndValue) == 'string') {
- let newObj = JSON.parse(res1.result.attributeAndValue)
- let newArr = []
- let dataArr = []
- for (let val in newObj) {
- let valueObj = [];
- let isTrue = false
- for (var i = 0; i < newObj[val].length; i++) {
- for (var m = 0; m < this.oldTemList.length; m++) {
- var data = this.oldTemList[m].name.split('/')
- for(var j = 0; j < data.length; j++){
- if(data[j] == newObj[val][i]){
- isTrue = true
- }
- }
- }
- for (var m = 0; m < this.pageOldTemList.length; m++) {
- var data = this.pageOldTemList[m].name.split('/')
- for(var j = 0; j < data.length; j++){
- if(data[j] == newObj[val][i]){
- isTrue = true
- }
- }
- }
- valueObj.push({
- value: newObj[val][i],
- isChecked: false
- })
- that.dataObj.set(newObj[val][i],val)
- isTrue = false
- }
- newArr.push({
- name: val,
- value: valueObj
- })
- }
- this.focus = false
- if(newArr[0].value.length == 1 && newArr[1].value.length == 1){
- // uni.hideKeyboard()
- this.keyboard = 'goodsNum'
- this.keyboardNum = this.goodsNum
- this.show = true
- this.oneGoodsName = newArr[0].value[0].value +' | '+ newArr[1].value[0].value
- this.oneGoodsSpec = newArr
- // this.oneGoodsToCarList(newArr)
- this.$refs.goodsNumDialog.open('center')
- this.$nextTick(() => {
- this.focus = true
- })
- this.getKCList(res1.result.stock);
- }else{
- // newArr[0].value[0].isChecked = true
- this.$refs.popup.open('bottom')
- this.goodsDetail.attributeList = newArr;
- for (var i = 0; i < this.goodsDetail.attributeList.length; i++) {
- let oldCheck = false
- let oldValue = []
- for (var m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
- if(this.goodsDetail.attributeList[i].value[m].isChecked == true){
- oldCheck = true
- oldValue.push(this.goodsDetail.attributeList[i].value[m].value)
- }
- }
- if(oldCheck){
- let specs1 = {
- specs:[]
- }
-
- specs1.specs = oldValue
- this.goodsList.push(specs1)
- }else{
- let specs1 = {
- specs:[]
- }
- this.goodsList.push(specs1)
- }
- oldCheck = false
- oldValue = []
- }
- this.getKCList(res1.result.stock);
- }
- if(this.temporaryList == ''){
- this.attrNameChange(0,this.goodsDetail.attributeList[0].value[0].value,0)
- }
- }
-
- } else {
- this.tui.toast(res.message)
- }
- }).catch((res) => {})
+ let that = this;
+ this.goodsDetail = item;
+ this.temporaryList = []
+ this.pageOldTemList = []
+ if (this.carList != '') {
+ this.zNum = 0
+ for (let i = 0; i < this.carList.length; i++) {
+ if (item.id == this.carList[i].id) {
+ this.goodsNum = this.carList[i].saleDetailQueryDTO[0].productCount
+ this.zNum = this.carList[i].num
+ this.temporaryList = this.carList[i].saleDetailQueryDTO
+ this.pageOldTemList = this.carList[i].saleDetailQueryDTO
+ this.oldTemList = this.carList[i].saleDetailQueryDTO
+ }
+ }
+
+ }
+ await this.tui.request("/app/productAttribute/selectAttributeAndValueByCategoryId", "POST", {
+ categoryId: this.goodsDetail.attrId
+ }, false, true).then((res1) => {
+ if (res1.code == 200) {
+ if (typeof(res1.result.attributeAndValue) == 'string') {
+ let newObj = JSON.parse(res1.result.attributeAndValue)
+ let newArr = []
+ let dataArr = []
+ for (let val in newObj) {
+ let valueObj = [];
+ let isTrue = false
+ for (var i = 0; i < newObj[val].length; i++) {
+ for (var m = 0; m < this.oldTemList.length; m++) {
+ var data = this.oldTemList[m].name.split('/')
+ for (var j = 0; j < data.length; j++) {
+ if (data[j] == newObj[val][i]) {
+ isTrue = true
+ }
+ }
+ }
+ for (var m = 0; m < this.pageOldTemList.length; m++) {
+ var data = this.pageOldTemList[m].name.split('/')
+ for (var j = 0; j < data.length; j++) {
+ if (data[j] == newObj[val][i]) {
+ isTrue = true
+ }
+ }
+ }
+ valueObj.push({
+ value: newObj[val][i],
+ isChecked: false
+ })
+ that.dataObj.set(newObj[val][i], val)
+ isTrue = false
+ }
+ newArr.push({
+ name: val,
+ value: valueObj
+ })
+ }
+ this.focus = false
+ if (newArr[0].value.length == 1 && newArr[1].value.length == 1) {
+ // uni.hideKeyboard()
+ this.keyboard = 'goodsNum'
+ this.keyboardNum = this.goodsNum
+ this.show = true
+ this.oneGoodsName = newArr[0].value[0].value + ' | ' + newArr[1].value[0].value
+ this.oneGoodsSpec = newArr
+ // this.oneGoodsToCarList(newArr)
+ this.$refs.goodsNumDialog.open('center')
+ this.$nextTick(() => {
+ this.focus = true
+ })
+ this.getKCList(res1.result.stock);
+ } else {
+ // newArr[0].value[0].isChecked = true
+ this.$refs.popup.open('bottom')
+ this.goodsDetail.attributeList = newArr;
+ for (var i = 0; i < this.goodsDetail.attributeList.length; i++) {
+ let oldCheck = false
+ let oldValue = []
+ for (var m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
+ if (this.goodsDetail.attributeList[i].value[m].isChecked == true) {
+ oldCheck = true
+ oldValue.push(this.goodsDetail.attributeList[i].value[m].value)
+ }
+ }
+ if (oldCheck) {
+ let specs1 = {
+ specs: []
+ }
+
+ specs1.specs = oldValue
+ this.goodsList.push(specs1)
+ } else {
+ let specs1 = {
+ specs: []
+ }
+ this.goodsList.push(specs1)
+ }
+ oldCheck = false
+ oldValue = []
+ }
+ this.getKCList(res1.result.stock);
+ }
+ if (this.temporaryList == '') {
+ this.attrNameChange(0, this.goodsDetail.attributeList[0].value[0].value, 0)
+ }
+ }
+
+ } else {
+ this.tui.toast(res.message)
+ }
+ }).catch((res) => {})
await uni.hideLoading()
- },
- async oneGoodsToCarList(){
- let that = this;
- // this.oneGoodsSpec //规格
- // this.goodsNum //数量
- this.show = false
- this.evalue = []
- var value = []
- var name = ''
- let value1 = "{"
- name = this.oneGoodsSpec[0].value[0].value + ' | ' + this.oneGoodsSpec[1].value[0].value
- value1 += '"'+this.oneGoodsSpec[0].name + '":"' + this.oneGoodsSpec[0].value[0].value + '",'
- value1 += '"'+this.oneGoodsSpec[1].name + '":"' + this.oneGoodsSpec[1].value[0].value + '"'
- value1 += "}"
- value.push(value1)
- this.evalue.push(name)
- await this.$nextTick(()=>{
- for (var i = 0; i < value.length; i++) {
- this.attributeList = {
- attributeList: value[i],
- productCount: Number(this.goodsNum),
- productNum:0,
- name: this.evalue[i],
- price: this.goodsDetail.purchasePrice
- }
- this.temporaryList = []
- this.temporaryList.push(this.attributeList);
- }
- })
-
- await this.$nextTick(()=>{
- console.log('pecsList',this.pecsList)
- for(var i=0;i{
- let data = {
- id: this.goodsDetail.id,
- price: this.zPrice,
- num: this.zNum,
- categoryId:this.goodsDetail.categoryId,
- productName: this.goodsDetail.productName,
- productSn: this.goodsDetail.productSn,
- returnPrice:this.goodsDetail.wholesalePrice,
- productPicture: this.goodsDetail.productPicture,
- supplierName: this.goodsDetail.supplierName,
- saleDetailQueryDTO: this.temporaryList,
- saleDetailQueryDTO1: [],
- purchasePrice:this.goodsDetail.purchasePrice,
- wholesalePrice: this.goodsDetail.wholesalePrice,
- lsprice: this.goodsDetail.price
- }
- if (this.carList.length == 0) {
- this.carList.push(data)
- } else {
- let aa = true;
- for (let i = 0; i < this.carList.length; i++) {
- if (this.carList[i].id == data.id) {
- this.carList[i] = data
- aa = false
- }
- }
- if (aa) {
- this.carList.push(data)
- }
- }
- })
- this.$nextTick(()=>{
- that.$refs.goodsNumDialog.close()
- that.goodsNum = ''
- })
- this.$forceUpdate()
- },
- //库存商品详情
- getKCList(list) {
- console.log('list',list)
- this.yanseList = new Map()
- this.chimaList = new Map()
- this.pecsList = list
-
- for(let i=0;i {
- if(key == '颜色'){
- if(this.yanseList.has(attributeList[key]) != true){
- this.yanseList.set(attributeList[key],attributeList[key])
- }
-
- }
- })
- }
- for(let i=0;i {
+ for (var i = 0; i < value.length; i++) {
+ this.attributeList = {
+ attributeList: value[i],
+ productCount: Number(this.goodsNum),
+ productNum: 0,
+ name: this.evalue[i],
+ price: this.goodsDetail.purchasePrice
+ }
+ this.temporaryList = []
+ this.temporaryList.push(this.attributeList);
+ }
+ })
+
+ await this.$nextTick(() => {
+ console.log('pecsList', this.pecsList)
+ for (var i = 0; i < this.temporaryList.length; i++) {
+ for (var m = 0; m < this.pecsList.length; m++) {
+ if (this.temporaryList[i].attributeList == this.pecsList[m].attributeList) {
+ this.temporaryList[i].productNum = this.pecsList[m].stockCount
+ }
+ this.$forceUpdate()
+ }
+ }
+
+ })
+ await this.$nextTick(() => {
+ let data = {
+ id: this.goodsDetail.id,
+ price: this.zPrice,
+ num: this.zNum,
+ categoryId: this.goodsDetail.categoryId,
+ productName: this.goodsDetail.productName,
+ productSn: this.goodsDetail.productSn,
+ returnPrice: this.goodsDetail.wholesalePrice,
+ productPicture: this.goodsDetail.productPicture,
+ supplierName: this.goodsDetail.supplierName,
+ saleDetailQueryDTO: this.temporaryList,
+ saleDetailQueryDTO1: [],
+ purchasePrice: this.goodsDetail.purchasePrice,
+ wholesalePrice: this.goodsDetail.wholesalePrice,
+ lsprice: this.goodsDetail.price
+ }
+ if (this.carList.length == 0) {
+ this.carList.push(data)
+ } else {
+ let aa = true;
+ for (let i = 0; i < this.carList.length; i++) {
+ if (this.carList[i].id == data.id) {
+ this.carList[i] = data
+ aa = false
+ }
+ }
+ if (aa) {
+ this.carList.push(data)
+ }
+ }
+ })
+ this.$nextTick(() => {
+ that.$refs.goodsNumDialog.close()
+ that.goodsNum = ''
+ })
+ this.$forceUpdate()
+ },
+ //库存商品详情
+ getKCList(list) {
+ console.log('list', list)
+ this.yanseList = new Map()
+ this.chimaList = new Map()
+ this.pecsList = list
+
+ for (let i = 0; i < list.length; i++) {
+ let attributeList = JSON.parse(list[i].attributeList)
+ Object.keys(attributeList).forEach(key => {
+ if (key == '颜色') {
+ if (this.yanseList.has(attributeList[key]) != true) {
+ this.yanseList.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
+ }
+ }
+ },
+
//未入库遮罩
clickMask() {
uni.showToast({
@@ -998,10 +1015,10 @@
this.indexList[i].parentId = false
}
}
- this.categoryId = this.indexList[index].id
- this.pageNum = 1
- this.searchName = ""
- this.shopList1 = []
+ this.categoryId = this.indexList[index].id
+ this.pageNum = 1
+ this.searchName = ""
+ this.shopList1 = []
this.shopList = []
this.getShareList()
},
@@ -1010,65 +1027,65 @@
this.goodsDetail.price = this.temporaryList[0].price = val
},
//弹窗选择规格后,点击弹窗中选好了按钮
- temporaryCheck() {
- let newList = []
- for(let i=0;i{
- let data = {
- id: this.goodsDetail.id,
- price: this.zPrice,
- num: this.zNum,
- categoryId:this.goodsDetail.categoryId,
- productName: this.goodsDetail.productName,
- productSn: this.goodsDetail.productSn,
- returnPrice:this.goodsDetail.wholesalePrice,
- productPicture: this.goodsDetail.productPicture,
- supplierName: this.goodsDetail.supplierName,
- saleDetailQueryDTO: newList,
- saleDetailQueryDTO1: [],
- purchasePrice:this.goodsDetail.purchasePrice,
- wholesalePrice: this.goodsDetail.wholesalePrice,
- lsprice: this.goodsDetail.price
- }
- if (this.carList.length == 0) {
- this.carList.push(data)
- } else {
- let aa = true;
- for (let i = 0; i < this.carList.length; i++) {
- if (this.carList[i].id == data.id) {
- this.carList[i] = data
- aa = false
- }
- }
- if (aa) {
- this.carList.push(data)
- }
- }
-
-
- for (let i = 0; i < this.carList.length; i++) {
- this.carList[i].num = 0
- for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
- this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
- }
- }
-
- this.temporaryList = []
- this.oldTemList = []
- this.purchasePrice = ''
- this.zPrice = ''
- this.zNum = ''
- for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
- this.goodsDetail.attributeList[i].isChecked = false;
- for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
- this.goodsDetail.attributeList[i].value[m].isChecked = false
- }
- }
- this.$refs.popup.close()
+ this.$nextTick(() => {
+ let data = {
+ id: this.goodsDetail.id,
+ price: this.zPrice,
+ num: this.zNum,
+ categoryId: this.goodsDetail.categoryId,
+ productName: this.goodsDetail.productName,
+ productSn: this.goodsDetail.productSn,
+ returnPrice: this.goodsDetail.wholesalePrice,
+ productPicture: this.goodsDetail.productPicture,
+ supplierName: this.goodsDetail.supplierName,
+ saleDetailQueryDTO: newList,
+ saleDetailQueryDTO1: [],
+ purchasePrice: this.goodsDetail.purchasePrice,
+ wholesalePrice: this.goodsDetail.wholesalePrice,
+ lsprice: this.goodsDetail.price
+ }
+ if (this.carList.length == 0) {
+ this.carList.push(data)
+ } else {
+ let aa = true;
+ for (let i = 0; i < this.carList.length; i++) {
+ if (this.carList[i].id == data.id) {
+ this.carList[i] = data
+ aa = false
+ }
+ }
+ if (aa) {
+ this.carList.push(data)
+ }
+ }
+
+
+ for (let i = 0; i < this.carList.length; i++) {
+ this.carList[i].num = 0
+ for (let m = 0; m < this.carList[i].saleDetailQueryDTO.length; m++) {
+ this.carList[i].num += this.carList[i].saleDetailQueryDTO[m].productCount
+ }
+ }
+
+ this.temporaryList = []
+ this.oldTemList = []
+ this.purchasePrice = ''
+ this.zPrice = ''
+ this.zNum = ''
+ for (let i = 0; i < this.goodsDetail.attributeList.length; i++) {
+ this.goodsDetail.attributeList[i].isChecked = false;
+ for (let m = 0; m < this.goodsDetail.attributeList[i].value.length; m++) {
+ this.goodsDetail.attributeList[i].value[m].isChecked = false
+ }
+ }
+ this.$refs.popup.close()
})
},
@@ -1091,11 +1108,11 @@
that.$forceUpdate()
}
})
- },
- //选商品的时候能删除规格
- delCarData(index) {
- this.temporaryList.splice(index, 1);
- this.temporaryChange()
+ },
+ //选商品的时候能删除规格
+ delCarData(index) {
+ this.temporaryList.splice(index, 1);
+ this.temporaryChange()
},
//删除商品下的某一个规格
delShopSpec(index, index1) {
@@ -1132,14 +1149,14 @@
checkPay(price) {
this.purchasePrice = price;
this.$refs.inputDialog.close()
- },
- keyWordChange(e){
- if(e.show == false){
- this.show = false
- this.keyboardNum = ''
- this.goodsNum = ''
- }
-
+ },
+ keyWordChange(e) {
+ if (e.show == false) {
+ this.show = false
+ this.keyboardNum = ''
+ this.goodsNum = ''
+ }
+
}
}
}
@@ -1241,33 +1258,34 @@
color: #646566;
}
- .title-box {
- background: #fff;
- position: fixed;
- top: 0;
- width: 100%;
+ .title-box {
+ background: #fff;
+ position: fixed;
+ top: 0;
+ width: 100%;
z-index: 99;
}
.bottom-box {
- width: 100%;
- height: 120rpx;
- // position: fixed;
- // bottom: 0;
- display: flex;
- background: #fff;
+ width: 100%;
+ height: 120rpx;
+ // position: fixed;
+ // bottom: 0;
+ display: flex;
+ background: #fff;
z-index: 98;
}
.bottom-left {
width: 15%;
- position: relative;
+ position: relative;
padding-top: 20rpx;
}
.bottom-right {
width: 85%;
padding-top: 20rpx;
+
.bottom-btn {
width: 85%;
line-height: 35px;
@@ -1291,14 +1309,14 @@
.content-box {
background: #fff;
flex: 1;
- display: flex;
+ display: flex;
overflow: hidden;
}
.content-left {
width: 170rpx;
background: #eee;
- height: auto;
+ height: auto;
overflow: scroll;
}
@@ -1335,10 +1353,10 @@
.content-right {
flex: 1;
- overflow-y: scroll;
- height: 100%;
- // padding-bottom: 100rpx;
- // padding-bottom: 100rpx;
+ overflow-y: scroll;
+ height: 100%;
+ // padding-bottom: 100rpx;
+ // padding-bottom: 100rpx;
// margin-bottom: 80rpx;
}
@@ -1455,13 +1473,13 @@
}
.popup-bottom {
- width: 95%;
- height: 100rpx;
- position: fixed;
- bottom: 0;
- left: 2.5%;
- display: flex;
- z-index: 99;
+ width: 95%;
+ height: 100rpx;
+ position: fixed;
+ bottom: 0;
+ left: 2.5%;
+ display: flex;
+ z-index: 99;
background: #fff;
}
@@ -1488,28 +1506,28 @@
}
}
- .attrs {
- .suibian {
- display: inline-block;
- border: 1px solid #5fd9ee;
- margin: 20rpx;
- margin-bottom: 0;
- margin-left: 0;
- background-color: #fff;
- color: #5fd9ee;
- padding: 0 10px;
- min-width: 100rpx;
- line-height: 35px;
- height: 70rpx;
- text-align: center;
- border-radius: 20rpx;
- }
-
- .checkedText {
- background-color: #5fd9ee;
- color: #fff;
- border-radius: 20rpx;
- }
+ .attrs {
+ .suibian {
+ display: inline-block;
+ border: 1px solid #5fd9ee;
+ margin: 20rpx;
+ margin-bottom: 0;
+ margin-left: 0;
+ background-color: #fff;
+ color: #5fd9ee;
+ padding: 0 10px;
+ min-width: 100rpx;
+ line-height: 35px;
+ height: 70rpx;
+ text-align: center;
+ border-radius: 20rpx;
+ }
+
+ .checkedText {
+ background-color: #5fd9ee;
+ color: #fff;
+ border-radius: 20rpx;
+ }
}
.shop-mask {
@@ -1519,98 +1537,110 @@
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.1);
- }
- .noPic{
- width: 150rpx;
- height: 150rpx;
- border-radius: 10px;
- text-align: center;
- line-height: 140rpx;
- color: #777;
- background: #eee;
- }
- .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;
- }
- .add-popup-content {
- align-items: center;
- justify-content: center;
- padding: 15px;
- width: 500rpx;
- height: 410rpx;
- 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: 30rpx;
- }
-
- .add-popup-btn {
- flex: 1;
- text-align: center;
- background: linear-gradient(90deg, #60F3FF, #088FEB);
- }
- .right-box:last-child{
- margin-bottom:100rpx;
+ }
+
+ .noPic {
+ width: 150rpx;
+ height: 150rpx;
+ border-radius: 10px;
+ text-align: center;
+ line-height: 140rpx;
+ color: #777;
+ background: #eee;
+ }
+
+ .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;
+ }
+
+ .add-popup-content {
+ align-items: center;
+ justify-content: center;
+ padding: 15px;
+ width: 500rpx;
+ height: 410rpx;
+ 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: 30rpx;
+ }
+
+ .add-popup-btn {
+ flex: 1;
+ text-align: center;
+ background: linear-gradient(90deg, #60F3FF, #088FEB);
+ }
+
+ .right-box:last-child {
+ margin-bottom: 100rpx;
+ }
+
+ @media screen and (min-width: 470px) {
+
+ /* 适配宽度为375px及以上的屏幕 */
+ .popup-content {
+ height: 900rpx;
+ }
}
\ No newline at end of file
diff --git a/pages/inventory/changeGoods1.vue b/pages/inventory/changeGoods1.vue
index c447d0d..82fbf4c 100644
--- a/pages/inventory/changeGoods1.vue
+++ b/pages/inventory/changeGoods1.vue
@@ -1441,4 +1441,12 @@
color: #c0c0c0 !important;
cursor: not-allowed;
}
+
+ @media screen and (min-width: 470px) {
+
+ /* 适配宽度为375px及以上的屏幕 */
+ .popup-content {
+ height: 900rpx;
+ }
+ }
\ No newline at end of file
diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue
index ee1b6ce..aa1e0d2 100644
--- a/pages/inventory/goodsList1.vue
+++ b/pages/inventory/goodsList1.vue
@@ -5494,4 +5494,9 @@
padding-left: 20rpx;
border-bottom: 1px solid #088FEB;
}
+ @media screen and (min-width: 470px) {
+ .shop-popup-content {
+ height: 900rpx;
+ }
+ }
\ No newline at end of file
diff --git a/pages/inventory/inventory.vue b/pages/inventory/inventory.vue
index 7a7a851..5946201 100644
--- a/pages/inventory/inventory.vue
+++ b/pages/inventory/inventory.vue
@@ -751,4 +751,16 @@
font-weight: 800;
border-bottom: 1px solid #eee;
}
+
+ @media screen and (min-width: 470px) {
+
+ /* 适配宽度为375px及以上的屏幕 */
+ .content-left {
+ height: 75% !important;
+ float: left;
+ position: fixed;
+ top: 25% !important;
+ }
+
+ }
\ No newline at end of file