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

库存盘点 加个 按钮 url lxyl/kcgl/kcpd/lkxj 参数和那个也一样

parent 516ef695
<template>
<BasePage class="min_full" @getRow='getRow' style="height: 100%;" :config="config">
<BasePage class="min_full" @getRow='getRow' ref="basePage" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog&&ctx.basePage.DialogTitle=='选择工位'" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
......@@ -12,6 +13,8 @@
<el-button v-if="ctx.basePage.powerObj['22']" @click="wc(ctx.basePage)" size='mini' type="primary">完成</el-button>
<el-button v-if="ctx.basePage.powerObj['22']" @click="qxwc(ctx.basePage)" size='mini' type="primary">取消完成</el-button>
<el-button v-if="ctx.basePage.powerObj['23']" @click="sendSap(ctx.basePage)" size='mini' type="primary">发送至sap</el-button>
<el-button @click="cjxjrw(ctx.basePage)" size='mini'
type="primary">创建下架任务</el-button>
</template>
</BasePage>
......@@ -19,6 +22,7 @@
<script>
import Edit from './edit.vue'
import Xzgw from './xzgw.vue'
export default {
data() {
return {
......@@ -41,7 +45,8 @@
title: "盘点单号",
field: "djid",
fieldType: "ftString",
width: 130
width: 130,
},
{
title: "盘点仓库",
......@@ -129,6 +134,28 @@
},
methods: {
saveGw(form) {
let ctx = this.$refs.basePage
this.$post('lxyl/kcgl/kcpd/lkxj', {
id: ctx.singleItem.id,
gwid: form.gwid
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.refresh()
}
})
},
cjxjrw(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
ctx.DialogTitle = '选择工位'
ctx.DialogWidth = '40vw'
ctx.showDialog = true
} else {
this.$warning('请选中一条数据')
}
},
getRow(val) {
this.$emit('getRow', val)
},
......@@ -276,7 +303,7 @@
}
},
components: {
Edit
Edit,Xzgw
}
}
......
<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() {
/* 初始化数据 */
},
data() {
return {
isLoading: false,
text: '加载中',
readonly: false,
editColItemList: [{
label: '工位',
prop: 'gwid',
span: 24,
required: true,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/common/queryXlk',
transform: {
value: 'id',
label: 'name'
}
}
},
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$emit('saveGw',this.form)
this.app.showDialog=false
}
})
}
}
}
</script>
<style scoped>
</style>
......@@ -59,7 +59,7 @@
{
title: "仓库",
field: "ckName",
width: 140,
width: 140
},
{
title: "维护人",
......
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