feat: 商品同步增加
This commit is contained in:
parent
61bd37de32
commit
6c72027a86
|
|
@ -55,7 +55,7 @@ const AuthAPI = {
|
||||||
method: "delete",
|
method: "delete",
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 退款退回
|
// 同步
|
||||||
refundToStock(data: any) {
|
refundToStock(data: any) {
|
||||||
return request<any, Responseres>({
|
return request<any, Responseres>({
|
||||||
url: `${baseURL}/refundToStock`,
|
url: `${baseURL}/refundToStock`,
|
||||||
|
|
@ -63,6 +63,14 @@ const AuthAPI = {
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 退款退回
|
||||||
|
sync(data: any) {
|
||||||
|
return request<any, Responseres>({
|
||||||
|
url: `${baseURL}/sync`,
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
// 耗材列表
|
// 耗材列表
|
||||||
productcons(params: any) {
|
productcons(params: any) {
|
||||||
|
|
|
||||||
|
|
@ -199,6 +199,20 @@ let datas = reactive({
|
||||||
remark: "",
|
remark: "",
|
||||||
images: []
|
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) {
|
function newHandleQueryClick(e: IObject | undefined) {
|
||||||
const filterParams = contentRef.value?.getFilterParams();
|
const filterParams = contentRef.value?.getFilterParams();
|
||||||
contentRef.value?.fetchPageData({ ...e, ...filterParams }, true);
|
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);
|
console.log(name);
|
||||||
if ( name === "custom1" ) {
|
if ( name === "custom1" ) {
|
||||||
// ElMessage.success("点击了自定义1按钮");
|
// ElMessage.success("点击了自定义1按钮");
|
||||||
myDialogRef.value.open();
|
myDialogRef.value.open();
|
||||||
}
|
}
|
||||||
if ( name === "custom2" ) { //商品同步
|
if ( name === "custom2" ) { //商品同步
|
||||||
|
let res = await UserAPI.sync()
|
||||||
|
ElMessage.success('操作成功,数据正在后台同步中...')
|
||||||
|
console.log(res)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function confirm() {
|
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() {
|
async function gethaocaiList() {
|
||||||
let res = await UserAPI.productcons({ id: route.query.id })
|
let res = await UserAPI.productcons({ id: route.query.id })
|
||||||
options.value = res.records
|
options.value = res.records
|
||||||
|
|
@ -388,4 +397,4 @@ async function gethaocaiList() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue