From 7de5f566b0896d7d6cc22c40c8cd62a7a29acf5c Mon Sep 17 00:00:00 2001 From: gyq <875626088@qq.com> Date: Thu, 1 Aug 2024 15:29:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=93=81=E7=BC=96?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/product/add_shop.vue | 104 ++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 39 deletions(-) diff --git a/src/views/product/add_shop.vue b/src/views/product/add_shop.vue index ce2d562..5099238 100644 --- a/src/views/product/add_shop.vue +++ b/src/views/product/add_shop.vue @@ -91,38 +91,48 @@ @@ -203,7 +213,8 @@ @@ -212,7 +223,9 @@ @@ -221,7 +234,8 @@ @@ -230,7 +244,9 @@ @@ -239,7 +255,8 @@ @@ -248,7 +265,8 @@ @@ -258,7 +276,9 @@ @@ -306,13 +326,15 @@
开启后: 收银完成后会自动打印对应数量的标签数
- +
单份商品打包费。注:店铺开启外卖模式下该数据才生效
- + @@ -326,8 +348,9 @@ - + @@ -395,6 +418,9 @@ export default { stockNumber: 0, firstShared: 0, barCode: `${localStorage.getItem("shopId")}${dayjs().valueOf()}`, + isGrounding: 1, + productId: this.$route.query.goods_id, + shopId: localStorage.getItem("shopId") // suit: 1 }, tableAddShopIndex: null, @@ -405,7 +431,7 @@ export default { id: "", typeEnum: "normal", name: "", - shortTitle:"",//商品介绍 + shortTitle: "",//商品介绍 unitId: "", unitName: "", categoryId: "", // 商品分类id @@ -521,24 +547,23 @@ export default { } }, methods: { - - priceFormat(item,key){ - const messageheight=48; - const offset=window.innerHeight/2-(messageheight/2) -100 - this.$nextTick(()=>{ - const min=0; - const max=100000000; - const newval=formatPrice(item[key],min,max,true) + priceFormat(item, key) { + const messageheight = 48; + const offset = window.innerHeight / 2 - (messageheight / 2) - 100 + this.$nextTick(() => { + const min = 0; + const max = 100000000; + const newval = formatPrice(item[key], min, max, true) console.log(newval) - if(typeof newval!=='number'){ - item[key]=newval.value + if (typeof newval !== 'number') { + item[key] = newval.value this.$message({ - offset, - message: `请输入${min}到${max}范围内的数字`, - type: "error" - }); - }else{ - item[key]=newval + offset, + message: `请输入${min}到${max}范围内的数字`, + type: "error" + }); + } else { + item[key] = newval } }) }, @@ -568,12 +593,12 @@ export default { // 确认批量修改规格 batchNumberFormConfirm() { console.log(this.form.skuList) - this.form.skuList.map((item,index) => { + this.form.skuList.map((item, index) => { //解决vue2列表数据更新视图未变化问题 - let newitem = {...item} + let newitem = { ...item } newitem[this.batchNumberKey] = this.batchNumberForm.batchNumber; - this.$set( this.form.skuList, index, {...newitem}) + this.$set(this.form.skuList, index, { ...newitem }) // item[this.batchNumberKey] = this.batchNumberForm.batchNumber; }); this.showBatchModal = false; @@ -606,11 +631,12 @@ export default { this.form.skuList = skuList.map((item, index) => { specInfo[index].id = item.id; specInfo[index].productId = item.productId; - specInfo[index].realSalesNumber = item.productId; + specInfo[index].realSalesNumber = item.realSalesNumber; specInfo[index].shopId = item.shopId; specInfo[index].warnLine = item.warnLine; specInfo[index].suit = item.suit; specInfo[index].stockNumber = item.stockNumber; + specInfo[index].isGrounding = item.isGrounding; return specInfo[index]; }); console.log(this.form.skuList);