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

各种领料单同步+路由导入组件

parent c6cd34f7
......@@ -300,6 +300,63 @@ export const powerRoutes = [
path: "ckdzb",
},
/* 备料管理*/
/* 客户/供应商等*/
{
erpComponent: true,
component: 'jcsj/kh/khfl/index',
hidden: false,
meta: {
"title": "客户分类",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920011800',
},
name: 'khfl',
path: "khfl",
},
{
erpComponent: true,
component: 'jcsj/kh/khxx/index',
hidden: false,
meta: {
"title": "客户信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920011900',
},
name: 'khxx',
path: "khxx",
},
{
erpComponent: true,
component: 'jcsj/gys/khfl/index',
hidden: false,
meta: {
"title": "供应商分类",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920012000',
},
name: 'gysfl',
path: "gysfl",
},
{
erpComponent: true,
component: 'jcsj/gys/gys/index',
hidden: false,
meta: {
"title": "供应商信息",
"icon": "",
"noCache": false,
"link": null,
"mkid": '920012100',
},
name: 'gysxx',
path: "gysxx",
}
......
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/ckgl/cktz/sync/lxll',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>
......@@ -2,18 +2,26 @@
<BasePage @beforeEdit='beforeEdit' @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步领料单'" />
<Akck :type="'add'" v-if="ctx.basePage.showAdd" :app='ctx.basePage' :buttonApp='ctx.basePage' />
<Wxfl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='外协发料同步'" />
<Cbzx :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='成本中心领料同步'" />
<Wwcl :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='委外超领同步'" />
</template>
<template #toolbar="ctx">
<el-button @click="akck(ctx.basePage)" size='mini' type="primary">按库存开</el-button>
<el-button @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="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> -->
<!-- <ImportButton @success="()=>{
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'/lxyl/ckgl/cktz/import'" /> -->
<el-button @click="tbwl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">同步领料单</el-button>
<!-- <el-button @click="tbwl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">同步领料单</el-button> -->
<el-button @click="tbwl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">生产领料同步</el-button>
<el-button @click="wxfl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">外协发料同步</el-button>
<el-button @click="cbzx(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">成本中心领料同步</el-button>
<el-button @click="wwcl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">委外超领同步</el-button>
</template>
......@@ -24,6 +32,9 @@
import Edit from './edit.vue'
import Tbwl from './tbwl.vue'
import Akck from './akck.vue'
import Wxfl from './wxfl.vue'
import Cbzx from './cbzx.vue'
import Wwcl from './wwcl.vue'
export default {
data() {
return {
......@@ -115,8 +126,8 @@
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime()-1000*60*60*24*30,
endValue:new Date().getTime(),
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
"label": "仓库",
......@@ -141,8 +152,8 @@
}
],[
{
],
[{
label: '状态',
prop: 'zt',
span: 8,
......@@ -175,18 +186,21 @@
},
methods: {
beforeEdit(val){
let {row,edit} = val
if(row.djly=='KC'){
edit.otherEdit=Akck
}else{
edit.otherEdit=false
beforeEdit(val) {
let {
row,
edit
} = val
if (row.djly == 'KC') {
edit.otherEdit = Akck
} else {
edit.otherEdit = false
}
},
akck(ctx){
ctx.showAdd=true
akck(ctx) {
ctx.showAdd = true
},
qr(ctx){
qr(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
......@@ -206,7 +220,7 @@
this.$warning('请选中一条数据')
}
},
qxqr(ctx){
qxqr(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', {
confirmButtonText: '确定',
......@@ -226,18 +240,37 @@
this.$warning('请选中一条数据')
}
},
tbwl(ctx){
ctx.DialogWidth='30vw'
ctx.DialogTitle='同步领料单'
ctx.showDialog=true
tbwl(ctx) {
ctx.DialogWidth = '30vw'
ctx.DialogTitle = '同步领料单'
ctx.showDialog = true
},
wxfl(ctx) {
ctx.DialogWidth = '30vw'
ctx.DialogTitle = '外协发料同步'
ctx.showDialog = true
},
cbzx(ctx) {
ctx.DialogWidth = '30vw'
ctx.DialogTitle = '成本中心领料同步'
ctx.showDialog = true
},
wwcl(ctx) {
ctx.DialogWidth = '30vw'
ctx.DialogTitle = '委外超领同步'
ctx.showDialog = true
},
getRow(val){
this.$emit('getRow',val)
getRow(val) {
this.$emit('getRow', val)
}
},
components: {
Edit,Tbwl,
Akck
Edit,
Tbwl,
Akck,
Wxfl,
Cbzx,
Wwcl
}
}
......
......@@ -53,14 +53,6 @@ this.$post('common/datetime',{}).then(res=>{
readonly:false,
loading:false,
editColItemList:[
// {
// label: '开始时间',
// prop: 'start',
// span: 24,
// type: 'datetime',
// value: '',
// "required": true,
// },
{
label: '时间',
prop: 'time',
......@@ -68,7 +60,15 @@ this.$post('common/datetime',{}).then(res=>{
type: 'datetime',
value: '',
"required": true,
},
{
label: '业务单号',
prop: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
......
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/ckgl/cktz/sync/wwcl',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>
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/ckgl/cktz/sync/wxyl',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>
......@@ -137,7 +137,6 @@
// },
// treeUrl:''
}
}
......
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/rkgl/rktz/sync/dbrk',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>
......@@ -2,7 +2,8 @@
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Shd v-if="ctx.basePage.showDialog" :app='ctx.basePage' />
<Shd v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步送货单'" :app='ctx.basePage' />
<Dbrktb v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='调拨入库同步'" :app='ctx.basePage' />
</template>
<template #toolbar="ctx">
......@@ -13,6 +14,7 @@
<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="tbshd(ctx.basePage)" size='mini' type="primary">同步送货单</el-button>
<el-button @click="dbrktb(ctx.basePage)" size='mini' type="primary">调拨入库同步</el-button>
<!-- <el-button @click="qktjkw(ctx.basePage)" size='mini' type="primary">清空推荐库位</el-button> -->
</template>
......@@ -22,6 +24,7 @@
<script>
import Edit from './edit.vue'
import Shd from './shd.vue'
import Dbrktb from './dbrktb.vue'
export default {
data() {
return {
......@@ -221,6 +224,11 @@
ctx.DialogTitle='同步送货单'
ctx.showDialog=true
},
dbrktb(ctx){
ctx.DialogWidth='35vw'
ctx.DialogTitle='调拨入库同步'
ctx.showDialog=true
},
qktjkw(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
this.$confirm('是否继续该操作?', '提示', {
......@@ -310,7 +318,8 @@
},
components: {
Edit,
Shd
Shd,
Dbrktb
}
}
......
......@@ -53,14 +53,7 @@ this.$post('common/datetime',{}).then(res=>{
readonly:false,
loading:false,
editColItemList:[
// {
// label: '开始时间',
// prop: 'start',
// span: 24,
// type: 'datetime',
// value: '',
// "required": true,
// },
{
label: '时间',
prop: 'time',
......@@ -68,6 +61,13 @@ this.$post('common/datetime',{}).then(res=>{
type: 'datetime',
value: '',
"required": true,
},
{
label: '业务单号',
prop: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
......@@ -78,7 +78,7 @@ this.$post('common/datetime',{}).then(res=>{
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/thgl/rkthtz/sync/cgth',this.form).then(res=>{
this.$post('lxyl/rkgl/ckthtz/sync/lltl',this.form).then(res=>{
if(res.success){
this.isLoading=false
this.$success('操作成功')
......
......@@ -2,18 +2,17 @@
<BasePage @getRow='getRow' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Shd v-if="ctx.basePage.showDialog" :app='ctx.basePage' />
<Sclltldb v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='生产领料退料同步'" :app='ctx.basePage' />
<Wxtltb v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='外协退料同步'" :app='ctx.basePage' />
<Cbzxtltb v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='成本中心退料同步'" :app='ctx.basePage' />
</template>
<template #toolbar="ctx">
<!-- <ImportButton @success="()=>{
ctx.basePage.refresh()
}" :url="'/lxyl/rkgl/ckthtz/import'" />
<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="sapgz(ctx.basePage)" size='mini' type="primary">SAP过账</el-button>
<el-button @click="tbshd(ctx.basePage)" size='mini' type="primary">同步送货单</el-button> -->
<!-- <el-button @click="qktjkw(ctx.basePage)" size='mini' type="primary">清空推荐库位</el-button> -->
<el-button @click="sclltldb(ctx.basePage)" size='mini' type="primary">生产领料退料同步</el-button>
<el-button @click="wxtltb(ctx.basePage)" size='mini' type="primary">外协退料同步</el-button>
<el-button @click="cbzxtltb(ctx.basePage)" size='mini' type="primary">成本中心退料同步</el-button>
</template>
</BasePage>
......@@ -22,6 +21,9 @@
<script>
import Edit from './edit.vue'
import Shd from './shd.vue'
import Sclltldb from './sclltldb.vue'
import Wxtltb from './wxtltb.vue'
import Cbzxtltb from './cbzxtltb.vue'
export default {
data() {
return {
......@@ -216,11 +218,21 @@
},
methods: {
// tbshd(ctx){
// ctx.DialogWidth='35vw'
// ctx.DialogTitle='同步送货单'
// ctx.showDialog=true
// },
sclltldb(ctx){
ctx.DialogWidth='35vw'
ctx.DialogTitle='生产领料退料同步'
ctx.showDialog=true
},
wxtltb(ctx){
ctx.DialogWidth='35vw'
ctx.DialogTitle='外协退料同步'
ctx.showDialog=true
},
cbzxtltb(ctx){
ctx.DialogWidth='35vw'
ctx.DialogTitle='成本中心退料同步'
ctx.showDialog=true
},
getRow(val){
this.$emit('getRow',val)
......@@ -229,7 +241,10 @@
},
components: {
Edit,
Shd
Shd,
Sclltldb,
Wxtltb,
Cbzxtltb
}
}
......
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/rkgl/ckthtz/sync/tld',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>
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/rkgl/ckthtz/sync/wxtl',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>
<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: 'ywdh',
span: 24,
type: 'input',
value: '',
}
]
}
},
methods: {
save(){
this.$refs['form'].validate((valid) => {
if(valid){
this.isLoading=true
this.$post('lxyl/rkgl/rkthtz/sync/cgth',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>
......@@ -3,12 +3,12 @@
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Akck :type="'add'" v-if="ctx.basePage.showAdd" :app='ctx.basePage' :buttonApp='ctx.basePage' />
<Tblld :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
<Cgthtb :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="akck(ctx.basePage)" size='mini' type="primary">按库存开</el-button>
<el-button @click="cgth(ctx.basePage)" size='mini' type="primary">同步采购退货单</el-button>
<el-button @click="cgthtb(ctx.basePage)" size='mini' type="primary">采购退货单同步</el-button>
<!-- <el-button @click="qxqr(ctx.basePage)" size='mini' type="primary">取消确认</el-button> -->
</template>
......@@ -18,7 +18,7 @@
<script>
import Edit from './edit.vue'
import Akck from './akck.vue'
import Tblld from './tblld.vue'
import Cgthtb from './cgthtb.vue'
export default {
data() {
return {
......@@ -169,7 +169,7 @@
},
methods: {
cgth(ctx){
cgthtb(ctx){
ctx.DialogWidth='30vw'
ctx.DialogTitle='同步采购退货单'
ctx.showDialog=true
......@@ -203,7 +203,7 @@
components: {
Edit,
Akck,
Tblld
Cgthtb
}
}
......
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