diff --git a/buyer/src/pages/home/enumeration.js b/buyer/src/pages/home/enumeration.js index 60a6f82f..60caf556 100644 --- a/buyer/src/pages/home/enumeration.js +++ b/buyer/src/pages/home/enumeration.js @@ -30,7 +30,7 @@ export const orderStatusList = [ status: 'TAKE' }, { - name: '已取消', + name: '已关闭', status: 'CANCELLED' }, { diff --git a/manager/public/config.js b/manager/public/config.js index ada826fc..9f51858a 100644 --- a/manager/public/config.js +++ b/manager/public/config.js @@ -1,29 +1,29 @@ 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" - }, - API_PROD: { - common: "https://common-api.pickmall.cn", - buyer: "https://buyer-api.pickmall.cn", - seller: "https://store-api.pickmall.cn", - manager: "https://admin-api.pickmall.cn" - }, - /** - * @description // 跳转买家端地址 pc端 - */ - PC_URL: "https://pc-b2b2c.pickmall.cn", - /** - * @description // 跳转买家端地址 wap端 - */ - WAP_URL: "https://m-b2b2c.pickmall.cn", - /** - * @description api请求基础路径前缀 - */ - PREFIX: "/manager" + /** + * @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", + }, + API_PROD: { + common: "https://common-api.pickmall.cn", + buyer: "https://buyer-api.pickmall.cn", + seller: "https://store-api.pickmall.cn", + manager: "https://admin-api.pickmall.cn" + }, + /** + * @description // 跳转买家端地址 pc端 + */ + PC_URL: "https://pc-b2b2c.pickmall.cn", + /** + * @description // 跳转买家端地址 wap端 + */ + WAP_URL: "https://m-b2b2c.pickmall.cn", + /** + * @description api请求基础路径前缀 + */ + PREFIX: "/manager" }; diff --git a/seller/src/views/goods/goods-seller/goodsOperationSec.vue b/seller/src/views/goods/goods-seller/goodsOperationSec.vue index 3c5f1323..bc78f691 100644 --- a/seller/src/views/goods/goods-seller/goodsOperationSec.vue +++ b/seller/src/views/goods/goods-seller/goodsOperationSec.vue @@ -178,9 +178,9 @@ + @on-change="skuValueChange(val, index, item, $index)">   @@ -1197,8 +1198,11 @@ export default { return; } if (this.zz(0, val) > 20) { - this.$Message.error("规格项最多十个字符长度!"); - return; + this.$Message.error("规格值最多十个字符长度!"); + // val = val.toString().slice(0, 4); + this.skuInfo[index].name = this.countCharacters(val, 10); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // return; } this.skuTableData = this.skuTableData.map((e) => { e[val] = e[this.currentSkuItem]; @@ -1220,8 +1224,28 @@ export default { } return len; }, + countCharacters (defaultStr, defaultNum) { + let str = '' + defaultStr || '', + num = + defaultNum || 0, + res = '', + length = 0; + if (!str || !num) { + return str; + } + // 循环字符串,判断长度 最少也会返回一个字 + for (const i in str) { + res += str[i]; + // 测试长度 + length += /[\u4e00-\u9fa5]/.test(str[i]) ? 2 : 1; + // 如果长度大于设置长度 或者 循环到最后则终止循环 + if (length >= num || +i == str.length - 1) { + break; + } + } + return res; + }, // 编辑规格值 - skuValueChange(val, index, item) { + skuValueChange(val, index, item, $index) { if (this.skuTableData.find((i) => i[val.name] === val.value)) { this.$Message.error("已存在相同规格值!"); return; @@ -1232,7 +1256,10 @@ export default { } if (this.zz(0, val.value) > 20) { this.$Message.error("规格值最多十个字符长度!"); - return; + // val.value = val.value.toString().slice(0, 4); + this.skuInfo[$index].spec_values[index].value = this.countCharacters(val.value, 10); + this.$forceUpdate();// 调用该方法会触发组件的重新渲染 + // return; } let curVal = this.currentSkuVal; this.skuTableData = this.skuTableData.map((e) => { @@ -1437,7 +1464,6 @@ export default { key: columnName, }); }); - // 有成本价和价格的情况 if (this.baseInfoForm.salesModel !== "WHOLESALE") { pushData.push( diff --git a/seller/src/views/member/memberComment.vue b/seller/src/views/member/memberComment.vue index 604644ec..191922bd 100644 --- a/seller/src/views/member/memberComment.vue +++ b/seller/src/views/member/memberComment.vue @@ -84,8 +84,8 @@ export default { pageSize: 10, // 页面大小 sort: "createTime", // 默认排序字段 order: "desc", // 默认排序方式 - startDate: "", // 起始时间 - endDate: "", // 终止时间 + startTime: "", // 起始时间 + endTime: "", // 终止时间 }, selectDate: null, form: { @@ -232,8 +232,8 @@ export default { // 选择日期回调 selectDateRange(v) { if (v) { - this.searchForm.startDate = v[0]; - this.searchForm.endDate = v[1]; + this.searchForm.startTime = v[0]; + this.searchForm.endTime = v[1]; } }, // 获取列表数据