From 3db4630f6bf34bc8857600ca6a0078eb43a21d1e Mon Sep 17 00:00:00 2001
From: ZN <zhang_12370@163.com>
Date: 星期二, 24 三月 2026 17:58:31 +0800
Subject: [PATCH] feat: 移除冗余字段并优化发货逻辑
---
src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue | 1
src/views/index.vue | 48 +-
src/views/procurementManagement/procurementLedger/index.vue | 120 +-----
src/views/salesManagement/deliveryLedger/index.vue | 9
src/views/customerService/feedbackRegistration/components/formDia.vue | 1
src/views/basicData/customerFile/index.vue | 206 +----------
src/views/salesManagement/receiptPaymentLedger/index.vue | 13
src/views/salesManagement/salesLedger/index.vue | 353 +++++++++++++++-----
src/views/basicData/supplierManage/components/HomeTab.vue | 191 +---------
src/views/procurementManagement/paymentLedger/index.vue | 36 +-
10 files changed, 388 insertions(+), 590 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index ad1c5bb..59f0002 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -57,79 +57,12 @@
:rules="rules"
ref="formRef">
<el-row :gutter="30">
- <el-col :span="12">
+ <el-col :span="24">
<el-form-item label="瀹㈡埛鍚嶇О锛�"
prop="customerName">
<el-input v-model="form.customerName"
placeholder="璇疯緭鍏�"
clearable />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="绾崇◣浜鸿瘑鍒彿锛�"
- prop="taxpayerIdentificationNumber">
- <el-input v-model="form.taxpayerIdentificationNumber"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="鍏徃鍦板潃锛�"
- prop="companyAddress">
- <el-input v-model="form.companyAddress"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍏徃鐢佃瘽锛�"
- prop="companyPhone">
- <el-input v-model="form.companyPhone"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="閾惰鍩烘湰鎴凤細"
- prop="basicBankAccount">
- <el-input v-model="form.basicBankAccount"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="閾惰璐﹀彿锛�"
- prop="bankAccount">
- <el-input v-model="form.bankAccount"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="寮�鎴疯鍙凤細"
- prop="bankCode">
- <el-input v-model="form.bankCode"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="瀹㈡埛鍒嗙被锛�"
- prop="customerType">
- <el-select v-model="form.customerType"
- placeholder="璇烽�夋嫨"
- clearable>
- <el-option label="闆跺敭瀹㈡埛"
- value="闆跺敭瀹㈡埛" />
- <el-option label="杩涢攢鍟嗗鎴�"
- value="杩涢攢鍟嗗鎴�" />
- </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -165,34 +98,6 @@
</el-row>
<el-button @click="addNewContact"
style="margin-bottom: 10px;">+ 鏂板鑱旂郴浜�</el-button>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="缁存姢浜猴細"
- prop="maintainer">
- <el-select v-model="form.maintainer"
- placeholder="璇烽�夋嫨"
- clearable
- disabled>
- <el-option v-for="item in userList"
- :key="item.nickName"
- :label="item.nickName"
- :value="item.nickName" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="缁存姢鏃堕棿锛�"
- prop="maintenanceTime">
- <el-date-picker style="width: 100%"
- v-model="form.maintenanceTime"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable />
- </el-form-item>
- </el-col>
- </el-row>
</el-form>
<template #footer>
<div class="dialog-footer">
@@ -717,24 +622,8 @@
const tableColumn = ref([
{
- label: "瀹㈡埛鍒嗙被",
- prop: "customerType",
- width: 120,
- },
- {
label: "瀹㈡埛鍚嶇О",
prop: "customerName",
- width: 220,
- },
- {
- label: "绾崇◣浜鸿瘑鍒爜",
- prop: "taxpayerIdentificationNumber",
- width: 220,
- },
- {
- label: "鍦板潃鍙婅仈绯绘柟寮�",
- prop: "addressPhone",
- width: 250,
},
{
label: "鑱旂郴浜�",
@@ -743,42 +632,8 @@
{
label: "鑱旂郴鐢佃瘽",
prop: "contactPhone",
- width: 150,
},
- {
- label: "璺熻繘杩涘害",
- prop: "followUpLevel",
- width: 120,
- },
- {
- label: "璺熻繘鏃堕棿",
- prop: "followUpTime",
- width: 120,
- },
- {
- label: "閾惰鍩烘湰鎴�",
- prop: "basicBankAccount",
- width: 220,
- },
- {
- label: "閾惰璐﹀彿",
- prop: "bankAccount",
- width: 220,
- },
- {
- label: "寮�鎴疯鍙�",
- prop: "bankCode",
- width: 220,
- },
- {
- label: "缁存姢浜�",
- prop: "maintainer",
- },
- {
- label: "缁存姢鏃堕棿",
- prop: "maintenanceTime",
- width: 100,
- },
+
{
dataType: "action",
label: "鎿嶄綔",
@@ -793,27 +648,27 @@
openForm("edit", row);
},
},
- {
- name: "璇︽儏",
- type: "text",
- clickFun: row => {
- openDetailDialog(row);
- },
- },
- {
- name: "鍥炶鎻愰啋",
- type: "text",
- clickFun: row => {
- openReminderDialog(row);
- },
- },
- {
- name: "娣诲姞娲借皥杩涘害",
- type: "text",
- clickFun: row => {
- openNegotiationDialog(row);
- },
- },
+ // {
+ // name: "璇︽儏",
+ // type: "text",
+ // clickFun: row => {
+ // openDetailDialog(row);
+ // },
+ // },
+ // {
+ // name: "鍥炶鎻愰啋",
+ // type: "text",
+ // clickFun: row => {
+ // openReminderDialog(row);
+ // },
+ // },
+ // {
+ // name: "娣诲姞娲借皥杩涘害",
+ // type: "text",
+ // clickFun: row => {
+ // openNegotiationDialog(row);
+ // },
+ // },
],
},
]);
@@ -861,21 +716,6 @@
},
rules: {
customerName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- taxpayerIdentificationNumber: [
- { required: true, message: "璇疯緭鍏�", trigger: "blur" },
- ],
- companyAddress: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- companyPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- // contactPerson: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- // contactPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- maintainer: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
- maintenanceTime: [
- { required: false, message: "璇烽�夋嫨", trigger: "change" },
- ],
- basicBankAccount: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- bankAccount: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- bankCode: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- customerType: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
},
});
const upload = reactive({
diff --git a/src/views/basicData/supplierManage/components/HomeTab.vue b/src/views/basicData/supplierManage/components/HomeTab.vue
index 85c3265..bd71f02 100644
--- a/src/views/basicData/supplierManage/components/HomeTab.vue
+++ b/src/views/basicData/supplierManage/components/HomeTab.vue
@@ -62,55 +62,11 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item
- label="绾崇◣浜鸿瘑鍒彿锛�"
- prop="taxpayerIdentificationNum"
- >
- <el-input
- v-model="form.taxpayerIdentificationNum"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="鍏徃鍦板潃锛�" prop="companyAddress">
- <el-input
- v-model="form.companyAddress"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鍏徃鐢佃瘽锛�" prop="companyPhone">
- <el-input
- v-model="form.companyPhone"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="寮�鎴疯锛�" prop="bankAccountName">
- <el-input
- v-model="form.bankAccountName"
- placeholder="璇疯緭鍏�"
- clearable
- />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="璐﹀彿锛�" prop="bankAccountNum">
- <el-input
- v-model="form.bankAccountNum"
- placeholder="璇疯緭鍏�"
- clearable
- />
+ <el-form-item label="鏄惁鐧藉悕鍗曪細" prop="isWhite">
+ <el-select v-model="form.isWhite" placeholder="璇烽�夋嫨" clearable>
+ <el-option label="鍚�" :value="1" />
+ <el-option label="鏄�" :value="0" />
+ </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -131,58 +87,6 @@
placeholder="璇疯緭鍏�"
clearable
/>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="缁存姢浜猴細" prop="maintainUserId">
- <el-select
- v-model="form.maintainUserId"
- placeholder="璇烽�夋嫨"
- clearable
- disabled
- >
- <el-option
- v-for="item in userList"
- :key="item.nickName"
- :label="item.nickName"
- :value="item.userId"
- />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="缁存姢鏃堕棿锛�" prop="maintainTime">
- <el-date-picker
- style="width: 100%"
- v-model="form.maintainTime"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable
- />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="渚涘簲鍟嗙被鍨嬶細" prop="supplierType">
- <el-select v-model="form.supplierType" placeholder="璇烽�夋嫨" clearable>
- <el-option label="鐢�" value="鐢�" />
- <el-option label="涔�" value="涔�" />
- <el-option label="涓�" value="涓�" />
- <el-option label="涓�" value="涓�" />
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="鏄惁鐧藉悕鍗曪細" prop="isWhite">
- <el-select v-model="form.isWhite" placeholder="璇烽�夋嫨" clearable>
- <el-option label="鏄�" :value="0" />
- <el-option label="鍚�" :value="1" />
- </el-select>
</el-form-item>
</el-col>
</el-row>
@@ -266,36 +170,6 @@
width: 250,
},
{
- label: "渚涘簲鍟嗙被鍨�",
- prop: "supplierType",
- width: 120,
- },
- {
- label: "绾崇◣浜鸿瘑鍒彿",
- prop: "taxpayerIdentificationNum",
- width: 230,
- },
- {
- label: "鍏徃鍦板潃",
- prop: "companyAddress",
- width: 220,
- },
- {
- label: "鑱旂郴鏂瑰紡",
- prop: "companyPhone",
- width:150
- },
- {
- label: "寮�鎴疯",
- prop: "bankAccountName",
- width: 220,
- },
- {
- label: "璐﹀彿",
- prop: "bankAccountNum",
- width: 220,
- },
- {
label: "鑱旂郴浜�",
prop: "contactUserName",
},
@@ -305,14 +179,9 @@
width: 150,
},
{
- label: "缁存姢浜�",
- prop: "maintainUserName",
- },
-
- {
- label: "缁存姢鏃堕棿",
- prop: "maintainTime",
- width:100
+ label: "鏄惁鐧藉悕鍗�",
+ prop: "isWhite",
+ formatData: (val) => (val == 0 ? "鏄�" : "鍚�"),
},
{
dataType: "action",
@@ -358,32 +227,21 @@
},
form: {
supplierName: "",
- taxpayerIdentificationNum: "",
- companyAddress: "",
- companyPhone: "",
- bankAccountName: "",
- bankAccountNum: "",
+ taxpayerIdentificationNum: "-",
+ companyAddress: "-",
+ companyPhone: "-",
+ bankAccountName: "-",
+ bankAccountNum: "-",
contactUserName: "",
contactUserPhone: "",
maintainUserId: "",
maintainTime: "",
- supplierType: "",
- isWhite: "",
+ supplierType: "鐢�",
+ isWhite: 0,
},
rules: {
supplierName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- taxpayerIdentificationNum: [
- { required: true, message: "璇疯緭鍏�", trigger: "blur" },
- ],
- companyAddress: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- companyPhone: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- bankAccountName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- bankAccountNum: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
- contactUserName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
- contactUserPhone: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
- maintainUserId: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
- maintainTime: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
- supplierType: [{ required: true, message: "璇烽�夋嫨渚涘簲鍟嗙被鍨�", trigger: "change" }],
+ isWhite: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
},
});
const { searchForm, form, rules } = toRefs(data);
@@ -468,9 +326,20 @@
// 鎵撳紑寮规
const openForm = (type, row) => {
operationType.value = type;
- form.value = {};
- form.value.maintainUserId = userStore.id;
- form.value.maintainTime = getCurrentDate();
+ form.value = {
+ supplierName: "",
+ taxpayerIdentificationNum: "-",
+ companyAddress: "-",
+ companyPhone: "-",
+ bankAccountName: "-",
+ bankAccountNum: "-",
+ contactUserName: "",
+ contactUserPhone: "",
+ maintainUserId: userStore.id,
+ maintainTime: getCurrentDate(),
+ supplierType: "鐢�",
+ isWhite: 0,
+ };
userListNoPage().then((res) => {
userList.value = res.data;
});
diff --git a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
index 20a4ee6..b0cd027 100644
--- a/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
+++ b/src/views/collaborativeApproval/approvalProcess/components/approvalDia.vue
@@ -136,7 +136,6 @@
<el-descriptions :column="2" border>
<el-descriptions-item label="閲囪喘鍚堝悓鍙�">{{ currentPurchase.purchaseContractNumber }}</el-descriptions-item>
<el-descriptions-item label="渚涘簲鍟嗗悕绉�">{{ currentPurchase.supplierName }}</el-descriptions-item>
- <el-descriptions-item label="椤圭洰鍚嶇О">{{ currentPurchase.projectName }}</el-descriptions-item>
<el-descriptions-item label="閿�鍞悎鍚屽彿">{{ currentPurchase.salesContractNo }}</el-descriptions-item>
<el-descriptions-item label="绛捐鏃ユ湡">{{ currentPurchase.executionDate }}</el-descriptions-item>
<el-descriptions-item label="褰曞叆鏃ユ湡">{{ currentPurchase.entryDate }}</el-descriptions-item>
diff --git a/src/views/customerService/feedbackRegistration/components/formDia.vue b/src/views/customerService/feedbackRegistration/components/formDia.vue
index 71cd167..08161fd 100644
--- a/src/views/customerService/feedbackRegistration/components/formDia.vue
+++ b/src/views/customerService/feedbackRegistration/components/formDia.vue
@@ -232,7 +232,6 @@
},
{ label: "蹇�掑叕鍙�", prop: "expressCompany", width: 140 },
{ label: "蹇�掑崟鍙�", prop: "expressNumber", width: 160 },
- { label: "鍙戣揣杞︾墝", prop: "shippingCarNumber", minWidth: 100, align: "center" },
{ label: "鍙戣揣鏃ユ湡", prop: "shippingDate", minWidth: 100, align: "center" },
{ label: "鏁伴噺", prop: "quantity", width: 100 },
{ label: "绋庣巼(%)", prop: "taxRate", width: 100 },
diff --git a/src/views/index.vue b/src/views/index.vue
index 4ae5fe4..62f4904 100644
--- a/src/views/index.vue
+++ b/src/views/index.vue
@@ -216,31 +216,31 @@
</div>
<!-- 搴曢儴妯悜涓ゆ爮 -->
- <div class="dashboard-row">
- <div class="main-panel">
- <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">
- <div class="section-title" style="margin-bottom: 0;">璐ㄩ噺缁熻</div>
- <el-radio-group v-model="qualityRange" size="small" @change="qualityStatisticsInfo">
- <el-radio-button :value="1">鍛�</el-radio-button>
- <el-radio-button :value="2">鏈�</el-radio-button>
- <el-radio-button :value="3">瀛e害</el-radio-button>
- </el-radio-group>
- </div>
- <div class="quality-cards">
- <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{ qualityStatisticsObject.supplierNum }}浠�</span></div>
- <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{ qualityStatisticsObject.processNum }}浠�</span></div>
- <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{ qualityStatisticsObject.factoryNum }}浠�</span></div>
- </div>
- <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="barSeries1"
- :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1" style="height: 260px"></Echarts>
- </div>
+<!-- <div class="dashboard-row">-->
+<!-- <div class="main-panel">-->
+<!-- <div style="display: flex;justify-content: space-between;align-items: center;margin-bottom: 10px;">-->
+<!-- <div class="section-title" style="margin-bottom: 0;">璐ㄩ噺缁熻</div>-->
+<!-- <el-radio-group v-model="qualityRange" size="small" @change="qualityStatisticsInfo">-->
+<!-- <el-radio-button :value="1">鍛�</el-radio-button>-->
+<!-- <el-radio-button :value="2">鏈�</el-radio-button>-->
+<!-- <el-radio-button :value="3">瀛e害</el-radio-button>-->
+<!-- </el-radio-group>-->
+<!-- </div>-->
+<!-- <div class="quality-cards">-->
+<!-- <div class="quality-card one">鍘熸潗鏂欏凡妫�娴嬫暟 <span>{{ qualityStatisticsObject.supplierNum }}浠�</span></div>-->
+<!-- <div class="quality-card two">杩囩▼妫�楠屾暟閲� <span>{{ qualityStatisticsObject.processNum }}浠�</span></div>-->
+<!-- <div class="quality-card three">鍑哄巶宸叉鏁伴噺 <span>{{ qualityStatisticsObject.factoryNum }}浠�</span></div>-->
+<!-- </div>-->
+<!-- <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="barSeries1"-->
+<!-- :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1" style="height: 260px"></Echarts>-->
+<!-- </div>-->
- <div class="main-panel">
- <div class="section-title">鍥炴涓庡紑绁ㄥ垎鏋�</div>
- <Echarts ref="invoiceChart" :chartStyle="chartStyle" :grid="grid" :legend="lineLegend" :series="lineSeries"
- :tooltip="tooltipLine" :xAxis="xAxis2" :yAxis="yAxis2" style="height: 270px;" />
- </div>
- </div>
+<!-- <div class="main-panel">-->
+<!-- <div class="section-title">鍥炴涓庡紑绁ㄥ垎鏋�</div>-->
+<!-- <Echarts ref="invoiceChart" :chartStyle="chartStyle" :grid="grid" :legend="lineLegend" :series="lineSeries"-->
+<!-- :tooltip="tooltipLine" :xAxis="xAxis2" :yAxis="yAxis2" style="height: 270px;" />-->
+<!-- </div>-->
+<!-- </div>-->
</div>
</template>
diff --git a/src/views/procurementManagement/paymentLedger/index.vue b/src/views/procurementManagement/paymentLedger/index.vue
index 294561d..e34e5e6 100644
--- a/src/views/procurementManagement/paymentLedger/index.vue
+++ b/src/views/procurementManagement/paymentLedger/index.vue
@@ -48,7 +48,7 @@
show-overflow-tooltip
:formatter="formattedNumber"
/>
- <el-table-column
+ <!-- <el-table-column
label="浠樻閲戦(鍏�)"
prop="paymentAmount"
show-overflow-tooltip
@@ -64,7 +64,7 @@
{{ formattedNumber(row, column, row.payableAmount) }}
</el-text>
</template>
- </el-table-column>
+ </el-table-column> -->
</el-table>
<pagination
v-show="total > 0"
@@ -144,31 +144,29 @@
{
label: "閲囪喘鍚堝悓鍙�",
prop: "purchaseContractNumber",
- width: 150,
},
{
label: "鍚堝悓閲戦(鍏�)",
prop: "invoiceAmount",
- width: 200,
formatData: (params) => {
return params ? parseFloat(params).toFixed(2) : 0;
},
},
- {
- label: "浠樻閲戦(鍏�)",
- prop: "paymentAmount",
- width: 200,
- formatData: (params) => {
- return params ? parseFloat(params).toFixed(2) : 0;
- },
- },
- {
- label: "搴斾粯閲戦(鍏�)",
- dataType: "slot",
- width: 200,
- prop: "payableAmount",
- slot: "payableAmountSlot",
- },
+ // {
+ // label: "浠樻閲戦(鍏�)",
+ // prop: "paymentAmount",
+ // width: 200,
+ // formatData: (params) => {
+ // return params ? parseFloat(params).toFixed(2) : 0;
+ // },
+ // },
+ // {
+ // label: "搴斾粯閲戦(鍏�)",
+ // dataType: "slot",
+ // width: 200,
+ // prop: "payableAmount",
+ // slot: "payableAmountSlot",
+ // },
]);
const tableDataSon = ref([]);
const originalTableDataSon = ref([]);
diff --git a/src/views/procurementManagement/procurementLedger/index.vue b/src/views/procurementManagement/procurementLedger/index.vue
index 20c6b1c..1432657 100644
--- a/src/views/procurementManagement/procurementLedger/index.vue
+++ b/src/views/procurementManagement/procurementLedger/index.vue
@@ -26,13 +26,13 @@
prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="椤圭洰鍚嶇О锛�">
+ <!-- <el-form-item label="椤圭洰鍚嶇О锛�">
<el-input v-model="searchForm.projectName"
placeholder="璇疯緭鍏�"
clearable
prefix-icon="Search"
@change="handleQuery" />
- </el-form-item>
+ </el-form-item> -->
<el-form-item label="褰曞叆鏃ユ湡锛�">
<el-date-picker v-model="searchForm.entryDate"
value-format="YYYY-MM-DD"
@@ -120,10 +120,10 @@
prop="supplierName"
width="160"
show-overflow-tooltip />
- <el-table-column label="椤圭洰鍚嶇О"
+ <!-- <el-table-column label="椤圭洰鍚嶇О"
prop="projectName"
width="320"
- show-overflow-tooltip />
+ show-overflow-tooltip /> -->
<el-table-column label="瀹℃壒鐘舵��"
prop="approvalStatus"
width="100"
@@ -159,7 +159,6 @@
show-overflow-tooltip />
<el-table-column label="澶囨敞"
prop="remarks"
- width="200"
show-overflow-tooltip />
<el-table-column fixed="right"
label="鎿嶄綔"
@@ -237,12 +236,24 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="椤圭洰鍚嶇О"
prop="projectName">
<el-input v-model="form.projectName"
placeholder="璇疯緭鍏�"
clearable />
+ </el-form-item>
+ </el-col> -->
+ <el-col :span="12">
+ <el-form-item label="褰曞叆鏃ユ湡锛�"
+ prop="entryDate">
+ <el-date-picker style="width: 100%"
+ v-model="form.entryDate"
+ value-format="YYYY-MM-DD"
+ format="YYYY-MM-DD"
+ type="date"
+ placeholder="璇烽�夋嫨"
+ clearable />
</el-form-item>
</el-col>
</el-row>
@@ -282,18 +293,7 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
- <el-form-item label="褰曞叆鏃ユ湡锛�"
- prop="entryDate">
- <el-date-picker style="width: 100%"
- v-model="form.entryDate"
- value-format="YYYY-MM-DD"
- format="YYYY-MM-DD"
- type="date"
- placeholder="璇烽�夋嫨"
- clearable />
- </el-form-item>
- </el-col>
+
</el-row>
<el-row :gutter="30">
<el-col :span="24">
@@ -380,7 +380,6 @@
</div>
</el-option>
</el-select>
- <!-- 鎸夐挳锛氫笌 Select 楂樺害鍖归厤锛屽幓鎺夊乏渚ц竟妗嗭紝鏃犵紳琛旀帴 -->
<el-button size="small"
style="height: 32px;margin-left: 8px;"
@click="handleButtonClick"
@@ -430,15 +429,6 @@
prop="taxExclusiveTotalPrice"
:formatter="formattedNumber"
width="150" />
- <el-table-column label="鏄惁璐ㄦ"
- prop="isChecked"
- width="150">
- <template #default="scope">
- <el-tag :type="scope.row.isChecked ? 'success' : 'info'">
- {{ scope.row.isChecked ? '鏄�' : '鍚�' }}
- </el-tag>
- </template>
- </el-table-column>
<el-table-column fixed="right"
label="鎿嶄綔"
min-width="60"
@@ -673,19 +663,6 @@
</el-form-item>
</el-col>
</el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="鏄惁璐ㄦ锛�"
- prop="isChecked">
- <el-radio-group v-model="productForm.isChecked">
- <el-radio label="鏄�"
- :value="true" />
- <el-radio label="鍚�"
- :value="false" />
- </el-radio-group>
- </el-form-item>
- </el-col>
- </el-row>
</el-form>
</FormDialog>
<FileListDialog
@@ -912,7 +889,6 @@
supplierId: "",
paymentMethod: "",
executionDate: "",
- isChecked: true,
},
rules: {
purchaseContractNumber: [
@@ -922,7 +898,7 @@
{ required: true, message: "璇烽�夋嫨瀹℃壒浜�", trigger: "change" },
],
projectName: [
- { required: true, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" },
+ { required: false, message: "璇疯緭鍏ラ」鐩悕绉�", trigger: "blur" },
],
supplierId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
entryDate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
@@ -960,7 +936,6 @@
taxExclusiveTotalPrice: "",
invoiceType: "",
warnNum: "",
- isChecked: true,
},
productRules: {
productId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
@@ -970,8 +945,8 @@
taxInclusiveUnitPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
- taxRate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- warnNum: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
+ taxRate: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
+ warnNum: [{ required: false, message: "璇烽�夋嫨", trigger: "change" }],
taxInclusiveTotalPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
@@ -979,7 +954,6 @@
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
invoiceType: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
- isChecked: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
},
});
const { productForm, productRules } = toRefs(productFormData);
@@ -1592,6 +1566,10 @@
const submitProduct = () => {
proxy.$refs["productFormRef"].validate(valid => {
if (valid) {
+ // 濡傛灉閲岄潰鐨勬暟鎹病鏈塼axRate 閭e氨榛樿甯︿笂涓�涓猼axRate 涓�0
+ if (!Object.prototype.hasOwnProperty.call(productForm.value, 'taxRate') || productForm.value.taxRate === null || productForm.value.taxRate === undefined || productForm.value.taxRate === '') {
+ productForm.value.taxRate = 0;
+ }
if (operationType.value === "edit") {
submitProductEdit();
} else {
@@ -1712,14 +1690,7 @@
return `${year}-${month}-${day}`;
}
const mathNum = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
- if (!productForm.value.taxInclusiveUnitPrice) {
- return;
- }
- if (!productForm.value.quantity) {
+ if (!productForm.value.taxInclusiveUnitPrice || !productForm.value.quantity) {
return;
}
// 鍚◣鎬讳环璁$畻
@@ -1728,23 +1699,10 @@
productForm.value.taxInclusiveUnitPrice,
productForm.value.quantity
);
- if (productForm.value.taxRate) {
- // 涓嶅惈绋庢�讳环璁$畻
- productForm.value.taxExclusiveTotalPrice =
- proxy.calculateTaxExclusiveTotalPrice(
- productForm.value.taxInclusiveTotalPrice,
- productForm.value.taxRate
- );
- }
+ // 浼樺寲锛氫娇甯︾◣鍜屼笉甯︾◣浠锋牸涓�鑷�
+ productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
};
const reverseMathNum = field => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
- const taxRate = Number(productForm.value.taxRate);
- if (!taxRate) return;
-
// 纭繚杈撳叆鍊间笉涓鸿礋鏁�
if (
field === "taxInclusiveTotalPrice" ||
@@ -1781,25 +1739,11 @@
productForm.value.quantity = "0";
}
}
- // 鍙嶇畻涓嶅惈绋庢�讳环
- productForm.value.taxExclusiveTotalPrice = (
- Number(productForm.value.taxInclusiveTotalPrice) /
- (1 + taxRate / 100)
- ).toFixed(2);
- // 纭繚缁撴灉涓嶄负璐熸暟
- if (Number(productForm.value.taxExclusiveTotalPrice) < 0) {
- productForm.value.taxExclusiveTotalPrice = "0";
- }
+ // 浼樺寲锛氫娇甯︾◣鍜屼笉甯︾◣浠锋牸涓�鑷�
+ productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
} else if (field === "taxExclusiveTotalPrice") {
- // 鍙嶇畻鍚◣鎬讳环
- productForm.value.taxInclusiveTotalPrice = (
- Number(productForm.value.taxExclusiveTotalPrice) *
- (1 + taxRate / 100)
- ).toFixed(2);
- // 纭繚缁撴灉涓嶄负璐熸暟
- if (Number(productForm.value.taxInclusiveTotalPrice) < 0) {
- productForm.value.taxInclusiveTotalPrice = "0";
- }
+ // 浼樺寲锛氫娇甯︾◣鍜屼笉甯︾◣浠锋牸涓�鑷�
+ productForm.value.taxInclusiveTotalPrice = productForm.value.taxExclusiveTotalPrice;
// 宸茬煡鏁伴噺锛屽弽绠楀惈绋庡崟浠�
if (productForm.value.quantity) {
productForm.value.taxInclusiveUnitPrice = (
diff --git a/src/views/salesManagement/deliveryLedger/index.vue b/src/views/salesManagement/deliveryLedger/index.vue
index 2b1b0b0..7ce4955 100644
--- a/src/views/salesManagement/deliveryLedger/index.vue
+++ b/src/views/salesManagement/deliveryLedger/index.vue
@@ -37,7 +37,6 @@
<el-table-column label="浜у搧鍚嶇О" prop="productName" show-overflow-tooltip />
<el-table-column label="瑙勬牸鍨嬪彿" prop="specificationModel" show-overflow-tooltip />
<el-table-column label="鍙戣揣鏃堕棿" prop="shippingDate" show-overflow-tooltip />
- <el-table-column label="鍙戣揣杞︾墝鍙�" prop="shippingCarNumber" show-overflow-tooltip />
<el-table-column label="蹇�掑叕鍙�" prop="expressCompany" show-overflow-tooltip />
<el-table-column label="蹇�掑崟鍙�" prop="expressNumber" show-overflow-tooltip />
<el-table-column label="瀹℃牳鐘舵��" prop="status" align="center" width="120">
@@ -85,7 +84,6 @@
style="width: 100%"
@change="handleShippingTypeChange"
>
- <el-option label="璐ц溅" value="璐ц溅" />
<el-option label="蹇��" value="蹇��" />
</el-select>
</el-form-item>
@@ -187,7 +185,6 @@
<el-descriptions-item label="鍙戣揣绫诲瀷">{{ detailRow.type || '--' }}</el-descriptions-item>
<el-descriptions-item label="鍙戣揣鏃ユ湡">{{ detailRow.shippingDate || '--' }}</el-descriptions-item>
<el-descriptions-item label="瀹℃牳鐘舵��">{{ getApprovalStatusText(detailRow.status) }}</el-descriptions-item>
- <el-descriptions-item label="鍙戣揣杞︾墝鍙�">{{ detailRow.shippingCarNumber || '--' }}</el-descriptions-item>
<el-descriptions-item label="蹇�掑叕鍙�">{{ detailRow.expressCompany || '--' }}</el-descriptions-item>
<el-descriptions-item label="蹇�掑崟鍙�" :span="2">{{ detailRow.expressNumber || '--' }}</el-descriptions-item>
</el-descriptions>
@@ -290,7 +287,7 @@
customerName: "",
specificationModel: "",
productName: "",
- type: "璐ц溅", // 璐ц溅, 蹇��
+ type: "蹇��", // 璐ц溅, 蹇��
shippingDate: "",
shippingCarNumber: "",
expressCompany: "",
@@ -370,7 +367,7 @@
id: row.id ?? null,
salesContractNo: row.salesContractNo ?? "",
customerName: row.customerName ?? "",
- type: row.type || "璐ц溅",
+ type: row.type || "蹇��",
shippingDate: row.shippingDate || getCurrentDate(),
shippingCarNumber: row.shippingCarNumber ?? "",
expressCompany: row.expressCompany ?? "",
@@ -404,7 +401,7 @@
id: null,
salesContractNo: "",
customerName: "",
- type: "璐ц溅",
+ type: "蹇��",
shippingDate: getCurrentDate(),
shippingCarNumber: "",
expressCompany: "",
diff --git a/src/views/salesManagement/receiptPaymentLedger/index.vue b/src/views/salesManagement/receiptPaymentLedger/index.vue
index 7029cfc..b5b1401 100644
--- a/src/views/salesManagement/receiptPaymentLedger/index.vue
+++ b/src/views/salesManagement/receiptPaymentLedger/index.vue
@@ -38,16 +38,14 @@
label="瀹㈡埛鍚嶇О"
prop="customerName"
show-overflow-tooltip
- width="200"
/>
<el-table-column
label="鍚堝悓閲戦(鍏�)"
prop="invoiceTotal"
show-overflow-tooltip
:formatter="formattedNumber"
- width="200"
/>
- <el-table-column
+ <!-- <el-table-column
label="鍥炴閲戦(鍏�)"
prop="receiptPaymentAmount"
show-overflow-tooltip
@@ -65,7 +63,7 @@
{{ formattedNumber(row, column, row.unReceiptPaymentAmount) }}
</el-text>
</template>
- </el-table-column>
+ </el-table-column> -->
</el-table>
<pagination
v-show="total > 0"
@@ -95,22 +93,19 @@
label="鍙戠敓鏃ユ湡"
prop="receiptPaymentDate"
show-overflow-tooltip
- width="110"
/>
<el-table-column
label="閿�鍞悎鍚屽彿"
prop="salesContractNo"
show-overflow-tooltip
- width="200"
/>
<el-table-column
label="鍚堝悓閲戦(鍏�)"
prop="invoiceTotal"
show-overflow-tooltip
:formatter="formattedNumber"
- width="200"
/>
- <el-table-column
+ <!-- <el-table-column
label="鍥炴閲戦(鍏�)"
prop="receiptPaymentAmount"
show-overflow-tooltip
@@ -128,7 +123,7 @@
{{ formattedNumber(row, column, row.unReceiptPaymentAmount) }}
</el-text>
</template>
- </el-table-column>
+ </el-table-column> -->
</el-table>
</div>
</div>
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 9d50d15..968ed7a 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -10,10 +10,6 @@
<el-input v-model="searchForm.salesContractNo" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
@change="handleQuery" />
</el-form-item>
- <el-form-item label="椤圭洰鍚嶇О锛�">
- <el-input v-model="searchForm.projectName" placeholder="璇疯緭鍏�" clearable prefix-icon="Search"
- @change="handleQuery" />
- </el-form-item>
<el-form-item label="褰曞叆鏃ユ湡锛�">
<el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
@@ -64,28 +60,8 @@
</el-tag>
</template>
</el-table-column>
- <el-table-column label="蹇�掑叕鍙�" prop="expressCompany" show-overflow-tooltip />
- <el-table-column label="蹇�掑崟鍙�" prop="expressNumber" show-overflow-tooltip />
- <el-table-column label="鍙戣揣杞︾墝" minWidth="100px" align="center">
- <template #default="scope">
- <div>
- <el-tag type="success" v-if="scope.row.shippingCarNumber">{{ scope.row.shippingCarNumber }}</el-tag>
- <el-tag v-else type="info">-</el-tag>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="鍙戣揣鏃ユ湡"
- minWidth="100px"
- align="center">
- <template #default="scope">
- <div>
- <div v-if="scope.row.shippingDate">{{ scope.row.shippingDate }}</div>
- <el-tag v-else
- type="info">-</el-tag>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="鏁伴噺" prop="quantity" />
+ <el-table-column label="鏁伴噺" prop ="quantity" />
+ <el-table-column label="宸插彂璐ф暟閲�" prop="partSendAmount" />
<el-table-column label="绋庣巼(%)" prop="taxRate" />
<el-table-column label="鍚◣鍗曚环(鍏�)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
<el-table-column label="鍚◣鎬讳环(鍏�)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
@@ -101,6 +77,13 @@
@click="openDeliveryForm(scope.row)">
鍙戣揣
</el-button>
+ <el-button
+ link
+ type="primary"
+ size="small"
+ @click="openDeliveryDetail(scope.row)">
+ 璇︽儏
+ </el-button>
</template>
</el-table-column>
</el-table>
@@ -110,8 +93,7 @@
<el-table-column label="閿�鍞悎鍚屽彿" prop="salesContractNo" width="180" show-overflow-tooltip />
<el-table-column label="瀹㈡埛鍚嶇О" prop="customerName" width="300" show-overflow-tooltip />
<el-table-column label="涓氬姟鍛�" prop="salesman" width="100" show-overflow-tooltip />
- <el-table-column label="椤圭洰鍚嶇О" prop="projectName" width="180" show-overflow-tooltip />
- <el-table-column label="浠樻鏂瑰紡" prop="paymentMethod" show-overflow-tooltip />
+
<el-table-column label="鍚堝悓閲戦(鍏�)" prop="contractAmount" width="220" show-overflow-tooltip
:formatter="formattedNumber" />
<el-table-column label="褰曞叆浜�" prop="entryPersonName" width="100" show-overflow-tooltip />
@@ -169,25 +151,19 @@
</el-select>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="椤圭洰鍚嶇О锛�" prop="projectName">
<el-input v-model="form.projectName" placeholder="璇疯緭鍏�" clearable :disabled="operationType === 'view'" />
</el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
+ </el-col> -->
<el-col :span="12">
<el-form-item label="绛捐鏃ユ湡锛�" prop="executionDate">
<el-date-picker style="width: 100%" v-model="form.executionDate" value-format="YYYY-MM-DD"
format="YYYY-MM-DD" type="date" placeholder="璇烽�夋嫨" clearable :disabled="operationType === 'view'" />
</el-form-item>
</el-col>
- <el-col :span="12">
- <el-form-item label="浠樻鏂瑰紡">
- <el-input v-model="form.paymentMethod" placeholder="璇疯緭鍏�" clearable :disabled="operationType === 'view'" />
- </el-form-item>
- </el-col>
- </el-row>
+ </el-row>
+
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="褰曞叆浜猴細" prop="entryPerson">
@@ -208,14 +184,14 @@
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item label="浜よ揣鏃ユ湡锛�" prop="entryDate">
+ <el-form-item label="浜よ揣鏃ユ湡锛�" prop="deliveryDate">
<el-date-picker style="width: 100%" v-model="form.deliveryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD"
type="date" placeholder="璇烽�夋嫨" clearable />
</el-form-item>
</el-col>
</el-row>
<el-row>
- <el-form-item label="浜у搧淇℃伅锛�" prop="entryDate">
+ <el-form-item label="浜у搧淇℃伅锛�">
<el-button v-if="operationType !== 'view'" type="primary" @click="openProductForm('add')">娣诲姞</el-button>
<el-button v-if="operationType !== 'view'" plain type="danger" @click="deleteProduct" >鍒犻櫎</el-button>
</el-form-item>
@@ -386,7 +362,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
- <el-form-item label="鏁伴噺锛�" prop="quantity">
+ <el-form-item label="鏁伴噺" prop="quantity">
<el-input-number :step="0.1" :min="0" v-model="productForm.quantity" placeholder="璇疯緭鍏�" clearable
:precision="2"
@change="calculateFromQuantity" style="width: 100%" />
@@ -490,10 +466,6 @@
<span class="label">鍙戣揣鏃ユ湡锛�</span>
<span class="value">{{ formatDate(item.createTime) }}</span>
</div>
- <div>
- <span class="label">鍙戣揣杞︾墝鍙凤細</span>
- <span class="value">{{ item.shippingCarNumber }}</span>
- </div>
</div>
<div class="info-row">
<div>
@@ -583,19 +555,52 @@
>
<el-form :model="deliveryForm" label-width="120px" label-position="top" :rules="deliveryRules" ref="deliveryFormRef">
<el-row :gutter="30">
- <el-col :span="24">
+ <el-col :span="12">
<el-form-item label="鍙戣揣绫诲瀷锛�" prop="type">
<el-select
v-model="deliveryForm.type"
placeholder="璇烽�夋嫨鍙戣揣绫诲瀷"
+ disabled
style="width: 100%"
>
- <el-option label="璐ц溅" value="璐ц溅" />
<el-option label="蹇��" value="蹇��" />
</el-select>
</el-form-item>
</el-col>
+ <el-col :span="12">
+ <el-form-item label="寰呭彂璐ф暟閲忥細">
+ <el-input v-model="deliveryForm.remainAmount" disabled placeholder="璇疯緭鍏ュ緟鍙戣揣鏁伴噺"></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍙戣揣妯″紡锛�" prop="deliveryMode">
+ <el-select
+ v-model="deliveryForm.deliveryMode"
+ placeholder="璇烽�夋嫨鍙戣揣妯″紡"
+ style="width: 100%"
+ @change="onDeliveryModeChange"
+ >
+ <el-option label="鍏ㄩ儴" value="鍏ㄩ儴" />
+ <el-option label="閮ㄥ垎" value="閮ㄥ垎" />
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="鍙戣揣鏁伴噺锛�" prop="partSendAmount">
+ <el-input-number
+ v-model="deliveryForm.partSendAmount"
+ :min="1"
+ :max="deliveryForm.remainAmount"
+ :precision="0"
+ :step="1"
+ :disabled="deliveryForm.deliveryMode === '鍏ㄩ儴'"
+ style="width: 100%"
+ placeholder="璇疯緭鍏ユ湰娆″彂璐ф暟閲�"
+ />
+ </el-form-item>
+ </el-col>
</el-row>
+
<!-- 瀹℃壒浜洪�夋嫨锛堜豢鍗忓悓瀹℃壒閲岀殑瀹℃壒浜鸿妭鐐归�夋嫨锛� -->
<el-row>
@@ -649,6 +654,48 @@
</div>
</template>
</el-dialog>
+
+ <!-- 鍙戣揣璇︽儏寮规 -->
+ <el-dialog
+ v-model="deliveryDetailVisible"
+ title="鍙戣揣璇︽儏"
+ width="80%"
+ :close-on-click-modal="false"
+ @close="closeDeliveryDetail"
+ >
+ <el-table
+ :data="deliveryDetailTableData"
+ border
+ stripe
+ v-loading="deliveryDetailLoading"
+ height="520px"
+ >
+ <el-table-column align="center" label="搴忓彿" type="index" width="60" />
+ <el-table-column prop="salesContractNo" label="閿�鍞鍗�" width="180" show-overflow-tooltip />
+ <el-table-column prop="shippingNo" label="鍙戣揣璁㈠崟鍙�" width="180" show-overflow-tooltip />
+ <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" min-width="200" show-overflow-tooltip />
+ <el-table-column prop="status" label="鍙戣揣鐘舵��" min-width="200" show-overflow-tooltip />
+ <el-table-column prop="productName" label="浜у搧鍚嶇О" min-width="160" show-overflow-tooltip />
+ <el-table-column prop="specificationModel" label="瑙勬牸鍨嬪彿" min-width="160" show-overflow-tooltip />
+ <el-table-column prop="type" label="鍙戣揣绫诲瀷" width="100" show-overflow-tooltip />
+ <el-table-column prop="expressCompany" label="蹇�掑叕鍙�" width="140" show-overflow-tooltip />
+ <el-table-column prop="expressNumber" label="蹇�掑崟鍙�" width="160" show-overflow-tooltip />
+ <el-table-column prop="partSendAmount" label="鏈鍙戣揣鏁伴噺" width="120" align="center" />
+ </el-table>
+ <pagination
+ v-show="deliveryDetailPage.total > 0"
+ :total="deliveryDetailPage.total"
+ layout="total, sizes, prev, pager, next, jumper"
+ :page="deliveryDetailPage.current"
+ :limit="deliveryDetailPage.size"
+ @pagination="deliveryDetailPaginationChange"
+ />
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button @click="closeDeliveryDetail">鍏抽棴</el-button>
+ </div>
+ </template>
+ </el-dialog>
</div>
</template>
@@ -656,7 +703,7 @@
import { getToken } from "@/utils/auth";
import pagination from "@/components/PIMTable/Pagination.vue";
import {onMounted, ref, getCurrentInstance} from "vue";
-import { addShippingInfo } from "@/api/salesManagement/deliveryLedger.js";
+import { addShippingInfo, deliveryLedgerListPage } from "@/api/salesManagement/deliveryLedger.js";
import { ElMessageBox, ElMessage } from "element-plus";
import { UploadFilled, Download } from "@element-plus/icons-vue";
import useUserStore from "@/store/modules/user";
@@ -758,7 +805,6 @@
taxInclusiveUnitPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
- taxRate: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
taxInclusiveTotalPrice: [
{ required: true, message: "璇疯緭鍏�", trigger: "blur" },
],
@@ -799,18 +845,100 @@
// 鍙戣揣鐩稿叧
const deliveryFormVisible = ref(false);
+const deliveryDetailVisible = ref(false);
+const deliveryDetailLoading = ref(false);
+const deliveryDetailTableData = ref([]);
+const deliveryDetailSalesLedgerId = ref(null);
+const deliveryDetailPage = reactive({
+ current: 1,
+ size: 10,
+ total: 0,
+});
const currentDeliveryRow = ref(null);
const deliveryFormData = reactive({
deliveryForm: {
- type: "璐ц溅", // 璐ц溅, 蹇��
+ type: "蹇��", // 璐ц溅, 蹇��
+ remainAmount: 0,
+ deliveryMode: "鍏ㄩ儴", // 鍏ㄩ儴 | 閮ㄥ垎
+ partSendAmount: 0,
},
deliveryRules: {
type: [
{ required: true, message: "璇烽�夋嫨鍙戣揣绫诲瀷", trigger: "change" }
+ ],
+ deliveryMode: [
+ { required: true, message: "璇烽�夋嫨鍙戣揣妯″紡", trigger: "change" }
+ ],
+ partSendAmount: [
+ {
+ validator: (rule, value, callback) => {
+ if (deliveryFormData.deliveryForm.deliveryMode !== "閮ㄥ垎") {
+ return callback();
+ }
+ const max = Number(deliveryFormData.deliveryForm.remainAmount) || 0;
+ const v = Number(value);
+ if (!v || v <= 0) {
+ return callback(new Error("璇疯緭鍏ュ彂璐ф暟閲�"));
+ }
+ if (v > max) {
+ return callback(new Error(`鍙戣揣鏁伴噺涓嶈兘瓒呰繃寰呭彂璐ф暟閲�(${max})`));
+ }
+ return callback();
+ },
+ trigger: "change",
+ }
]
},
});
const { deliveryForm, deliveryRules } = toRefs(deliveryFormData);
+
+const onDeliveryModeChange = (val) => {
+ const remain = Number(deliveryForm.value.remainAmount) || 0;
+ if (val === "鍏ㄩ儴") {
+ deliveryForm.value.partSendAmount = remain;
+ } else {
+ let v = Number(deliveryForm.value.partSendAmount) || 0;
+ if (v <= 0 || v > remain) {
+ deliveryForm.value.partSendAmount = remain > 0 ? Math.min(1, remain) : 0;
+ }
+ }
+};
+
+const getDeliveryDetailList = () => {
+ if (!deliveryDetailSalesLedgerId.value) return;
+ deliveryDetailLoading.value = true;
+ return deliveryLedgerListPage({
+ salesLedgerId: deliveryDetailSalesLedgerId.value,
+ current: deliveryDetailPage.current,
+ size: deliveryDetailPage.size,
+ }).then((res) => {
+ deliveryDetailTableData.value = res?.data?.records || [];
+ deliveryDetailPage.total = res?.data?.total || 0;
+ }).finally(() => {
+ deliveryDetailLoading.value = false;
+ });
+};
+
+const deliveryDetailPaginationChange = (obj) => {
+ deliveryDetailPage.current = obj.page;
+ deliveryDetailPage.size = obj.limit;
+ getDeliveryDetailList();
+};
+
+const openDeliveryDetail = (row) => {
+ deliveryDetailSalesLedgerId.value = row?.salesLedgerId ?? null;
+ deliveryDetailPage.current = 1;
+ deliveryDetailVisible.value = true;
+ getDeliveryDetailList();
+};
+
+const closeDeliveryDetail = () => {
+ deliveryDetailVisible.value = false;
+ deliveryDetailTableData.value = [];
+ deliveryDetailSalesLedgerId.value = null;
+ deliveryDetailPage.current = 1;
+ deliveryDetailPage.total = 0;
+};
// 鍙戣揣瀹℃壒浜鸿妭鐐癸紙浠垮崗鍚屽鎵� infoFormDia.vue锛�
const approverNodes = ref([{ id: 1, userId: null }]);
@@ -1295,10 +1423,15 @@
const submitProduct = () => {
proxy.$refs["productFormRef"].validate((valid) => {
if (valid) {
+ // 濡傛灉閲岄潰鐨勬暟鎹病鏈塼axRate 閭e氨榛樿甯︿笂涓�涓猼axRate 涓虹┖
+ if (!Object.prototype.hasOwnProperty.call(productForm.value, 'taxRate') || productForm.value.taxRate === null || productForm.value.taxRate === undefined) {
+ productForm.value.taxRate = 0;
+ }
if (operationType.value === "edit") {
submitProductEdit();
} else {
if(productOperationType.value === "add"){
+
productData.value.push({ ...productForm.value });
}else{
productData.value[productIndex.value] = { ...productForm.value }
@@ -1872,13 +2005,15 @@
// 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
productForm.value.taxInclusiveUnitPrice = (totalPrice / quantity).toFixed(2);
- // 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
+ // 鏈夌◣鐜囧垯璁$畻涓嶅惈绋庢�讳环锛屽惁鍒欎笉鍚◣鎬讳环 = 鍚◣鎬讳环
if (productForm.value.taxRate) {
productForm.value.taxExclusiveTotalPrice =
proxy.calculateTaxExclusiveTotalPrice(
totalPrice,
productForm.value.taxRate
);
+ } else {
+ productForm.value.taxExclusiveTotalPrice = totalPrice.toFixed(2);
}
isCalculating.value = false;
@@ -1886,39 +2021,34 @@
// 鏍规嵁涓嶅惈绋庢�讳环璁$畻鍚◣鍗曚环鍜屾暟閲�
const calculateFromExclusiveTotalPrice = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
if (isCalculating.value) return;
const exclusiveTotalPrice = parseFloat(productForm.value.taxExclusiveTotalPrice);
const quantity = parseFloat(productForm.value.quantity);
- const taxRate = parseFloat(productForm.value.taxRate);
- if (!exclusiveTotalPrice || !quantity || quantity <= 0 || !taxRate) {
+ if (!exclusiveTotalPrice || !quantity || quantity <= 0) {
return;
}
isCalculating.value = true;
- // 鍏堣绠楀惈绋庢�讳环 = 涓嶅惈绋庢�讳环 / (1 - 绋庣巼/100)
- const taxRateDecimal = taxRate / 100;
- const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal);
- productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2);
-
- // 璁$畻鍚◣鍗曚环 = 鍚◣鎬讳环 / 鏁伴噺
- productForm.value.taxInclusiveUnitPrice = (inclusiveTotalPrice / quantity).toFixed(2);
+ if (productForm.value.taxRate) {
+ // 鏈夌◣鐜囷細鍚◣鎬讳环 = 涓嶅惈绋庢�讳环 / (1 - 绋庣巼/100)
+ const taxRateDecimal = parseFloat(productForm.value.taxRate) / 100;
+ const inclusiveTotalPrice = exclusiveTotalPrice / (1 - taxRateDecimal);
+ productForm.value.taxInclusiveTotalPrice = inclusiveTotalPrice.toFixed(2);
+ productForm.value.taxInclusiveUnitPrice = (inclusiveTotalPrice / quantity).toFixed(2);
+ } else {
+ // 鏃犵◣鐜囷細鍚◣鎬讳环 = 涓嶅惈绋庢�讳环
+ productForm.value.taxInclusiveTotalPrice = exclusiveTotalPrice.toFixed(2);
+ productForm.value.taxInclusiveUnitPrice = (exclusiveTotalPrice / quantity).toFixed(2);
+ }
isCalculating.value = false;
};
// 鏍规嵁鏁伴噺鍙樺寲璁$畻鎬讳环
const calculateFromQuantity = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
if (isCalculating.value) return;
const quantity = parseFloat(productForm.value.quantity);
@@ -1933,13 +2063,15 @@
// 璁$畻鍚◣鎬讳环
productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
- // 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
+ // 鏈夌◣鐜囧垯璁$畻涓嶅惈绋庢�讳环锛屽惁鍒欎笉鍚◣鎬讳环 = 鍚◣鎬讳环
if (productForm.value.taxRate) {
productForm.value.taxExclusiveTotalPrice =
proxy.calculateTaxExclusiveTotalPrice(
productForm.value.taxInclusiveTotalPrice,
productForm.value.taxRate
);
+ } else {
+ productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
}
isCalculating.value = false;
@@ -1947,10 +2079,6 @@
// 鏍规嵁鍚◣鍗曚环鍙樺寲璁$畻鎬讳环
const calculateFromUnitPrice = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
if (isCalculating.value) return;
const quantity = parseFloat(productForm.value.quantity);
@@ -1965,13 +2093,15 @@
// 璁$畻鍚◣鎬讳环
productForm.value.taxInclusiveTotalPrice = (unitPrice * quantity).toFixed(2);
- // 濡傛灉鏈夌◣鐜囷紝璁$畻涓嶅惈绋庢�讳环
+ // 鏈夌◣鐜囧垯璁$畻涓嶅惈绋庢�讳环锛屽惁鍒欎笉鍚◣鎬讳环 = 鍚◣鎬讳环
if (productForm.value.taxRate) {
productForm.value.taxExclusiveTotalPrice =
proxy.calculateTaxExclusiveTotalPrice(
productForm.value.taxInclusiveTotalPrice,
productForm.value.taxRate
);
+ } else {
+ productForm.value.taxExclusiveTotalPrice = productForm.value.taxInclusiveTotalPrice;
}
isCalculating.value = false;
@@ -1979,27 +2109,27 @@
// 鏍规嵁绋庣巼鍙樺寲璁$畻涓嶅惈绋庢�讳环
const calculateFromTaxRate = () => {
- if (!productForm.value.taxRate) {
- proxy.$modal.msgWarning("璇峰厛閫夋嫨绋庣巼");
- return;
- }
if (isCalculating.value) return;
const inclusiveTotalPrice = parseFloat(productForm.value.taxInclusiveTotalPrice);
- const taxRate = parseFloat(productForm.value.taxRate);
- if (!inclusiveTotalPrice || !taxRate) {
+ if (!inclusiveTotalPrice) {
return;
}
isCalculating.value = true;
- // 璁$畻涓嶅惈绋庢�讳环
- productForm.value.taxExclusiveTotalPrice =
- proxy.calculateTaxExclusiveTotalPrice(
- inclusiveTotalPrice,
- taxRate
- );
+ if (productForm.value.taxRate) {
+ // 鏈夌◣鐜囷細閲嶆柊璁$畻涓嶅惈绋庢�讳环
+ productForm.value.taxExclusiveTotalPrice =
+ proxy.calculateTaxExclusiveTotalPrice(
+ inclusiveTotalPrice,
+ parseFloat(productForm.value.taxRate)
+ );
+ } else {
+ // 鏃犵◣鐜囷細涓嶅惈绋庢�讳环 = 鍚◣鎬讳环
+ productForm.value.taxExclusiveTotalPrice = inclusiveTotalPrice.toFixed(2);
+ }
isCalculating.value = false;
};
@@ -2065,6 +2195,12 @@
return typeTextMap[statusStr] || 'info';
};
+const getRemainAmount = (row) => {
+ const total = Number(row?.quantity || 0);
+ const shipped = Number(row?.partSendAmount || 0);
+ return Math.max(0, total - shipped);
+};
+
/**
* 鍒ゆ柇鏄惁鍙互鍙戣揣
* 鍙湁鍦ㄤ骇鍝佺姸鎬佹槸鍏呰冻锛屽彂璐х姸鎬佹槸寰呭彂璐у拰瀹℃牳鎷掔粷鐨勬椂鍊欐墠鍙互鍙戣揣
@@ -2075,18 +2211,13 @@
if (row.approveStatus !== 1) {
return false;
}
-
- // 鑾峰彇鍙戣揣鐘舵��
- const shippingStatus = row.shippingStatus;
-
- // 濡傛灉宸插彂璐э紙鏈夊彂璐ф棩鏈熸垨杞︾墝鍙凤級锛屼笉鑳藉啀娆″彂璐�
- if (row.shippingDate || row.shippingCarNumber) {
+
+ if (getRemainAmount(row) <= 0) {
return false;
}
-
- // 鍙戣揣鐘舵�佸繀椤绘槸"寰呭彂璐�"鎴�"瀹℃牳鎷掔粷"
- const statusStr = shippingStatus ? String(shippingStatus).trim() : '';
- return statusStr === '寰呭彂璐�' || statusStr === '瀹℃牳鎷掔粷';
+
+
+ return true;
};
/**
@@ -2104,6 +2235,7 @@
});
}
+
// 鎵撳紑鍙戣揣寮规
const openDeliveryForm = (row) => {
// 妫�鏌ユ槸鍚﹀彲浠ュ彂璐�
@@ -2111,10 +2243,15 @@
proxy.$modal.msgWarning("鍙湁鍦ㄤ骇鍝佺姸鎬佹槸鍏呰冻锛屽彂璐х姸鎬佹槸寰呭彂璐ф垨瀹℃牳鎷掔粷鐨勬椂鍊欐墠鍙互鍙戣揣");
return;
}
-
currentDeliveryRow.value = row;
+ const total = Number(row.quantity || 0);
+ const shipped = Number(row.partSendAmount || 0);
+ const remain = Math.max(0, total - shipped);
deliveryForm.value = {
- type: "璐ц溅",
+ type: "蹇��",
+ remainAmount: remain,
+ deliveryMode: "鍏ㄩ儴",
+ partSendAmount: remain,
};
// 閲嶇疆瀹℃壒浜鸿妭鐐癸紙榛樿涓�涓┖鑺傜偣锛�
approverNodes.value = [{ id: 1, userId: null }];
@@ -2133,6 +2270,24 @@
return;
}
const approveUserIds = approverNodes.value.map(node => node.userId).join(",");
+ const remain = Number(deliveryForm.value.remainAmount) || 0;
+ if (remain <= 0) {
+ proxy.$modal.msgWarning("寰呭彂璐ф暟閲忎负0锛屾棤娉曞彂璐�");
+ return;
+ }
+ const isAllSend = deliveryForm.value.deliveryMode === "鍏ㄩ儴" ? 1 : 0;
+ let quantityToSend = remain;
+ if (isAllSend === 0) {
+ quantityToSend = Number(deliveryForm.value.partSendAmount) || 0;
+ if (quantityToSend <= 0) {
+ proxy.$modal.msgWarning("璇疯緭鍏ュ彂璐ф暟閲�");
+ return;
+ }
+ if (quantityToSend > remain) {
+ proxy.$modal.msgWarning(`鍙戣揣鏁伴噺涓嶈兘瓒呰繃寰呭彂璐ф暟閲�(${remain})`);
+ return;
+ }
+ }
// 淇濆瓨褰撳墠灞曞紑鐨勮ID锛屼互渚垮彂璐у悗閲嶆柊鍔犺浇瀛愯〃鏍兼暟鎹�
const currentExpandedKeys = [...expandedRowKeys.value];
const salesLedgerId = currentDeliveryRow.value.salesLedgerId;
@@ -2140,6 +2295,8 @@
salesLedgerId: salesLedgerId,
salesLedgerProductId: currentDeliveryRow.value.id,
type: deliveryForm.value.type,
+ isAllSend,
+ partSendAmount: quantityToSend,
approveUserIds,
})
.then(() => {
--
Gitblit v1.9.3