|
@@ -12,11 +12,11 @@
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
<el-button hc-btn type="primary" @click="addModalClick">
|
|
|
- <HcIcon name="add" />
|
|
|
+ <hc-icon name="add" />
|
|
|
<span>新增</span>
|
|
|
</el-button>
|
|
|
<el-button hc-btn type="warning" @click="reportClick">
|
|
|
- <HcIcon name="send-plane-2" />
|
|
|
+ <hc-icon name="send-plane-2" />
|
|
|
<span>上报</span>
|
|
|
</el-button>
|
|
|
</template>
|
|
@@ -120,19 +120,24 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { nextTick, onMounted, ref } from 'vue'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import { getArrValue, getRandom } from 'js-fast-way'
|
|
|
+import mainApi from '~api/alter/admin/order'
|
|
|
import addModal from './components/order/addModal.vue'
|
|
|
-import { getRandom } from 'js-fast-way'
|
|
|
-
|
|
|
|
|
|
defineOptions({
|
|
|
name: 'AlterAdminOrder',
|
|
|
})
|
|
|
|
|
|
const uuid = getRandom(4)
|
|
|
+const useAppState = useAppStore()
|
|
|
+const projectId = ref(useAppState.getProjectId || '')
|
|
|
+const contractId = ref(useAppState.getContractId || '')
|
|
|
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
setSplitRef()
|
|
|
+ getTableData()
|
|
|
})
|
|
|
|
|
|
//初始化设置拖动分割线
|
|
@@ -156,7 +161,6 @@ const tabTab = ref([
|
|
|
|
|
|
const tabChange = (item) => {
|
|
|
tabKey.value = item?.key
|
|
|
- console.log(item)
|
|
|
}
|
|
|
|
|
|
//搜索表单
|
|
@@ -168,22 +172,34 @@ const searchForm = ref({
|
|
|
const pageChange = ({ current, size }) => {
|
|
|
searchForm.value.current = current
|
|
|
searchForm.value.size = size
|
|
|
+ getTableData()
|
|
|
}
|
|
|
|
|
|
//表格数据
|
|
|
const tableLoading = ref(false)
|
|
|
const tableColumn = ref([
|
|
|
- { key: 'key1', name: '变更编号' },
|
|
|
- { key: 'key2', name: '变更名称' },
|
|
|
- { key: 'key3', name: '变更金额' },
|
|
|
- { key: 'key4', name: '变更类型' },
|
|
|
- { key: 'key5', name: '变更批复日期' },
|
|
|
- { key: 'key6', name: '审批状态' },
|
|
|
+ { key: 'changeNumber', name: '变更编号' },
|
|
|
+ { key: 'changeName', name: '变更名称' },
|
|
|
+ { key: 'changeMoney', name: '变更金额' },
|
|
|
+ { key: 'changeTypeName', name: '变更类型' },
|
|
|
+ { key: 'changeApprovalDate', name: '变更批复日期' },
|
|
|
+ { key: 'approveStatusName', name: '审批状态' },
|
|
|
{ key: 'action', name: '操作', width: 94 },
|
|
|
])
|
|
|
-const tableData = ref([
|
|
|
- { key1: '1111' },
|
|
|
-])
|
|
|
+const tableData = ref([])
|
|
|
+const getTableData = async () => {
|
|
|
+ tableData.value = []
|
|
|
+ tableLoading.value = true
|
|
|
+ const { data } = await mainApi.getPage({
|
|
|
+ ...searchForm.value,
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ })
|
|
|
+ tableData.value = getArrValue(data['records'])
|
|
|
+ searchForm.value.total = data.total || 0
|
|
|
+ tableLoading.value = false
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
const rowEditClick = () => {
|
|
|
|