From 7ba94c7fe113f1633af72c4db382618512780615 Mon Sep 17 00:00:00 2001 From: 15386982806 Date: Tue, 16 Jan 2024 17:54:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=95=86=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/public/config.js | 12 ++--- manager/public/config.js | 12 ++--- seller/public/config.js | 12 ++--- .../goods/goods-seller/goodsOperationSec.vue | 45 ++++++++++++------- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/buyer/public/config.js b/buyer/public/config.js index f1061804..2272ff76 100644 --- a/buyer/public/config.js +++ b/buyer/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn" - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/manager/public/config.js b/manager/public/config.js index 5be44003..9f51858a 100644 --- a/manager/public/config.js +++ b/manager/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn", - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn", }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/public/config.js b/seller/public/config.js index 939235af..87161bcb 100644 --- a/seller/public/config.js +++ b/seller/public/config.js @@ -3,14 +3,10 @@ var BASE = { * @description api请求基础路径 */ API_DEV: { - // common: "https://common-api.pickmall.cn", - // buyer: "https://buyer-api.pickmall.cn", - // seller: "https://store-api.pickmall.cn", - // manager: "https://admin-api.pickmall.cn", - common: "http://192.168.31.225:8890", - buyer: "http://192.168.31.225:8888", - seller: "http://192.168.31.225:8889", - manager: "http://192.168.31.225:8887" + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn", }, API_PROD: { common: "https://common-api.pickmall.cn", diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index b526b55d..623da940 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -196,7 +196,7 @@ - {{skuInfo}} +   @@ -1197,9 +1197,20 @@ export default { this.$Message.error("已存在相同规格项!"); return; } + // if (this.zz(0, val) > 20) { + // this.$Message.error("规格项最多十个字符长度!"); + // return; + // } if (this.zz(0, val) > 20) { - this.$Message.error("规格项最多十个字符长度!"); - return; + this.$Message.error("规格值最多十个字符长度!"); + // val = val.toString().slice(0, 4); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // val = this.truncateString(val); + this.skuInfo[index].name = this.truncateString(val); + // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val)); + // this.$set(item, 'value', this.truncateString(val)); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // return; } this.skuTableData = this.skuTableData.map((e) => { e[val] = e[this.currentSkuItem]; @@ -1238,12 +1249,20 @@ export default { break; } } - console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); - return str.substr(0, Math.floor((count - 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 + // console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2))); + return str.substr(0, Math.floor((count + 1) / 2)); // 根据统计得到的字节数进行切片并返回结果 } }, // 编辑规格值 skuValueChange(val, index, item, $index) { + if (this.skuTableData.find((i) => i[val.name] === val.value)) { + this.$Message.error("已存在相同规格值!"); + return; + } + if (val.value === '') { + this.$Message.error("规格值不能为空!"); + return; + } if (this.zz(0, val.value) > 20) { this.$Message.error("规格值最多十个字符长度!"); // val.value = val.value.toString().slice(0, 4); @@ -1253,17 +1272,12 @@ export default { // this.$set(this.skuInfo[$index].spec_values[index], 'value', this.truncateString(val.value)); // this.$set(item, 'value', this.truncateString(val.value)); this.$forceUpdate();// 调用该方法会触发组件的重新渲染 - return; - } - console.log('编辑规格值改变', item); - if (this.skuTableData.find((i) => i[val.name] === val.value)) { - this.$Message.error("已存在相同规格值!"); - return; - } - if (val.value === '') { - this.$Message.error("规格值不能为空!"); - return; + // return; } + // console.log('编辑规格值改变', item); + + + let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { if (e[val.name] === curVal) { @@ -1467,7 +1481,6 @@ export default { key: columnName, }); }); - console.log('渲染头部', this.skuInfo); // 有成本价和价格的情况 if (this.baseInfoForm.salesModel !== "WHOLESALE") { pushData.push(