فهرست منبع

开工预付款计量单新增

ZaiZai 1 سال پیش
والد
کامیت
1cd174f4ce
2فایلهای تغییر یافته به همراه251 افزوده شده و 2 حذف شده
  1. 121 0
      src/views/debit-pay/start-work/components/order/dataModal.vue
  2. 130 2
      src/views/debit-pay/start-work/order.vue

+ 121 - 0
src/views/debit-pay/start-work/components/order/dataModal.vue

@@ -0,0 +1,121 @@
+<template>
+    <hc-dialog is-to-body widths="500px" :show="isShow" title="开工预付款计量单新增" @save="modalSave" @close="modalClose">
+        <el-scrollbar>
+            <hc-card-item>
+                <el-form ref="baseFormRef" :model="baseForm" :rules="baseFormRules" label-position="top" label-width="auto">
+                    <el-form-item label="计量期:">
+                        <el-select v-model="baseForm.key1" block>
+                            <el-option label="第一期" value="1" />
+                            <el-option label="第二期" value="2" />
+                        </el-select>
+                    </el-form-item>
+                    <el-form-item label="业务日期:">
+                        <el-date-picker v-model="baseForm.key2" class="block" format="YYYY-MM-DD" type="date" value-format="YYYY-MM-DD" disabled />
+                    </el-form-item>
+                    <el-form-item label="计量金额:">
+                        <el-input v-model="baseForm.key3" />
+                    </el-form-item>
+                    <el-form-item label="开工预付款总额:">
+                        <el-input v-model="baseForm.key4" />
+                    </el-form-item>
+                    <el-form-item label="申请依据:">
+                        <el-input v-model="baseForm.key5" :autosize="{ minRows: 2, maxRows: 6 }" type="textarea" />
+                    </el-form-item>
+                </el-form>
+            </hc-card-item>
+            <!-- 附件列表 -->
+            <hc-card-item class="mt-3" title="附件列表" extra-text="可上传:图片、Excel、PDF、Word文件">
+                <el-form :model="baseForm" label-position="top">
+                    <el-form-item label="">
+                        <hc-form-upload type="list" :src="baseForm.key11" />
+                    </el-form-item>
+                </el-form>
+            </hc-card-item>
+        </el-scrollbar>
+    </hc-dialog>
+</template>
+
+<script setup>
+import { nextTick, ref, watch } from 'vue'
+
+const props = defineProps({
+    ids: {
+        type: [String, Number],
+        default: '',
+    },
+})
+
+//事件
+const emit = defineEmits(['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) {
+        detailsModalShow()
+    }
+})
+
+const detailsModalShow = () => {
+    nextTick(() => {
+        window.$split(['#hc_modal_tree', '#hc_modal_form'], {
+            sizes: [30, 70],
+            snapOffset: 0,
+            minSize: [170, 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 baseFormRef = ref(null)
+const baseForm = ref({})
+const baseFormRules = {}
+
+const modalSave = () => {
+    modalClose()
+}
+
+const modalClose = () => {
+    isShow.value = false
+    emit('close')
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 130 - 2
src/views/debit-pay/start-work/order.vue

@@ -1,13 +1,141 @@
 <template>
-    <hc-card title="开工预付款计量单">
-        开发中...
+    <hc-card>
+        <template #header>
+            <div class="w-40">
+                <el-select v-model="searchForm.key1" filterable block placeholder="选择计量期" @change="searchKey1Click">
+                    <el-option v-for="item in key1Data" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+            </div>
+        </template>
+        <template #extra>
+            <el-button hc-btn type="primary" @click="addModalClick">
+                <HcIcon name="add" />
+                <span>新增</span>
+            </el-button>
+            <el-button hc-btn type="primary" @click="reportClick">
+                <HcIcon name="send-plane-2" />
+                <span>上报</span>
+            </el-button>
+        </template>
+        <div class="relative h-full flex">
+            <div class="flex-1">
+                <hc-card-item>
+                    <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-check @selection-change="tableCheckChange">
+                        <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 class="ml-3 w-[600px]">
+                <hc-card-item title="详情信息" scrollbar>
+                    <hc-info-table>
+                        <tr>
+                            <hc-info-table-td center is-title>计量期:</hc-info-table-td>
+                            <hc-info-table-td width="120px">第1期</hc-info-table-td>
+                            <hc-info-table-td center is-title>业务日期:</hc-info-table-td>
+                            <hc-info-table-td width="120px">2020-09-10</hc-info-table-td>
+                        </tr>
+                        <tr>
+                            <hc-info-table-td center is-title>计量金额:</hc-info-table-td>
+                            <hc-info-table-td width="120px">2775000</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="3">-</hc-info-table-td>
+                        </tr>
+                    </hc-info-table>
+                    <div class="mt-5">附件列表</div>
+                    <div class="mt-3">
+                        <el-check-tag checked class="mr-2">文件名称1.jpg</el-check-tag>
+                        <el-check-tag checked class="mr-2">文件名称2.jpg</el-check-tag>
+                        <el-check-tag checked class="mr-2">文件名称3.jpg</el-check-tag>
+                        <el-check-tag checked class="mr-2">文件名称4.jpg</el-check-tag>
+                    </div>
+                </hc-card-item>
+            </div>
+        </div>
+        <!-- 新增/修改 -->
+        <HcDataModal v-model="isDataModal" />
+
+        <!-- 上报弹窗 -->
+        <hc-report-dialog v-model="isReport" />
     </hc-card>
 </template>
 
 <script setup>
+import { onMounted, ref } from 'vue'
+import HcDataModal from './components/order/dataModal.vue'
+
 defineOptions({
     name: 'DebitPayStartWorkOrder',
 })
+
+//渲染完成
+onMounted(() => {
+
+})
+
+//搜索表单
+const searchForm = ref({
+    key1: null, current: 1, size: 10, total: 0,
+})
+
+//计量期
+const key1Data = ref([
+    { id: 1, name: '计量期1' },
+    { id: 2, name: '计量期2' },
+])
+const searchKey1Click = () => {
+
+}
+
+//分页
+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: 'action', name: '操作', width: 94 },
+])
+const tableData = ref([
+    { key1: '1111' },
+])
+
+//表格选择
+const tableCheckChange = () => {
+
+}
+
+//新增
+const isDataModal = ref(false)
+const addModalClick = () => {
+    isDataModal.value = true
+}
+
+//修改
+const rowEditClick = (row) => {
+    isDataModal.value = true
+}
+
+//是否上报
+const isReport = ref(false)
+const reportClick = () => {
+    isReport.value = true
+}
 </script>
 
 <style scoped lang="scss">