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

新增仓库变更功能

parent d7bbf836
<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 :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.form.id = this.app.singleItem.id
},
data() {
return {
isLoading: false,
text: '加载中',
readonly: false,
editColItemList: [{
"label": "仓库",
"prop": "ckid",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "lxyl/common/queryCk",
"match": {
"value": "id",
"label": "name"
},
params: {
ckfl: 'X'
}
}
}
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.isLoading = true
this.$post('lxyl/ckgl/usofh/sync/ckToSap', 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 :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbjhd :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
<Tbjhd :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='同步交货单'" />
<Ckbg :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='仓库变更'" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
......@@ -12,6 +13,7 @@
<el-button @click="sapgz(ctx.basePage)" size='mini' type="primary">SAP过账</el-button>
<el-button @click="gb(ctx.basePage)" size='mini' type="primary">关闭</el-button>
<el-button @click="sfsap(ctx.basePage)" size='mini' type="primary">释放SAP修改权限</el-button>
<el-button @click="ckbg(ctx.basePage)" size='mini' type="primary">仓库变更</el-button>
</template>
</BasePage>
......@@ -20,6 +22,7 @@
<script>
import Edit from './edit.vue'
import Tbjhd from './tbjhd.vue'
import Ckbg from './ckbg.vue'
export default {
data() {
return {
......@@ -239,6 +242,16 @@
},
methods: {
ckbg(ctx){
if (ctx.singleItem && ctx.singleItem.id) {
ctx.DialogTitle='仓库变更'
ctx.DialogWidth='30vw'
ctx.showDialog=true
}else{
this.$warning('请选中一条数据')
}
},
sfsap(ctx) {
let list = ctx.$refs.TablePager.selectedList || []
if (list.length > 0) {
......@@ -380,7 +393,8 @@
},
components: {
Edit,
Tbjhd
Tbjhd,
Ckbg
}
}
......
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