|
@@ -4,10 +4,12 @@ import APP from '@/services';
|
|
|
import { OperationTabMenu } from '@/services/go/commonService/interface';
|
|
import { OperationTabMenu } from '@/services/go/commonService/interface';
|
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+// 单据菜单数据
|
|
|
|
|
+const orderList = ref<OperationTabMenu[]>([])
|
|
|
|
|
+
|
|
|
// 处理页面下半部分数据
|
|
// 处理页面下半部分数据
|
|
|
export function handleOrderData() {
|
|
export function handleOrderData() {
|
|
|
- // 单据菜单数据
|
|
|
|
|
- const orderList = ref<OperationTabMenu[]>([])
|
|
|
|
|
const isBottom = ref<boolean>(false)
|
|
const isBottom = ref<boolean>(false)
|
|
|
const componentId = ref<enumOrderComponents>()
|
|
const componentId = ref<enumOrderComponents>()
|
|
|
initData(() => {
|
|
initData(() => {
|
|
@@ -24,4 +26,26 @@ export function handleOrderData() {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
return { isBottom, orderList, componentId }
|
|
return { isBottom, orderList, componentId }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 根据 code 获取单据对应子菜单配置数据
|
|
|
|
|
+export function handleOrderDetailList(coode: enumOrderComponents) {
|
|
|
|
|
+ // 选中的组件,默认第一个
|
|
|
|
|
+ const componentId = ref<enumOrderComponents>()
|
|
|
|
|
+ const tabList = ref<OperationTabMenu[]>([])
|
|
|
|
|
+ // 过滤,获取当前tab页配置数据
|
|
|
|
|
+ function filerAction() {
|
|
|
|
|
+ const temp = orderList.value.find(e => e.code === coode)
|
|
|
|
|
+ if (temp) {
|
|
|
|
|
+ tabList.value = temp.children
|
|
|
|
|
+ if (temp.children.length) {
|
|
|
|
|
+ componentId.value = temp.children[0].code as enumOrderComponents
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ function changeTab(index: number, item: OperationTabMenu) {
|
|
|
|
|
+ componentId.value = item.code as enumOrderComponents
|
|
|
|
|
+ }
|
|
|
|
|
+ filerAction()
|
|
|
|
|
+ return { tabList, componentId, changeTab }
|
|
|
}
|
|
}
|