From fdccbcb18a3216ec53b47e0f04cd71a1605c8e58 Mon Sep 17 00:00:00 2001
From: wangyi <2946747746@qq.com>
Date: 星期四, 27 十一月 2025 08:25:54 +0800
Subject: [PATCH] 销售退货单:条码明细
---
src/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainListEdit.vue | 139 ++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 139 insertions(+), 0 deletions(-)
diff --git a/src/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainListEdit.vue b/src/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainListEdit.vue
index 34bd751..7e2ff79 100644
--- a/src/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainListEdit.vue
+++ b/src/views/sell/Kf_ICStockBillMainList/Kf_ICStockBillMainListEdit.vue
@@ -352,6 +352,7 @@
import Dept from '@/views/component/dept'
import Warehouse from '@/views/component/warehouse'
import Material from '@/views/component/material'
+import dayjs from 'dayjs'
export default {
name: 'SellOutBill',
@@ -461,6 +462,9 @@
}
else if (this.OperationType == 3 || this.copyType == 1) {
this.handleUpdate()
+ }
+ else if(this.OperationType == 2){
+ this.handleCopy()
}
else if (this.OperationType == 4) {
this.zzSelDis = true
@@ -768,6 +772,141 @@
});
},
//#endregion
+ //#region 澶嶅埗椤甸潰鍒濆鍖�
+ handleCopy() {
+ // 妫�鏌ュ繀瑕佸弬鏁�
+ if (!this.linterid) {
+ this.$modal.msgError("澶嶅埗澶辫触锛氱己灏戞簮鏁版嵁ID");
+ this.formShow = true;
+ this.formLoading = false;
+ return;
+ }
+
+ if (!this.baseURL) {
+ this.$modal.msgError("澶嶅埗澶辫触锛氭帴鍙e湴鍧�鏈厤缃�");
+ this.formShow = true;
+ this.formLoading = false;
+ return;
+ }
+
+ this.reset()
+ let rowHmainid = this.linterid
+ console.log("寮�濮嬪鍒讹紝鍙傛暟:", { HInterID: rowHmainid })
+
+ // 娣诲姞璇锋眰瓒呮椂璁剧疆
+ axios.get(this.baseURL + "Kf_ICStockBackBill/getEditInitData", {
+ params: { 'HInterID': rowHmainid },
+ timeout: 10000 // 10绉掕秴鏃�
+ }).then(response => {
+ console.log("澶嶅埗鎺ュ彛瀹屾暣鍝嶅簲:", response)
+
+ if (!response.data) {
+ throw new Error("鍝嶅簲鏁版嵁涓虹┖")
+ }
+
+ if (response.data.count == 1) {
+ // 鍘熸湁鐨勫鍒堕�昏緫
+ var result = response.data
+ var data = response.data.data[0]
+ console.log("澶嶅埗鑾峰彇鐨勬暟鎹�:", data)
+
+ // 鑾峰彇鏂板崟鍙�
+ this.getHBillNo()
+
+ // 澶嶅埗涓昏〃鏁版嵁
+ this.form.BillType = data.HSourceBillType
+ this.form.HInterID = 0
+ this.form.HDate = dayjs(new Date()).format("YYYY-MM-DD")
+ this.form.HMaker = sessionStorage["HUserName"] || "褰撳墠鐢ㄦ埛"
+ this.form.HChecker = ""
+ this.form.HMakeDate = dayjs(new Date()).format("YYYY-MM-DD")
+ this.form.HCheckDate = ""
+ this.form.HCloseMan = ""
+ this.form.HDeleteMan = ""
+ this.form.HCloseDate = ""
+ this.form.HDeleteDate = ""
+
+ // 澶嶅埗涓氬姟鏁版嵁...
+ this.form.HEmpID = data.HEmpID
+ this.form.HEmpName = data.涓氬姟鍛�
+ this.form.HDeptID = data.HDeptID
+ this.form.HDeptName = data.閮ㄩ棬
+ this.form.HSupID = data.HSupID
+ this.form.HSupName = data.渚涘簲鍟�
+ this.form.HInvoiceBillNo = (data.鍙戠エ缂栧彿 || "") + "_COPY"
+ this.form.HWHID = data.涓昏〃浠撳簱ID
+ this.form.HWHName = data.涓昏〃浠撳簱
+ this.form.HSecManagerID = data.HSecManagerID
+ this.form.HSecManagerName = data.楠屾敹鍛�
+ this.form.HRemark = (data.琛ㄥご澶囨敞 || "") + " (澶嶅埗)"
+ this.form.HOrgID = data.HOrgID
+ this.form.HSTOCKORGID = data.HOrgID
+ this.form.HOWNERID = data.HOrgID
+
+ // 澶嶅埗瀛愯〃鏁版嵁...
+ this.editData = [] // 娓呯┖鍘熸湁鏁版嵁
+ for (var i = 0; i < result.data.length; i++) {
+ this.editData.push({
+ "HMaterID": result.data[i].HMaterID,
+ "鐗╂枡浠g爜": result.data[i].鐗╂枡浠g爜,
+ "鐗╂枡鍚嶇О": result.data[i].鐗╂枡鍚嶇О,
+ "瑙勬牸鍨嬪彿": result.data[i].瑙勬牸鍨嬪彿,
+ "HUnitID": result.data[i].HUnitID,
+ "璁¢噺鍗曚綅": result.data[i].璁¢噺鍗曚綅,
+ "HQtyMust": result.data[i].搴旀敹鏁伴噺,
+ "HQty": result.data[i].瀹炴敹鏁伴噺,
+ "HRemark": (result.data[i].琛ㄤ綋澶囨敞 || "") + " (澶嶅埗)",
+ "HPrice": result.data[i].鍗曚环,
+ "HMoney": result.data[i].閲戦,
+ "HOrderPrice": result.data[i].閲囪喘閲戦,
+ "HWHID": result.data[i].HWHID,
+ "鏀舵枡浠撳簱": result.data[i].鏀舵枡浠撳簱,
+ "HSPID": result.data[i].HSPID,
+ "浠撲綅鍚嶇О": result.data[i].浠撲綅鍚嶇О,
+ "HBatchNo": result.data[i].鎵规,
+ "HSourceBillNo": result.data[i].婧愬崟鍗曞彿,
+ "HSourceBillType": result.data[i].婧愬崟绫诲瀷,
+ "HSourceInterID": result.data[i].婧愬崟涓诲唴鐮�,
+ "HSourceEntryID": result.data[i].婧愬崟瀛愬唴鐮�,
+ "HTaxRate": result.data[i].绋庣巼,
+ "HTaxPrice": result.data[i].鍚◣鍗曚环,
+ "HlineTotal": result.data[i].鍚◣閲戦,
+ "HStatus": "鍒涘缓"
+ })
+ }
+
+ this.subDisabled = false
+ this.$modal.msgSuccess("鏁版嵁澶嶅埗鎴愬姛锛�")
+ this.formShow = true
+ this.formLoading = false
+
+ } else {
+ this.$modal.msgError("澶嶅埗澶辫触锛氭湭鎵惧埌瀵瑰簲鐨勬簮鏁版嵁")
+ this.formShow = true
+ this.formLoading = false
+ }
+ }).catch(error => {
+ let errorMsg = "澶嶅埗鏁版嵁澶辫触! ";
+ if (error.response) {
+ // 鏈嶅姟鍣ㄥ搷搴旈敊璇�
+ errorMsg += `鏈嶅姟鍣ㄩ敊璇�: ${error.response.status} - ${error.response.data || ''}`;
+ } else if (error.request) {
+ // 璇锋眰鍙戦�佸け璐�
+ errorMsg += "缃戠粶閿欒锛岃妫�鏌ョ綉缁滆繛鎺�";
+ } else {
+ // 鍏朵粬閿欒
+ errorMsg += error.message;
+ }
+
+ console.error("澶嶅埗璇︾粏閿欒:", error)
+ this.$modal.msgError(errorMsg)
+ this.$nextTick(() => {
+ this.formShow = true
+ this.formLoading = false
+ })
+ })
+ },
+ //#endregion
//#region 鍒楄缃�
handleRowHide() {
--
Gitblit v1.9.1