Merge branch 'multi-store' of https://e.coding.net/g-cphe0354/cashier/cashier-web into multi-store

This commit is contained in:
wwz 2025-04-11 09:37:31 +08:00
commit bfca8f4013
2 changed files with 29 additions and 12 deletions

View File

@ -55,7 +55,7 @@ const AuthAPI = {
method: "delete",
});
},
// 退款退回
// 同步
refundToStock(data: any) {
return request<any, Responseres>({
url: `${baseURL}/refundToStock`,
@ -63,6 +63,14 @@ const AuthAPI = {
data,
});
},
// 退款退回
sync(data: any) {
return request<any, Responseres>({
url: `${baseURL}/sync`,
method: "post",
data,
});
},
// 耗材列表
productcons(params: any) {

View File

@ -199,6 +199,20 @@ let datas = reactive({
remark: "",
images: []
});
if (JSON.parse(localStorage.getItem('userInfo') || '{}').isHeadShop == 0) {
contentConfig.toolbar.splice(0, 1)
}else {
contentConfig.toolbar.splice(1, 1)
}
onMounted(() => {
console.log(route.query);
if (route.query.id) {
contentRef.value?.fetchPageData({ id: route.query.id });
}
//
gethaocaiList()
});
function newHandleQueryClick(e: IObject | undefined) {
const filterParams = contentRef.value?.getFilterParams();
contentRef.value?.fetchPageData({ ...e, ...filterParams }, true);
@ -299,14 +313,16 @@ async function handleEditClick(row: IObject) {
}
//
function handleToolbarClick(name: string) {
async function handleToolbarClick(name: string) {
console.log(name);
if ( name === "custom1" ) {
// ElMessage.success("1");
myDialogRef.value.open();
}
if ( name === "custom2" ) { //
let res = await UserAPI.sync()
ElMessage.success('操作成功,数据正在后台同步中...')
console.log(res)
}
}
async function confirm() {
@ -357,14 +373,7 @@ async function handleOperatClick(data: IOperatData) {
}
onMounted(() => {
console.log(route.query);
if (route.query.id) {
contentRef.value?.fetchPageData({ id: route.query.id });
}
//
gethaocaiList()
});
async function gethaocaiList() {
let res = await UserAPI.productcons({ id: route.query.id })
options.value = res.records
@ -388,4 +397,4 @@ async function gethaocaiList() {
}
}
}
</style>
</style>