ZaiZai 1 year ago
parent
commit
98913cd569

+ 219 - 0
src/views/alter/admin/components/pre/addModal.vue

@@ -0,0 +1,219 @@
+<template>
+    <hc-dialog is-to-body is-table is-footer-center widths="90%" :show="isShow" title="预变更" @save="addModalSave" @close="addModalClose">
+        <div class="relative h-full flex">
+            <div id="hc_add_dialog_tree_card">
+                <hc-card-item title="工程部位" scrollbar>
+                    <template #extra>
+                        <el-link type="primary">添加</el-link>
+                    </template>
+                    <hc-lazy-tree :h-props="treeProps" show-checkbox @load="treeLoadNode" />
+                </hc-card-item>
+            </div>
+            <div id="hc_add_dialog_table_card">
+                <el-scrollbar>
+                    <!-- 基础表单 -->
+                    <hc-card-item title="基础表单">
+                        <el-form ref="baseFormRef" :model="baseForm" :rules="baseFormRules" label-position="left" label-width="auto">
+                            <el-row :gutter="20">
+                                <el-col :span="8">
+                                    <el-form-item label="预变更编号:">
+                                        <el-input v-model="baseForm.key1" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="预变更名称:">
+                                        <el-input v-model="baseForm.key2" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="预变更金额:">
+                                        <el-input v-model="baseForm.key3" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="变更类型:">
+                                        <el-select v-model="baseForm.key4" filterable block>
+                                            <el-option label="一般变更A" value="1" />
+                                            <el-option label="一般变更B" value="2" />
+                                            <el-option label="一般变更C" value="3" />
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="延长工期:">
+                                        <el-input v-model="baseForm.key5" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="变更发起单位:">
+                                        <el-input v-model="baseForm.key6" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="业务日期:">
+                                        <el-date-picker v-model="baseForm.key7" class="block" format="YYYY-MM-DD" type="date" value-format="YYYY-MM-DD" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="16">
+                                    <el-form-item label="实际变更桩号:">
+                                        <el-input v-model="baseForm.key8" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="24">
+                                    <el-form-item label="变更原因:">
+                                        <el-input v-model="baseForm.key9" :autosize="{ minRows: 4, maxRows: 8 }" type="textarea" />
+                                    </el-form-item>
+                                </el-col>
+                            </el-row>
+                        </el-form>
+                    </hc-card-item>
+                    <!-- 变更申请部位 -->
+                    <hc-card-item title="变更申请部位" class="mt-3">
+                        <hc-table :column="tableColumn" :datas="tableData">
+                            <template #key3="{ row }">
+                                <hc-table-input v-model="row.key3" />
+                            </template>
+                            <template #action="{ row }">
+                                <el-link type="danger">删除</el-link>
+                            </template>
+                        </hc-table>
+                    </hc-card-item>
+                    <!-- 变更申请清单 -->
+                    <hc-card-item title="变更申请清单" class="mt-3">
+                        <template #extra>
+                            <el-link type="primary" @click="changeShowClick">添加</el-link>
+                        </template>
+                        <div class="hc-table-ref-box no-border">
+                            <el-table class="w-full" :data="tableData" row-key="id" height="100%" highlight-current-row border>
+                                <el-table-column type="index" label="序号" />
+                                <el-table-column prop="key1" label="清单编号" />
+                                <el-table-column prop="key2" label="清单名称" />
+                                <el-table-column prop="key3" label="单价" />
+                                <el-table-column label="数量" align="center">
+                                    <el-table-column prop="key5" label="变更前" />
+                                    <el-table-column prop="key6" label="变更增减" />
+                                    <el-table-column prop="key7" label="变更后" />
+                                </el-table-column>
+                                <el-table-column label="金额" align="center">
+                                    <el-table-column prop="key8" label="变更前" />
+                                    <el-table-column prop="key9" label="变更增减" />
+                                    <el-table-column prop="key10" label="变更后" />
+                                </el-table-column>
+                            </el-table>
+                        </div>
+                    </hc-card-item>
+                </el-scrollbar>
+            </div>
+        </div>
+        <ChangeRequest v-model="isChangeShow" />
+    </hc-dialog>
+</template>
+
+<script setup>
+import { nextTick, ref, watch } from 'vue'
+import ChangeRequest from './changeRequest.vue'
+
+const props = defineProps({
+    ids: {
+        type: [String, Number],
+        default: '',
+    },
+})
+
+//事件
+const emit = defineEmits(['finish', 'close'])
+
+//双向绑定
+// eslint-disable-next-line no-undef
+const isShow = defineModel('modelValue', {
+    default: false,
+})
+
+//监听
+watch(() => [
+    props.ids,
+], ([ids]) => {
+    console.log('ids', ids)
+}, { immediate: true })
+
+//监听
+watch(isShow, (val) => {
+    if (val) {
+        setSplitRef()
+    }
+})
+
+//初始化设置拖动分割线
+const setSplitRef = () => {
+    //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
+    nextTick(() => {
+        window.$split(['#hc_add_dialog_tree_card', '#hc_add_dialog_table_card'], {
+            sizes: [20, 80],
+            snapOffset: 0,
+            minSize: [100, 400],
+        })
+    })
+}
+
+//数据格式
+const treeProps = {
+    label: 'name',
+    children: 'children',
+    isLeaf: 'leaf',
+}
+
+//懒加载的数据
+const treeLoadNode = ({ level }, resolve) => {
+    if (level === 0) {
+        return resolve([{ name: 'region' }])
+    }
+    if (level > 3) {
+        return resolve([])
+    }
+    setTimeout(() => {
+        resolve([
+            { name: 'leaf', leaf: true },
+            { name: 'zone' },
+        ])
+    }, 500)
+}
+
+//基础表单
+const baseFormRef = ref(null)
+const baseForm = ref({})
+const baseFormRules = {}
+
+//变更申请部位列表
+const tableColumn = ref([
+    { key: 'key1', name: '工程名称' },
+    { key: 'key2', name: '节点路径' },
+    { key: 'key3', name: '合同图号' },
+    { key: 'key4', name: '变更后金额(元)' },
+    { key: 'key5', name: '是否增补' },
+    { key: 'action', name: '操作', width: 80, align: 'center' },
+])
+const tableData = ref([
+    { key1: '101-1-a' },
+])
+
+const addModalSave = () => {
+    emit('finish')
+    addModalClose()
+}
+
+//关闭弹窗
+const addModalClose = () => {
+    isShow.value = false
+    emit('close')
+}
+
+//变更清单的添加弹窗
+const isChangeShow = ref(false)
+const changeShowClick = () => {
+    isChangeShow.value = true
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 97 - 0
src/views/alter/admin/components/pre/changeRequest.vue

@@ -0,0 +1,97 @@
+<template>
+    <hc-dialog is-to-body is-table is-footer-center widths="90%" :show="isShow" title="预变更清单添加" @save="addModalSave" @close="addModalClose">
+        <hc-card-item>
+            <template #header>
+                <div class="w-60">
+                    <el-input v-model="searchForm.key1" placeholder="清单编号" />
+                </div>
+            </template>
+            <template #extra>
+                <el-link type="primary">显示已分解</el-link>
+            </template>
+            <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-check @selection-change="tableCheckChange" />
+            <template #action>
+                <hc-pages :pages="searchForm" @change="pageChange" />
+            </template>
+        </hc-card-item>
+    </hc-dialog>
+</template>
+
+<script setup>
+import { ref, watch } from 'vue'
+
+const props = defineProps({
+    ids: {
+        type: [String, Number],
+        default: '',
+    },
+})
+
+//事件
+const emit = defineEmits(['finish', 'close'])
+
+//双向绑定
+// eslint-disable-next-line no-undef
+const isShow = defineModel('modelValue', {
+    default: false,
+})
+
+//监听
+watch(() => [
+    props.ids,
+], ([ids]) => {
+    console.log('ids', ids)
+}, { immediate: true })
+
+//监听
+watch(isShow, (val) => {
+    if (val) {
+        console.log('isShow', val)
+    }
+})
+
+//搜索表单
+const searchForm = ref({
+    key1: null, current: 1, size: 10, total: 0,
+})
+
+//分页
+const pageChange = ({ current, size }) => {
+    searchForm.value.current = current
+    searchForm.value.size = size
+}
+
+//表格数据
+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: 'key7', name: '是否增补' },
+])
+const tableData = ref([
+    { key1: '1111' },
+])
+
+const tableCheckChange = () => {
+
+}
+
+const addModalSave = () => {
+    emit('finish')
+    addModalClose()
+}
+
+//关闭弹窗
+const addModalClose = () => {
+    isShow.value = false
+    emit('close')
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 136 - 7
src/views/alter/admin/pre.vue

@@ -1,20 +1,94 @@
 <template>
     <hc-card>
         <template #header>
-            1
+            <div class="font-400 text-orange">温馨提示:已经被变更方案引用的预变更,无法进行修改、删除操作</div>
         </template>
         <template #extra>
-            <el-button hc-btn type="primary">
+            <el-button hc-btn type="primary" @click="addModalClick">
                 <HcIcon name="add" />
                 <span>新增</span>
             </el-button>
         </template>
-        1111
+        <div class="relative h-full flex">
+            <div id="hc_table_card" class="flex-1">
+                <hc-card-item>
+                    <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading">
+                        <template #action="{ row }">
+                            <el-link type="success" @click="rowEditClick(row)">修改</el-link>
+                            <el-link type="danger">删除</el-link>
+                        </template>
+                    </hc-table>
+                    <template #action>
+                        <hc-pages :pages="searchForm" @change="pageChange" />
+                    </template>
+                </hc-card-item>
+            </div>
+            <div id="hc_info_card">
+                <el-scrollbar>
+                    <hc-card-item title="详情信息">
+                        <hc-info-table>
+                            <tr>
+                                <hc-info-table-td center is-title>预变更编号:</hc-info-table-td>
+                                <hc-info-table-td width="120px">33</hc-info-table-td>
+                                <hc-info-table-td center is-title>预变更名称:</hc-info-table-td>
+                                <hc-info-table-td width="120px">测试的</hc-info-table-td>
+                                <hc-info-table-td center is-title>变更申请金额:</hc-info-table-td>
+                                <hc-info-table-td width="120px">1</hc-info-table-td>
+                            </tr>
+                            <tr>
+                                <hc-info-table-td center is-title>变更类型:</hc-info-table-td>
+                                <hc-info-table-td width="120px">一般变更</hc-info-table-td>
+                                <hc-info-table-td center is-title>延长工期:</hc-info-table-td>
+                                <hc-info-table-td width="120px">-</hc-info-table-td>
+                                <hc-info-table-td center is-title>变更发起单位:</hc-info-table-td>
+                                <hc-info-table-td width="120px">-</hc-info-table-td>
+                            </tr>
+                            <tr>
+                                <hc-info-table-td center is-title>业务日期:</hc-info-table-td>
+                                <hc-info-table-td width="auto">-</hc-info-table-td>
+                                <hc-info-table-td center is-title>实际变更桩号:</hc-info-table-td>
+                                <hc-info-table-td width="auto" colspan="3">-</hc-info-table-td>
+                            </tr>
+                            <tr>
+                                <hc-info-table-td center is-title>变更原因:</hc-info-table-td>
+                                <hc-info-table-td width="auto" colspan="5">-</hc-info-table-td>
+                            </tr>
+                        </hc-info-table>
+                    </hc-card-item>
+                    <hc-card-item class="mt-3" title="变更申请部位">
+                        <hc-table :column="tableColumn1" :datas="tableData1" />
+                    </hc-card-item>
+                    <hc-card-item class="mt-3" title="变更申请清单">
+                        <div class="hc-table-ref-box no-border">
+                            <el-table class="w-full" :data="tableData" row-key="id" height="100%" highlight-current-row border>
+                                <el-table-column type="index" label="序号" />
+                                <el-table-column prop="key1" label="清单编号" />
+                                <el-table-column prop="key2" label="清单名称" />
+                                <el-table-column prop="key3" label="单价" />
+                                <el-table-column label="数量" align="center">
+                                    <el-table-column prop="key5" label="变更前" />
+                                    <el-table-column prop="key6" label="变更增减" />
+                                    <el-table-column prop="key7" label="变更后" />
+                                </el-table-column>
+                                <el-table-column label="金额" align="center">
+                                    <el-table-column prop="key8" label="变更前" />
+                                    <el-table-column prop="key9" label="变更增减" />
+                                    <el-table-column prop="key10" label="变更后" />
+                                </el-table-column>
+                            </el-table>
+                        </div>
+                    </hc-card-item>
+                </el-scrollbar>
+            </div>
+        </div>
+        <!-- 新增修改的弹窗 -->
+        <addModal v-model="isAddShow" />
     </hc-card>
 </template>
 
 <script setup>
-import { onMounted, ref } from 'vue'
+import { nextTick, onMounted, ref } from 'vue'
+import addModal from './components/pre/addModal.vue'
 
 defineOptions({
     name: 'AlterAdminPre',
@@ -22,10 +96,65 @@ defineOptions({
 
 //渲染完成
 onMounted(() => {
+    setSplitRef()
+})
+
+//初始化设置拖动分割线
+const setSplitRef = () => {
+    //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
+    nextTick(() => {
+        window.$split(['#hc_table_card', '#hc_info_card'], {
+            sizes: [60, 40],
+            snapOffset: 0,
+            minSize: [100, 400],
+        })
+    })
+}
 
+//搜索表单
+const searchForm = ref({
+    key1: null, current: 1, size: 10, total: 0,
 })
-</script>
 
-<style scoped lang="scss">
+//分页
+const pageChange = ({ current, size }) => {
+    searchForm.value.current = current
+    searchForm.value.size = size
+}
+
+//表格数据
+const tableLoading = ref(false)
+const tableColumn = ref([
+    { key: 'key1', name: '预变更编号' },
+    { key: 'key2', name: '预变更名称' },
+    { key: 'key3', name: '预变更金额' },
+    { key: 'key4', name: '变更类型' },
+    { key: 'key5', name: '业务日期' },
+    { key: 'action', name: '操作', width: 94 },
+])
+const tableData = ref([
+    { key1: '1111' },
+])
 
-</style>
+const rowEditClick = () => {
+
+}
+
+//申请部位
+const tableColumn1 = ref([
+    { key: 'key1', name: '工程名称' },
+    { key: 'key2', name: '节点路径' },
+    { key: 'key3', name: '合同图号' },
+    { key: 'key4', name: '变更金额(元)' },
+    { key: 'key5', name: '是否增补' },
+])
+const tableData1 = ref([
+    { key1: '1111' },
+])
+
+//新增修改的弹窗
+const isAddShow = ref(false)
+const addModalClick = () => {
+    isAddShow.value = true
+}
+</script>

+ 112 - 13
src/views/alter/admin/zero.vue

@@ -1,20 +1,56 @@
 <template>
     <hc-card>
-        <template #header>
-            1
-        </template>
-        <template #extra>
-            <el-button hc-btn type="primary">
-                <HcIcon name="add" />
-                <span>新增</span>
-            </el-button>
-        </template>
-        1111
+        <div class="relative h-full flex">
+            <div id="hc_tree_card">
+                <hc-card-item scrollbar>
+                    <hc-lazy-tree :h-props="treeProps" @load="treeLoadNode" />
+                </hc-card-item>
+            </div>
+            <div id="hc_table_card" class="flex-1">
+                <hc-card-item style="height: 106px">
+                    <template #header>
+                        <div class="font-400 text-orange">温馨提示: 可选择树节点生成和删除该节点下所有清单的零号变更</div>
+                    </template>
+                    <template #extra>
+                        <el-button hc-btn type="danger">
+                            <HcIcon name="delete-bin" />
+                            <span>批量删除</span>
+                        </el-button>
+                        <el-button hc-btn type="primary">
+                            <HcIcon name="pencil-ruler-2" />
+                            <span>一键生成零号变更</span>
+                        </el-button>
+                    </template>
+                    <el-form inline :model="searchForm" class="search-form-box">
+                        <el-form-item label="零号变更编号">
+                            <el-input v-model="searchForm.key1" placeholder="零号变更编号" clearable />
+                        </el-form-item>
+                        <el-form-item label="生成时间">
+                            <el-date-picker v-model="searchForm.key2" class="block" format="YYYY-MM-DD" type="date" value-format="YYYY-MM-DD" />
+                        </el-form-item>
+                        <el-form-item label="零号变更金额">
+                            <el-input v-model="searchForm.key3" placeholder="零号变更金额" clearable />
+                        </el-form-item>
+                    </el-form>
+                </hc-card-item>
+                <!-- 数据列表 -->
+                <hc-card-item class="mt-3" style="height: calc(100% - 106px - 0.75rem);">
+                    <template #header>
+                        <div class="font-400 text-orange">零号变更数据列表</div>
+                    </template>
+                    <hc-table :is-index="false" :column="tableColumn" :datas="tableData" :loading="tableLoading">
+                        <template #action="{ row }">
+                            <el-link type="danger">删除</el-link>
+                        </template>
+                    </hc-table>
+                </hc-card-item>
+            </div>
+        </div>
     </hc-card>
 </template>
 
 <script setup>
-import { onMounted, ref } from 'vue'
+import { nextTick, onMounted, ref } from 'vue'
 
 defineOptions({
     name: 'AlterAdminZero',
@@ -22,10 +58,73 @@ defineOptions({
 
 //渲染完成
 onMounted(() => {
+    setSplitRef()
+})
+
+//初始化设置拖动分割线
+const setSplitRef = () => {
+    //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
+    nextTick(() => {
+        window.$split(['#hc_tree_card', '#hc_table_card'], {
+            sizes: [20, 80],
+            snapOffset: 0,
+            minSize: [50, 500],
+        })
+    })
+}
+
+//数据格式
+const treeProps = {
+    label: 'name',
+    children: 'children',
+    isLeaf: 'leaf',
+}
 
+//懒加载的数据
+const treeLoadNode = ({ level }, resolve) => {
+    if (level === 0) {
+        return resolve([{ name: 'region' }])
+    }
+    if (level > 3) {
+        return resolve([])
+    }
+    setTimeout(() => {
+        resolve([
+            { name: 'leaf', leaf: true },
+            { name: 'zone' },
+        ])
+    }, 500)
+}
+
+//搜索表单
+const searchForm = ref({
+    key1: null,
 })
-</script>
 
-<style scoped lang="scss">
+//表格数据
+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: 'key7', name: '现划分数量' },
+    { key: 'key8', name: '修正量' },
+    { key: 'key9', name: '修正金额' },
+    { key: 'key10', name: '核实量' },
+    { key: 'key11', name: '核实金额' },
+    { key: 'key12', name: '状态' },
+    { key: 'action', name: '操作', width: 80, align: 'center' },
+])
+const tableData = ref([
+    { key1: '1111' },
+])
+</script>
 
+<style lang="scss">
+.search-form-box .el-form-item {
+    margin-bottom: 0;
+}
 </style>