Commit 355ef01b authored by 华国豪's avatar 华国豪 🙄

1

parent 497c4524
......@@ -121,7 +121,7 @@
</template>
<script>
export default {
props:["ID","width","color","GetDetail"], //接收参数 ID width color
props:["ID","width","color"], //接收参数 ID width color
data(){
return{
picObj:[],
......@@ -129,6 +129,7 @@ export default {
picIsShow:false,
allMoney:0,
cnAllMoney:'',
GetDetail: {}
}
},methods:{
showImg(obj){
......@@ -136,11 +137,11 @@ export default {
this.picIsShow= true;
},
Financial_post_GetDetail(id){ //获取单据详情
// if(!id) return
if(!id) return
this.loading = true;
// this.apipost('Financial_post_GetDetail',{ID:id}, res => {
// if(res.data.resultCode == 1) {
let data= this.GetDetail;
this.apipost('Financial_post_GetDetail',{ID:id}, res => {
if(res.data.resultCode == 1) {
let data= res.data.data;
let Money = 0;
data.DetailList.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100);
......@@ -158,26 +159,26 @@ export default {
data.AuditSteps.reverse();
this.GetDetail = data;
this.loading=false;
// }
// }, err => {})
}
}, err => {})
},
},mounted(){
this.Financial_post_GetDetail()
this.Financial_post_GetDetail(this.ID)
},watch: { // 监听参数变化
// GetDetail: {
// handler: function(val, oldVal) {
// // console.log(val)
// // console.log(oldVal)
// },
// deep: true
// },
// ID:{
// handler: function(val, oldVal) {
// this.ID = val
// this.Financial_post_GetDetail(this.ID)
// },
// deep: true
// }
GetDetail: {
handler: function(val, oldVal) {
// console.log(val)
// console.log(oldVal)
},
deep: true
},
ID:{
handler: function(val, oldVal) {
this.ID = val
this.Financial_post_GetDetail(this.ID)
},
deep: true
}
}
}
</script>
......@@ -277,7 +277,7 @@
</template>
<script>
export default {
props:["ID","width","color","isPrintPage","name","GetDetail"], //接收参数 ID width color
props:["ID","width","color","isPrintPage","name"], //接收参数 ID width color
data(){
return{
loading:true,
......@@ -290,6 +290,7 @@
},
images: [],
moneyObj: {},
GetDetail: {}
}
},methods:{
inited (viewer){
......@@ -337,7 +338,7 @@
this.loading = true;
this.apipost('Financial_post_GetDetail',{ID:id}, res => {
if(res.data.resultCode == 1) {
let data= this.GetDetail;
let data= res.data.data;
data.DetailList.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = Math.round(x.Money * 100) / 100
......
......@@ -324,7 +324,7 @@
</template>
<script>
export default {
props:["ID","width","color","isPrintPage","name","OrderSource","GetDetail"], //接收参数 ID width color
props:["ID","width","color","isPrintPage","name","OrderSource"], //接收参数 ID width color
data(){
return{
loading:true,
......@@ -334,6 +334,7 @@ export default {
printTime:'',
currentMoney:0,
benMoney:0,
GetDetail: {}
}
},created(){
let date = new Date(),
......@@ -377,7 +378,7 @@ export default {
this.loading = true;
this.apipost('Financial_post_GetDetail',{ID:id}, res => {
if(res.data.resultCode == 1) {
let data= this.GetDetail;
let data= res.data.data;
data.DetailList.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = Math.round(x.Money * 100) / 100
......
......@@ -249,7 +249,7 @@
</template>
<script>
export default {
props:["ID","width","color","isPrintPage","name","GetDetail"], //接收参数 ID width color
props:["ID","width","color","isPrintPage","name"], //接收参数 ID width color
data(){
return{
loading:false,
......@@ -257,6 +257,7 @@
EmployeeId:'',
EndDate:'',
StartDate:'',
GetDetail: {}
}
},methods:{
jumpPage(path,id,type){
......@@ -282,12 +283,12 @@
})
}
},
Financial_post_GetDetail(){ //获取单据详情
// if(!id) return
// this.loading = true;
// this.apipost('Financial_post_GetDetail',{ID:id}, res => {
// if(res.data.resultCode == 1) {
let data= this.GetDetail;
Financial_post_GetDetail(id){ //获取单据详情
if(!id) return
this.loading = true;
this.apipost('Financial_post_GetDetail',{ID:id}, res => {
if(res.data.resultCode == 1) {
let data= res.data.data;
data.DetailList.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = Math.round(x.Money * 100) / 100
......@@ -300,10 +301,10 @@
data.AuditSteps.reverse()
this.GetDetail = data;
this.loading=false
// this.$set(this.$data,"GetDetail",data);
// console.log(this.GetDetail)
// }
// }, err => {})
this.$set(this.$data,"GetDetail",data);
console.log(this.GetDetail)
}
}, err => {})
},
},mounted(){
console.log(this.GetDetail,"mounted")
......@@ -315,23 +316,23 @@
this.EndDate = yaer + '-' + month + '-' + dateS;
let userInfo = this.getLocalStorage();
this.EmployeeId = userInfo.EmployeeId;
this.Financial_post_GetDetail();
this.Financial_post_GetDetail(this.ID);
},watch: { // 监听参数变化
// GetDetail: {
// handler: function(val, oldVal) {
// // console.log(val)
// // console.log(oldVal)
// },
// deep: true
// },
// ID:{
// handler: function(val, oldVal) {
// this.ID = val
// this.Financial_post_GetDetail(this.ID)
// // console.log(val)
// },
// deep: true
// }
GetDetail: {
handler: function(val, oldVal) {
// console.log(val)
// console.log(oldVal)
},
deep: true
},
ID:{
handler: function(val, oldVal) {
this.ID = val
this.Financial_post_GetDetail(this.ID)
// console.log(val)
},
deep: true
}
}
}
</script>
......@@ -284,16 +284,17 @@
</template>
<script>
export default {
props:[" ","width","color","isPrintPage","name","Num","OrderSource","GetDetail"], //接收参数 ID width color isPrintPage
props:["ID","width","color","isPrintPage","name","Num","OrderSource"], //接收参数 ID width color isPrintPage
data(){
return{
loading:false,
loading: false,
EmployeeId:'',
EndDate:'',
StartDate:'',
printTime:'',
currentMoney:0,
benMoney:0,
GetDetail: {}
}
},created(){
let date = new Date(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment