|  | @@ -106,6 +106,7 @@
 | 
											
												
													
														|  |    import {detailListData } from "@/api/importTrade/purchase";
 |  |    import {detailListData } from "@/api/importTrade/purchase";
 | 
											
												
													
														|  |    import {getSysNo} from "@/api/importTrade/purchase";
 |  |    import {getSysNo} from "@/api/importTrade/purchase";
 | 
											
												
													
														|  |    import { getUserInfo } from "@/api/system/user";
 |  |    import { getUserInfo } from "@/api/system/user";
 | 
											
												
													
														|  | 
 |  | +  import { contrastObj,contrastList } from "@/util/contrastData";
 | 
											
												
													
														|  |    export default {
 |  |    export default {
 | 
											
												
													
														|  |      name: "paymentDetailsPage",
 |  |      name: "paymentDetailsPage",
 | 
											
												
													
														|  |      props: {
 |  |      props: {
 | 
											
										
											
												
													
														|  | @@ -309,6 +310,8 @@
 | 
											
												
													
														|  |              },
 |  |              },
 | 
											
												
													
														|  |            ],
 |  |            ],
 | 
											
												
													
														|  |          },
 |  |          },
 | 
											
												
													
														|  | 
 |  | +        oldForm:{},
 | 
											
												
													
														|  | 
 |  | +        oldDataList:[],
 | 
											
												
													
														|  |        }
 |  |        }
 | 
											
												
													
														|  |      },
 |  |      },
 | 
											
												
													
														|  |      created() {
 |  |      created() {
 | 
											
										
											
												
													
														|  | @@ -320,8 +323,12 @@
 | 
											
												
													
														|  |          this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
 |  |          this.id = BigInt(this.detailData.id);//字符串转数字  超长用BigInt
 | 
											
												
													
														|  |          getDetail(this.id).then(res => {
 |  |          getDetail(this.id).then(res => {
 | 
											
												
													
														|  |            this.form = res.data.data;
 |  |            this.form = res.data.data;
 | 
											
												
													
														|  | 
 |  | +          this.oldForm = Object.assign({},res.data.data);
 | 
											
												
													
														|  |            this.configuration.dicData = res.data.data.customerModel;
 |  |            this.configuration.dicData = res.data.data.customerModel;
 | 
											
												
													
														|  | -          this.dataList = res.data.data.itemsList
 |  | 
 | 
											
												
													
														|  | 
 |  | +          if(res.data.data.itemsList){
 | 
											
												
													
														|  | 
 |  | +            this.dataList = res.data.data.itemsList
 | 
											
												
													
														|  | 
 |  | +            this.oldDataList = this.deepClone(res.data.data.itemsList)
 | 
											
												
													
														|  | 
 |  | +          }
 | 
											
												
													
														|  |          })
 |  |          })
 | 
											
												
													
														|  |        }else{
 |  |        }else{
 | 
											
												
													
														|  |          this.assignment()
 |  |          this.assignment()
 | 
											
										
											
												
													
														|  | @@ -390,6 +397,13 @@
 | 
											
												
													
														|  |              }
 |  |              }
 | 
											
												
													
														|  |              editFinance(params).then(res =>{
 |  |              editFinance(params).then(res =>{
 | 
											
												
													
														|  |                if(res.data.success){
 |  |                if(res.data.success){
 | 
											
												
													
														|  | 
 |  | +                this.form = res.data.data;
 | 
											
												
													
														|  | 
 |  | +                this.oldForm = Object.assign({},res.data.data);
 | 
											
												
													
														|  | 
 |  | +                this.configuration.dicData = res.data.data.customerModel;
 | 
											
												
													
														|  | 
 |  | +                if(res.data.data.itemsList){
 | 
											
												
													
														|  | 
 |  | +                  this.dataList = res.data.data.itemsList
 | 
											
												
													
														|  | 
 |  | +                  this.oldDataList = this.deepClone(res.data.data.itemsList)
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  |                  this.$message.success("操作成功!")
 |  |                  this.$message.success("操作成功!")
 | 
											
												
													
														|  |                }
 |  |                }
 | 
											
												
													
														|  |              })
 |  |              })
 | 
											
										
											
												
													
														|  | @@ -399,17 +413,22 @@
 | 
											
												
													
														|  |            }
 |  |            }
 | 
											
												
													
														|  |          })
 |  |          })
 | 
											
												
													
														|  |        },
 |  |        },
 | 
											
												
													
														|  | -      backToList(){
 |  | 
 | 
											
												
													
														|  | -        this.$confirm("是否保存当前页面?", "提示", {
 |  | 
 | 
											
												
													
														|  | -          confirmButtonText: "保存",
 |  | 
 | 
											
												
													
														|  | -          cancelButtonText: "取消",
 |  | 
 | 
											
												
													
														|  | -          type: "warning",
 |  | 
 | 
											
												
													
														|  | -        }).then(() => {
 |  | 
 | 
											
												
													
														|  | -          this.editFinance(true)
 |  | 
 | 
											
												
													
														|  | -        }).catch(() => {
 |  | 
 | 
											
												
													
														|  | 
 |  | +      backToList() {
 | 
											
												
													
														|  | 
 |  | +        if(contrastObj(this.form,this.oldForm) || contrastList(this.dataList,this.oldDataList)
 | 
											
												
													
														|  | 
 |  | +        ){
 | 
											
												
													
														|  | 
 |  | +          this.$confirm("是否保存当前页面?", "提示", {
 | 
											
												
													
														|  | 
 |  | +            confirmButtonText: "保存",
 | 
											
												
													
														|  | 
 |  | +            cancelButtonText: "取消",
 | 
											
												
													
														|  | 
 |  | +            type: "warning",
 | 
											
												
													
														|  | 
 |  | +          }).then(() => {
 | 
											
												
													
														|  | 
 |  | +            this.editCustomer(true)
 | 
											
												
													
														|  | 
 |  | +          }).catch(()=>{
 | 
											
												
													
														|  | 
 |  | +            this.$emit("goBack");
 | 
											
												
													
														|  | 
 |  | +          })
 | 
											
												
													
														|  | 
 |  | +        }else{
 | 
											
												
													
														|  |            this.$emit("goBack");
 |  |            this.$emit("goBack");
 | 
											
												
													
														|  | -        })
 |  | 
 | 
											
												
													
														|  | -      }
 |  | 
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +      },
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |    }
 |  |    }
 | 
											
												
													
														|  |  </script>
 |  |  </script>
 |