买家端订单状态
parent
6e626f6e11
commit
bf8afdc0f4
|
@ -3,10 +3,14 @@ var BASE = {
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
API_DEV: {
|
API_DEV: {
|
||||||
common: "https://common-api.pickmall.cn",
|
// common: "https://common-api.pickmall.cn",
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
// buyer: "https://buyer-api.pickmall.cn",
|
||||||
seller: "https://store-api.pickmall.cn",
|
// seller: "https://store-api.pickmall.cn",
|
||||||
manager: "https://admin-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"
|
||||||
},
|
},
|
||||||
API_PROD: {
|
API_PROD: {
|
||||||
common: "https://common-api.pickmall.cn",
|
common: "https://common-api.pickmall.cn",
|
||||||
|
|
|
@ -30,7 +30,7 @@ export const orderStatusList = [
|
||||||
status: 'TAKE'
|
status: 'TAKE'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '已取消',
|
name: '已关闭',
|
||||||
status: 'CANCELLED'
|
status: 'CANCELLED'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,29 +1,33 @@
|
||||||
var BASE = {
|
var BASE = {
|
||||||
/**
|
/**
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
API_DEV: {
|
API_DEV: {
|
||||||
common: "https://common-api.pickmall.cn",
|
// common: "https://common-api.pickmall.cn",
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
// buyer: "https://buyer-api.pickmall.cn",
|
||||||
seller: "https://store-api.pickmall.cn",
|
// seller: "https://store-api.pickmall.cn",
|
||||||
manager: "https://admin-api.pickmall.cn"
|
// manager: "https://admin-api.pickmall.cn",
|
||||||
},
|
common: "http://192.168.31.225:8890",
|
||||||
API_PROD: {
|
buyer: "http://192.168.31.225:8888",
|
||||||
common: "https://common-api.pickmall.cn",
|
seller: "http://192.168.31.225:8889",
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
manager: "http://192.168.31.225:8887"
|
||||||
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",
|
||||||
* @description // 跳转买家端地址 pc端
|
seller: "https://store-api.pickmall.cn",
|
||||||
*/
|
manager: "https://admin-api.pickmall.cn"
|
||||||
PC_URL: "https://pc-b2b2c.pickmall.cn",
|
},
|
||||||
/**
|
/**
|
||||||
* @description // 跳转买家端地址 wap端
|
* @description // 跳转买家端地址 pc端
|
||||||
*/
|
*/
|
||||||
WAP_URL: "https://m-b2b2c.pickmall.cn",
|
PC_URL: "https://pc-b2b2c.pickmall.cn",
|
||||||
/**
|
/**
|
||||||
* @description api请求基础路径前缀
|
* @description // 跳转买家端地址 wap端
|
||||||
*/
|
*/
|
||||||
PREFIX: "/manager"
|
WAP_URL: "https://m-b2b2c.pickmall.cn",
|
||||||
|
/**
|
||||||
|
* @description api请求基础路径前缀
|
||||||
|
*/
|
||||||
|
PREFIX: "/manager"
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,10 +3,14 @@ var BASE = {
|
||||||
* @description api请求基础路径
|
* @description api请求基础路径
|
||||||
*/
|
*/
|
||||||
API_DEV: {
|
API_DEV: {
|
||||||
common: "https://common-api.pickmall.cn",
|
// common: "https://common-api.pickmall.cn",
|
||||||
buyer: "https://buyer-api.pickmall.cn",
|
// buyer: "https://buyer-api.pickmall.cn",
|
||||||
seller: "https://store-api.pickmall.cn",
|
// seller: "https://store-api.pickmall.cn",
|
||||||
manager: "https://admin-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"
|
||||||
},
|
},
|
||||||
API_PROD: {
|
API_PROD: {
|
||||||
common: "https://common-api.pickmall.cn",
|
common: "https://common-api.pickmall.cn",
|
||||||
|
|
|
@ -178,9 +178,9 @@
|
||||||
<FormItem v-for="(val, index) in item.spec_values" :key="index"
|
<FormItem v-for="(val, index) in item.spec_values" :key="index"
|
||||||
class="sku-item-content-val flex" label="规格项">
|
class="sku-item-content-val flex" label="规格项">
|
||||||
<AutoComplete ref="input" v-model="val.value" :data="skuVal" :filter-method="filterMethod"
|
<AutoComplete ref="input" v-model="val.value" :data="skuVal" :filter-method="filterMethod"
|
||||||
:maxlength="30" placeholder="请输入规格项" style="width: 150px"
|
:maxlength="10" placeholder="请输入规格项" style="width: 150px"
|
||||||
@on-focus="changeSkuVals(val, item.name)" @on-blur="checkSkuVal(val, index)"
|
@on-focus="changeSkuVals(val, item.name)" @on-blur="checkSkuVal(val, index)"
|
||||||
@on-change="skuValueChange(val, index, item)">
|
@on-change="skuValueChange(val, index, item, $index)">
|
||||||
</AutoComplete>
|
</AutoComplete>
|
||||||
<Button size="small" style="margin-left: 10px" type="primary"
|
<Button size="small" style="margin-left: 10px" type="primary"
|
||||||
@click="handleCloseSkuValue(val, index, item)">
|
@click="handleCloseSkuValue(val, index, item)">
|
||||||
|
@ -196,6 +196,7 @@
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
|
{{skuInfo}}
|
||||||
<Button class="add-sku-btn" size="small" type="primary" @click="addSkuItem">添加规格项
|
<Button class="add-sku-btn" size="small" type="primary" @click="addSkuItem">添加规格项
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
@ -1220,8 +1221,41 @@ export default {
|
||||||
}
|
}
|
||||||
return len;
|
return len;
|
||||||
},
|
},
|
||||||
|
truncateString(str) {
|
||||||
|
let len = str.length; // 获取原始字符串的长度
|
||||||
|
if (len <= 10 && /^[\u4e00-\u9fa5]+$/.test(str)) { // 判断字符串长度小于等于10且只包含中文时直接返回原字符串
|
||||||
|
return str;
|
||||||
|
} else {
|
||||||
|
let count = 0; // 记录已经统计的字节数(UTF-8编码)
|
||||||
|
for (let i = 0; i < len; i++) {
|
||||||
|
let charCode = str.charCodeAt(i);
|
||||||
|
if ((charCode >= 0x0001 && charCode <= 0x007F) || (charCode >= 0xFF60 && charCode <= 0xFF9F)) { // ASCII字符或全角字符
|
||||||
|
count += 1;
|
||||||
|
} else {
|
||||||
|
count += 2; // UTF-8编码中非ASCII字符占两个字节
|
||||||
|
}
|
||||||
|
if (count > 10 * 2) { // 当已经统计的字节数大于10*2时,说明已经达到了限制条件
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log('根据统计得到的字节数进行切片并返回结果', str, str.substr(0, Math.floor((count - 1) / 2)));
|
||||||
|
return str.substr(0, Math.floor((count - 1) / 2)); // 根据统计得到的字节数进行切片并返回结果
|
||||||
|
}
|
||||||
|
},
|
||||||
// 编辑规格值
|
// 编辑规格值
|
||||||
skuValueChange(val, index, item) {
|
skuValueChange(val, index, item, $index) {
|
||||||
|
if (this.zz(0, val.value) > 20) {
|
||||||
|
this.$Message.error("规格值最多十个字符长度!");
|
||||||
|
// val.value = val.value.toString().slice(0, 4);
|
||||||
|
this.$forceUpdate();// 调用该方法会触发组件的重新渲染
|
||||||
|
// val.value = this.truncateString(val.value);
|
||||||
|
this.skuInfo[$index].spec_values[index].value = this.truncateString(val.value);
|
||||||
|
// 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)) {
|
if (this.skuTableData.find((i) => i[val.name] === val.value)) {
|
||||||
this.$Message.error("已存在相同规格值!");
|
this.$Message.error("已存在相同规格值!");
|
||||||
return;
|
return;
|
||||||
|
@ -1230,10 +1264,6 @@ export default {
|
||||||
this.$Message.error("规格值不能为空!");
|
this.$Message.error("规格值不能为空!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.zz(0, val.value) > 20) {
|
|
||||||
this.$Message.error("规格值最多十个字符长度!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let curVal = this.currentSkuVal;
|
let curVal = this.currentSkuVal;
|
||||||
this.skuTableData = this.skuTableData.map((e) => {
|
this.skuTableData = this.skuTableData.map((e) => {
|
||||||
if (e[val.name] === curVal) {
|
if (e[val.name] === curVal) {
|
||||||
|
@ -1437,7 +1467,7 @@ export default {
|
||||||
key: columnName,
|
key: columnName,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
console.log('渲染头部', this.skuInfo);
|
||||||
// 有成本价和价格的情况
|
// 有成本价和价格的情况
|
||||||
if (this.baseInfoForm.salesModel !== "WHOLESALE") {
|
if (this.baseInfoForm.salesModel !== "WHOLESALE") {
|
||||||
pushData.push(
|
pushData.push(
|
||||||
|
|
Loading…
Reference in New Issue