|
|
@@ -23,26 +23,34 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import { defineComponent, initData, getTableColumns, getTableEvent, queryTableList, contextMenu, BtnList, _getBtnList } from '@/common/export/table';
|
|
|
+import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
+import { ComposeTableParam, defineComponent, handleComposeTable, queryTableList } from '@/common/export/commonTable';
|
|
|
import { getUserId } from '@/services/bus/user';
|
|
|
import { queryTradeDetail } from '@/services/go/ermcp/qhj';
|
|
|
import { QueryTradeDetailReq } from '@/services/go/ermcp/qhj/interface';
|
|
|
import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
|
|
|
import Filter from '../../compoments/filter/index.vue';
|
|
|
-// import ControlModal from './compoments/controlModal/index.vue';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'platinum_document_query_success',
|
|
|
- components: { Filter, contextMenu, BtnList },
|
|
|
+ components: { Filter },
|
|
|
setup() {
|
|
|
- // 表头数据
|
|
|
- const { columns, registerColumn } = getTableColumns();
|
|
|
- // 表格事件
|
|
|
- const { expandedRowKeys, selectedRow, Rowclick, btnClick } = getTableEvent<ErmcpWareHouseInfo>({});
|
|
|
- // 表格操作按钮列表
|
|
|
- const [firstBtn] = _getBtnList('platinum_document_query_success', false).value;
|
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList();
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<ErmcpWareHouseInfo>();
|
|
|
+ const queryTableAction = () => {
|
|
|
+ // 获取列表数据
|
|
|
+ queryTable(queryTradeDetail, { userid: getUserId() });
|
|
|
+ };
|
|
|
+
|
|
|
+ // 表格通用逻辑
|
|
|
+ const param: ComposeTableParam = {
|
|
|
+ queryFn: queryTableAction,
|
|
|
+ menuType: EnumRouterName.plan_audit,
|
|
|
+ tableName: 'table_pcweb_qhj_deal_order',
|
|
|
+ tableFilterKey: [],
|
|
|
+ isDetail: true,
|
|
|
+ };
|
|
|
+
|
|
|
function search(value: any) {
|
|
|
const { includesub, goodsid, filtername, userid, ordertime, userinfotype } = value;
|
|
|
const len = ordertime.length;
|
|
|
@@ -57,24 +65,12 @@ export default defineComponent({
|
|
|
};
|
|
|
queryTable(queryTradeDetail, param);
|
|
|
}
|
|
|
- initData(() => {
|
|
|
- // 获取列表数据
|
|
|
- queryTable(queryTradeDetail, { userid: getUserId() });
|
|
|
- // 注册表头信息 过滤
|
|
|
- registerColumn('table_pcweb_qhj_deal_order', ['tradetime', 'accountid', 'goodsid']);
|
|
|
- });
|
|
|
|
|
|
return {
|
|
|
- columns,
|
|
|
+ ...handleComposeTable<ErmcpWareHouseInfo>(param),
|
|
|
search,
|
|
|
- expandedRowKeys,
|
|
|
- selectedRow,
|
|
|
- Rowclick,
|
|
|
- firstBtn,
|
|
|
loading,
|
|
|
tableList,
|
|
|
- queryTable,
|
|
|
- btnClick,
|
|
|
};
|
|
|
},
|
|
|
});
|