From 15178bafd7aa1827e6c48fda8e2cc3b8df0bbf5e Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期一, 19 一月 2026 15:24:25 +0800
Subject: [PATCH] 新增前后端
---
ui/admin-ui3/src/components/makeInvoiceCate/index.vue | 99 ++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 80 insertions(+), 19 deletions(-)
diff --git a/ui/admin-ui3/src/components/makeInvoiceCate/index.vue b/ui/admin-ui3/src/components/makeInvoiceCate/index.vue
index 1589a44..d567e54 100644
--- a/ui/admin-ui3/src/components/makeInvoiceCate/index.vue
+++ b/ui/admin-ui3/src/components/makeInvoiceCate/index.vue
@@ -5,6 +5,16 @@
<!-- 琛ㄥ崟涓讳綋 -->
<el-form ref="formRef" :model="form" :rules="formRules" label-width="140px" size="default"
class="form-container">
+
+ <el-form-item label="鍏宠仈浼佷笟绫诲瀷" prop="enterpriseType">
+ <el-radio-group v-model="form.enterpriseType" @change="handleTypeChange">
+ <el-radio :value="1">鍐呴儴缁撶畻鍗曚綅</el-radio>
+ <el-radio :value="0">瀹㈡埛</el-radio>
+ <el-radio :value="2">渚涘簲鍟�</el-radio>
+ </el-radio-group>
+ </el-form-item>
+
+
<!-- 鍏宠仈瀹㈡埛锛堝甫鎼滅储鍥炬爣锛� -->
<el-form-item label="鍏宠仈瀹㈡埛" prop="customerName">
<el-input v-model="form.customerName" placeholder="璇烽�夋嫨鍏宠仈瀹㈡埛" readonly suffix-icon="Search"
@@ -65,12 +75,14 @@
</el-dialog>
<!-- 鍏宠仈瀹㈡埛閫夋嫨寮圭獥 -->
- <CustomerSelectDialog
- :visible="isCustomerSelectVisibleIshow"
- :default-selected-id="form.customerId"
- @confirm="handleCustomerSelect"
- @close="isCustomerSelectVisibleIshow = false"
- />
+ <CustomerSelectDialog :visible="isCustomerSelectVisibleIshow" :default-selected-id="form.customerId"
+ @confirm="handleCustomerSelect" @close="isCustomerSelectVisibleIshow = false" />
+ <!-- 杩愯惀涓讳綋 -->
+ <subjectPeration :visible="subjectPerationShow" :default-selected-id="form.customerId"
+ @confirm="subjectPerationSelect" @close="subjectPerationShow = false" />
+ <!-- 渚涘簲鍟� -->
+ <transportServiceDialog :visible="transportSelectVisibleIshow" :default-selected-id="form.customerId"
+ @confirm="transportCustomerSelect" @close="transportSelectVisibleIshow = false" />
</template>
<script setup lang="ts">
@@ -79,10 +91,11 @@
import { ElMessage } from 'element-plus';
// 寮曞叆瀹㈡埛閫夋嫨寮圭獥缁勪欢
import CustomerSelectDialog from '../CustomerSelectDialog/index';
-
+import subjectPeration from '../subjectPeration/index';
+import transportServiceDialog from '../transportServiceDialog/index';
import useCurrentInstance from "@/utils/useCurrentInstance";
const { proxy } = useCurrentInstance();
-const { sys_invoice_type } = proxy.useDict('sys_invoice_type');
+const { sys_invoice_type, sys_affiliated_enterprises } = proxy.useDict('sys_invoice_type', 'sys_affiliated_enterprises');
// 瀹氫箟琛ㄥ崟鏁版嵁绫诲瀷锛堟柊澧瀋ustomerId瀛楁锛岄伩鍏嶈祴鍊兼椂鎶ラ敊锛�
interface InvoiceForm {
@@ -101,6 +114,8 @@
// 寮圭獥鎺у埗
const dialogVisible = ref(false);
const isCustomerSelectVisibleIshow = ref(false);
+const transportSelectVisibleIshow = ref(false);
+
// Emits
const emit = defineEmits(['close', 'submit']);
@@ -109,12 +124,13 @@
const form = reactive<InvoiceForm>({
customerId: '', // 鍒濆鍖朿ustomerId
customerName: '',
+ enterpriseType: '',
invoiceCompanyName: '',
invoiceCreditCode: '',
invoiceType: '',
invoiceBankName: '',
invoiceBankNo: '',
- id:'',
+ id: '',
invoiceOperatingLicenseAddress: '',
invoiceOperatingLicensePhone: '',
invoiceOperatingLicenseEmail: ''
@@ -141,6 +157,9 @@
invoiceOperatingLicenseEmail: [
{ required: true, message: '璇疯緭鍏ラ偖绠�', trigger: 'blur' },
{ type: 'email', message: '璇疯緭鍏ユ纭殑閭鏍煎紡', trigger: 'blur' }
+ ],
+ enterpriseType: [
+ { required: true, message: '璇烽�夋嫨瀹㈡埛绫诲瀷', trigger: 'change' }
]
});
@@ -150,14 +169,14 @@
// 鎵撳紑寮圭獥锛堜緵鐖剁粍浠惰皟鐢紝淇鍥炴樉閫昏緫锛�
const openDialog = (data?: Partial<InvoiceForm>) => {
dialogVisible.value = true;
-
+
// 鍏堥噸缃〃鍗曪紝閬垮厤鏃ф暟鎹畫鐣�
nextTick(() => {
formRef.value?.resetFields();
-
+
// 鏈夊洖鏄炬暟鎹椂锛岄�愪釜璧嬪�硷紙鏍稿績淇锛氶伩鍏嶆暣浣撹祴鍊糵orm = data锛�
if (data && Object.keys(data).length > 0) {
- // 閬嶅巻data鐨勬墍鏈夊瓧娈碉紝璧嬪�煎埌form锛堜粎瑕嗙洊瀵瑰簲瀛楁锛�
+ // 閬嶅巻data鐨勬墍鏈夊瓧娈碉紝璧嬪�煎埌form锛堜粎瑕嗙洊瀵瑰簲瀛楁锛�
Object.assign(form, data);
// 娓呯┖琛ㄥ崟鏍¢獙鐘舵��
formRef.value?.clearValidate();
@@ -166,12 +185,13 @@
Object.assign(form, {
customerId: '',
customerName: '',
+ enterpriseType: '',
invoiceCompanyName: '',
invoiceCreditCode: '',
invoiceType: '',
invoiceBankName: '',
invoiceBankNo: '',
- id:'',
+ id: '',
invoiceOperatingLicenseAddress: '',
invoiceOperatingLicensePhone: '',
invoiceOperatingLicenseEmail: ''
@@ -182,12 +202,24 @@
// 鎵撳紑鍏宠仈瀹㈡埛閫夋嫨寮圭獥
const openCustomerSelectDialog = () => {
- isCustomerSelectVisibleIshow.value = true;
+ console.log(form.enterpriseType);
+ if (form.enterpriseType == '') {
+ ElMessage.warning(`璇峰厛閫夋嫨鍏宠仈浼佷笟绫诲瀷`);
+ return
+ }
+ if (form.enterpriseType == '1') {
+ subjectPerationShow.value = true;
+ } else if (form.enterpriseType == '0') {
+ isCustomerSelectVisibleIshow.value = true;
+ } else if (form.enterpriseType == '2') {
+ transportSelectVisibleIshow.value = true;
+ }
+ // isCustomerSelectVisibleIshow.value = true;
};
// 閫夋嫨瀹㈡埛鍥炶皟
const handleCustomerSelect = (selectedCustomer) => {
- form.customerName = selectedCustomer.customerShortName;
+ form.customerName = selectedCustomer.customerFullName;
form.customerId = selectedCustomer.id; // 鐜板湪瀛楁宸插0鏄庯紝璧嬪�兼湁鏁�
isCustomerSelectVisibleIshow.value = false;
};
@@ -223,6 +255,24 @@
formRef.value?.resetFields();
emit('close');
};
+const handleTypeChange = (val) => {
+ form.customerName = ''
+ form.customerId = ''
+}
+/* 杩愯惀涓讳綋 */
+const subjectPerationShow = ref(false);
+const subjectPerationSelect = (selectedCustomer) => {
+ form.customerName = selectedCustomer.customerFullName;
+ form.customerId = selectedCustomer.id; // 鐜板湪瀛楁宸插0鏄庯紝璧嬪�兼湁鏁�
+ isCustomerSelectVisibleIshow.value = false;
+};
+/* 渚涘簲鍟� */
+
+const transportCustomerSelect = (selectedCustomer) => {
+ form.customerName = selectedCustomer.serviceName;
+ form.customerId = selectedCustomer.id;
+ isCustomerSelectVisibleIshow.value = false;
+};
// 鏆撮湶鏂规硶缁欑埗缁勪欢
defineExpose({ openDialog, handleClose });
@@ -231,13 +281,24 @@
<style scoped lang="scss">
.form-container {
padding: 10px 0;
- :deep(.el-form-item) { margin-bottom: 18px; }
+
+ :deep(.el-form-item) {
+ margin-bottom: 18px;
+ }
}
.search-input {
- :deep(.el-input__inner) { cursor: pointer; background-color: #f8f9fa; }
- :deep(.el-icon-search) { color: #409eff; }
+ :deep(.el-input__inner) {
+ cursor: pointer;
+ background-color: #f8f9fa;
+ }
+
+ :deep(.el-icon-search) {
+ color: #409eff;
+ }
}
-.dialog-footer { text-align: right; }
+.dialog-footer {
+ text-align: right;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0