From a75b06fc740ea99bf8ab68723b87a25466394091 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=8E=8B=E5=B8=85?= <3115919733@qq.com>
Date: Mon, 9 Jun 2025 14:18:47 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E8=B4=A7=E9=9C=80=E6=B1=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../iogisticsprice/TmsIogisticsPriceList.vue | 12 +-
.../vehiclepallet/VehiclePalletList.vue | 2 +-
.../deliveryplan/modules/DeliveryPlanForm.vue | 32 +++-
.../deliverydemand/DeliveryDemandList.vue | 55 ++++---
.../modules/DeliveryDemandForm.vue | 151 ++++++++++++++----
5 files changed, 183 insertions(+), 69 deletions(-)
diff --git a/ant-design-vue-jeecg/src/views/tms/basicdata/iogisticsprice/TmsIogisticsPriceList.vue b/ant-design-vue-jeecg/src/views/tms/basicdata/iogisticsprice/TmsIogisticsPriceList.vue
index f88cd2d..b33a4ff 100644
--- a/ant-design-vue-jeecg/src/views/tms/basicdata/iogisticsprice/TmsIogisticsPriceList.vue
+++ b/ant-design-vue-jeecg/src/views/tms/basicdata/iogisticsprice/TmsIogisticsPriceList.vue
@@ -207,7 +207,7 @@
dataIndex: 'kilometers'
},
{
- title:'车型',
+ title:'运输类型',
align:"center",
dataIndex: 'carType'
},
@@ -254,16 +254,18 @@
{
title:'生效日期',
align:"center",
- dataIndex: 'effectiveDate',
- customRender:function (text) {
- return !text?"":(text.length>10?text.substr(0,10):text)
- }
+ dataIndex: 'effectiveDate'
},
{
title:'时效',
align:"center",
dataIndex: 'validity'
},
+ {
+ title:'失效日期',
+ align:"center",
+ dataIndex: 'failureTime'
+ },
{
title: '操作',
dataIndex: 'action',
diff --git a/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/VehiclePalletList.vue b/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/VehiclePalletList.vue
index 0696405..a85e3dc 100644
--- a/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/VehiclePalletList.vue
+++ b/ant-design-vue-jeecg/src/views/tms/basicdata/vehiclepallet/VehiclePalletList.vue
@@ -143,7 +143,7 @@
}
},
{
- title:'车型',
+ title:'运输类型',
align:"center",
dataIndex: 'carType'
},
diff --git a/ant-design-vue-jeecg/src/views/tms/carinout/deliveryplan/modules/DeliveryPlanForm.vue b/ant-design-vue-jeecg/src/views/tms/carinout/deliveryplan/modules/DeliveryPlanForm.vue
index fd1398d..b906304 100644
--- a/ant-design-vue-jeecg/src/views/tms/carinout/deliveryplan/modules/DeliveryPlanForm.vue
+++ b/ant-design-vue-jeecg/src/views/tms/carinout/deliveryplan/modules/DeliveryPlanForm.vue
@@ -56,7 +56,12 @@
-
+
+
+
+ {{item}}
+
@@ -18,10 +17,10 @@
-
+ -->
-
+
@@ -29,20 +28,20 @@
-
+
-
+
-
+
@@ -51,35 +50,69 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
{{item}}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ |
+ 发货单 |
+ 发货仓库 |
+ 料号 |
+ 品名 |
+ 规格 |
+ 数量 |
+ 单位 |
+
+
+
+
+
+ {{ item.invoice }} |
+ {{ item.pickUpHub }} |
+ {{ item.pn }} |
+ {{ item.productName }} |
+ {{ item.specName }} |
+ |
+ {{ item.unit }} |
+
+
+
+
@@ -88,6 +121,7 @@
import { httpAction, getAction,postAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import { off } from 'codemirror'
+import { h } from 'vue'
import { min } from 'xe-utils/methods'
export default {
@@ -109,8 +143,11 @@ import { min } from 'xe-utils/methods'
pnSpecList:[],
pnList:[],
invoiceList:[],
+ deliveryDetailList:[],
model:{
- },
+ shipNumber: 0,
+ palletsNum: 0
+ },
labelCol: {
xs: { span: 24 },
sm: { span: 6 },
@@ -125,6 +162,7 @@ import { min } from 'xe-utils/methods'
pn :[{required: true, message: '请输入料号!'}],
shipNumber :[{required: true, message: '请输入发货数量!'}],
shipDate :[{required: true, message: '请选择发货日期!'}],
+ deliveryDate :[{required: true, message: '请选择到货日期!'}],
deliveryAddress :[{required: true, message: '请选择送货地点!'}],
pickUpHub :[{required: true, message: '请选择取货仓库!'}],
spec: [{required: true, message: '请输入规格!'}],
@@ -137,7 +175,9 @@ import { min } from 'xe-utils/methods'
getPalletsNum: "/deliverydemand/deliveryDemand/getPalletsNum",
getCity: "/logisticsroute/logisticsRoute/getCity",
getPnSpecList: "/vehicleproduct/tmsVehicleProduct/getPnSpecList",
- getShip: "/deliverydemand/deliveryDemand/getShip"
+ getShip: "/deliverydemand/deliveryDemand/getShip",
+ getShipDetail: "/deliverydemand/deliveryDemand/getShipDetail",
+ queryByDeliveryDemandId: "/deliverydemanddetail/deliveryDemandDetail/queryByDeliveryDemandId"
}
}
},
@@ -154,12 +194,12 @@ import { min } from 'xe-utils/methods'
this.getShip();
},
methods: {
+ // 计算托盘数
changeGetpalletsNum() {
- if (!this.model.pn || !this.model.spec || !this.model.shipNumber) {
- return
- }
- console.log("22222");
- postAction(this.url.getPalletsNum, this.model).then(res => {
+ // if (!this.model.pn || !this.model.spec || !this.model.shipNumber) {
+ // return
+ // }
+ postAction(this.url.getPalletsNum, this.deliveryDetailList).then(res => {
if (res.success) {
this.model.palletsNum = res.result
}
@@ -171,6 +211,7 @@ import { min } from 'xe-utils/methods'
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
+ this.queryByDeliveryDemandId();
},
submitForm () {
const that = this;
@@ -187,6 +228,7 @@ import { min } from 'xe-utils/methods'
httpurl+=this.url.edit;
method = 'put';
}
+ this.model.deliveryDemandDetailList = this.deliveryDetailList
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
@@ -243,7 +285,46 @@ import { min } from 'xe-utils/methods'
this.invoiceList = res.result
}
})
+ },
+ addLine(){
+ this.deliveryDetailList.push({selected: false,shipNumber: 0})
+ },
+ batchDel(){
+ this.deliveryDetailList = this.deliveryDetailList.filter(x => x.selected===false)
+ this.changeQty()
+ },
+ // 计算发货数量
+ changeQty(){
+ this.model.shipNumber = parseFloat(this.deliveryDetailList.reduce((sum, current) => sum + current.shipNumber, 0).toFixed(4));
+ console.log(this.model.shipNumber);
+ console.log(typeof this.model.shipNumber);
+
+ this.changeGetpalletsNum()
+ },
+ changeInvoice(value){
+ console.log(value);
+ let hasEven = this.deliveryDetailList.some((item) => {
+ return item.invoice == value;
+ });
+ if(hasEven){
+ this.$message.warning("列表中已存在"+value);
+ return;
+ }
+ getAction(this.url.getShipDetail, {invoice: value}).then(res => {
+ if(res.success){
+ this.deliveryDetailList.push(...res.result)
+ this.changeQty()
+ }
+ })
+ },
+ queryByDeliveryDemandId(){
+ getAction(this.url.queryByDeliveryDemandId, {deliveryDemandId: this.model.id}).then(res => {
+ if(res.success){
+ this.deliveryDetailList = res.result
+ }
+ })
}
+
}
}
\ No newline at end of file