doway-coms 1.4.3 → 1.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1932,6 +1932,16 @@ export default {
|
|
|
1932
1932
|
*/
|
|
1933
1933
|
getUpdateRows() {
|
|
1934
1934
|
let tempRows = [];
|
|
1935
|
+
//先获取删除数据,因为前台删除一个明细后又添加相同的明细后台会
|
|
1936
|
+
//报唯一索引错误,因为后台也是先添加然后再是删除的会照成问题
|
|
1937
|
+
//所有就要把删除的放在数组的第一个传递过去,这样后台就先删除然后再新增了
|
|
1938
|
+
let tempRemoveRows = this.$refs.baseGrid.getRemoveRecords();
|
|
1939
|
+
for (let i = 0; i < tempRemoveRows.length; i++) {
|
|
1940
|
+
let tempRow = tempRemoveRows[i];
|
|
1941
|
+
tempRow["sysRowState"] = "delete";
|
|
1942
|
+
tempRows.push(tempRow);
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1935
1945
|
let tempTableData = this.$refs.baseGrid.getTableData().fullData;
|
|
1936
1946
|
for (let i = 0; i < tempTableData.length; i++) {
|
|
1937
1947
|
let tempRow = tempTableData[i];
|
|
@@ -1940,19 +1950,13 @@ export default {
|
|
|
1940
1950
|
tempRows.push(tempRow);
|
|
1941
1951
|
continue;
|
|
1942
1952
|
}
|
|
1943
|
-
if (this.$refs.baseGrid.isUpdateByRow(tempRow) === true) {
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
|
|
1950
|
-
let tempRemoveRows = this.$refs.baseGrid.getRemoveRecords();
|
|
1951
|
-
for (let i = 0; i < tempRemoveRows.length; i++) {
|
|
1952
|
-
let tempRow = tempRemoveRows[i];
|
|
1953
|
-
tempRow["sysRowState"] = "delete";
|
|
1954
|
-
tempRows.push(tempRow);
|
|
1953
|
+
// if (this.$refs.baseGrid.isUpdateByRow(tempRow) === true) {
|
|
1954
|
+
// // tempRow['sysRowState'] = 'update'
|
|
1955
|
+
// // tempRows.push(tempRow)
|
|
1956
|
+
// // continue
|
|
1957
|
+
// }
|
|
1955
1958
|
}
|
|
1959
|
+
|
|
1956
1960
|
let tempUpdateRows = this.$refs.baseGrid.getUpdateRecords();
|
|
1957
1961
|
for (let i = 0; i < tempUpdateRows.length; i++) {
|
|
1958
1962
|
let tempRow = tempUpdateRows[i];
|