|
@@ -1,11 +1,91 @@
|
|
|
<template>
|
|
|
- <div>
|
|
|
- 材料调差
|
|
|
- </div>
|
|
|
+ <hc-card title="材料调差" class="hc-debit-pay-material-material">
|
|
|
+ <template #extra>
|
|
|
+ <el-button hc-btn type="primary">
|
|
|
+ <hc-icon name="add" />
|
|
|
+ <span>新增</span>
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ <hc-table :column="tableColumn" :datas="tableData" :index-style="{ width: 60 }" :loading="tableLoading">
|
|
|
+ <template #key3="{ row }">
|
|
|
+ <el-link type="primary" @click="rowTop(row)">{{ row.key3 }}</el-link>
|
|
|
+ </template>
|
|
|
+ <template #key8="{ row }">
|
|
|
+ <span class="text-green">已完结</span>
|
|
|
+ <span class="text-gray">未完结</span>
|
|
|
+ </template>
|
|
|
+ <template #action="{ row }">
|
|
|
+ <el-link type="primary" @click="rowEditClick(row)">编辑</el-link>
|
|
|
+ <el-link type="danger" @click="rowDelClick(row)">删除</el-link>
|
|
|
+ </template>
|
|
|
+ </hc-table>
|
|
|
+ </hc-card>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { onActivated, ref } from 'vue'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import { HcDelMsg } from 'hc-vue3-ui'
|
|
|
+import { getArrValue } from 'js-fast-way'
|
|
|
+import mainApi from '~api/debit-pay/material/material'
|
|
|
|
|
|
+//初始化
|
|
|
+const store = useAppStore()
|
|
|
+const projectId = ref(store.getProjectId)
|
|
|
+const contractId = ref(store.getContractId)
|
|
|
+
|
|
|
+//渲染完成
|
|
|
+onActivated(() => {
|
|
|
+ //getTableData()
|
|
|
+})
|
|
|
+
|
|
|
+//表格
|
|
|
+const tableColumn = [
|
|
|
+ { key: 'key1', name: '调差期', width: 100, align: 'center' },
|
|
|
+ { key: 'key2', name: '调差月份', width: 120, align: 'center' },
|
|
|
+ { key: 'key3', name: '材料名称' },
|
|
|
+ { key: 'key4', name: '基准价格(元)', width: 140, align: 'center' },
|
|
|
+ { key: 'key5', name: '施工期价格(元)', width: 140, align: 'center' },
|
|
|
+ { key: 'key6', name: '调差数量', width: 140, align: 'center' },
|
|
|
+ { key: 'key7', name: '调差金额', width: 140, align: 'center' },
|
|
|
+ { key: 'key8', name: '状态', width: 120, align: 'center' },
|
|
|
+ { key: 'action', name: '操作', width: 100, align: 'center' },
|
|
|
+]
|
|
|
+const tableData = ref([
|
|
|
+ {},
|
|
|
+])
|
|
|
+
|
|
|
+//获取表格数据
|
|
|
+const tableLoading = ref(false)
|
|
|
+const getTableData = async () => {
|
|
|
+ tableLoading.value = true
|
|
|
+ const { error, code, data } = await mainApi.getAllMaterial({
|
|
|
+ //...searchForm.value,
|
|
|
+ projectId: projectId.value,
|
|
|
+ contractId: contractId.value,
|
|
|
+ })
|
|
|
+ tableLoading.value = false
|
|
|
+ if (!error && code === 200) {
|
|
|
+ tableData.value = getArrValue(data)
|
|
|
+ } else {
|
|
|
+ tableData.value = []
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+//材料名称被点击
|
|
|
+const rowTop = (row) => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//编辑
|
|
|
+const rowEditClick = (row) => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//删除
|
|
|
+const rowDelClick = (row) => {
|
|
|
+
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|