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