ZaiZai 1 an în urmă
părinte
comite
f845bf0a1b

+ 102 - 0
src/views/project/debit/contract/components/pay/formula.vue

@@ -0,0 +1,102 @@
+<template>
+    <hc-new-dialog v-model="isShow" is-table widths="1200px" title="添加公式" @save="modalSave">
+        <div class="hc-search-form">
+            <el-select v-model="searchForm.key1" filterable class="w-40" placeholder="公式分类" @change="searchKeyClick">
+                <el-option label="xxx" value="1" />
+            </el-select>
+        </div>
+        <div class="hc-search-table">
+            <el-radio-group v-model="tableRadio" class="hc-search-table-radio-group">
+                <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
+                    <template #action="{ row }">
+                        <el-radio :label="row.key1" size="large" />
+                    </template>
+                </hc-table>
+            </el-radio-group>
+        </div>
+    </hc-new-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('处理数据')
+    }
+})
+
+//搜索表单
+const searchForm = ref({})
+const searchKeyClick = () => {
+
+}
+
+//表格数据
+const tableLoading = ref(false)
+const tableColumn = [
+    { key: 'key1', name: '公式编号' },
+    { key: 'key2', name: '公式名称' },
+    { key: 'key3', name: '备注' },
+    { key: 'action', name: '选择', width: 50, align: 'center' },
+]
+const tableData = ref([
+    { key1: '1111' },
+    { key1: '222' },
+])
+
+const tableRadio = ref('')
+
+const modalSave = () => {
+    emit('finish')
+}
+</script>
+
+<style scoped lang="scss">
+.hc-search-form {
+    position: relative;
+    margin-bottom: 10px;
+}
+.hc-search-table {
+    position: relative;
+    height: calc(100% - 42px);
+}
+.hc-search-table-radio-group {
+    display: block;
+    height: 100%;
+}
+</style>
+
+<style lang="scss">
+.hc-search-table .hc-search-table-radio-group .el-table[hc].new .cell .el-radio {
+    margin-right: 0;
+    height: 20px;
+    .el-radio__label {
+        display: none;
+    }
+}
+</style>

+ 44 - 0
src/views/project/debit/contract/components/pay/info-table.vue

@@ -0,0 +1,44 @@
+<template>
+    <hc-info-table>
+        <tr>
+            <hc-info-table-td center is-title>支付项编号:</hc-info-table-td>
+            <hc-info-table-td width="120px">100章</hc-info-table-td>
+            <hc-info-table-td center is-title>支付项名称:</hc-info-table-td>
+            <hc-info-table-td width="120px">100章</hc-info-table-td>
+        </tr>
+        <tr>
+            <hc-info-table-td center is-title>支付项类型:</hc-info-table-td>
+            <hc-info-table-td width="120px">100章</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>
+        </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">1</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>
+        <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>
+        <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>
+        <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>
+</template>

+ 116 - 0
src/views/project/debit/contract/components/pay/row-data.vue

@@ -0,0 +1,116 @@
+<template>
+    <hc-new-dialog v-model="isShow" is-table widths="666px" title="修改项目支付项" @save="modalSave">
+        <el-scrollbar class="hc-dialog-scrollbar">
+            <el-form ref="formRef" class="p-2" label-position="left" label-width="auto" :model="formModel" :rules="formRules">
+                <el-form-item label="支付项编号:">
+                    <el-input v-model="formModel.key1" />
+                </el-form-item>
+                <el-form-item label="支付项名称:">
+                    <el-input v-model="formModel.key2" />
+                </el-form-item>
+                <el-form-item label="支付项类型:">
+                    <el-select v-model="formModel.key3" block>
+                        <el-option label="xx项" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item class="nowrap" label="合同计算公式:">
+                    <el-input v-model="formModel.key4" class="flex-1" disabled />
+                    <el-link type="primary" class="ml-2 line-height-normal" @click="formulaClick">添加公式</el-link>
+                    <el-link type="danger" class="ml-2 line-height-normal">删除公式</el-link>
+                </el-form-item>
+                <el-form-item class="nowrap" label="变更计算公式:">
+                    <el-input v-model="formModel.key5" disabled class="flex-1" />
+                    <el-link type="primary" class="ml-2 line-height-normal">添加公式</el-link>
+                    <el-link type="danger" class="ml-2 line-height-normal">删除公式</el-link>
+                </el-form-item>
+                <el-form-item class="nowrap" label="本期计算公式:">
+                    <el-input v-model="formModel.key6" disabled class="flex-1" />
+                    <el-link type="primary" class="ml-2 line-height-normal">添加公式</el-link>
+                    <el-link type="danger" class="ml-2 line-height-normal">删除公式</el-link>
+                </el-form-item>
+                <el-form-item label="是否为扣款项:">
+                    <el-select v-model="formModel.key7" block>
+                        <el-option label="xx项" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="是否加粗:">
+                    <el-select v-model="formModel.key8" block>
+                        <el-option label="xx项" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="是否手动输入:">
+                    <el-select v-model="formModel.key9" block>
+                        <el-option label="xx项" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="是否显示百分比:">
+                    <el-select v-model="formModel.key10" block>
+                        <el-option label="xx项" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="支付项适用类型:">
+                    <el-select v-model="formModel.key11" block>
+                        <el-option label="xx项" :value="1" />
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="排序号:">
+                    <el-input v-model="formModel.key12" />
+                </el-form-item>
+                <el-form-item label="备注:">
+                    <el-input v-model="formModel.key13" :autosize="{ minRows: 4, maxRows: 8 }" type="textarea" />
+                </el-form-item>
+            </el-form>
+        </el-scrollbar>
+    </hc-new-dialog>
+    <HcFormula v-model="isFormulaShow" />
+</template>
+
+<script setup>
+import { ref, watch } from 'vue'
+import HcFormula from './formula.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('处理数据')
+    }
+})
+
+//弹窗表单
+const formRef = ref(null)
+const formModel = ref({ })
+const formRules = ref({})
+
+const modalSave = () => {
+    emit('finish')
+}
+
+//公式
+const isFormulaShow = ref(false)
+const formulaClick = () => {
+    isFormulaShow.value = true
+}
+</script>

+ 64 - 0
src/views/project/debit/contract/components/pay/system-pay.vue

@@ -0,0 +1,64 @@
+<template>
+    <hc-new-dialog v-model="isShow" is-table widths="1200px" title="引用系统支付项" @save="modalSave">
+        <hc-table
+            :column="tableColumn" :datas="tableData" :loading="tableLoading"
+            is-new :check-style="{ width: 29 }" :index-style="{ width: 60 }"
+            is-check @selection-change="tableCheckChange"
+        />
+    </hc-new-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('处理数据')
+    }
+})
+//表格数据
+const tableLoading = ref(false)
+const tableColumn = [
+    { key: 'key1', name: '支付项编号' },
+    { key: 'key2', name: '支付项名称' },
+    { key: 'key3', name: '支付项类型' },
+    { key: 'key4', name: '是否为扣款项' },
+    { key: 'key5', name: '是否合计项' },
+    { key: 'key5', name: '适用类型' },
+]
+const tableData = ref([
+    { key1: '1111' },
+])
+
+//表格选择
+const tableCheckChange = (checks) => {
+    console.log(checks)
+}
+const modalSave = () => {
+    emit('finish')
+}
+</script>

+ 73 - 81
src/views/project/debit/contract/pay.vue

@@ -1,54 +1,54 @@
 <template>
-    <hc-card>
-        <template #header>
-            111
-        </template>
-        <template #extra>
-            222
-        </template>
-        <div class="relative h-full flex">
-            <div :id="`hc_tree_card_${uuid}`">
-                <hc-card-item scrollbar>
-                    <hc-lazy-tree :h-props="treeProps" @load="treeLoadNode" />
-                </hc-card-item>
-            </div>
-            <div :id="`hc_table_card_${uuid}`" class="flex-1">
-                <hc-card-item>
-                    <template #header>
-                        <div class="font-400 text-orange">收方总金额:0元</div>
+    <div class="relative h-full flex">
+        <div :id="`hc_table_card_${uuid}`">
+            <hc-new-card>
+                <template #header>
+                    <el-button hc-btn type="primary" @click="systemPaymentClick">引用系统支付项</el-button>
+                </template>
+                <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-new :index-style="{ width: 60 }" is-current-row>
+                    <template #action="{ row }">
+                        <el-link type="success" @click="editRowClick(row)">修改</el-link>
+                        <el-link type="danger">删除</el-link>
                     </template>
+                </hc-table>
+                <template #action>
+                    <hc-pages :pages="searchForm" @change="pageChange" />
+                </template>
+            </hc-new-card>
+        </div>
+        <div :id="`hc_info_card_${uuid}`" class="flex-1">
+            <hc-new-card scrollbar>
+                <infoTable />
+                <hc-title title="汇总项">
                     <template #extra>
-                        <el-button hc-btn color="#626aef">
-                            <HcIcon name="sort-desc" :line="false" />
-                            <span>按部位排序</span>
-                        </el-button>
-                        <el-button hc-btn color="#626aef">
-                            <HcIcon name="sort-desc" :line="false" />
-                            <span>按录入时间排序</span>
-                        </el-button>
+                        <el-link type="primary">添加汇总项</el-link>
                     </template>
-                    <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" is-check @selection-change="tableCheckChange">
-                        <template #action="{ row }">
-                            <el-link type="primary" @click="giveTaskModalClick(row)">下达</el-link>
-                            <el-link type="success">修改</el-link>
-                            <el-link type="danger">删除</el-link>
-                        </template>
-                    </hc-table>
-                    <template #action>
-                        <hc-pages :pages="searchForm" @change="pageChange" />
+                </hc-title>
+                <hc-table :column="tableColumn1" :datas="tableData1" is-new :index-style="{ width: 60 }">
+                    <template #action="{ row }">
+                        <el-link type="danger">删除</el-link>
                     </template>
-                </hc-card-item>
-            </div>
+                </hc-table>
+            </hc-new-card>
         </div>
-    </hc-card>
+
+        <!-- 引用系统支付项 -->
+        <systemPay v-model="systemPayShow" />
+
+        <!-- 修改项目支付项 -->
+        <rowDataInfo v-model="isEditRowShow" />
+    </div>
 </template>
 
 <script setup>
 import { nextTick, onMounted, ref } from 'vue'
 import { getRandom } from 'js-fast-way'
+import infoTable from './components/pay/info-table.vue'
+import systemPay from './components/pay/system-pay.vue'
+import rowDataInfo from './components/pay/row-data.vue'
 
 defineOptions({
-    name: 'DebitPayAdminApply',
+    name: 'ProjectDebitContractPay',
 })
 
 const uuid = getRandom(4)
@@ -62,42 +62,16 @@ onMounted(() => {
 const setSplitRef = () => {
     //配置参考: https://split.js.org/#/?direction=vertical&snapOffset=0
     nextTick(() => {
-        window.$split(['#hc_tree_card_' + uuid, '#hc_table_card_' + uuid], {
-            sizes: [20, 80],
+        window.$split(['#hc_table_card_' + uuid, '#hc_info_card_' + uuid], {
+            sizes: [70, 30],
             snapOffset: 0,
-            minSize: [50, 500],
+            minSize: [50, 300],
         })
     })
 }
 
 //搜索表单
-const searchForm = ref({
-    key1: null, current: 1, size: 10, total: 0,
-})
-
-
-//数据格式
-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({ current: 1, size: 10, total: 0 })
 
 //分页
 const pageChange = ({ current, size }) => {
@@ -108,24 +82,42 @@ const pageChange = ({ current, 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: 200, align: 'center' },
+    { key: 'key1', name: '支付项编号', width: 140 },
+    { key: 'key2', name: '支付项名称' },
+    { key: 'key3', name: '支付项类型', width: 160 },
+    { key: 'key4', name: '是否为扣款项', width: 100 },
+    { key: 'key5', name: '是否合计项', width: 100 },
+    { key: 'key5', name: '适用类型', width: 100 },
+    { key: 'action', name: '操作', width: 100 },
 ])
 const tableData = ref([
     { key1: '1111' },
 ])
 
-//表格选择
-const tableCheckChange = () => {
-
+//引用系统支付项
+const systemPayShow = ref(false)
+const systemPaymentClick = () => {
+    systemPayShow.value = true
 }
-</script>
 
-<style scoped lang="scss">
+//汇总项
+const tableColumn1 = ref([
+    { key: 'key1', name: '支付项编号' },
+    { key: 'key2', name: '支付项名称' },
+    { key: 'key3', name: '支付项类型' },
+    { key: 'key4', name: '合同计算公式' },
+    { key: 'key5', name: '变更计算公式' },
+    { key: 'key6', name: '本期计算公式' },
+    { key: 'key7', name: '是否为扣款项' },
+    { key: 'action', name: '操作', width: 50 },
+])
+const tableData1 = ref([
+    { key1: '1111' },
+])
 
-</style>
+//修改
+const isEditRowShow = ref(false)
+const editRowClick = () => {
+    isEditRowShow.value = true
+}
+</script>