Commit 9652adb1 authored by 李苏's avatar 李苏 💬

上架/拣货 选择仓库逻辑

parent 8a757f1b
......@@ -5,6 +5,7 @@
<!-- 操作逻辑类似选择入库单 -->
<xzckd @save='xzckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择出库单'" />
<xzdbckd @save='xzdbckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择调拨出库单'" />
<Tbsapck @save='tbsapckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择仓库'" />
<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"
......@@ -37,6 +38,7 @@
<script>
import xzckd from './xzckd.vue'
import xzdbckd from './xzdbckd.vue'
import Tbsapck from './tbsapck.vue'
import {
toFixed,
digit,
......@@ -51,7 +53,8 @@
mixins: [editMixin, editMixin_expand],
components: {
xzckd,
xzdbckd
xzdbckd,
Tbsapck
},
methods: {
/* 需要整体row时的回调 */
......@@ -95,6 +98,12 @@
delete item.zt
this.formDetail.push(_.cloneDeep(item))
})
/* 回填后重新选择仓库*/
this.$nextTick(()=>{
this.showDialog=true
this.DialogTitle='选择仓库'
this.DialogWidth='30vw'
})
},
/* 带入*/
xzdbckdSave(obj) {
......@@ -134,12 +143,20 @@
},
xzckd() {
this.DialogTitle = '选择出库单'
this.DialogWidth='80vw'
this.showDialog = true
},
xzdbckd() {
this.DialogTitle = '选择调拨出库单'
this.DialogWidth='80vw'
this.showDialog = true
},
tbsapckdSave(val){
/* 赋值回调*/
this.form.ckid=val.ckid
this.form.hzid=val.hzid
this.form.hzName=val.hzName
},
save() {},
/* 选择库存回调 */
savekc(list) {
......
<template>
<DefaultDialog :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 {
readonly: false,
editColItemList: [
{
"label": "仓库",
"prop": "ckid",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "lxyl/common/ck/queryCkidByRktzid",
"match": {
"value": "id",
"label": "name"
},
params:{
rktzid:this.app.form.lydjid
},
change: (row) => {
this.form.hzName=row.hzName
this.form.hzid=row.hzid
}
}
},
// {
// label: '退货单号',
// prop: 'ddh',
// span: 24,
// type: 'input',
// value: '',
// }
]
}
},
methods: {
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.app.showDialog = false
this.app.DialogWidth='80vw'
this.$emit('save',this.form)
}
})
}
}
}
</script>
<style scoped>
::v-deep .el-icon-close{
display: none;
}
</style>
......@@ -4,6 +4,7 @@
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<Xzrkqd @save='xzrkqdSave' :app='this' v-if="showDialog&&DialogTitle=='选择入库单'" />
<Xzdbckd @save='xzdbckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择调拨入库单'" />
<Tbsapck @save='tbsapckdSave' :app='this' v-if="showDialog&&DialogTitle=='选择仓库'" />
<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"
......@@ -46,10 +47,11 @@
} from 'common'
import Xzrkqd from './xzrkqd.vue'
import Xzdbckd from './xzdbckd.vue'
import Tbsapck from './tbsapck.vue'
export default {
mixins: [editMixin, editMixin_expand],
components: {
Xzrkqd,Xzdbckd
Xzrkqd,Xzdbckd,Tbsapck
},
mounted() {
// this.form.sjrName=this.username
......@@ -58,6 +60,7 @@
methods: {
xzdbckd() {
this.DialogTitle = '选择调拨入库单'
his.DialogWidth='80vw'
this.showDialog = true
},
getFormDetail() {
......@@ -71,6 +74,12 @@
this.formDetail.forEach(item => item.kwid = '')
}
},
tbsapckdSave(val){
/* 赋值回调*/
this.form.ckid=val.ckid
this.form.hzid=val.hzid
this.form.hzName=val.hzName
},
xzdbckdSave(obj){
let {
list,
......@@ -144,9 +153,16 @@
}
})
/* 回填后重新选择仓库*/
this.$nextTick(()=>{
this.showDialog=true
this.DialogTitle='选择仓库'
this.DialogWidth='30vw'
})
},
xzrkqd() {
this.DialogTitle = '选择入库单'
this.DialogWidth='80vw'
this.showDialog = true
},
/* 需要整体row时的回调 */
......
......@@ -13,7 +13,7 @@
</div>
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="app.showDialog=false">取 消</el-button>
<!-- <el-button @click="app.showDialog=false">取 消</el-button> -->
<el-button type="primary" @click="save()">确 定</el-button>
</span>
</div>
......@@ -48,15 +48,22 @@
{
"label": "仓库",
"prop": "ckid",
"span": 8,
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "lxyl/common/ck/queryCkid",
"src": "lxyl/common/ck/queryCkidByRktzid",
"match": {
"value": "id",
"label": "name"
},
params:{
rktzid:this.app.form.lydjid
},
change: (row) => {
this.form.hzName=row.hzName
this.form.hzid=row.hzid
}
}
},
......@@ -75,17 +82,9 @@
save() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.isLoading = true
this.$post('lxyl/rkgl/rktz/sync/xsthd', 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
})
this.app.DialogWidth='80vw'
this.$emit('save',this.form)
}
})
}
......@@ -95,4 +94,8 @@
</script>
<style scoped>
::v-deep .el-icon-close{
display: none;
}
</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