Browse Source

变更令

ZaiZai 1 year ago
parent
commit
012e4f0a88

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20230925115918"
+  "value": "20231016152658"
 }

+ 278 - 0
src/views/alter/admin/components/order/addModal.vue

@@ -0,0 +1,278 @@
+<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.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="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.key3" />
+                                    </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="8">
+                                    <el-form-item label="实际变更桩号:">
+                                        <el-input v-model="baseForm.key8" />
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="变更归类:">
+                                        <el-select v-model="baseForm.key4" filterable block>
+                                            <el-option label="路基" value="1" />
+                                            <el-option label="路面" value="2" />
+                                            <el-option label="软基" value="3" />
+                                        </el-select>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="8">
+                                    <el-form-item label="变更批复文号:">
+                                        <el-input v-model="baseForm.key8" />
+                                    </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="24">
+                                    <el-form-item class="input-link-item" label="引用预变更:">
+                                        <el-input v-model="baseForm.key6" disabled />
+                                        <el-link type="primary" @click="quoteClick">引用</el-link>
+                                        <el-link type="danger">删除引用</el-link>
+                                    </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>
+                    <hc-card-item class="mt-3" title="附件列表">
+                        <hc-table :column="tableColumn2" :datas="tableData2">
+                            <template #action="{ row }">
+                                <el-link type="primary">选择文件</el-link>
+                                <el-link type="danger">清除</el-link>
+                            </template>
+                        </hc-table>
+                    </hc-card-item>
+                </el-scrollbar>
+            </div>
+        </div>
+
+        <!-- 引用预变更 -->
+        <ChangePre v-model="isChangeQuoteShow" />
+
+        <!-- 变更申请清单 -->
+        <ChangeRequest v-model="isChangeShow" />
+    </hc-dialog>
+</template>
+
+<script setup>
+import { nextTick, ref, watch } from 'vue'
+import ChangeRequest from './changeRequest.vue'
+import ChangePre from './changePre.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
+}
+
+//引用预变更的弹窗
+const isChangeQuoteShow = ref(false)
+const quoteClick = () => {
+    isChangeQuoteShow.value = true
+}
+
+//附件列表
+const tableColumn2 = ref([
+    { key: 'key1', name: '文件名称', width: 200 },
+    { key: 'key2', name: '必须上传', width: 100 },
+    { key: 'key3', name: '附件列表' },
+    { key: 'action', name: '操作', width: 120 },
+])
+const tableData2 = ref([
+    { key1: '工程设计变更申请单', key2: '是', key3: '文件名称' },
+])
+</script>

+ 88 - 0
src/views/alter/admin/components/order/changePre.vue

@@ -0,0 +1,88 @@
+<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>
+            <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: '变更申请金额' },
+])
+const tableData = ref([
+    { key1: '1111' },
+])
+
+const tableCheckChange = () => {
+
+}
+
+const addModalSave = () => {
+    emit('finish')
+    addModalClose()
+}
+
+//关闭弹窗
+const addModalClose = () => {
+    isShow.value = false
+    emit('close')
+}
+</script>

+ 97 - 0
src/views/alter/admin/components/order/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>

+ 199 - 7
src/views/alter/admin/order.vue

@@ -1,31 +1,223 @@
 <template>
     <hc-card>
         <template #header>
-            1
+            <hc-new-switch :datas="tabTab" :keys="tabKey" :round="false" size="default" @change="tabChange" />
+            <div v-if="tabKey === 'key2'" class="ml-3 w-40">
+                <el-select v-model="searchForm.key1" filterable block placeholder="选择工区">
+                    <el-option label="工区1" value="1" />
+                    <el-option label="工区2" value="2" />
+                    <el-option label="工区3" value="3" />
+                </el-select>
+            </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>
+            <el-button hc-btn type="warning" @click="reportClick">
+                <HcIcon name="send-plane-2" />
+                <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">-</hc-info-table-td>
+                            </tr>
+                            <tr>
+                                <hc-info-table-td center is-title>业务日期:</hc-info-table-td>
+                                <hc-info-table-td width="160px">2022-02-15</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="120px">116</hc-info-table-td>
+                                <hc-info-table-td center is-title>设计图完成时间:</hc-info-table-td>
+                                <hc-info-table-td width="120px">2022-02-15</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="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" colspan="5">-</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>
+                    <hc-card-item class="mt-3" title="附件列表">
+                        <hc-table :column="tableColumn2" :datas="tableData2" />
+                    </hc-card-item>
+                </el-scrollbar>
+            </div>
+        </div>
+
+        <!-- 上报弹窗 -->
+        <hc-report-dialog v-model="isReport" />
+
+        <!-- 新增修改的弹窗 -->
+        <addModal v-model="isAddShow" />
     </hc-card>
 </template>
 
 <script setup>
-import { onMounted, ref } from 'vue'
+import { nextTick, onMounted, ref } from 'vue'
+import addModal from './components/order/addModal.vue'
+
 
 defineOptions({
     name: 'AlterAdminOrder',
 })
 
+
 //渲染完成
 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],
+        })
+    })
+}
+
+//类型tab数据和相关处理
+const tabKey = ref('key1')
+const tabTab = ref([
+    { key: 'key1', name: '普通变更' },
+    { key: 'key2', name: '工区变更' },
+])
+
+const tabChange = (item) => {
+    tabKey.value = item?.key
+    console.log(item)
+}
 
+//搜索表单
+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: 'key6', name: '审批状态' },
+    { key: 'action', name: '操作', width: 94 },
+])
+const tableData = ref([
+    { key1: '1111' },
+])
+
+const rowEditClick = () => {
+
+}
 
-</style>
+//新增修改的弹窗
+const isAddShow = ref(false)
+const addModalClick = () => {
+    isAddShow.value = true
+}
+
+//申请部位
+const tableColumn1 = ref([
+    { key: 'key1', name: '工程名称' },
+    { key: 'key2', name: '节点路径' },
+    { key: 'key3', name: '合同图号' },
+    { key: 'key4', name: '变更金额(元)' },
+    { key: 'key5', name: '是否增补' },
+])
+const tableData1 = ref([
+    { key1: '1111' },
+])
+
+//附件列表
+const tableColumn2 = ref([
+    { key: 'key1', name: '文件名称' },
+    { key: 'key2', name: '必须上传' },
+    { key: 'key3', name: '附件列表' },
+])
+const tableData2 = ref([
+    { key1: '工程设计变更申请单', key2: '是', key3: '文件名称' },
+])
+
+//是否上报
+const isReport = ref(false)
+const reportClick = () => {
+    isReport.value = true
+}
+</script>