Commit 30de65ef authored by 李苏's avatar 李苏 💬

lxyl/rkgl/rktz/scm/sync start,end

parent c0c49c7b
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config"> <BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Shd v-if="ctx.basePage.showDialog" :app='ctx.basePage' />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
...@@ -11,6 +12,7 @@ ...@@ -11,6 +12,7 @@
<el-button style="margin-left: 10px;" @click="qr(ctx.basePage)" size='mini' type="primary">确认</el-button> <el-button style="margin-left: 10px;" @click="qr(ctx.basePage)" size='mini' type="primary">确认</el-button>
<el-button @click="qxqr(ctx.basePage)" size='mini' type="primary">取消确认</el-button> <el-button @click="qxqr(ctx.basePage)" size='mini' type="primary">取消确认</el-button>
<el-button @click="sapgz(ctx.basePage)" size='mini' type="primary">SAP过账</el-button> <el-button @click="sapgz(ctx.basePage)" size='mini' type="primary">SAP过账</el-button>
<el-button @click="tbshd(ctx.basePage)" size='mini' type="primary">同步送货单</el-button>
</template> </template>
</BasePage> </BasePage>
...@@ -18,6 +20,7 @@ ...@@ -18,6 +20,7 @@
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
import Shd from './shd.vue'
export default { export default {
data() { data() {
return { return {
...@@ -162,7 +165,7 @@ ...@@ -162,7 +165,7 @@
{ {
label: '状态', label: '状态',
prop: 'zt', prop: 'zt',
span: 6, span: 8,
type: 'RelSelect', type: 'RelSelect',
typeConfig: { typeConfig: {
src: 'lxyl/rkgl/rktz/init/zt' src: 'lxyl/rkgl/rktz/init/zt'
...@@ -186,6 +189,10 @@ ...@@ -186,6 +189,10 @@
}, },
methods: { methods: {
tbshd(ctx){
ctx.DialogTitle='同步送货单'
ctx.showDialog=true
},
sapgz(ctx){ sapgz(ctx){
if(ctx.singleItem&&ctx.singleItem.id){ if(ctx.singleItem&&ctx.singleItem.id){
this.$confirm('是否继续该操作?', '提示', { this.$confirm('是否继续该操作?', '提示', {
...@@ -254,7 +261,8 @@ ...@@ -254,7 +261,8 @@
} }
}, },
components: { components: {
Edit Edit,
Shd
} }
} }
......
<template>
<DefaultDialog :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-120*60*1000
this.editColItemList[1].value=nowTime
this.loading=true
})
},
data() {
return {
readonly:false,
loading:false,
editColItemList:[
{
label: '开始日期',
prop: 'start',
span: 12,
type: 'datetime',
value: '',
"required": true,
},
{
label: '结束日期',
prop: 'end',
span: 12,
type: 'datetime',
value: '',
"required": true,
},
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
/* 判定开始参数不能大于30天*/
if(this.form.start<this.nowTime-30*24*60*60*1000){
this.$warning('最早开始时间不得超过30天')
return
}
/* 开始时间和结束时间不能大于120分钟*/
if(this.form.end-this.form.start>120*60*1000){
this.$warning('开始时间与结束时间间隔不能大于120分钟')
return
}
if(this.form.start>this.form.end){
this.$warning('开始时间不得晚于结束时间')
return
}
/* 构建参数*/
let params={
start:this.form.start,
end:this.form.end
}
this.$post('lxyl/rkgl/rktz/scm/sync',params).then(res=>{
if(res.success){
this.$success('操作成功')
this.app.showDialog=false
this.app.refresh()
}
})
}
})
}
}
}
</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