Commit af94cf8d authored by 刘文虎's avatar 刘文虎

修改刷新逻辑

parent f8c19950
Pipeline #3950 canceled with stages
......@@ -195,6 +195,7 @@ export default {
async handleClickConfirm() {
try {
let { data } = await updateOfferTemplate({ id: this.id,deleteFlag:true });
uni.$emit("on-custom-price-delete",{id: this.id})
this.$u.route({
type: 'back'
});
......
......@@ -84,6 +84,12 @@ export default {
});
},
toEdit(item) {
uni.$once("on-custom-price-delete",(res)=>{
if(res&&this.id===res.id){
uni.$emit('update-custom-id',this.list[0])
this.$store.dispatch("Save_custom_id",this.list[0].id)
}
})
this.$u.route({
url: '/pages/bill/quoted-price/create/edit',
params: {
......@@ -149,19 +155,13 @@ export default {
},
handleCancel() {},
async onDelete() {
try {
let params = {
id: this.readyDeleteItem.id
};
let { data } = await deleteById(params);
await this.getList();
console.log("this.id",this.id)
console.log("this.readyDeleteItem",this.readyDeleteItem.id)
if(this.id===this.readyDeleteItem.id){
uni.$emit('update-custom-id',this.list[0])
this.$store.dispatch("Save_custom_id",this.list[0].id)
}
} catch (e) {
console.log(e);
//TODO handle the exception
......
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