Commit 96785371 authored by 李苏's avatar 李苏 💬

Synchronize materials pop-up interface, change save to confirm, add loading and text

parent b43465d1
......@@ -46,7 +46,7 @@
width: 140
},
{
title: "入库日期",
title: "业务日期",
field: "ywrq",
fieldType: 'ftDate'
},
......@@ -87,7 +87,7 @@
}
},
{
title: "入库部门",
title: "部门",
field: "bmName",
width: 140
},
......@@ -190,6 +190,7 @@
},
methods: {
tbshd(ctx){
ctx.DialogWidth='35vw'
ctx.DialogTitle='同步送货单'
ctx.showDialog=true
},
......
<template>
<DefaultDialog :app='app'>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row v-if="loading" :gutter="20" :app="this" class="editRow">
......@@ -13,7 +13,7 @@
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
</DefaultDialog>
......@@ -48,13 +48,15 @@ this.$post('common/datetime',{}).then(res=>{
},
data() {
return {
isLoading:false,
text:'正在请求中...',
readonly:false,
loading:false,
editColItemList:[
{
label: '开始日期',
prop: 'start',
span: 12,
span: 24,
type: 'datetime',
value: '',
"required": true,
......@@ -62,7 +64,7 @@ this.$post('common/datetime',{}).then(res=>{
{
label: '结束日期',
prop: 'end',
span: 12,
span: 24,
type: 'datetime',
value: '',
"required": true,
......@@ -95,12 +97,16 @@ this.$post('common/datetime',{}).then(res=>{
start:this.form.start,
end:this.form.end
}
this.isLoading=true
this.$post('lxyl/rkgl/rktz/scm/sync',params).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
}
}).finally(res=>{
this.isLoading=false
})
}
})
......
<template>
<DefaultDialog :app='app'>
<DefaultDialog v-loading='isLoading' :element-loading-text="text" :app='app'>
<div slot="form" style="">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row v-if="loading" :gutter="20" :app="this" class="editRow">
......@@ -13,7 +13,7 @@
<div slot="reFooter" class="refooter" >
<span slot="footer" class="dialog-footer" >
<el-button @click="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
</DefaultDialog>
......@@ -47,6 +47,8 @@ this.$post('common/datetime',{}).then(res=>{
},
data() {
return {
isLoading:false,
text:'正在请求中...',
readonly:false,
loading:false,
editColItemList:[
......@@ -66,14 +68,18 @@ this.$post('common/datetime',{}).then(res=>{
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/jcsj/wlxx/sap/sync',{
time:this.form.time
}).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
this.app.showDialog=false
this.app.$refs.TablePager.refresh()
}
}).finally(res=>{
this.isLoading=false
})
}
})
......
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