|
@@ -3,37 +3,18 @@ import { ref } from "vue";
|
|
import { PageSearch, usePageSearch } from "/@/components/PageSearch";
|
|
import { PageSearch, usePageSearch } from "/@/components/PageSearch";
|
|
import searchConfig from "./config/search.config";
|
|
import searchConfig from "./config/search.config";
|
|
import contentConfig from "./config/content.config";
|
|
import contentConfig from "./config/content.config";
|
|
-import { PageModal, usePageModal } from "/@/components/PageModal";
|
|
|
|
-import modalConfig from "./config/modal.config";
|
|
|
|
import { PageContent } from "/@/components/PageContent";
|
|
import { PageContent } from "/@/components/PageContent";
|
|
import { exportPageContent } from "/@/utils/export";
|
|
import { exportPageContent } from "/@/utils/export";
|
|
-import ExeclUpload from "./cpns/execl-files-upload/index.vue";
|
|
|
|
-import { httpDetail } from "/@/api/mobile/exchangeOrder";
|
|
|
|
-import { useResponseHandle } from "/@/hooks/useAsync";
|
|
|
|
|
|
+import ExeclUpload from "./components/execl-files-upload/index.vue";
|
|
import { usePermission } from "/@/hooks/usePermission";
|
|
import { usePermission } from "/@/hooks/usePermission";
|
|
|
|
+import EditModel from "./components/edit-dialog.vue";
|
|
const pageName = "exchangeOrder";
|
|
const pageName = "exchangeOrder";
|
|
-const responseHandle = useResponseHandle();
|
|
|
|
const { pageContentRef, handleResetClick, handleSearchClick, getMergeParams } =
|
|
const { pageContentRef, handleResetClick, handleSearchClick, getMergeParams } =
|
|
usePageSearch(undefined, undefined, searchConfig);
|
|
usePageSearch(undefined, undefined, searchConfig);
|
|
const { hasPermissionWithCode, permissions } = usePermission(pageName);
|
|
const { hasPermissionWithCode, permissions } = usePermission(pageName);
|
|
-
|
|
|
|
-const { pageModalRef, handlePreviewData, handleConfrim, defaultInfo } =
|
|
|
|
- usePageModal({
|
|
|
|
- pageContentRef
|
|
|
|
- });
|
|
|
|
|
|
+const modelEditRef = ref<InstanceType<typeof EditModel>>(null);
|
|
const execlUploadRef = ref<InstanceType<typeof ExeclUpload>>(null);
|
|
const execlUploadRef = ref<InstanceType<typeof ExeclUpload>>(null);
|
|
|
|
|
|
-async function handleDetailData(id) {
|
|
|
|
- const { code, data, message } = await httpDetail({ id: id });
|
|
|
|
- responseHandle({
|
|
|
|
- code,
|
|
|
|
- message,
|
|
|
|
- handler: () => {
|
|
|
|
- handlePreviewData(data);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- // actionModalRef.value.onShow("兑换商品库存", type, id);
|
|
|
|
-}
|
|
|
|
function getParams() {
|
|
function getParams() {
|
|
exportPageContent({
|
|
exportPageContent({
|
|
type: "http",
|
|
type: "http",
|
|
@@ -41,7 +22,6 @@ function getParams() {
|
|
params: getMergeParams(),
|
|
params: getMergeParams(),
|
|
name: "订单导出"
|
|
name: "订单导出"
|
|
});
|
|
});
|
|
- // console.log(pageContentRef);
|
|
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -69,14 +49,12 @@ function getParams() {
|
|
ref="pageContentRef"
|
|
ref="pageContentRef"
|
|
:powers="permissions"
|
|
:powers="permissions"
|
|
:content-config="contentConfig"
|
|
:content-config="contentConfig"
|
|
- @preview-btn-click="({ id }) => handleDetailData(id)"
|
|
|
|
|
|
+ @preview-btn-click="
|
|
|
|
+ ({ id, account_id, good_id, type }) =>
|
|
|
|
+ modelEditRef.show({ id, account_id, good_id, type })
|
|
|
|
+ "
|
|
/>
|
|
/>
|
|
<ExeclUpload ref="execlUploadRef" @onSuccess="handleResetClick" />
|
|
<ExeclUpload ref="execlUploadRef" @onSuccess="handleResetClick" />
|
|
- <PageModal
|
|
|
|
- ref="pageModalRef"
|
|
|
|
- :modal-config="modalConfig"
|
|
|
|
- :default-info="defaultInfo"
|
|
|
|
- @confirm-btn-click="handleConfrim"
|
|
|
|
- />
|
|
|
|
|
|
+ <EditModel ref="modelEditRef" @reload="pageContentRef.onSearch()" />
|
|
</PageAuth>
|
|
</PageAuth>
|
|
</template>
|
|
</template>
|