From c5fe1fdd8475cc19d386ab787e1172a5d007a927 Mon Sep 17 00:00:00 2001
From: llj <132905093+newwwwwwtree@users.noreply.github.com>
Date: 星期二, 02 十二月 2025 17:56:11 +0800
Subject: [PATCH] 其他出库单修复
---
src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue | 61 +++++++++++++++++++++---------
1 files changed, 42 insertions(+), 19 deletions(-)
diff --git a/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue b/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue
index 885d566..c881c1e 100644
--- a/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue
+++ b/src/views/KCGL/OtherOutBill/Kf_OtherOutBillEdit.vue
@@ -14,7 +14,7 @@
<el-row>
<el-col :span="6">
<el-form-item label="鍗曟嵁缂栧彿" prop="HBillNo">
- <el-input v-model="form.HBillNo" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" disabled="true" />
+ <el-input v-model="form.HBillNo" placeholder="璇疯緭鍏ュ崟鎹紪鍙�" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="6">
@@ -287,8 +287,8 @@
</el-table-column>
<el-table-column align="center" label="鍙戞枡浠撲綅" width="120">
<template slot-scope="scope">
- <el-input v-model="scope.row.鏀舵枡浠撲綅" placeholder="璇疯緭鍏ュ彂鏂欎粨浣�" @keyup.native.f7="openDataDialog(2, scope.row)"
- @dblclick.native="openDataDialog(2, scope.row)" />
+ <el-input v-model="scope.row.鏀舵枡浠撲綅" placeholder="璇疯緭鍏ュ彂鏂欎粨浣�" @keyup.native.f7="openDataDialog(4, scope.row)"
+ @dblclick.native="openDataDialog(4, scope.row)" />
</template>
</el-table-column>
<el-table-column align="center" label="鎵规" width="120">
@@ -417,6 +417,7 @@
activeName: 'first',
zbIndex: null,
zbSelForm: {}, //瀛愯〃閫変腑鏁版嵁,鐢ㄤ簬瀛愯〃澶嶅埗銆佷笂绉汇�佷笅绉荤瓑鎿嶄綔
+ zbRow: null,
};
},
created() {
@@ -432,7 +433,7 @@
getdata() {
this.formShow = false
this.formLoading = true
-
+ console.log(this.OperationType,this.copyType)
if ((this.OperationType == 1 && this.copyType != 1) || (!this.OperationType && !this.copyType)) {
this.handleAdd()
}
@@ -637,7 +638,10 @@
//#region 鎵撳紑鏁版嵁鍒楄〃寮圭獥
openDataDialog(num, row) {
if (row) {
- this.zbIndex = row.index - 1
+
+ const idx = this.editData.indexOf(row);
+ this.zbIndex = idx >= 0 ? idx : null;
+ this.zbRow = row;
}
this.showReset()
if (num == 1) {
@@ -677,13 +681,23 @@
this.openData = false
}
else if (num == 2) { //鏀舵枡浠撳簱
- this.editData[this.zbIndex].HWHID = deptRow.HItemID;
- this.editData[this.zbIndex].鏀舵枡浠撳簱 = deptRow.浠撳簱鍚嶇О;
+
+ if (this.zbIndex == null || this.zbIndex < 0 || !this.editData[this.zbIndex]) {
+ this.$modal.msgError('璇烽�夋嫨瑕佺紪杈戠殑鏄庣粏琛屽悗鍐嶉�夋嫨浠撳簱');
+ this.openData = false;
+ return;
+ }
+
+ this.$set(this.editData[this.zbIndex], 'HWHID', deptRow.HItemID);
+ this.$set(this.editData[this.zbIndex], '鏀舵枡浠撳簱', deptRow.浠撳簱鍚嶇О);
+
this.openData = false
}
- else if (num == 4) { //浠撲綅
- this.editData[this.zbIndex].HSPID = deptRow.HItemID;
- this.editData[this.zbIndex].浠撲綅鍚嶇О = deptRow.浠撲綅鍚嶇О;
+ else if (num == 4) {
+ this.$set(this.editData[this.zbIndex], 'HSPID', deptRow.HItemID);
+ this.$set(this.editData[this.zbIndex], '鍙戞枡浠撲綅', deptRow.浠撲綅鍚嶇О); //浠撲綅
+ // this.editData[this.zbIndex].HSPID = deptRow.HItemID;
+ // this.editData[this.zbIndex].浠撲綅鍚嶇О = deptRow.浠撲綅鍚嶇О;
this.openData = false
}
else if (num == 3) { //鐗╂枡
@@ -803,8 +817,9 @@
//#region 瀛愯〃鎿嶄綔
//#region 璁剧疆瀛愯〃搴忓彿鍒�
- rowSysZbIndex({ row, rowIndex }) {
+ rowSysZbIndex( row, rowIndex ) {
row.index = rowIndex + 1;
+ return '';
},
//#endregion
@@ -837,13 +852,20 @@
HCostPrice: 0,
HCostMoney: 0,
HSalePrice: 0,
- HSeOrderInterID: 741,
- HSeOrderEntryID: 18,
- HSeOrderBillNo: 'XSFH00000747',
- HSourceInterID: 741,
- HSourceEntryID: 18,
- HSourceBillNo: 'XSFH00000747',
- HSourceBillType: 1402,
+ // HSeOrderInterID: 741,
+ // HSeOrderEntryID: 18,
+ HSeOrderInterID: '',
+ HSeOrderEntryID: '',
+ //HSeOrderBillNo: 'XSFH00000747',
+ HSeOrderBillNo: '',
+ // HSourceInterID: 741,
+ // HSourceEntryID: 18,
+ // HSourceBillNo: 'XSFH00000747',
+ HSourceInterID: '',
+ HSourceEntryID: '',
+ HSourceBillNo: '',
+ //HSourceBillType: '1402',
+ HSourceBillType: '',
HRelationQty: 0,
HRelationMoney: 0,
HSPID: 0,
@@ -943,7 +965,8 @@
handleTableZbEdit(selection) {
this.checkedSysZb = selection.map(item => item.index)
this.zbSelForm = selection[0]
- this.zbIndex = this.checkedSysZb[0]
+
+ this.zbIndex = selection.length ? this.editData.indexOf(selection[0]) : null
if (selection.length > 1) {
const del_row = selection.shift()
this.$refs.zbTable.toggleRowSelection(del_row, false) //璁剧疆杩欎竴琛屽彇娑堥�変腑
--
Gitblit v1.9.1