From 89fd2cf7202c321512c2ea699a3a220a7138ed44 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 09 四月 2026 10:40:52 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/cwxt_master' into cwxt_master
---
ui/admin-ui3/src/views/tms/tmsCustomerInfo/info.vue | 224 +++++++++++++++++++++++++++++++++++--------------------
1 files changed, 143 insertions(+), 81 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/tmsCustomerInfo/info.vue b/ui/admin-ui3/src/views/tms/tmsCustomerInfo/info.vue
index 2d1274a..b86b15d 100644
--- a/ui/admin-ui3/src/views/tms/tmsCustomerInfo/info.vue
+++ b/ui/admin-ui3/src/views/tms/tmsCustomerInfo/info.vue
@@ -1,15 +1,14 @@
<template>
- <el-affix :offset="84">
+ <!-- <el-affix :offset="84">
<div class="affix-box">
<div class="affix-box-title">
</div>
<div>
<el-button type="warning" @click="goToList">杩� 鍥�</el-button>
-
<el-button v-if="!formDisabled" type="primary" @click="submitForm">鎻� 浜�</el-button>
</div>
</div>
- </el-affix>
+ </el-affix> -->
<div class="app-container">
<h4 class="form-header">瀹㈠晢淇℃伅</h4>
<el-form ref="wmsDzInoutOrderItemRef" :model="form" :rules="rules" class="form-wrapper">
@@ -110,7 +109,7 @@
@click="handleAdd(1)">鏂板
</el-button>
- <el-table border :data="invoiceInfoList">
+ <el-table border class="demo-tabs" :data="invoiceInfoList">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="id" align="center" prop="id" /> -->
<el-table-column label="鎶ご鍏徃鍚嶇О" align="center" prop="invoiceCompanyName" />
@@ -122,9 +121,9 @@
</el-table-column>
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template #default="scope">
- <el-button v-if="!formDisabled" type="text" icon="Edit" @click="handleUpdates(scope.row)">缂栬緫
+ <el-button v-if="!formDisabled" type="text" icon="Edit" @click="handleUpdates(scope.row,scope.$index)">缂栬緫
</el-button>
- <el-button v-if="!formDisabled" type="text" @click="handleDelte(scope.row)">鍒犻櫎
+ <el-button v-if="!formDisabled" type="text" @click="handleDelte(scope.row,scope.$index)">鍒犻櫎
</el-button>
<el-button v-if="formDisabled" type="text" @click="handleExamine(scope.row)">鏌ョ湅
@@ -144,7 +143,7 @@
@click="handleBankAdd(2)">鏂板
</el-button>
- <el-table border :data="bankAccountConfigList">
+ <el-table border class="demo-tabs" :data="bankAccountConfigList">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="閾惰璐﹀彿缂栧彿" align="center" prop="accountNo" />
<el-table-column label="鎴峰悕" align="center" prop="accountName" />
@@ -163,9 +162,9 @@
<el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width">
<template #default="scope">
<el-button v-if="!formDisabled" type="text" icon="Edit"
- @click="handleBankUpdates(scope.row)">缂栬緫
+ @click="handleBankUpdates(scope.row, scope.$index)">缂栬緫
</el-button>
- <el-button v-if="!formDisabled" type="text" @click="handleBankDelte(scope.row)">鍒犻櫎
+ <el-button v-if="!formDisabled" type="text" @click="handleBankDelte(scope.row, scope.$index)">鍒犻櫎
</el-button>
<el-button v-if="formDisabled" type="text" @click="handleExamine(scope.row)">鏌ョ湅
</el-button>
@@ -176,25 +175,29 @@
<pagination v-show="bankPageF.total > 0" :total="bankPageF.total" v-model:page="queryBankParams.pageNum"
v-model:limit="queryBankParams.pageSize" @pagination="getList" />
</el-tab-pane>
- </el-tabs>
+ </el-tabs>
+ <div class="bottom-operation-container">
+ <el-button size="large" type="warning" @click="goToList" style="width: 120px;">杩� 鍥�</el-button>
+ <el-button v-if="!formDisabled" size="large" type="primary" @click="submitForm" style="width: 120px; margin-left: 30px;">鎻� 浜�</el-button>
+ </div>
</div>
- <CommonDialogForm :visible="isDialogVisible" title="浼佷笟鍙戠エ鎶ご淇℃伅" :initial-data="initialFormData"
+ <CommonDialogForm :mode="formMode" :visible="isDialogVisible" title="浼佷笟鍙戠エ鎶ご淇℃伅" :initial-data="initialFormData"
@close="isDialogVisible = false" @submit="handleFormSubmit" />
- <bankAccount :visible="isDialogVisibleBank" title="瀹㈡埛閾惰璐﹀彿閰嶇疆" :initial-data="bankFormData"
+ <bankAccount :mode="formBankeMode" :visible="isDialogVisibleBank" title="瀹㈡埛閾惰璐﹀彿閰嶇疆" :initial-data="bankFormData"
@close="isDialogVisibleBank = false" @submit="handleBankFormSubmit" />
<!-- 璇︽儏寮圭獥锛氫粎灞曠ず鎻忚堪鍒楄〃锛屾棤杈撳叆妗� -->
<el-dialog v-model="invoiceVisible" :title="invoiceTitle" width="70%" destroy-on-close @close="handleClose"
append-to-body>
- <el-descriptions v-if="activeName == 'first'" :column="3" border>
+ <el-descriptions v-if="activeName == 'first'" :column="3" border>
<!-- 鍩烘湰淇℃伅缁� -->
<el-descriptions-item label="绯荤粺缂栧彿">
{{ formData.id }}
</el-descriptions-item>
<el-descriptions-item label="鍏宠仈瀹㈡埛">
- {{ formData.customerName }}
+ {{ formData.customerName }}
</el-descriptions-item>
<el-descriptions-item label="鎶ご鍏徃">
{{ formData.invoiceCompanyName }}
@@ -203,11 +206,11 @@
{{ formData.invoiceCreditCode }}
</el-descriptions-item>
<el-descriptions-item label="鍙戠エ绫诲瀷">
- {{ dictFormat(sys_invoice_type, formData.invoiceType) }}
+ {{ dictFormat(sys_invoice_type, formData.invoiceType) }}
</el-descriptions-item>
<!-- 鑱旂郴浜轰俊鎭粍 -->
<el-descriptions-item label="寮�鎴烽摱琛屽悕绉�">
- {{ formData.invoiceBankName }}
+ {{ formData.invoiceBankName }}
</el-descriptions-item>
<el-descriptions-item label="鍩烘湰寮�鎴疯处鍙�">
{{ formData.invoiceBankNo }}
@@ -220,16 +223,16 @@
{{ formData.invoiceOperatingLicensePhone }}
</el-descriptions-item>
<el-descriptions-item label="閭">
- {{ formData.invoiceOperatingLicenseEmail }}
+ {{ formData.invoiceOperatingLicenseEmail }}
</el-descriptions-item>
</el-descriptions>
- <el-descriptions v-if="activeName == 'second'" :column="3" border>
+ <el-descriptions v-if="activeName == 'second'" :column="3" border>
<!-- 鍩烘湰淇℃伅缁� -->
<el-descriptions-item label="绯荤粺缂栧彿">
{{ formData.id }}
</el-descriptions-item>
<el-descriptions-item label="鍏宠仈瀹㈡埛">
- {{ formData.customerName }}
+ {{ formData.customerName }}
</el-descriptions-item>
<el-descriptions-item label="璐﹀彿缂栧彿">
{{ formData.accountNo }}
@@ -238,23 +241,23 @@
{{ formData.accountName }}
</el-descriptions-item>
<el-descriptions-item label="閾惰鍚嶇О">
- {{ formData.bankName }}
+ {{ formData.bankName }}
</el-descriptions-item>
<!-- 鑱旂郴浜轰俊鎭粍 -->
<el-descriptions-item label="鏀鍚嶇О">
- {{ formData.branchName }}
+ {{ formData.branchName }}
</el-descriptions-item>
<el-descriptions-item label="璐﹀彿绫诲瀷">
- {{ dictFormat(sys_account_type, formData.accountType) }}
+ {{ dictFormat(sys_account_type, formData.accountType) }}
</el-descriptions-item>
<el-descriptions-item label="甯佺">
- {{ dictFormat(sys_currency, formData.currency) }}
+ {{ dictFormat(sys_currency, formData.currency) }}
</el-descriptions-item>
<!-- 閾惰璐︽埛淇℃伅缁� -->
<el-descriptions-item label="璐︽埛鐘舵��">
- {{ dictFormat(sys_bank_type, formData.status) }}
+ {{ dictFormat(sys_bank_type, formData.status) }}
</el-descriptions-item>
-
+
</el-descriptions>
<!-- 搴曢儴鎸夐挳 -->
@@ -284,7 +287,7 @@
import { listInvoiceInfo, getInvoiceInfo } from "@/api/cwgl/invoiceInfo";
-import { listBankAccountConfig,getBankAccountConfig } from "@/api/cwgl/bankAccountConfig";
+import { listBankAccountConfig, getBankAccountConfig } from "@/api/cwgl/bankAccountConfig";
interface DzInventoryI extends BaseEntityInterface {
id?: number, no?: string, enterId?: string, putrecNo?: string, etpsInnerInvtNo?: string, bizopEtpsSccd?: string, bizopEtpsNo?: string, bizopEtpsNm?: string, rcvgdEtpsNo?: string, rvsngdEtpsSccd?: string, rcvgdEtpsNm?: string, dclEtpsSccd?: string, dclEtpsNo?: string, dclEtpsNm?: string, invtDclTime?: string, entryDclTime?: string, rltInvtNo?: string, rltPutrecNo?: string, rltEntryNo?: string, rltEntryBizopEtpsSccd?: string, rltEntryBizopEtpsno?: string, rltEntryBizopEtpsnm?: string, rltEntryRvsngdEtpsSccd?: string, rltEntryRcvgdEtpsNo?: string, rltEntryRcvgdEtpsNm?: string, rltEntryDclEtpsSccd?: string, rltEntryDclEtpsNo?: string, rltEntryDclEtpsNm?: string, impExpPortcd?: string, dclPlcCuscd?: string, mtpckEndprdMarkcd?: string, supvModecd?: string, trspModecd?: string, dclCusFlag?: number, decType?: string, vrfdedMarkcd?: string, invtIochkptStucd?: string, prevdTime?: string, formalVrfdedTime?: string, applyNo?: string, listType?: string, inputCode?: string, inputCreditCode?: string, inputName?: string, icCardNo?: string, inputTime?: string, listStat?: string, correntryDclEtpssccd?: string, correntryDclEtpsno?: string, correntryDclEtpsnm?: string, decType?: string, chgTmsCnt?: number, stshipTrsarvNatcd?: string, invtType?: string, entryStucd?: number, passPortUsedTypecd?: string, dclTypecd?: number, needEntryModified?: string, levyBlAmt?: string, genDecFlag?: number, createBy?: string, createTime?: string, updateBy?: string, updateTime?: string, status?: number, deleted?: number, remark?: string
impExpMarkcd?: string, dzOrders?: any, wmsDzInoutOrderItemList?: any, inputSccd?: string
@@ -293,12 +296,12 @@
const { proxy } = useCurrentInstance();
const {
- customer_type, sys_invoice_type, sys_currency, sys_account_type,sys_bank_type
+ customer_type, sys_invoice_type, sys_currency, sys_account_type, sys_bank_type
} =
proxy.useDict(
- 'customer_type', 'sys_invoice_type', 'sys_currency', 'sys_account_type','sys_bank_type'
+ 'customer_type', 'sys_invoice_type', 'sys_currency', 'sys_account_type', 'sys_bank_type'
);
@@ -317,7 +320,7 @@
const data = reactive({
form: <DzInventoryI & any>{
},
- formData:{},
+ formData: {},
operate: 'add',
queryParams: <DzInoutOrderI>{ pageNum: 1, pageSize: 10 },
queryBankParams: <DzInoutOrderI>{ pageNum: 1, pageSize: 10 },
@@ -340,31 +343,35 @@
bankAccountConfigList: [],
})
-const { form, rules, queryParams, operate, formDisabled, invoiceInfoList, queryBankParams, bankAccountConfigList,formData } = toRefs(data);
+const { form, rules, queryParams, operate, formDisabled, invoiceInfoList, queryBankParams, bankAccountConfigList, formData } = toRefs(data);
const activeName = ref('first')
const handleClick = (tab: TabsPaneContext, event: Event) => {
- if (tab.props.name == 'first') {
- // 寮�绁ㄨ祫鏂�
- queryParams.value.customerId = router.currentRoute.value.query.id
- listInvoiceInfo(queryParams.value).then(res => {
- if (res.code = 200) {
- form.value.invoiceInfoList = res.rows;
- invoiceInfoList.value = res.rows;
- pageF.total = res.total;
- }
- });
- } else if (tab.props.name == 'second') {
- // 閾惰璐﹀彿
- listBankAccountConfig(queryBankParams.value).then(res => {
- if (res.code = 200) {
- form.value.bankAccountConfigList = res.rows;
- bankAccountConfigList.value = res.rows;
- bankPageF.total = res.total;
- }
- });
+
+ if (router.currentRoute.value.query.formDisabled == 'true') {
+ if (tab.props.name == 'first') {
+ // 寮�绁ㄨ祫鏂�
+ queryParams.value.customerId = router.currentRoute.value.query.id
+ listInvoiceInfo(queryParams.value).then(res => {
+ if (res.code = 200) {
+ form.value.invoiceInfoList = res.rows;
+ invoiceInfoList.value = res.rows;
+ pageF.total = res.total;
+ }
+ });
+ } else if (tab.props.name == 'second') {
+ // 閾惰璐﹀彿
+ listBankAccountConfig(queryBankParams.value).then(res => {
+ if (res.code = 200) {
+ form.value.bankAccountConfigList = res.rows;
+ bankAccountConfigList.value = res.rows;
+ bankPageF.total = res.total;
+ }
+ });
+ }
}
+
}
const goToList = () => {
router.push('/customer/tmsCustomerInfo');
@@ -402,30 +409,47 @@
// router.push({ path: '/cwgl/dzInventory' });
}
/* 寮�绁ㄨ祫鏂� */
+const formMode = ref<'add' | 'edit'>('add');
+const formBankeMode = ref<'add' | 'edit'>('add');
+
+
const handleAdd = () => {
if (!form.value.customerFullName || form.value.customerFullName.trim() == '') {
proxy.$message.error("瀹㈡埛鍏ㄧО涓嶈兘涓虹┖");
return;
}
-
+ formMode.value = 'add';
isDialogVisible.value = true;
initialFormData.value = {
relatedCustomerName: form.value.customerFullName,
};
};
-const handleUpdates = (row: any) => {
+const editingIndex = ref()
+const handleUpdates = (row: any,index:any) => {
// 缂栬緫琛屾暟鎹�
+ console.log(row);
+ formMode.value = 'edit';
isDialogVisible.value = true;
initialFormData.value = row;
+ editingIndex.value = index; // 璁板綍绱㈠紩
}
-const handleDelte = (row: any) => {
- const index = invoiceInfoList.value.findIndex((item: any) => item === row);
+const handleDelte = (row: any,index:any) => {
+ // const index = invoiceInfoList.value.findIndex((item: any) => item === row);
if (index > -1) {
invoiceInfoList.value.splice(index, 1);
}
}
-const handleFormSubmit = (data: any) => {
- invoiceInfoList.value.push(data);
+const handleFormSubmit = (data: any,mode:any) => {
+if (formMode.value === 'edit' && editingIndex.value !== null) {
+ // 妯″紡1锛氬熀浜庣储寮曚慨鏀癸紙鏈�鎺ㄨ崘锛屾敮鎸佹湭淇濆瓨鐨勬柊鏁版嵁锛�
+ invoiceInfoList.value.splice(editingIndex.value, 1, data);
+ } else {
+ // 鏂板妯″紡
+ invoiceInfoList.value.push(data);
+ }
+ // 閲嶇疆鐘舵��
+ editingIndex.value = null;
+ isDialogVisible.value = false;
};
const getList = () => {
// 鑾峰彇鍒楄〃鏁版嵁
@@ -461,33 +485,45 @@
const bankFormData = ref({
});
-
/* 閾惰 */
const handleBankAdd = () => {
if (!form.value.customerFullName || form.value.customerFullName.trim() == '') {
proxy.$message.error("瀹㈡埛鍏ㄧО涓嶈兘涓虹┖");
return;
}
+ formBankeMode.value = 'add';
isDialogVisibleBank.value = true;
bankFormData.value = {
relatedCustomerName: form.value.customerFullName,
};
};
-const handleBankUpdates = (row: any) => {
+const bankIndex = ref()
+const handleBankUpdates = (row: any, index: any) => {
// 缂栬緫琛屾暟鎹�
+ formBankeMode.value = 'edit';
+ bankIndex.value = index;
isDialogVisibleBank.value = true;
bankFormData.value = row;
};
-const handleBankDelte = (row: any) => {
- console.log(row);
- const index = bankAccountConfigList.value.findIndex((item: any) => item === row);
+const handleBankDelte = (row: any, index: any) => {
+ // const index = bankAccountConfigList.value.findIndex((item: any) => item === row);
if (index > -1) {
bankAccountConfigList.value.splice(index, 1);
}
}
const handleBankFormSubmit = (data: any) => {
- console.log(data);
- bankAccountConfigList.value.push(data);
+
+if (formBankeMode.value === 'edit' && bankIndex.value !== null) {
+ // 妯″紡1锛氬熀浜庣储寮曚慨鏀癸紙鏈�鎺ㄨ崘锛屾敮鎸佹湭淇濆瓨鐨勬柊鏁版嵁锛�
+ bankAccountConfigList.value.splice(bankIndex.value, 1, data);
+ } else {
+ // 鏂板妯″紡
+ bankAccountConfigList.value.push(data);
+ }
+ // 閲嶇疆鐘舵��
+ bankIndex.value = null;
+ isDialogVisibleBank.value = false;
+
};
const getDataFormat = () => {
console.log(router.currentRoute.value.query.id);
@@ -519,28 +555,28 @@
}
const invoiceVisible = ref(false);
const invoiceTitle = ref('')
-const handleExamine = (row:any) => {
+const handleExamine = (row: any) => {
console.log(activeName.value);
-
- if(activeName.value == 'first'){
- invoiceTitle.value = '鏌ョ湅浼佷笟鍙戠エ鎶ご淇℃伅'
- getInvoiceInfo(row.id).then(res => {
- if (res.code ==200) {
- formData.value = res.data;
- invoiceVisible.value = true
- }
- });
- }else if(activeName.value == 'second'){
- getBankAccountConfig(row.id).then(res => {
- if (res.code == 200) {
- invoiceTitle.value = '鏌ョ湅瀹㈡埛閾惰璐﹀彿淇℃伅'
- formData.value = res.data;
- invoiceVisible.value = true
- }
- });
+ if (activeName.value == 'first') {
+ invoiceTitle.value = '鏌ョ湅浼佷笟鍙戠エ鎶ご淇℃伅'
+ getInvoiceInfo(row.id).then(res => {
+ if (res.code == 200) {
+ formData.value = res.data;
+ invoiceVisible.value = true
+ }
+ });
+ } else if (activeName.value == 'second') {
+ getBankAccountConfig(row.id).then(res => {
+ if (res.code == 200) {
+ invoiceTitle.value = '鏌ョ湅瀹㈡埛閾惰璐﹀彿淇℃伅'
+
+ formData.value = res.data;
+ invoiceVisible.value = true
+ }
+ });
}
-
+
}
const handleClose = () => {
invoiceVisible.value = false;
@@ -652,4 +688,30 @@
}
}
}
+/* 杩斿洖 */
+/* 鍦ㄥ凡鏈夌殑 style 鏍囩鍐呮坊鍔� */
+
+.bottom-operation-container {
+ margin-top: 40px; /* 涓庝笂鏂� Tabs 鐨勯棿璺� */
+ margin-bottom: 20px; /* 涓庨〉闈㈠簳閮ㄧ殑闂磋窛 */
+ display: flex;
+ justify-content: center; /* 姘村钩灞呬腑 */
+ align-items: center;
+ padding: 20px 0;
+ border-top: 1px solid #eee; /* 鍙�夛細澧炲姞涓�鏉¢《閮ㄥ垎鍓茬嚎 */
+}
+
+/* 浼樺寲琛ㄦ牸鏍峰紡锛岀‘淇濆浐瀹氶珮搴︽椂婊氬姩鏉$編瑙� */
+::v-deep .el-table {
+ margin-top: 5px;
+ /* 鏇挎崲鎺夋姤閿欑殑 @include锛屾敼鐢ㄥ師鐢� CSS 缇庡寲婊氬姩鏉★紙鍙�夛級 */
+ .el-scrollbar__bar {
+ z-index: 5;
+ }
+}
+
+/* 璋冩暣 Tabs 鏍峰紡浣垮叾搴曢儴涓嶈澶眬淇� */
+.demo-tabs {
+ margin-bottom: 20px;
+}
</style>
--
Gitblit v1.8.0