|
@@ -46,7 +46,7 @@ export default {
|
|
|
watch: {
|
|
|
"params.puOrderItemList": {
|
|
|
handler(nVal, oVal) {
|
|
|
- this.visible &&
|
|
|
+ this.visible &&
|
|
|
this.handleSynchronousMaterial(
|
|
|
"puOrderItemList",
|
|
|
"puOrderExecuteList"
|
|
@@ -110,6 +110,7 @@ export default {
|
|
|
},
|
|
|
// 复制赋值
|
|
|
async setCopyParams(id) {
|
|
|
+
|
|
|
try {
|
|
|
const { code, msg, data } = await orderApi.details(id);
|
|
|
|
|
@@ -209,6 +210,8 @@ export default {
|
|
|
},
|
|
|
// 同步子表物料
|
|
|
handleSynchronousMaterial(tableOne, tableTwo) {
|
|
|
+
|
|
|
+ console.log('tableOne',tableOne, 'tableTwo', tableTwo);
|
|
|
let _this = this;
|
|
|
// this.params[tableOne]-- -> this.params[tableTwo]
|
|
|
this.params[tableOne] &&
|
|
@@ -216,6 +219,15 @@ export default {
|
|
|
this.params[tableOne].forEach((item, index) => {
|
|
|
|
|
|
for (const key in item) {
|
|
|
+
|
|
|
+ if(!_this.params[tableTwo][index]){
|
|
|
+
|
|
|
+ const arr = _this.tabColumns.find(
|
|
|
+ (element) => element.key === tableTwo
|
|
|
+ ).tableColumns;
|
|
|
+
|
|
|
+ _this.params[tableTwo].push(initParams(arr, "key", "value"));
|
|
|
+ }
|
|
|
|
|
|
if (key in _this.params[tableTwo][index]) {
|
|
|
|