Browse Source

企业台账管理前端

CzRger 10 months ago
parent
commit
3e01bd4add

+ 1 - 1
snowy-admin-web/src/views/biz/qyrecordinfo/detail.vue

@@ -156,4 +156,4 @@
 </script>
 
 <style lang="less" scoped>
-</style>
+</style>

+ 1 - 8
snowy-admin-web/src/views/yqyc/general-ledger/one/index.vue

@@ -151,18 +151,11 @@
         <template v-if="column.dataIndex === 'action'">
           <a-space>
             <a @click="onDetail(record, true)" v-if="hasPerm('qyFrontlineWarehouseView')">查看</a>
-            <a-divider type="vertical"
-                       v-if="hasPerm('qyFrontlineWarehouseView') && hasPerm(['qyFrontlineWarehouseEdit', 'qyFrontlineWarehouseDelete'], 'or')"/>
             <a @click="onDetail(record)" v-if="hasPerm('qyFrontlineWarehouseEdit')">编辑</a>
-            <a-divider type="vertical"
-                       v-if="hasPerm(['qyFrontlineWarehouseEdit', 'qyFrontlineWarehouseDelete'], 'and')"/>
             <a-popconfirm title="确定要删除吗?" @confirm="deleteQyFrontlineWarehouse(record)">
               <a-button type="link" danger size="small" v-if="hasPerm('qyFrontlineWarehouseDelete')">删除</a-button>
             </a-popconfirm>
-            <a-divider type="vertical"
-                       v-if="hasPerm(['qyFrontlineWarehouseView', 'qyFrontlineWarehouseEdit', 'qyFrontlineWarehouseDelete'])"/>
             <a-button type="link" primary size="small" @click="goodsDetailRef.onOpen(record)">{{ (record.warehouseType == 0 ? '入' : '出') + '库单' }}</a-button>
-            <a-divider type="vertical"/>
             <a-button type="link" primary size="small" @click="certificateDetailRef.onOpen(record)">记账凭证</a-button>
           </a-space>
         </template>
@@ -283,7 +276,7 @@ watch(() => searchFormStateReal.value.warehouseType, (n) => {
 if (hasPerm(['qyFrontlineWarehouseView', 'qyFrontlineWarehouseEdit', 'qyFrontlineWarehouseDelete'])) {
   columns.value.forEach(v => {
     if (v.dataIndex === 'action') {
-      v.width = 400
+      v.width = 200
     }
   })
 }

+ 1 - 8
snowy-admin-web/src/views/yqyc/general-ledger/two/index.vue

@@ -145,18 +145,11 @@
         <template v-if="column.dataIndex === 'action'">
           <a-space>
             <a @click="onDetail(record, true)" v-if="hasPerm('qySecondlineWarehouseView')">查看</a>
-            <a-divider type="vertical"
-                       v-if="hasPerm('qySecondlineWarehouseView') && hasPerm(['qySecondlineWarehouseEdit', 'qySecondlineWarehouseDelete'], 'or')"/>
             <a @click="onDetail(record)" v-if="hasPerm('qySecondlineWarehouseEdit')">编辑</a>
-            <a-divider type="vertical"
-                       v-if="hasPerm(['qySecondlineWarehouseEdit', 'qySecondlineWarehouseDelete'], 'and')"/>
             <a-popconfirm title="确定要删除吗?" @confirm="deleteQySecondlineWarehouse(record)">
               <a-button type="link" danger size="small" v-if="hasPerm('qySecondlineWarehouseDelete')">删除</a-button>
             </a-popconfirm>
-            <a-divider type="vertical"
-                       v-if="hasPerm(['qySecondlineWarehouseView', 'qySecondlineWarehouseEdit', 'qySecondlineWarehouseDelete'])"/>
             <a-button type="link" primary size="small" @click="goodsDetailRef.onOpen(record)">出库单</a-button>
-            <a-divider type="vertical"/>
             <a-button type="link" primary size="small" @click="certificateDetailRef.onOpen(record)">记账凭证</a-button>
           </a-space>
         </template>
@@ -266,7 +259,7 @@ const columns = ref([
 if (hasPerm(['qyFrontlineWarehouseView', 'qyFrontlineWarehouseEdit', 'qyFrontlineWarehouseDelete'])) {
   columns.value.forEach(v => {
     if (v.dataIndex === 'action') {
-      v.width = 400
+      v.width = 200
     }
   })
 }

+ 828 - 0
snowy-admin-web/src/views/yqyc/zero/enterprise-ledger/detail.vue

@@ -0,0 +1,828 @@
+<template>
+	<a-card :bordered="false">
+		<a-page-header
+			:title="formData.id ? '企业台账' : '新增企业台账'"
+			@back="onClose"
+		>
+			<template #extra>
+				<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
+				<a-popconfirm title="请确认是否保存?" @confirm="onTemp" v-if="!isView">
+					<a-button style="margin-right: 8px" :loading="submitLoading">保存</a-button>
+				</a-popconfirm>
+				<a-popconfirm title="请确认是否申报?" @confirm="onSubmit" v-if="!isView">
+					<a-button type="primary" :loading="submitLoading">申报</a-button>
+				</a-popconfirm>
+			</template>
+		</a-page-header>
+		<a-collapse v-model:activeKey="activeKey" expand-icon-position="end">
+			<a-collapse-panel key="1" header="基本信息">
+				<a-form ref="formRef" :model="formData" :rules="formRules" layout="inline">
+					<a-row :gutter="[0, 16]">
+						<a-col :span="8">
+							<a-form-item label="预录入台账编号:" name="ylTzCode">
+								<a-input v-model:value="formData.ylTzCode" :disabled="true" placeholder="请输入预录入台账编号"
+										 allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="台账编号:" name="tzCode">
+								<a-input v-model:value="formData.tzCode" :disabled="true" placeholder="请输入台账编号"
+										 allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="台账性质:" name="tzType">
+								<a-select v-model:value="formData.tzType" :disabled="isView" placeholder="请选择台账性质"
+										  :options="tzTypeOptions" show-search allow-clear option-filter-prop="label"/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="海关注册编码:" name="companyMainHgCode">
+								<a-input v-model:value="formData.companyMainHgCode" :disabled="isView"
+										 placeholder="请输入海关注册编码" allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="统一社会信用代码:" name="companyCode">
+								<a-input v-model:value="formData.companyCode" :disabled="true"
+										 placeholder="请输入统一社会信用代码" allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="企业名称:" name="companyName">
+								<a-input v-model:value="formData.companyName" :disabled="true" placeholder="请输入企业名称"
+										 allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="申报类型:" name="applyType">
+								<a-select v-model:value="formData.applyType" :disabled="true" placeholder="请选择申报类型"
+										  :options="applyTypeOptions" show-search allow-clear option-filter-prop="label"/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="企业类型:" name="companyType">
+								<a-select v-model:value="formData.companyType" :disabled="true" placeholder="请选择企业类型"
+										  :options="companyTypeOptions" show-search allow-clear option-filter-prop="label"/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="企业地址:" name="companyAddress">
+								<a-input v-model:value="formData.companyAddress" :disabled="true" placeholder="请输入企业地址"
+										 allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="联系人:" name="companyLinkMan">
+								<a-input v-model:value="formData.companyLinkMan" :disabled="true" placeholder="请输入联系人"
+										 allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="联系电话:" name="companyLegalPhone">
+								<a-input v-model:value="formData.companyLegalPhone" :disabled="true"
+										 placeholder="请输入联系电话" allow-clear/>
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="经营范围:" name="companyJyFw">
+								<a-input v-model:value="formData.companyJyFw" :disabled="true" placeholder="请输入经营范围"
+										 allow-clear/>
+							</a-form-item>
+						</a-col>
+					</a-row>
+				</a-form>
+			</a-collapse-panel>
+			<a-collapse-panel key="2" header="表体信息">
+				<a-button type="primary" @click="onBodyReset">重置</a-button>
+				<a-form ref="bodyFormRef" :model="bodyData" :rules="bodyRules" layout="inline" style="margin-bottom: 20px;">
+					<a-row :gutter="[0, 16]">
+						<a-col :span="8">
+							<a-form-item label="商品编码:" name="productCode">
+								<a-input v-model:value="bodyData.productCode" :disabled="isView" placeholder="请输入商品编码" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="商品名称:" name="productName">
+								<a-input v-model:value="bodyData.productName" :disabled="isView" placeholder="请输入商品名称" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="规格型号:" name="specModel">
+								<a-input v-model:value="bodyData.specModel" :disabled="isView" placeholder="请输入规格型号" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="备案数量:" name="recordQuantity">
+								<a-input v-model:value="bodyData.recordQuantity" :disabled="isView" placeholder="请输入备案数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="备案计量单位:" name="recordUnit">
+								<a-input v-model:value="bodyData.recordUnit" :disabled="isView" placeholder="请输入备案计量单位" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="申报计量单位:" name="declareUnit">
+								<a-input v-model:value="bodyData.declareUnit" :disabled="isView" placeholder="请输入申报计量单位" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="法定计量单位:" name="legalUnit">
+								<a-input v-model:value="bodyData.legalUnit" :disabled="isView" placeholder="请输入法定计量单位" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="法定第二计量单位:" name="legalSecondUnit">
+								<a-input v-model:value="bodyData.legalSecondUnit" :disabled="isView" placeholder="请输入法定第二计量单位" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="原产国(地区):" name="originCountry">
+								<a-input v-model:value="bodyData.originCountry" :disabled="isView" placeholder="请输入原产国(地区)" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="备案单价:" name="recordPrice">
+								<a-input v-model:value="bodyData.recordPrice" :disabled="isView" placeholder="请输入备案单价" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="备案总价:" name="recordTotalPrice">
+								<a-input v-model:value="bodyData.recordTotalPrice" :disabled="isView" placeholder="请输入备案总价" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="币制:" name="currency">
+								<a-input v-model:value="bodyData.currency" :disabled="isView" placeholder="请输入币制" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="法定数量:" name="legalQuantity">
+								<a-input v-model:value="bodyData.legalQuantity" :disabled="isView" placeholder="请输入法定数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="第二法定数量:" name="secondLegalQuantity">
+								<a-input v-model:value="bodyData.secondLegalQuantity" :disabled="isView" placeholder="请输入第二法定数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="重量比例因子:" name="weightRatioFactor">
+								<a-input v-model:value="bodyData.weightRatioFactor" :disabled="isView" placeholder="请输入重量比例因子" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="第一比例因子:" name="firstRatioFactor">
+								<a-input v-model:value="bodyData.firstRatioFactor" :disabled="isView" placeholder="请输入第一比例因子" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="第二比例因子:" name="secondRatioFactor">
+								<a-input v-model:value="bodyData.secondRatioFactor" :disabled="isView" placeholder="请输入第二比例因子" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="毛重(KG):" name="grossWeight">
+								<a-input v-model:value="bodyData.grossWeight" :disabled="isView" placeholder="请输入毛重(KG)" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="净重(KG):" name="netWeight">
+								<a-input v-model:value="bodyData.netWeight" :disabled="isView" placeholder="请输入净重(KG)" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="备案数量:" name="recordAmount">
+								<a-input v-model:value="bodyData.recordAmount" :disabled="isView" placeholder="请输入备案数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="剩余备案数量:" name="remainingRecordAmount">
+								<a-input v-model:value="bodyData.remainingRecordAmount" :disabled="isView" placeholder="请输入剩余备案数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="进账累计数量:" name="inAccountCumulativeAmount">
+								<a-input v-model:value="bodyData.inAccountCumulativeAmount" :disabled="isView" placeholder="请输入进账累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="出账累计数量:" name="outAccountCumulativeAmount">
+								<a-input v-model:value="bodyData.outAccountCumulativeAmount" :disabled="isView" placeholder="请输入出账累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="库存累计数量:" name="inventoryCumulativeAmount">
+								<a-input v-model:value="bodyData.inventoryCumulativeAmount" :disabled="isView" placeholder="请输入库存累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="一线进区累计数量:" name="firstInAmount">
+								<a-input v-model:value="bodyData.firstInAmount" :disabled="isView" placeholder="请输入一线进区累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="一线出区累计数量:" name="firstOutAmount">
+								<a-input v-model:value="bodyData.firstOutAmount" :disabled="isView" placeholder="请输入一线出区累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="二线进区累计数量:" name="secondInAmount">
+								<a-input v-model:value="bodyData.secondInAmount" :disabled="isView" placeholder="请输入二线进区累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="二线出区累计数量:" name="secondOutAmount">
+								<a-input v-model:value="bodyData.secondOutAmount" :disabled="isView" placeholder="请输入二线出区累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="区内转入累计数量:" name="intraZoneTransferInAmount">
+								<a-input v-model:value="bodyData.intraZoneTransferInAmount" :disabled="isView" placeholder="请输入区内转入累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="区内转出累计数量:" name="intraZoneTransferOutAmount">
+								<a-input v-model:value="bodyData.intraZoneTransferOutAmount" :disabled="isView" placeholder="请输入区内转出累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="区外转入累计数量:" name="extraZoneTransferInAmount">
+								<a-input v-model:value="bodyData.extraZoneTransferInAmount" :disabled="isView" placeholder="请输入区外转入累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="转至区外累计数量:" name="transferToExtraZoneAmount">
+								<a-input v-model:value="bodyData.transferToExtraZoneAmount" :disabled="isView" placeholder="请输入转至区外累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="补税累计数量:" name="compensationTaxAmount">
+								<a-input v-model:value="bodyData.compensationTaxAmount" :disabled="isView" placeholder="请输入补税累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="核销累计数量:" name="writeOffAmount">
+								<a-input v-model:value="bodyData.writeOffAmount" :disabled="isView" placeholder="请输入核销累计数量" allow-clear />
+							</a-form-item>
+						</a-col>
+						<a-col :span="8">
+							<a-form-item label="修改标志:" name="modifyFlag">
+								<a-input v-model:value="bodyData.modifyFlag" :disabled="isView" placeholder="请输入修改标志" allow-clear />
+							</a-form-item>
+						</a-col>
+					</a-row>
+				</a-form>
+				<a-button type="primary" style="margin-right: 8px;" v-if="!(bodyData.id || bodyData.__index)" @click="onBodyAdd">插入</a-button>
+				<a-button type="primary" style="margin-right: 8px;" v-else @click="onBodyEdit">保存</a-button>
+				<xn-batch-delete
+					:selectedRowKeys="bodySelectedRowKeys"
+					@batchDelete="deleteBatchBody"
+				/>
+				<a-table
+					style="margin-top: 10px"
+					bordered
+					:dataSource="bodyList"
+					:columns="bodyColumns"
+					:pagination="false"
+					:scroll="{ x: 2000 }"
+					:row-selection="bodyOptions.rowSelection"
+				>
+					<template #bodyCell="{ column, record, index }">
+						<template v-if="column.dataIndex === 'action'">
+							<template v-if="isView">
+								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>
+							</template>
+							<template v-else>
+								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">编辑</a-button>
+								<a-button type="link" danger size="small" @click="onBodyDel(index)">删除</a-button>
+							</template>
+						</template>
+					</template>
+				</a-table>
+			</a-collapse-panel>
+			<a-collapse-panel key="3" header="附件信息">
+				<div>
+					友情提示<br/>
+					1、附件大小要求不超过4M,如果文件过大,建议拆分多个上传;<br/>
+					2、附件格式要求:PDF文件;<br/>
+					3、同一附件类型可以上传多个附件;<br/>
+					4、附件传输过程中会出现传输失败的情况,请随时关注附件传输状态;<br/>
+					5、要求上传复印件的可上传原件的扫描件。
+				</div>
+				<xn-upload ref="ref_upload" v-model:value="fileData.fileUrl" @onChange="fileChange" accept=".pdf" v-if="showFileUpload"/>
+				<a-table
+					style="margin-top: 10px"
+					bordered
+					:dataSource="fileList"
+					:columns="fileColumns"
+					:pagination="false"
+					:row-selection="fileOptions.rowSelection"
+				>
+					<template #bodyCell="{ column, record, index, text }">
+						<template v-if="['attachmentName', 'attachmentFormat', 'attachmentContent'].includes(column.dataIndex)">
+							<div>
+								<a-input
+									v-if="!isView"
+									v-model:value="record[column.dataIndex]"
+									style="margin: -5px 0"
+								/>
+								<template v-else>
+									{{ text }}
+								</template>
+							</div>
+						</template>
+						<template v-if="column.dataIndex === 'action'">
+							<template v-if="isView">
+								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">查看</a-button>
+							</template>
+							<template v-else>
+								<a-button type="link" primary size="small" @click="onBodyReset(), bodyData = cloneDeep(record)">编辑</a-button>
+								<a-button type="link" danger size="small" @click="onFileDel(index)">删除</a-button>
+							</template>
+						</template>
+					</template>
+				</a-table>
+			</a-collapse-panel>
+		</a-collapse>
+	</a-card>
+</template>
+
+<script setup name="qyRecordInfoDetail">
+import tool from '@/utils/tool'
+import {cloneDeep} from 'lodash-es'
+import {required} from '@/utils/formRules'
+import qyRecordInfoApi from '@/api/biz/qyRecordInfoApi'
+import {message, Modal} from "ant-design-vue";
+import {createVNode} from "vue";
+import {ExclamationCircleOutlined} from "@ant-design/icons-vue";
+// 抽屉状态
+const { proxy } = getCurrentInstance()
+
+const emit = defineEmits({successful: null, onClose: null})
+const formRef = ref()
+const bodyFormRef = ref()
+const ref_upload = ref()
+// 表单数据
+const formData = ref({})
+const bodyData = ref({})
+const fileData = ref({})
+const submitLoading = ref(false)
+const isView = ref(false)
+const showFileUpload = ref(true)
+const tzTypeOptions = ref([])
+const applyTypeOptions = ref([])
+const companyTypeOptions = ref([])
+const activeKey = ref('1')
+const bodySelectedRowKeys = ref([])
+const bodyList = ref([])
+const userInfo = tool.data.get('USER_INFO')
+
+// 列表选择配置
+const bodyOptions = {
+	rowSelection: {
+		onChange: (selectedRowKey, selectedRows) => {
+			bodySelectedRowKeys.value = selectedRows
+		}
+	}
+}
+const fileSelectedRowKeys = ref([])
+const fileList = ref([])
+// 列表选择配置
+const fileOptions = {
+	rowSelection: {
+		onChange: (selectedRowKey, selectedRows) => {
+			fileSelectedRowKeys.value = selectedRows
+		}
+	}
+}
+// 打开抽屉
+const onOpen = (record, view = false) => {
+	isView.value = view
+	if (record) {
+		let recordData = cloneDeep(record)
+		formData.value = Object.assign({}, recordData)
+	} else {
+		formData.value.companyCode = userInfo.companyNumber
+		formData.value.companyName = userInfo.companyName
+		formData.value.companyType = userInfo.companyType
+		formData.value.companyAddress = userInfo.companyAddress
+		formData.value.companyLinkMan = userInfo.contactName
+		formData.value.companyLegalPhone = userInfo.contactPhone
+		formData.value.companyJyFw = userInfo.businessScope
+		formData.value.applyType = 'basq'
+	}
+	tzTypeOptions.value = tool.dictList('tzlx')
+	applyTypeOptions.value = tool.dictList('qybalx')
+	companyTypeOptions.value = tool.dictList('qylx')
+}
+// 关闭抽屉
+const onClose = () => {
+	formRef.value.resetFields()
+	formData.value = {}
+	isView.value = true
+	emit('onClose')
+}
+// 默认要校验的
+const formRules = {
+	companyMainHgCode: [required('请输入海关注册编码')],
+	companyCode: [required('请输入统一社会信用代码')],
+	companyName: [required('请输入企业名称')],
+	applyType: [required('请输入申报类型')],
+	companyType: [required('请输入企业类型')],
+	companyAddress: [required('请输入企业地址')],
+	companyLinkMan: [required('请输入联系人')],
+	companyLegalPhone: [required('请输入联系电话')],
+	companyJyFw: [required('请输入经营范围')],
+}
+// 默认要校验的
+const bodyRules = {
+	productCode: [required('请输入商品编码')],
+	productName: [required('请输入商品名称')],
+	specModel: [required('请输入规格型号')],
+	recordQuantity: [required('请输入备案数量')],
+	recordUnit: [required('请输入备案计量单位')],
+	legalUnit: [required('请输入法定计量单位')],
+	originCountry: [required('请输入原产国(地区)')],
+	recordPrice: [required('请输入备案单价')],
+	recordTotalPrice: [required('请输入备案总价')],
+	currency: [required('请输入币制')],
+	legalQuantity: [required('请输入法定数量')],
+	recordAmount: [required('请输入备案数量')],
+}
+const bodyColumns = [
+	{
+		title: '商品编码',
+		dataIndex: 'productCode',
+		width: 100,
+		fixed: 'left'
+	},
+	{
+		title: '商品名称',
+		dataIndex: 'productName',
+		width: 100,
+		fixed: 'left'
+	},
+	{
+		title: '规格型号',
+		dataIndex: 'specModel',
+		width: 100
+	},
+	{
+		title: '备案数量',
+		dataIndex: 'recordQuantity',
+		width: 100
+	},
+	{
+		title: '备案计量单位',
+		dataIndex: 'recordUnit',
+		width: 120
+	},
+	{
+		title: '申报计量单位',
+		dataIndex: 'declareUnit',
+		width: 120
+	},
+	{
+		title: '法定计量单位',
+		dataIndex: 'legalUnit',
+		width: 120
+	},
+	{
+		title: '法定第二计量单位',
+		dataIndex: 'legalSecondUnit',
+		width: 160
+	},
+	{
+		title: '原产国(地区)',
+		dataIndex: 'originCountry',
+		width: 140
+	},
+	{
+		title: '备案单价',
+		dataIndex: 'recordPrice',
+		width: 100
+	},
+	{
+		title: '备案总价',
+		dataIndex: 'recordTotalPrice',
+		width: 100
+	},
+	{
+		title: '币制',
+		dataIndex: 'currency',
+		width: 100
+	},
+	{
+		title: '法定数量',
+		dataIndex: 'legalQuantity',
+		width: 100
+	},
+	{
+		title: '第二法定数量',
+		dataIndex: 'secondLegalQuantity',
+		width: 120
+	},
+	{
+		title: '重量比例因子',
+		dataIndex: 'weightRatioFactor',
+		width: 120
+	},
+	{
+		title: '第一比例因子',
+		dataIndex: 'firstRatioFactor',
+		width: 120
+	},
+	{
+		title: '第二比例因子',
+		dataIndex: 'secondRatioFactor',
+		width: 120
+	},
+	{
+		title: '毛重(KG)',
+		dataIndex: 'grossWeight',
+		width: 120
+	},
+	{
+		title: '净重(KG)',
+		dataIndex: 'netWeight',
+		width: 120
+	},
+	{
+		title: '备案数量',
+		dataIndex: 'recordAmount',
+		width: 100
+	},
+	{
+		title: '剩余备案数量',
+		dataIndex: 'remainingRecordAmount',
+		width: 120
+	},
+	{
+		title: '进账累计数量',
+		dataIndex: 'inAccountCumulativeAmount',
+		width: 120
+	},
+	{
+		title: '出账累计数量',
+		dataIndex: 'outAccountCumulativeAmount',
+		width: 120
+	},
+	{
+		title: '库存累计数量',
+		dataIndex: 'inventoryCumulativeAmount',
+		width: 120
+	},
+	{
+		title: '一线进区累计数量',
+		dataIndex: 'firstInAmount',
+		width: 160
+	},
+	{
+		title: '一线出区累计数量',
+		dataIndex: 'firstOutAmount',
+		width: 160
+	},
+	{
+		title: '二线进区累计数量',
+		dataIndex: 'secondInAmount',
+		width: 160
+	},
+	{
+		title: '二线出区累计数量',
+		dataIndex: 'secondOutAmount',
+		width: 160
+	},
+	{
+		title: '区内转入累计数量',
+		dataIndex: 'intraZoneTransferInAmount',
+		width: 160
+	},
+	{
+		title: '区内转出累计数量',
+		dataIndex: 'intraZoneTransferOutAmount',
+		width: 160
+	},
+	{
+		title: '区外转入累计数量',
+		dataIndex: 'extraZoneTransferInAmount',
+		width: 160
+	},
+	{
+		title: '转至区外累计数量',
+		dataIndex: 'transferToExtraZoneAmount',
+		width: 160
+	},
+	{
+		title: '补税累计数量',
+		dataIndex: 'compensationTaxAmount',
+		width: 120
+	},
+	{
+		title: '核销累计数量',
+		dataIndex: 'writeOffAmount',
+		width: 120
+	},
+	{
+		title: '修改标志',
+		dataIndex: 'modifyFlag',
+		width: 100
+	},
+	{
+		title: '操作',
+		dataIndex: 'action',
+		width: 160,
+		fixed: 'right'
+	},
+]
+const fileColumns = [
+	{
+		title: '附件名称',
+		dataIndex: 'attachmentName',
+	},
+	{
+		title: '附件格式',
+		dataIndex: 'attachmentFormat',
+	},
+	{
+		title: '附件内容',
+		dataIndex: 'attachmentContent',
+	},
+	{
+		title: '上传时间',
+		dataIndex: 'uploadTime',
+	},
+	{
+		title: '操作',
+		dataIndex: 'action',
+	},
+]
+// 验证并提交数据
+const onSubmit = () => {
+	formRef.value
+	.validate()
+	.then(() => {
+		submitLoading.value = true
+		const formDataParam = cloneDeep(formData.value)
+		if (formDataParam.id) {
+			formDataParam.qyRecardBodyAddParams = bodyList.value
+			formDataParam.qyRecordAttachmentAddParams = fileList.value
+		} else {
+			formDataParam.qyRecardBodyEditParams = bodyList.value
+			formDataParam.qyRecordAttachmentEditParams = fileList.value
+		}
+		formDataParam.status = '2'
+		qyRecordInfoApi
+		.qyRecordInfoSubmitForm(formDataParam, formDataParam.id)
+		.then(() => {
+			onClose()
+			emit('successful')
+		})
+		.finally(() => {
+			submitLoading.value = false
+		})
+	})
+	.catch(() => {
+	})
+}
+// 验证并提交数据
+const onTemp = () => {
+	formRef.value
+	.validate()
+	.then(() => {
+		submitLoading.value = true
+		const formDataParam = cloneDeep(formData.value)
+		if (formDataParam.id) {
+			formDataParam.qyRecardBodyAddParams = bodyList.value
+			formDataParam.qyRecordAttachmentAddParams = fileList.value
+		} else {
+			formDataParam.qyRecardBodyEditParams = bodyList.value
+			formDataParam.qyRecordAttachmentEditParams = fileList.value
+		}
+		formDataParam.status = '1'
+		qyRecordInfoApi
+		.qyRecordInfoSubmitForm(formDataParam, formDataParam.id)
+		.then(() => {
+			onClose()
+			emit('successful')
+		})
+		.finally(() => {
+			submitLoading.value = false
+		})
+	})
+	.catch(() => {
+	})
+}
+const onBodyReset = () => {
+	bodyFormRef.value.resetFields()
+	bodyData.value = {}
+}
+const onBodyAdd = () => {
+	bodyFormRef.value
+	.validate()
+	.then(() => {
+		bodyList.value.push(Object.assign({__index: bodyList.value.length + 1}, bodyData.value))
+		onBodyReset()
+		message.success('插入表体信息成功!')
+	})
+	.catch(() => {
+	})
+}
+const onBodyEdit = () => {
+	bodyFormRef.value
+	.validate()
+	.then(() => {
+		let k = ''
+		if (bodyData.value.id) {
+			k = 'id'
+		} else if (bodyData.value.__index) {
+			k = '__index'
+		}
+		if (k) {
+			bodyList.value.forEach(v => {
+				if (v[k] === bodyData.value[k]) {
+					Object.assign(v, bodyData.value)
+				}
+			})
+		}
+		onBodyReset()
+		message.success('编辑表体信息成功!')
+	})
+	.catch(() => {
+	})
+}
+const onBodyDel = (recode, index) => {
+	Modal.confirm({
+		title: '提示',
+		icon: createVNode(ExclamationCircleOutlined),
+		content: createVNode('div', { style: 'color:red;' }, `是否要删除${record.productName}?`),
+		centered: true,
+		onOk() {
+			bodyList.value.splice(index, 1)
+		},
+		onCancel() {
+		},
+	});
+}
+const deleteBatchBody = () => {
+	bodyList.value = bodyList.value.filter(v => {
+		let flag = true
+		bodySelectedRowKeys.value.forEach(s => {
+			if ((v.id && (v.id === s.id)) || (v.__index && (v.__index === s.__index))) {
+				flag = false
+			}
+		})
+		return flag
+	})
+}
+const getFileExtension = (filename) => {
+	// 使用lastIndexOf查找最后一个"."的位置
+	var dotIndex = filename.lastIndexOf(".");
+
+	// 如果找到了".",则提取从"."之后的子串作为后缀名
+	if (dotIndex !== -1 && dotIndex < filename.length - 1) { // 确保"."不是字符串的最后一个字符
+		return filename.slice(dotIndex + 1); // slice从dotIndex+1开始到字符串结束
+	} else {
+		// 如果没有找到".",返回空字符串表示没有后缀
+		return "";
+	}
+}
+const fileChange = (file) => {
+	if (file) {
+		const f = ref_upload.value.uploadFileList()[0]
+		fileList.value.push({
+			attachmentUrl: f.url,
+			attachmentName: f.name,
+			attachmentFormat: getFileExtension(f.name),
+			attachmentContent: '',
+			uploadTime: proxy.$util.YMDHms(new Date()),
+		})
+		fileData.value.fileUrl = ''
+		showFileUpload.value = false
+		setTimeout(() => {
+			showFileUpload.value = true
+		}, 0)
+	}
+}
+const onFileDel = (recode, index) => {
+	Modal.confirm({
+		title: '提示',
+		icon: createVNode(ExclamationCircleOutlined),
+		content: createVNode('div', { style: 'color:red;' }, `是否要删除?`),
+		centered: true,
+		onOk() {
+			fileList.value.splice(index, 1)
+		},
+		onCancel() {
+		},
+	});
+}
+// 抛出函数
+defineExpose({
+	onOpen
+})
+</script>
+
+<style lang="less" scoped>
+</style>

+ 254 - 0
snowy-admin-web/src/views/yqyc/zero/enterprise-ledger/index.vue

@@ -0,0 +1,254 @@
+<template>
+	<a-card :bordered="false" v-if="indexShow">
+		<a-form ref="searchFormRef" name="advanced_search" :model="searchFormState" class="ant-advanced-search-form">
+            <a-row :gutter="24">
+                <a-col :span="6">
+                    <a-form-item label="预录入台账编号" name="ylTzCode">
+                        <a-input v-model:value="searchFormState.ylTzCode" placeholder="请输入预录入台账编号" allow-clear/>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="6">
+                    <a-form-item label="台账性质" name="tzType">
+                        <a-select v-model:value="searchFormState.tzType" placeholder="请选择台账性质" :options="tzTypeOptions" show-search allow-clear option-filter-prop="label"/>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="6">
+                    <a-form-item label="海关注册编码" name="companyMainHgCode">
+                        <a-input v-model:value="searchFormState.companyMainHgCode" placeholder="请输入海关注册编码" allow-clear/>
+                    </a-form-item>
+                </a-col>
+                <a-col :span="6">
+                    <a-form-item label="企业类型" name="companyType">
+                        <a-select v-model:value="searchFormState.companyType" placeholder="请选择企业类型" :options="companyTypeOptions" show-search allow-clear option-filter-prop="label"/>
+                    </a-form-item>
+                </a-col>
+				<a-col :span="6" :offset="18">
+					<div style="width: 100%;display: flex;justify-content: flex-end">
+						<a-button type="primary" @click="onSearch()">查询</a-button>
+						<a-button style="margin: 0 0 0 8px" @click="reset">重置</a-button>
+					</div>
+				</a-col>
+            </a-row>
+        </a-form>
+		<s-table
+			ref="tableRef"
+			:columns="columns"
+			:data="loadData"
+			:alert="options.alert.show"
+			bordered
+			:row-key="(record) => record.id"
+			:tool-config="toolConfig"
+			:row-selection="options.rowSelection"
+			v-model:filterParam="filterParam"
+			:scroll="{ x: 2000 }"
+		>
+			<template #operator class="table-operator">
+				<a-space>
+					<a-button type="primary" @click="onDetail()" v-if="hasPerm('qyRecordInfoAdd')">
+						<template #icon><plus-outlined /></template>
+						新增
+					</a-button>
+					<xn-batch-delete
+						v-if="hasPerm('qyRecordInfoDelete')"
+						:selectedRowKeys="selectedRowKeys"
+						@batchDelete="deleteBatchQyRecordInfo"
+					/>
+					<a-button @click="onExport" v-if="hasPerm('qyRecordInfoBatchExport')">
+                        <template #icon><export-outlined /></template>
+                        批量导出
+                    </a-button>
+				</a-space>
+			</template>
+			<template #bodyCell="{ column, record }">
+				<template v-if="column.dataIndex === 'tzType'">
+					{{ $TOOL.dictTypeData('tzlx', record.tzType) }}
+				</template>
+				<template v-if="column.dataIndex === 'applyType'">
+					{{ $TOOL.dictTypeData('qybalx', record.applyType) }}
+				</template>
+				<template v-if="column.dataIndex === 'companyType'">
+					{{ $TOOL.dictTypeData('qylx', record.companyType) }}
+				</template>
+				<template v-if="column.dataIndex === 'action'">
+					<a-space>
+					    <a @click="onDetail(record, true)" v-if="hasPerm('qyRecordInfoView')">查看</a>
+						<a @click="onDetail(record)" v-if="hasPerm('qyRecordInfoEdit')">编辑</a>
+						<a-popconfirm title="确定要删除吗?" @confirm="deleteQyRecordInfo(record)">
+							<a-button type="link" danger size="small" v-if="hasPerm('qyRecordInfoDelete')">删除</a-button>
+						</a-popconfirm>
+					</a-space>
+				</template>
+			</template>
+		</s-table>
+	</a-card>
+	<Detail v-else ref="detailRef" @onClose="indexShow = true" @successful="onSearch()" />
+</template>
+
+<script setup name="qyrecordinfo">
+	import tool from '@/utils/tool'
+	import { cloneDeep } from 'lodash-es'
+	import Detail from './detail.vue'
+	import qyRecordInfoApi from '@/api/biz/qyRecordInfoApi'
+	import downloadUtil from "@/utils/downloadUtil";
+    const { proxy } = getCurrentInstance()
+	const searchFormState = ref({})
+	const searchFormStateReal = ref(searchFormState.value) // 点击搜索后备份的查询参数
+	const searchFormRef = ref()
+	const tableRef = ref()
+	const filterParam = ref({})
+	const detailRef = ref()
+	const indexShow = ref(true)
+	const toolConfig = { refresh: true, height: true, columnSetting: true, striped: false }
+	// 查询区域显示更多控制
+	const advanced = ref(false)
+	const toggleAdvanced = () => {
+		advanced.value = !advanced.value
+	}
+	const columns = [
+		{
+			title: '预录入台账编号',
+			dataIndex: 'ylTzCode',
+		},
+		{
+			title: '台账编号',
+			dataIndex: 'tzCode',
+		},
+		{
+			title: '台账性质',
+			dataIndex: 'tzType',
+		},
+		{
+			title: '海关注册编码',
+			dataIndex: 'companyMainHgCode',
+		},
+		{
+			title: '统一社会信用代码',
+			dataIndex: 'companyCode',
+		},
+		{
+			title: '企业名称',
+			dataIndex: 'companyName',
+		},
+		{
+			title: '申报类型',
+			dataIndex: 'applyType',
+		},
+		{
+			title: '企业类型',
+			dataIndex: 'companyType',
+		},
+		{
+			title: '企业地址',
+			dataIndex: 'companyAddress',
+		},
+		{
+			title: '联系人',
+			dataIndex: 'companyLinkMan',
+		},
+		{
+			title: '联系电话',
+			dataIndex: 'companyLegalPhone',
+		},
+		{
+			title: '经营范围',
+			dataIndex: 'companyJyFw',
+		},
+		{
+			title: '审核状态',
+			dataIndex: 'status',
+		},
+	]
+	// 操作栏通过权限判断是否显示
+	if (hasPerm(['qyRecordInfoEdit', 'qyRecordInfoDelete'])) {
+		columns.push({
+			title: '操作',
+			dataIndex: 'action',
+			align: 'center',
+			width: 200,
+			fixed: 'right',
+		})
+	}
+	const selectedRowKeys = ref([])
+	// 列表选择配置
+	const options = {
+		// columns数字类型字段加入 needTotal: true 可以勾选自动算账
+		alert: {
+			show: true,
+			clear: () => {
+				selectedRowKeys.value = ref([])
+			}
+		},
+		rowSelection: {
+			onChange: (selectedRowKey, selectedRows) => {
+				selectedRowKeys.value = selectedRowKey
+			}
+		}
+	}
+	const loadData = (parameter) => {
+        tableRef.value.clearSelected()
+        return qyRecordInfoApi.qyRecordInfoPage(Object.assign(parameter, searchFormStateReal.value)).then((data) => {
+            return data
+        })
+    }
+    // 搜索同时备份参数
+    const onSearch = (parameter) => {
+        searchFormStateReal.value = cloneDeep(Object.assign(searchFormState.value, filterParam.value))
+        nextTick(() => {
+            tableRef.value.refresh(parameter)
+        })
+    }
+    // 重置
+    const reset = () => {
+        searchFormRef.value.resetFields()
+        onSearch(true)
+    }
+	// 删除
+	const deleteQyRecordInfo = (record) => {
+		let params = [
+			{
+				id: record.id
+			}
+		]
+		qyRecordInfoApi.qyRecordInfoDelete(params).then(() => {
+			tableRef.value.refresh(true)
+		})
+	}
+	// 批量删除
+	const deleteBatchQyRecordInfo = (params) => {
+		qyRecordInfoApi.qyRecordInfoDelete(params).then(() => {
+			tableRef.value.clearRefreshSelected()
+		})
+	}
+	// 批量导出
+    const onExport = () => {
+        const params = {
+            ...filterParam.value
+        }
+        if (selectedRowKeys.value.length > 0) {
+            params.ids = selectedRowKeys.value
+        } else {
+            Object.entries(searchFormStateReal.value).forEach(([key, value]) => {
+                console.log(key)
+                if (proxy.$util.isValue(value)) {
+                    params[key] = value
+                }
+            })
+        }
+        qyRecordInfoApi.qyRecordInfoExport(params).then((res) => {
+            downloadUtil.resultDownload(res)
+            tableRef.value.clearSelected()
+        })
+    }
+	// 切换至表单
+    const onDetail = (record = null, view) => {
+    	indexShow.value = false
+    	nextTick(() => {
+            detailRef.value.onOpen(record, view)
+    	})
+    }
+	const tzTypeOptions = tool.dictList('tzlx')
+	const companyTypeOptions = tool.dictList('qylx')
+</script>
+
+<style lang="less" scoped>
+</style>

+ 1 - 1
snowy-admin-web/src/views/yqyc/zero/enterprise-qualification/detail.vue

@@ -1,7 +1,7 @@
 <template>
   <a-card :bordered="false">
     <a-page-header
-      :title="formData.id ? '编辑企业资质备案' : '新增企业资质备案'"
+      :title="formData.id ? '企业资质' : '新增企业资质'"
       @back="onClose"
     >
       <template #extra>

+ 1 - 7
snowy-admin-web/src/views/yqyc/zero/enterprise-qualification/index.vue

@@ -85,21 +85,15 @@
         <template v-if="column.dataIndex === 'action'">
           <a-space>
             <a @click="onDetail(record, true)" v-if="hasPerm('qyRecordView')">查看</a>
-            <a-divider type="vertical"
-                       v-if="hasPerm('qyRecordView') && hasPerm(['qyRecordEdit', 'qyRecordDelete'], 'or')"/>
             <a @click="onDetail(record)" v-if="hasPerm('qyRecordEdit') && record.status == 1">编辑</a>
-            <a-divider type="vertical" v-if="hasPerm(['qyRecordEdit', 'qyRecordDelete'], 'and')"/>
             <a-popconfirm title="确定要删除吗?" @confirm="deleteQyRecord(record)">
               <a-button type="link" danger size="small" v-if="hasPerm('qyRecordDelete')">删除</a-button>
             </a-popconfirm>
-		  	<a-divider type="vertical" v-if="hasPerm(['qyRecordView', 'qyRecordEdit', 'qyRecordDelete'])"/>
 		    <a @click="resultDetailRef.onOpen(record)" v-if="record.status == 3 || record.status == 4">查看回执</a>
 		  	<template v-if="searchFormState.baType === 'bgsq' && (record.status == 3 || record.status == 4)">
-				<a-divider type="vertical"/>
 				<a @click="onChange(record)">变更</a>
 		  	</template>
 		  	<template v-else-if="searchFormState.baType === 'zxsq' && record.status == 4">
-				<a-divider type="vertical"/>
 				<a @click="onKill(record)">注销</a>
 		  	</template>
           </a-space>
@@ -179,7 +173,7 @@ const columns = ref([
 if (hasPerm(['qyRecordView', 'qyRecordEdit', 'qyRecordDelete'])) {
 	columns.value.forEach(v => {
 		if (v.dataIndex === 'action') {
-			v.width = 400
+			v.width = 200
 		}
 	})
 }