From 1d8a79d7a7e4902984b110f0cee5083b6f88557a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 21 九月 2026 10:55:13 +0800
Subject: [PATCH] 新疆-融邦 1.销售订单根据类别修改展示字段 2.销售台账新增时选择完客户提示一下当前客户的信托基金额度
---
src/views/inventoryManagement/stockManagement/OilStockInDialog.vue | 116 ++++++++++++++++++++++++++++++++------
src/views/salesManagement/salesLedger/index.vue | 28 ++++++++
2 files changed, 122 insertions(+), 22 deletions(-)
diff --git a/src/views/inventoryManagement/stockManagement/OilStockInDialog.vue b/src/views/inventoryManagement/stockManagement/OilStockInDialog.vue
index 722db7e..0a40459 100644
--- a/src/views/inventoryManagement/stockManagement/OilStockInDialog.vue
+++ b/src/views/inventoryManagement/stockManagement/OilStockInDialog.vue
@@ -248,6 +248,43 @@
<div class="form-section-title">鐗╂祦淇℃伅</div>
<el-row :gutter="30">
<el-col :span="12">
+ <el-form-item label="杞﹁締"
+ prop="vehicleId"
+ :rules="[{ required: true, message: '璇烽�夋嫨杞﹁締', trigger: 'change' }]">
+ <el-select v-model="formState.vehicleId"
+ placeholder="璇烽�夋嫨"
+ clearable
+ filterable
+ popper-class="vehicle-select-popper"
+ style="width: 100%"
+ @change="vehicleChange">
+ <el-option v-for="item in vehicleList"
+ :key="item.id"
+ :label="item.plateNumber"
+ :value="item.id">
+ <div class="vehicle-option">
+ <div class="vehicle-option-title">{{ item.plateNumber }}</div>
+ <div class="vehicle-option-line">榛樿鍙告満锛歿{ item.driverName || '--' }}</div>
+ <div class="vehicle-option-line">鍙告満鐢佃瘽锛歿{ item.driverPhone || '--' }}</div>
+ <div class="vehicle-option-line">鏍稿畾杞介噸(鍚�)锛歿{ item.loadCapacity ?? '--' }}</div>
+ </div>
+ </el-option>
+ </el-select>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="杞︽寕鐗屽彿"
+ prop="trailerPlateNo"
+ :rules="[{ required: true, message: '璇疯緭鍏ヨ溅鎸傜墝鍙�', trigger: 'blur' }]">
+ <el-input v-model="formState.trailerPlateNo"
+ :readonly="!!formState.vehicleId"
+ placeholder="璇疯緭鍏�"
+ clearable />
+ </el-form-item>
+ </el-col>
+ </el-row>
+ <el-row :gutter="30">
+ <el-col :span="12">
<el-form-item label="鍙告満濮撳悕"
prop="driverName"
:rules="[{ required: true, message: '璇疯緭鍏ュ徃鏈哄鍚�', trigger: 'blur' }]">
@@ -292,26 +329,6 @@
placeholder="璇疯緭鍏�11浣嶆暟瀛�"
maxlength="11"
@input="phoneInput('escortPhone')"
- clearable />
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="30">
- <el-col :span="12">
- <el-form-item label="杞︾墝鍙�"
- prop="truckPlateNo"
- :rules="[{ required: true, message: '璇疯緭鍏ヨ溅鐗屽彿', trigger: 'blur' }]">
- <el-input v-model="formState.truckPlateNo"
- placeholder="璇疯緭鍏�"
- clearable />
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="杞︽寕鐗屽彿"
- prop="trailerPlateNo"
- :rules="[{ required: true, message: '璇疯緭鍏ヨ溅鎸傜墝鍙�', trigger: 'blur' }]">
- <el-input v-model="formState.trailerPlateNo"
- placeholder="璇疯緭鍏�"
clearable />
</el-form-item>
</el-col>
@@ -448,6 +465,7 @@
import { addStockInRecordOnly } from "@/api/inventoryManagement/stockInventory.js";
import { allOilDepot } from "@/api/basicData/oilDepot.js";
import { allTankInfo } from "@/api/basicData/tankInfo.js";
+ import { allVehicle } from "@/api/basicData/vehicle.js";
import { listCustomer } from "@/api/basicData/customer.js";
const props = defineProps({
@@ -474,6 +492,7 @@
customerId: undefined,
contactPerson: "",
contactPhone: "",
+ vehicleId: undefined,
driverName: "",
driverPhone: "",
escortName: "",
@@ -494,6 +513,7 @@
const oilDepotList = ref([]);
const tankList = ref([]);
const customerList = ref([]);
+ const vehicleList = ref([]);
const isShow = computed({
get() {
return props.visible;
@@ -559,6 +579,21 @@
}
};
+ // 杞﹁締閫夋嫨鏀瑰彉锛氳溅鐗屽彿銆佽溅鎸傜墝鍙蜂笌鍙告満淇℃伅鐢辫溅杈嗕富鏁版嵁甯﹀嚭锛屽徃鏈哄彲鎵嬪姩瑕嗙洊
+ const vehicleChange = id => {
+ const vehicle = vehicleList.value.find(item => item.id === id);
+ if (vehicle) {
+ formState.value.truckPlateNo = vehicle.plateNumber || "";
+ // 杞︽寕鐗屽彿涓庤溅鐗屽彿鏄悓涓�涓墝锛岄�変簡杞﹁締灏卞甫鍑哄苟缃负鍙锛岄伩鍏嶆墜濉嚭涓や釜涓嶄竴鑷寸殑鍊�
+ formState.value.trailerPlateNo = vehicle.plateNumber || "";
+ formState.value.driverName = vehicle.driverName || "";
+ formState.value.driverPhone = vehicle.driverPhone || "";
+ } else {
+ formState.value.truckPlateNo = "";
+ formState.value.trailerPlateNo = "";
+ }
+ };
+
// 浜у搧閫夋嫨澶勭悊
const handleProductSelect = async products => {
if (products && products.length > 0) {
@@ -611,6 +646,9 @@
listCustomer({ current: 1, size: 1000, type: 0 }).then(res => {
customerList.value = res?.data?.records || [];
});
+ allVehicle().then(res => {
+ vehicleList.value = res?.data || [];
+ });
});
</script>
@@ -657,6 +695,24 @@
}
.tank-option-line {
+ font-size: 12px;
+ color: #909399;
+ line-height: 1.8;
+ }
+ }
+
+ // 杞﹁締涓嬫媺閫夐」锛氬皬鍗$墖鏍峰紡
+ .vehicle-option {
+ padding: 8px 10px;
+
+ .vehicle-option-title {
+ font-size: 14px;
+ font-weight: 600;
+ color: #303133;
+ margin-bottom: 4px;
+ }
+
+ .vehicle-option-line {
font-size: 12px;
color: #909399;
line-height: 1.8;
@@ -723,6 +779,26 @@
}
}
+ // 杞﹁締涓嬫媺闈㈡澘锛坆ody 涓嬶紝闇�鍏ㄥ眬鏍峰紡锛�
+ .vehicle-select-popper {
+ .el-select-dropdown__item {
+ height: auto;
+ line-height: normal;
+ padding: 4px 0;
+ }
+
+ .vehicle-option {
+ border: 1px solid #e4e7ed;
+ border-radius: 6px;
+ background-color: #fafbfc;
+
+ &:hover {
+ border-color: #409eff;
+ background-color: #f0f7ff;
+ }
+ }
+ }
+
// 瀹㈡埛鍚嶇О涓嬫媺闈㈡澘锛坆ody 涓嬶紝闇�鍏ㄥ眬鏍峰紡锛�
.customer-select-popper {
.el-select-dropdown__item {
diff --git a/src/views/salesManagement/salesLedger/index.vue b/src/views/salesManagement/salesLedger/index.vue
index 01e853b..1d2ca3e 100644
--- a/src/views/salesManagement/salesLedger/index.vue
+++ b/src/views/salesManagement/salesLedger/index.vue
@@ -284,7 +284,7 @@
show-overflow-tooltip
/>
<el-table-column
- label="浜や粯鏃ユ湡"
+ :label="activeTab === '浠e偍' ? '瀛樺偍鏃ユ湡' : '浜や粯鏃ユ湡'"
prop="deliveryDate"
width="120"
show-overflow-tooltip
@@ -469,6 +469,10 @@
}}
</el-option>
</el-select>
+ <!-- 閫変腑瀹㈡埛鍚庡睍绀哄叾淇℃墭鍩洪噾锛屼究浜庡垽鏂唬鍌ㄥ悎鍚岄噾棰濇槸鍚﹁秴闄� -->
+ <div v-if="customerTrustFundText" class="customer-trust-fund-tip">
+ 璇ュ鎴蜂俊鎵樺熀閲�(鍏�)锛歿{ customerTrustFundText }}
+ </div>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -547,7 +551,10 @@
</el-row>
<el-row :gutter="30">
<el-col :span="12">
- <el-form-item label="浜よ揣鏃ユ湡锛�" prop="entryDate">
+ <el-form-item
+ :label="form.ledgerType === '浠e偍' ? '瀛樺偍鏃ユ湡锛�' : '浜よ揣鏃ユ湡锛�'"
+ prop="entryDate"
+ >
<el-date-picker
style="width: 100%"
v-model="form.deliveryDate"
@@ -1422,6 +1429,13 @@
});
const { form, rules } = toRefs(data);
const { form: searchForm } = useFormData(data.searchForm);
+// 閫変腑瀹㈡埛鐨勪俊鎵樺熀閲戝睍绀哄�硷紙瀹㈡埛鏈淮鎶ゆ椂涓虹┖锛屼笉灞曠ず锛�
+const customerTrustFundText = computed(() => {
+ const fund = selectedCustomerTrustFund.value;
+ if (fund === null || fund === undefined || fund === "") return "";
+ const amount = Number(fund);
+ return Number.isNaN(amount) ? String(fund) : amount.toFixed(2);
+});
// 浠e偍鍚堝悓閲戦瓒呬俊鎵樺熀閲戯紙瀹㈡埛鏈淮鎶や俊鎵樺熀閲戞椂涓嶆彁绀猴級
const isContractOverTrustFund = computed(() => {
const fund = selectedCustomerTrustFund.value;
@@ -2077,6 +2091,8 @@
// 濡傛灉鎵句笉鍒帮紝淇濈暀鍘熷�硷紙鍏佽鐢ㄦ埛鎵嬪姩閫夋嫨/涓嶆墦鏂凡鏈夎緭鍏ワ級
form.value.customerId = form.value.customerId || "";
}
+ // 瀹㈡埛鏄唬鐮佽祴鍊笺�佷笉浼氳Е鍙戜笅鎷夌殑 change锛岃繖閲屾墜鍔ㄥ埛涓�娆′俊鎵樺熀閲戞彁绀�
+ loadCustomerTrustFund();
// 浜у搧淇℃伅鏄犲皠锛氭姤浠� products -> 鍙拌处 productData
const products = Array.isArray(row.products) ? row.products : [];
@@ -3271,6 +3287,14 @@
width: 100%;
}
+/* 閫変腑瀹㈡埛鍚庣殑淇℃墭鍩洪噾鎻愮ず */
+.customer-trust-fund-tip {
+ margin-top: 4px;
+ font-size: 12px;
+ line-height: 1.6;
+ color: #1d6fd8;
+}
+
.ledger-tabs {
margin-bottom: 8px;
}
--
Gitblit v1.9.3