From 84bc1af19f5dded03d1bbdf89be546b35bf115b9 Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期三, 21 一月 2026 15:13:55 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-VUEUI
---
src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue | 138 ++++++++++++++++++++++++++++++++++++++--------
1 files changed, 114 insertions(+), 24 deletions(-)
diff --git a/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue b/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue
index 49f5425..5684ebd 100644
--- a/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue
+++ b/src/views/logistics/transportGPS/Add_Edit_WL_YayBill.vue
@@ -54,7 +54,7 @@
<el-form-item label="濮嬪彂鍦�" prop="HBeginAddrName">
<el-input v-model="form.HBeginAddrName" placeholder="璇疯緭鍏ュ鍙戝湴">
<el-button slot="append" icon="el-icon-search"
- @click="openDataDialog('鏆傛棤')"></el-button>
+ @click="openDataDialog(3, areaType = 'b')"></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -62,7 +62,7 @@
<el-form-item label="鐩殑鍦�" prop="HEndAddrName">
<el-input v-model="form.HEndAddrName" placeholder="璇疯緭鍏ョ洰鐨勫湴">
<el-button slot="append" icon="el-icon-search"
- @click="openDataDialog('鏆傛棤')"></el-button>
+ @click="openDataDialog(3, areaType = 'e')"></el-button>
</el-input>
</el-form-item>
</el-col>
@@ -434,7 +434,9 @@
</el-table-column>
<el-table-column align="center" label="鍣ㄥ叿浠g爜" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.HMouldNumber" placeholder="璇疯緭鍏ュ櫒鍏蜂唬鐮�" />
+ <el-input v-model="scope.row.HMouldNumber" placeholder="璇疯緭鍏ュ櫒鍏蜂唬鐮�"
+ @keyup.native.f7="openDataDialog(8, scope.row)"
+ @dblclick.native="openDataDialog(8, scope.row)" />
</template>
</el-table-column>
<el-table-column align="center" label="鍣ㄥ叿鍚嶇О" width="120">
@@ -476,7 +478,8 @@
<el-table-column align="center" label="鐗╂枡鏁伴噺" width="120">
<template slot-scope="scope">
<el-input-number v-model="scope.row.HQty" :min="0" style="width: 90px;"
- controls-position="right"></el-input-number>
+ controls-position="right"
+ @change="checkTotalQtyExceed(scope.row)"></el-input-number>
</template>
</el-table-column>
<el-table-column align="center" label="浣撶Н" width="120">
@@ -513,11 +516,13 @@
:propsHOrgID="form.HOrgID" v-if="xsSeOutStockBillShow" />
<GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" />
<GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" />
- <GyCartype @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCartypeShow" />
+ <GyCartype @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :volume="form.HCarTypeMaxVolume" v-if="gyCartypeShow" />
<GyCar @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCarShow" />
<GyDriver @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyDriverShow" />
<ContractTransport @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName"
v-if="ContractTransportShow" />
+ <GyMould @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyMouldShow" />
+ <AreaDialog @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :HBeginAddrName="form.HBeginAddrName" :HEndAddrName="form.HEndAddrName" v-if="AreaDialogShow" />
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="deptClickSub">纭� 瀹�</el-button>
<el-button @click="deptClose">鍙� 娑�</el-button>
@@ -545,9 +550,11 @@
import GyCar from "@/views/basic/gyCar/gyCarList.vue"
import GyDriver from "@/views/system/user/GyDriver.vue"
import ContractTransport from "@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue"
+import GyMould from '@/views/scMould/basicModeling/Gy_MouldFileList.vue'
+import AreaDialog from "@/views/component/AreaDialog"
export default {
name: 'SellOutBill',
- components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport },
+ components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport, GyMould, AreaDialog },
props: {
OperationType: { type: Number, },
linterid: { type: Number, },
@@ -588,7 +595,10 @@
gyCarShow: false, //杞﹁締鏁版嵁缁勪欢鏄剧ず鏍囪
gyDriverShow: false, //鍙告満鏁版嵁缁勪欢鏄剧ず鏍囪
ContractTransportShow: false, //鎵胯繍鍚堝悓鏁版嵁缁勪欢鏄剧ず鏍囪
+ gyMouldShow: false, //瀹瑰櫒鏁版嵁缁勪欢鏄剧ず鏍囪
+ AreaDialogShow: false, //鐩殑鍦版暟鎹粍浠舵樉绀烘爣璁�
deptform: {}, //寮圭獥閫変腑鏁版嵁
+ areaType: '',//鍦板尯閫夋嫨绫诲瀷
temp: undefined, //涓存椂鍙橀噺
btResList: [], // 鍒楄缃�
@@ -1050,8 +1060,8 @@
this.warehouseShow = true
this.openData = true
} else if (num == 3) {
- this.dialogTitle = '鐗╂枡鍒楄〃'
- this.materialShow = true
+ this.dialogTitle = '鍦板尯鍒楄〃'
+ this.AreaDialogShow = true;
this.openData = true
} else if (num == 4) {
this.dialogTitle = '浠撲綅鍒楄〃'
@@ -1064,6 +1074,10 @@
} else if (num == 7) {
this.dialogTitle = '瀹㈡埛鍒楄〃'
this.gyCustomerShow = true
+ this.openData = true
+ } else if (num == 8) {
+ this.dialogTitle = '瀹瑰櫒鍒楄〃'
+ this.gyMouldShow = true
this.openData = true
} else if (num == 12) {
this.dialogTitle = '婧愬崟鍒楄〃'
@@ -1099,6 +1113,7 @@
this.gyCarShow = false
this.gyDriverShow = false
this.ContractTransportShow = false
+ this.gyMouldShow = false
},
//#endregion
//#endregion
@@ -1119,15 +1134,15 @@
this.editData[this.zbIndex].HSPID = deptRow.HItemID;
this.editData[this.zbIndex].浠撲綅鍚嶇О = deptRow.浠撲綅鍚嶇О;
this.openData = false
- } else if (num == 3) { //鐗╂枡
- this.editData[this.zbIndex].HMaterID = deptRow.HItemID;
- this.editData[this.zbIndex].鐗╂枡浠g爜 = deptRow.鐗╂枡浠g爜;
- this.editData[this.zbIndex].鐗╂枡鍚嶇О = deptRow.鐗╂枡鍚嶇О;
- this.editData[this.zbIndex].HUnitID = deptRow.HUnitID;
- this.editData[this.zbIndex].瑙勬牸鍨嬪彿 = deptRow.瑙勬牸鍨嬪彿
- this.editData[this.zbIndex].璁¢噺鍗曚綅 = deptRow.璁¢噺鍗曚綅鍚嶇О
- this.editData[this.zbIndex].HTaxPrice = deptRow.鍚◣鎴愭湰浠�
- this.editData[this.zbIndex].HTaxRate = deptRow.榛樿绋庣巼
+ } else if (num == 3) { //鍦板尯
+ if (this.areaType == 'b') {
+ this.form.HBeginAddrName = deptRow.鍦板尯鍚嶇О
+ this.form.HBeginAddr = deptRow.HItemID
+ } else if (this.areaType == 'e') {
+ this.form.HEndAddrName = deptRow.鍦板尯鍚嶇О
+ this.form.HEndAddr = deptRow.HItemID
+ }
+ this.AreaDialogShow = false;
this.openData = false
} else if (num == 6) {
this.form.HCarrierName = deptRow.渚涘簲鍟嗗悕绉�
@@ -1139,6 +1154,16 @@
this.form.HCusID = deptRow.HItemID
this.gyCustomerShow = false
this.openData = false
+ } else if (num == 8) {
+ console.log(deptRow)
+ this.editData[this.zbIndex].HMouldID = deptRow.hmainid
+ this.editData[this.zbIndex].HMouldNumber = deptRow.妯″叿缂栧彿
+ this.editData[this.zbIndex].HMouldName = deptRow.妯″叿鍚嶇О
+ this.editData[this.zbIndex].HMouldLength = deptRow.闀�
+ this.editData[this.zbIndex].HMouldWidth = deptRow.瀹�
+ this.editData[this.zbIndex].HMouldFoldHeight = deptRow.鎶樺彔楂樺害
+ this.gyMouldShow = false
+ this.openData = false
} else if (num == 12) {
// 浣跨敤寮傛鏂瑰紡澶勭悊婧愬崟鏁版嵁
this.processSourceDataAsync(deptRow);
@@ -1146,7 +1171,7 @@
this.form.HCarTypeName = deptRow.杞﹀瀷鍚嶇О
this.form.HCarTypeID = deptRow.HItemID
this.form.HCarTypeMaxVolume = deptRow["鏈�澶т綋绉�(绔嬫柟绫�)"]
- this.calculateLoadingRate(parseFloat($('#HTotalVolume').val()) || 0);
+ this.calculateLoadingRate(parseFloat(this.form.HTotalVolume || 0));
this.gyCartypeShow = false
this.openData = false
} else if (num == 14) {
@@ -1236,10 +1261,10 @@
this.form.HCusName = deptRow[0]["瀹㈡埛"];
}
console.log(deptRow)
- this.form.HMainSourceInterID=deptRow[0]["hmainid"]
- this.form.HMainSourceEntryID=deptRow[0]["hsubid"]
- this.form.HMainSourceBillType=deptRow[0]["HBillType"]
- this.form.HMainSourceBillNo=deptRow[0]["鍗曟嵁鍙�"]
+ this.form.HMainSourceInterID = deptRow[0]["hmainid"]
+ this.form.HMainSourceEntryID = deptRow[0]["hsubid"]
+ this.form.HMainSourceBillType = deptRow[0]["HBillType"]
+ this.form.HMainSourceBillNo = deptRow[0]["鍗曟嵁鍙�"]
// 妫�鏌ユ槸鍚︽墍鏈夎褰曞睘浜庡悓涓�瀹㈡埛
for (var i = 0; i < deptRow.length; i++) {
if (deptRow[i]["HCusID"] != this.form.HCusID) {
@@ -1382,7 +1407,6 @@
var qty = materialInfo.HSNP || 0;
var snp = materialInfo.HSNP || 1;
var mouldQty = snp > 0 ? Math.ceil(qty / snp) : 0;
-
var length = parseFloat(materialInfo.闀垮害) || 0;
var width = parseFloat(materialInfo.瀹藉害) || 0;
var height = parseFloat(materialInfo.楂樺害) || 0;
@@ -1766,7 +1790,7 @@
// 璁$畻瑁呰浇鐜囧嚱鏁�
calculateLoadingRate(totalVolume) {
- var maxVolume = parseFloat((this.form.HCarTypeMaxVolume).val()) || 0;
+ var maxVolume = parseFloat(this.form.HCarTypeMaxVolume) || 0;
if (maxVolume > 0) {
var loadingRate = (totalVolume / maxVolume * 100).toFixed(2);
this.form.HLoadingRate = loadingRate + "%"
@@ -1775,7 +1799,73 @@
}
},
//#endregion
+ checkTotalQtyExceed(selRow) {
+ var tableData = this.editData
+ console.log(tableData)
+ if (!tableData || tableData.length === 0) return;
+ var sourceQtyMap = {};
+ var currentQtyMap = {};
+ tableData.forEach(function (row) {
+ if (row.HSourceInterID && row.HSourceEntryID) {
+ var key = row.HSourceInterID + '_' + row.HSourceEntryID;
+ if (row.HQty_origin) {
+ sourceQtyMap[key] = parseFloat(row.HQty_origin) || 0;
+ }
+ }
+ });
+ tableData.forEach(function (row) {
+ if (row.HSourceInterID && row.HSourceEntryID) {
+ var key = row.HSourceInterID + '_' + row.HSourceEntryID;
+ var currentQty = parseFloat(row.HQty) || 0;
+
+ if (!currentQtyMap[key]) {
+ currentQtyMap[key] = 0;
+ }
+ currentQtyMap[key] += currentQty;
+ }
+ });
+
+ // 妫�鏌ユ槸鍚﹁秴鍑�
+ var exceedSources = [];
+ for (var key in sourceQtyMap) {
+ var sourceQty = sourceQtyMap[key];
+ var currentTotal = currentQtyMap[key] || 0;
+
+ if (currentTotal > sourceQty) {
+
+ var sourceBillNo = '';
+ tableData.some(function (row) {
+ if (row.HSourceInterID + '_' + row.HSourceEntryID === key) {
+ sourceBillNo = row.HSourceBillNo || '鏈煡婧愬崟';
+ return true;
+ }
+ return false;
+ });
+
+ exceedSources.push({
+ sourceBillNo: sourceBillNo,
+ sourceQty: sourceQty,
+ currentTotal: currentTotal
+ });
+ }
+ }
+ console.log(exceedSources)
+
+ if (exceedSources.length > 0) {
+ var message = '鐗╂枡鏁伴噺涔嬪拰瓒呰繃婧愬崟鏁伴噺锛�';
+ exceedSources.forEach(function (item, index) {
+ message += (index + 1) + '. 婧愬崟鍙凤細' + item.sourceBillNo +
+ '锛屾簮鍗曟暟閲忥細' + item.sourceQty +
+ '锛屽綋鍓嶆暟閲忥細' + item.currentTotal;
+ });
+
+ this.$modal.msgError(message);
+ return true; // 琛ㄧず鏈夎秴鍑�
+ }
+
+ return false; // 琛ㄧず娌℃湁瓒呭嚭
+ },
//#region 闄勪欢涓婁紶鐩稿叧鏂规硶
// 鏂囦欢閫夋嫨鍙樺寲鏃剁殑澶勭悊
handleFileChange(file, fileList) {
--
Gitblit v1.9.1