Commit 416fcb1d authored by 李苏's avatar 李苏 💬

添加xsjhd 弹框条件按钮

parent 4d2d0e80
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<BasePage :power='power' class="min_full" :config="config"> <BasePage :power='power' class="min_full" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbjhd :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
import Tbjhd from './tbjhd.vue'
export default { export default {
data() { data() {
return { return {
...@@ -289,20 +291,23 @@ ...@@ -289,20 +291,23 @@
} }
}, },
tbjhd(ctx) { tbjhd(ctx) {
this.$confirm('是否继续操作, 是否继续?', '提示', { ctx.DialogTitle='同步交货单'
confirmButtonText: '确定', ctx.DialogWidth='30vw'
cancelButtonText: '取消', ctx.showDialog=true
type: 'warning' // this.$confirm('是否继续操作, 是否继续?', '提示', {
}).then(res => { // confirmButtonText: '确定',
this.$post('lxyl/ckgl/usofh/sync/xsjhd', { // cancelButtonText: '取消',
// type: 'warning'
// }).then(res => {
// this.$post('lxyl/ckgl/usofh/sync/xsjhd', {
}).then(res => { // }).then(res => {
if (res.success) { // if (res.success) {
this.$success('操作成功') // this.$success('操作成功')
ctx.refresh() // ctx.refresh()
} // }
}) // })
}) // })
}, },
qr(ctx) { qr(ctx) {
...@@ -374,7 +379,8 @@ ...@@ -374,7 +379,8 @@
// } // }
}, },
components: { components: {
Edit Edit,
Tbjhd
} }
} }
......
<template>
<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">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" v-if="(item.show==false)?false:true"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
</el-form>
</div>
<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>
</span>
</div>
</DefaultDialog>
</template>
<script>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
/* 初始化数据 */
this.$post('common/datetime',{}).then(res=>{
let nowTime=res.data.data||new Date().getTime()
/* 初始赋值*/
this.nowTime=nowTime
// this.editColItemList[0].value=nowTime-24*60*60*1000
this.editColItemList[0].value=nowTime
this.loading=true
})
},
data() {
return {
isLoading:false,
text:'正在请求中...',
readonly:false,
loading:false,
editColItemList:[
{
label: '时间',
prop: 'time',
span: 24,
type: 'datetime',
value: '',
"required": true,
},
{
label: '单号',
prop: 'ddh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/ckgl/usofh/sync/xsjhd',this.form).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
this.app.showDialog=false
this.app.$refs.TablePager.refresh()
}
}).finally(res=>{
this.isLoading=false
})
}
})
}
}
}
</script>
<style scoped>
</style>
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