采购计划数据修改刷新优化

master
mhsnet 2 months ago
parent dddc9896ab
commit 89f7f9df5e

@ -568,7 +568,7 @@
<JNPF-Form-Order <JNPF-Form-Order
v-if="formOrderVisible" v-if="formOrderVisible"
ref="JNPFFormOrder" ref="JNPFFormOrder"
@refresh="fnRefreshFormOrder" @refreshFormOrder="fnRefreshFormOrder"
/> />
</div> </div>
</transition> </transition>
@ -749,9 +749,10 @@ export default {
}, },
mounted() {}, mounted() {},
methods: { methods: {
fnRefreshFormOrder(isrRefresh) { fnRefreshFormOrder() {
this.formOrderVisible = false; console.log("刷新");
if (isrRefresh) this.reset(); console.log(this.dataForm.id)
this.init(this.dataForm.id)
}, },
fnProcurementOrderCreate(row) { fnProcurementOrderCreate(row) {
this.$nextTick(() => { this.$nextTick(() => {
@ -897,21 +898,21 @@ export default {
this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll)); this.dataForm = JSON.parse(JSON.stringify(this.dataValueAll));
}, },
init(id, isDetail, allList) { init(id, isDetail, allList) {
this.prevDis = false; // this.prevDis = false;
this.nextDis = false; // this.nextDis = false;
this.allList = allList || []; // this.allList = allList || [];
if (allList.length) { // if (allList.length) {
this.index = this.allList.findIndex(item => item.id === id); // this.index = this.allList.findIndex(item => item.id === id);
if (this.index == 0) { // if (this.index == 0) {
this.prevDis = true; // this.prevDis = true;
} // }
if (this.index == this.allList.length - 1) { // if (this.index == this.allList.length - 1) {
this.nextDis = true; // this.nextDis = true;
} // }
} else { // } else {
this.prevDis = true; // this.prevDis = true;
this.nextDis = true; // this.nextDis = true;
} // }
this.dataForm.id = id || 0; this.dataForm.id = id || 0;
this.visible = true; this.visible = true;
this.$nextTick(() => { this.$nextTick(() => {
@ -921,6 +922,7 @@ export default {
url: "/api/example/YysMaterialProcurementPlan/" + this.dataForm.id, url: "/api/example/YysMaterialProcurementPlan/" + this.dataForm.id,
method: "get" method: "get"
}).then(res => { }).then(res => {
console.log(res)
this.dataInfo(res.data); this.dataInfo(res.data);
this.loading = false; this.loading = false;
}); });

@ -238,7 +238,7 @@ export default {
}, },
goBack() { goBack() {
this.visible = false; this.visible = false;
this.$emit("refreshDataList", true); this.$emit("refreshFormOrder", true);
}, },
init(dataForm, row) { init(dataForm, row) {
this.dataForm = dataForm; this.dataForm = dataForm;

Loading…
Cancel
Save