买家端订单状态

master
15386982806 2024-01-16 17:29:19 +08:00
parent 6e626f6e11
commit bf8afdc0f4
5 changed files with 86 additions and 44 deletions

View File

@ -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",

View File

@ -30,7 +30,7 @@ export const orderStatusList = [
status: 'TAKE' status: 'TAKE'
}, },
{ {
name: '已取消', name: '已关闭',
status: 'CANCELLED' status: 'CANCELLED'
}, },
{ {

View File

@ -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",

View File

@ -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",

View File

@ -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>
&nbsp; &nbsp;
@ -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-8ASCII
}
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(