mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-08-06 02:47:29 +08:00
Merge branch 'master' of https://gitee.com/beijing_hongye_huicheng/lilishop-ui
This commit is contained in:
@@ -92,6 +92,7 @@ import { mobile, email } from '@/plugins/RegExp.js';
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'invoiceModal',
|
name: 'invoiceModal',
|
||||||
|
emits: ['change'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
invoice: 1, // 1 电子普通发票 2 增值税专用发票
|
invoice: 1, // 1 电子普通发票 2 增值税专用发票
|
||||||
|
|||||||
@@ -193,7 +193,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="error-goods" v-if="goods.errorMessage">
|
<div class="error-goods" v-if="goods.errorMessage">
|
||||||
<div style="margin-top: 20px">{{ goods.errorMessage }}</div>
|
<div>{{ goods.errorMessage }}</div>
|
||||||
<el-button type="primary" @click="delGoods(goods.goodsSku.id)"
|
<el-button type="primary" @click="delGoods(goods.goodsSku.id)"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
@@ -785,20 +785,18 @@ export default {
|
|||||||
outline-color: $theme_color;
|
outline-color: $theme_color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
.error-goods {
|
||||||
.error-goods {
|
position: absolute;
|
||||||
position: absolute;
|
inset: 0;
|
||||||
width: 100%;
|
background-color: rgba($color: #999, $alpha: 0.5);
|
||||||
height: 100%;
|
z-index: 10;
|
||||||
margin-left: -20px;
|
display: flex;
|
||||||
background-color: rgba($color: #999, $alpha: 0.5);
|
align-items: center;
|
||||||
z-index: 10;
|
justify-content: space-between;
|
||||||
display: flex;
|
padding: 0 30px 0 150px;
|
||||||
align-items: center;
|
box-sizing: border-box;
|
||||||
justify-content: space-between;
|
color: #000;
|
||||||
padding-left: 150px;
|
}
|
||||||
color: #000;
|
|
||||||
padding-right: 30px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-footer {
|
&-footer {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="hover-color" @click="goodsDetail(goods.skuId, goods.goodsId)">{{ goods.name }}</div>
|
<div class="hover-color" @click="goodsDetail(goods.skuId, goods.goodsId)">{{ goods.name }}</div>
|
||||||
<div class="mt_10">
|
<div class="mt_10">
|
||||||
<span class="global_color">{{ $filters.unitPrice(goods.goodsPrice, "¥") }} </span>x {{ goods.num }}
|
<span class="global_color">{{ $filters.unitPrice(goods.goodsPrice, "¥") }} </span> x {{ goods.num }}
|
||||||
<span style="margin-left: 10px;color: #ff9900;">{{refundPriceList(goods.isRefund)}}</span>
|
<span style="margin-left: 10px;color: #ff9900;">{{refundPriceList(goods.isRefund)}}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:190px;margin-right:10px">评价</el-button>
|
<el-button v-if="goods.commentStatus == 'UNFINISHED'" @click="comment(order.sn, goodsIndex)" size="small" type="success" class="fontsize_12" style="position:relative;top:-22px;left:190px;margin-right:10px">评价</el-button>
|
||||||
|
|||||||
@@ -68,7 +68,13 @@
|
|||||||
row-key="id"
|
row-key="id"
|
||||||
@selection-change="onSelectionChange"
|
@selection-change="onSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column v-if="!selectedMember" type="selection" width="60" align="center" />
|
<el-table-column
|
||||||
|
v-if="!selectedMember || checkboxSelect"
|
||||||
|
type="selection"
|
||||||
|
width="60"
|
||||||
|
align="center"
|
||||||
|
:reserve-selection="checkboxSelect"
|
||||||
|
/>
|
||||||
<el-table-column prop="id" label="会员ID" min-width="120" show-overflow-tooltip />
|
<el-table-column prop="id" label="会员ID" min-width="120" show-overflow-tooltip />
|
||||||
<el-table-column label="头像" min-width="80" align="center">
|
<el-table-column label="头像" min-width="80" align="center">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
@@ -109,10 +115,16 @@
|
|||||||
<priceColorScheme v-if="row" :value="row.memberWallet" :color="$mainColor" />
|
<priceColorScheme v-if="row" :value="row.memberWallet" :color="$mainColor" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="200" align="center" fixed="right">
|
<el-table-column
|
||||||
|
v-if="!selectedMember || !checkboxSelect"
|
||||||
|
label="操作"
|
||||||
|
width="200"
|
||||||
|
align="center"
|
||||||
|
fixed="right"
|
||||||
|
>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div v-if="row" style="display: flex; justify-content: center; align-items: center">
|
<div v-if="row" style="display: flex; justify-content: center; align-items: center">
|
||||||
<template v-if="selectedMember">
|
<template v-if="selectedMember && !checkboxSelect">
|
||||||
<a class="link-text" @click="callback(row)">
|
<a class="link-text" @click="callback(row)">
|
||||||
{{ row.___selected ? "已选择" : "选择" }}
|
{{ row.___selected ? "已选择" : "选择" }}
|
||||||
</a>
|
</a>
|
||||||
@@ -320,6 +332,10 @@ export default {
|
|||||||
type: null,
|
type: null,
|
||||||
default: () => [],
|
default: () => [],
|
||||||
},
|
},
|
||||||
|
checkboxSelect: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -432,8 +448,28 @@ export default {
|
|||||||
if (name === "updatePoint") this.openMemberPoint(row);
|
if (name === "updatePoint") this.openMemberPoint(row);
|
||||||
},
|
},
|
||||||
onSelectionChange(selection) {
|
onSelectionChange(selection) {
|
||||||
|
if (this.selectedMember && this.checkboxSelect) {
|
||||||
|
this.selectMember = selection || [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.selectedRows = selection || [];
|
this.selectedRows = selection || [];
|
||||||
},
|
},
|
||||||
|
getSelection() {
|
||||||
|
return this.selectMember || [];
|
||||||
|
},
|
||||||
|
syncTableSelection() {
|
||||||
|
if (!this.selectedMember || !this.checkboxSelect) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.clearSelection();
|
||||||
|
this.data.forEach((row) => {
|
||||||
|
if (this.selectMember.some((member) => member.id === row.id)) {
|
||||||
|
this.$refs.table?.toggleRowSelection(row, true);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
openSetMemberGroup() {
|
openSetMemberGroup() {
|
||||||
this.memberGroupFlag = true;
|
this.memberGroupFlag = true;
|
||||||
this.memberGroupLoading = false;
|
this.memberGroupLoading = false;
|
||||||
@@ -569,6 +605,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.init(res.result.records);
|
this.init(res.result.records);
|
||||||
this.total = res.result.total;
|
this.total = res.result.total;
|
||||||
|
this.syncTableSelection();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -156,10 +156,15 @@
|
|||||||
<el-dialog v-model="checkUserList" width="1200px" title="选择会员" destroy-on-close>
|
<el-dialog v-model="checkUserList" width="1200px" title="选择会员" destroy-on-close>
|
||||||
<userList
|
<userList
|
||||||
v-if="checkUserList"
|
v-if="checkUserList"
|
||||||
@callback="callbackSelectUser"
|
|
||||||
:selectedList="selectedMember"
|
|
||||||
ref="memberLayout"
|
ref="memberLayout"
|
||||||
|
:selectedMember="true"
|
||||||
|
:checkboxSelect="true"
|
||||||
|
:selectedList="memberSelectSnapshot"
|
||||||
/>
|
/>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="cancelMemberSelect">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirmMemberSelect">确定</el-button>
|
||||||
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -185,6 +190,7 @@ export default {
|
|||||||
showCouponSelect: false,
|
showCouponSelect: false,
|
||||||
tempCouponList: [],
|
tempCouponList: [],
|
||||||
checkUserList: false,
|
checkUserList: false,
|
||||||
|
memberSelectSnapshot: [],
|
||||||
selectedMember: [],
|
selectedMember: [],
|
||||||
form: {
|
form: {
|
||||||
promotionName: "",
|
promotionName: "",
|
||||||
@@ -237,20 +243,14 @@ export default {
|
|||||||
};
|
};
|
||||||
return map[type] || "danger";
|
return map[type] || "danger";
|
||||||
},
|
},
|
||||||
callbackSelectUser(val) {
|
cancelMemberSelect() {
|
||||||
let findUser = this.selectedMember.find((item) => {
|
this.checkUserList = false;
|
||||||
return item.id === val.id;
|
},
|
||||||
});
|
confirmMemberSelect() {
|
||||||
if (!findUser) {
|
const list = this.$refs.memberLayout?.getSelection?.() || [];
|
||||||
this.selectedMember.push(val);
|
this.selectedMember = list;
|
||||||
} else {
|
|
||||||
this.selectedMember.map((item, index) => {
|
|
||||||
if (item.id === findUser.id) {
|
|
||||||
this.selectedMember.splice(index, 1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
this.reSelectMember();
|
this.reSelectMember();
|
||||||
|
this.checkUserList = false;
|
||||||
},
|
},
|
||||||
delUser(index) {
|
delUser(index) {
|
||||||
this.selectedMember.splice(index, 1);
|
this.selectedMember.splice(index, 1);
|
||||||
@@ -293,10 +293,8 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
addVip() {
|
addVip() {
|
||||||
|
this.memberSelectSnapshot = JSON.parse(JSON.stringify(this.selectedMember));
|
||||||
this.checkUserList = true;
|
this.checkUserList = true;
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.memberLayout.selectedMember = true;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
showSelector() {
|
showSelector() {
|
||||||
this.tempCouponList = [...this.selectCouponList];
|
this.tempCouponList = [...this.selectCouponList];
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ export default {
|
|||||||
{ type: "WECHAT_PAYMENT", name: "微信支付设置" },
|
{ type: "WECHAT_PAYMENT", name: "微信支付设置" },
|
||||||
],
|
],
|
||||||
tabWay: [], // tab数据
|
tabWay: [], // tab数据
|
||||||
|
settingRequestSeq: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -115,29 +116,60 @@ export default {
|
|||||||
this.selected = name;
|
this.selected = name;
|
||||||
this.getSettingData(name);
|
this.getSettingData(name);
|
||||||
},
|
},
|
||||||
|
resolveTabWay() {
|
||||||
|
const tabMap = {
|
||||||
|
setting: this.setting,
|
||||||
|
authLogin: this.authLogin,
|
||||||
|
pay: this.pay,
|
||||||
|
};
|
||||||
|
this.tabWay = tabMap[this.$route.name] || [];
|
||||||
|
},
|
||||||
|
normalizeSettingResult(res) {
|
||||||
|
if (!res || res.result == null) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
const raw = res.result;
|
||||||
|
if (typeof raw === "string") {
|
||||||
|
try {
|
||||||
|
return JSON.parse(raw);
|
||||||
|
} catch (e) {
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (typeof raw === "object") {
|
||||||
|
return raw;
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 进入页面请求第一个配置
|
* 进入页面请求第一个配置
|
||||||
*/
|
*/
|
||||||
getSettingData(name) {
|
getSettingData(name) {
|
||||||
this.settingData = "";
|
this.settingData = "";
|
||||||
Object.keys(this).forEach((item) => {
|
this.resolveTabWay();
|
||||||
if (this.$route.name == item) {
|
|
||||||
this.tabWay = this[item];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 点击页面给每项第一个数据赋值
|
|
||||||
if (!name) {
|
if (!name) {
|
||||||
|
if (!this.tabWay.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
name = this.tabWay[0].type;
|
name = this.tabWay[0].type;
|
||||||
this.selected = name;
|
this.selected = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
getSetting(name).then((res) => {
|
const requestId = ++this.settingRequestSeq;
|
||||||
if (res.result) {
|
getSetting(name)
|
||||||
this.settingData = JSON.stringify(res.result);
|
.then((res) => {
|
||||||
} else {
|
if (requestId !== this.settingRequestSeq) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.settingData = JSON.stringify(this.normalizeSettingResult(res));
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
if (requestId !== this.settingRequestSeq) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.settingData = "{}";
|
this.settingData = "{}";
|
||||||
}
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user