Commit 97c5e364 authored by 李苏's avatar 李苏 💬

立库拣货回库

parent ee76b58b
......@@ -539,6 +539,19 @@ export const powerRoutes = [
name: 'spk',
path: "spk",
},
{
component: 'ccgl/rkgl/lkjhhk/index',
hidden: false,
meta: {
"title": "立库拣货回库",
"icon": "",
"noCache": false,
"link": null,
"mkid": 920031400,
},
name: 'lkjhhk',
path: "lkjhhk",
},
],
},
......
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<el-row :gutter="20" :app="this">
<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" :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
</RelDialog>
</template>
<script>
import {
editMixin
} from 'common'
export default {
mixins: [editMixin],
data() {
return {
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input'
},
]
}
}
}
</script>
<template>
<div class="outer">
<div class=" higher flex-column">
<!-- 分层-->
<div class="top">
<Top @getRow='topGetRow' ref="top"></Top>
</div>
<div class="bottom flex">
<div class="full" >
<el-tabs class="full" v-model="activeName" >
<el-tab-pane class="full" label="明细" name="first">
<Mx ref="mx" class="full" />
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
</div>
</template>
<script>
import Top from './top/index.vue'
import Mx from './mx.vue'
export default {
components: {
Top,Mx
},
data(){
return {
activeName: 'first'
}
},
methods: {
topGetRow(row) {
/* dom赋值*/
let mid = row.id
this.$refs.mx.$refs.basePage.queryParams.mid = mid
this.$refs.mx.$refs.basePage.$refs['TablePager'].pageQuery({
setFirstCurrent: true
})
},
}
}
</script>
<style lang="scss" scoped>
.outer {
overflow: auto;
height: calc(100vh - 84px);
width: 100%;
.top {
width: 100%;
height: 45%;
}
.bottom {
width: 100%;
height: 55%;
.left {
width: 50%;
height: 100%;
}
.right {
width: 50%;
height: 100%;
}
}
}
.higher {
height: 140vh;
}
.flex-column {
display: flex;
flex-direction: column;
}
::v-deep .el-tabs__content{
height: calc(100% - 40px);
}
::v-deep .el-tabs__nav-scroll{
padding-left: 10px;
}
</style>
<template>
<BasePage @getRow='getRow' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;border-top: 0px;" :autoQuery='false'
:config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
</template>
</BasePage>
</template>
<script>
import wlsx from 'common/src/mixin/wlphsx.js'
import wlphsx from 'common/src/mixin/wlphsx.js'
export default {
mounted() {
},
mixins:[wlsx,wlphsx],
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'lxyl/rkgl/sjrw/ckhk/query/detail',
queryUrl: 'lxyl/rkgl/sjrw/ckhk/query/detail',
tableTitle: [
{
title: "唯一码",
field: "packCode",
width: 180
},
{
title: "物料编码",
field: "wlxxCode",
width: 160
},
{
title: "物料名称",
field: "wlxxName",
width: 180
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 180
},
{
title: "制令号",
field: "zlh",
width: 180
},
{
title: "数量",
field: "sl",
width: 120
}
],
queryParams: [],
}
}
},
methods: {
getRow(val){
this.$emit('getRow',val)
},
demo(ctx){
if(ctx.singleItem&&ctx.singleItem.id){
console.log(ctx.singleItem)
}else{
this.$warning('请选中一条数据')
}
}
},
components: {
}
}
</script>
<style>
</style>
<template>
<RelDialog ref="RelDialog" bigTitle @getForm='getForm'
@getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<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"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
<!-- 额外数据 -->
</el-row>
<div class="editTab">
<editTableForEdit :expandTitle='true' :phsxTitle='true' :AuxButton="false" :indexApp='app' :type='type'
ref="editTableForEdit" :editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail">
<template v-if="type!='view'" #toolbar="ctx">
<AuxButton
:queryParams="{
rktzid:that.form.lydjid
}"
:dynamic='true' :component='Wym' rename='选择唯一码' code='dynamic' @save="savewym" />
</template>
</editTableForEdit>
</div>
<el-row :gutter="20" :app="this" class="editRow bottomInfo">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList2 " :value="item.value" :span="item.span" :label="item.label"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" />
</el-row>
</el-form>
<!-- editTab数据 -->
<div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="$refs.RelDialog.closeAll()">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div>
</RelDialog>
</template>
<script>
import Wym from './wym/index.vue'
import WMSRKD from './wmsRkd'
import {
toFixed,
digit,
doRkdChange
} from 'common/src/utils/blur.js'
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
methods: {
save() {
this.$refs['form'].validate((valid)=>{
if(valid){
this.$post('lxyl/rkgl/sjrw/lkrk/save',{
...this.form,
datas:this.formDetail
}).then(res=>{
console.log(res)
if(res.success){
this.$success('操作成功')
this.$refs.RelDialog.closeAll()
this.app.refresh()
}
})
}
})
},
getForm(val) {
// val.djly = 'M'
},
/* 需要整体row时的回调 */
computedRow(row) {
// this.$refs.editTableForEdit.$forceUpdate()
},
/* 选择list时的回调 */
/* 选择库存回调 */
savewym(list) {
debugger
let packidList=this.formDetail.map(pitem=>pitem.packid)
list.forEach(item => {
if(packidList.includes(item.packid)){
console.log('重复')
}else{
delete item.id
this.formDetail.push(_.cloneDeep(item))
}
// 转换并且push
// item.lydjid = item.id
})
}
},
mounted() {
// this.form.llrName = this.username
// this.form.llrid = this.userid
},
data() {
return {
that:this,
Wym: Wym,
form: {
// djly:'M'
},
/* 常规edit数据 */
editColItemList: [{
"label": "仓库",
"prop": "ckid",
"span": 8,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "lxyl/common/ck/queryCkidByRktzid",
"match": {
"value": "id",
"label": "name"
},
params:{
flid:'L'
}
}
},
{
"label": "库区",
"prop": "kqid",
"span": 8,
"type": "RelSelect",
"value": "",
// "required": true,
"typeConfig": {
"src": "wms/jcsj/kq/query",
"match": {
"value": "id",
"label": "name"
},
linkage: true,
linkParams: ['ckid']
}
},
{
label: '容器',
prop: 'rqid',
span: 8,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
code: 'RQGLKMS',
label: 'rqCode',
transform: {
value: 'id',
label: 'code'
},
give:(item)=>{
this.$post('wms/common/queryRqmxByCode',{
code:item.code
}).then(res=>{
if(res.success){
let length=this.formDetail.length
this.formDetail.splice(0,length)
/* */
let list =res.data.records||[]
let packidList=this.formDetail.map(pitem=>pitem.packid)
list.forEach(item=>{
item.sl=item.packmxSl
delete item.id
if(packidList.includes(item.packid)){
console.log('重复')
}else{
this.formDetail.push(item)
}
})
}
})
}
}
},
{
label: '库位',
prop: 'kwid',
span: 8,
type: 'AuxInput',
typeConfig: {
queryParams:()=>{
return{
ckid:this.form.ckid
}
},
isRequest: false,
code: 'WMSKWWH',
label: 'kwCode',
transform: {
value: 'id',
label: 'code'
}
},
},
{
label: '工位',
prop: 'gwid',
span: 8,
// required: true,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'SLKGWID',
label: 'gwCode',
transform: {
value: 'id',
label: 'name'
}
},
},
{
label: '入库单',
prop: 'lydjid',
span: 8,
required: false,
type: 'AuxInput',
typeConfig: {
isRequest: false,
code: true,
dynamic: true,
component: WMSRKD,
label: 'lydjDjid',
transform: {
value: 'id',
label: 'djid'
},
give:(item)=>{
this.$post('lxyl/common/ck/queryCkidByRktzid',{
rktzid:item.id
}).then(res=>{
if(res.success){
let list =res.data.records||[]
if(list.length==1){
}
this.form.ckid=list[0].id
}
})
}
}
}
],
editColItemList2:[
{
"label": "状态",
"prop": "zt",
"span": 8,
"type": "RelSelect",
"value": "",
readonly:true,
"typeConfig": {
"src": "wms/rkgl/sjrw/init/zt",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '维护人',
prop: 'whr',
type: 'input',
span: 8,
readonly:true,
},
{
label: '维护时间',
prop: 'whsj',
span: 8,
type: 'datetime',
readonly:true,
value:new Date().getTime()
}
],
/* 从表编辑数据 */
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "唯一码",
field: "packCode",
width: 180,
},
{
title: "物料编码",
field: "wlxxCode",
width: 180,
},
{
title: "物料名称",
field: "wlxxName",
width: 160
},
{
title: "规格",
field: "wlxxGg",
width: 140
},
{
title: "数量",
field: "sl",
// type: 'inputText',
width: 160
},
{
title: "物料批号",
field: "wlph",
width: 180,
},
{
title: "制令号",
field: "zlh",
// type: 'inputText',
width: 180,
}
]
}
}
}
</script>
<style lang="scss" scoped>
@import url("~common/src/assets/styles/editDetail.scss");
</style>
<template>
<BasePage ref="basePage" @getRow='getRow' :power='power' class="min_full" style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Xzgw ref="xzgw" @saveGw='saveGw' :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<el-button @click="hk(ctx.basePage)" size='mini' type="primary">回库</el-button>
<!-- <el-button @click="close(ctx.basePage)" size='mini' type="primary">关闭</el-button> -->
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
import Xzgw from './xzgw.vue'
export default {
data() {
return {
power: {
add: true,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
queryDetail: true,
/* 基本配置*/
url: 'lxyl/rkgl/sjrw/ckhk/',
tableTitle: [{
title: "状态",
field: "zt",
"transform": {
"url": "lxyl/rkgl/sjrw/ckhk/init/zt",
"label": "name",
"value": "id"
},
width: 100
},
{
title: "任务号",
field: "djid",
width: 140
},
{
title: "业务日期",
field: "ywrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "库区",
field: "kqName",
width: 140
},
{
title: "起始位",
field: "gwName",
width: 140
},
{
title: "目标位",
field: "kwName",
width: 140
},
{
title: "容器",
field: "rqCode",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "入库单号",
field: "lydjDjid",
width: 140
},
{
title: "开始时间",
field: "kssj",
fieldType: "ftDateTime"
},
{
title: "结束时间",
field: "jssj",
fieldType: "ftDateTime"
},
{
title: "耗时",
field: "timespan",
width: 140,
fieldType: "timespan"
},
{
title: "创建人",
field: "cjr"
},
{
title: "创建时间",
field: "cjsj",
fieldType: "ftDateTime"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '日期',
startProp: "start",
endProp: "end",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
"label": "仓库",
"prop": "ckid",
"span": 8,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/jcsj/uck/ck/queryCjckid",
"match": {
"value": "id",
"label": "name"
},
params: {
flid: 'L'
}
}
},
{
label: '入库单号',
prop: 'lydjDjid',
span: 8,
type: 'input',
value: ''
}
],
[{
label: '容器',
prop: 'rqInfo',
span: 8,
type: 'input',
value: ''
},
{
label: '唯一码',
prop: 'packInfo',
span: 8,
type: 'input',
value: ''
},
{
"label": "状态",
"prop": "zt",
"span": 8,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/rkgl/sjrw/ckhk/init/zt ",
"match": {
"value": "id",
"label": "name"
}
}
},
]
],
/* 默认启停用 */
showqt: false,
}
}
},
methods: {
getRow(val) {
this.$emit('getRow', val)
},
saveGw(form) {
let params = {
gwid: form.gwid,
rqid: form.rqid
}
this.$post('lxyl/rkgl/sjrw/lkrk/start', params).then(res => {
if (res.success) {
this.$refs.basePage.refresh()
}
})
},
hk(ctx) {
let map={
'D':'平库',
'L':'立库'
}
/* 判断状态*/
if (ctx.singleItem && ctx.singleItem.id) {
if(ctx.singleItem.zt!='W'){
this.$warning('任务不是待上架状态,不允许回库!')
return
}
let type=ctx.singleItem.ckFlid
ctx.DialogTitle = `${map[type]}回库`
ctx.DialogWidth = '30vw'
ctx.showDialog = true
this.$nextTick(()=>{
this.$refs.xzgw.apitype=type
})
} else {
this.warning('请选中一条数据')
}
},
// close(ctx){
// if(ctx.singleItem&&ctx.singleItem.id){
// this.$post('lxyl/rkgl/sjrw/lkrk/close',{
// id:ctx.singleItem.id
// }).then(res=>{
// if(res.success){
// this.$success('任务关闭成功!')
// ctx.refreshId(res.data.id)
// }
// })
// }else{
// this.warning('请选择一条数据!')
// }
// }
},
components: {
Edit,
Xzgw
}
}
</script>
<style>
</style>
<template>
<BasePage :toolButtonConfig="{
showExcel:false,
showPrint:false,
showField:true
}" ref="basePage" :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
export default {
data() {
return {
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'wms/rkgl/sjrw/query/rktz',
queryUrl:'wms/rkgl/sjrw/query/rktz',
tableTitle: [
{
title: "状态",
field: "bzzt",
fieldType: "ftString",
align: 'center',
width: 80,
"transform": {
"url": "wms/rkgl/rktz/init/bzzt",
"label": "name",
"value": "id"
}
},
{
title: "入库单号",
field: "djid",
width: 140
},
{
title: "入库日期",
field: "ywrq",
fieldType: 'ftDate'
},
// {
// title: "入库人",
// field: "rkr",
// width: 140
// },
{
title: "事务类型",
field: "swlxName",
width: 100
},
{
title: "仓库",
field: "ckid",
width: 140,
hidden: true
},
{
title: "仓库",
field: "ckName",
width: 140
},
{
title: "入库部门",
field: "bmName",
width: 140
},
{
title: "备注",
field: "bz",
width: 240
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: 'ftDateTime'
}
],
queryParams: [
[
{
label: '开始日期',
prop: 'start',
span: 6,
type: 'date',
value: ''
},
{
label: '结束日期',
prop: 'end',
span: 6,
type: 'date',
value: ''
},
{
"label": "仓库",
"prop": "ckid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '单据编号',
prop: 'djid',
span: 6,
type: 'input',
value: ''
}
],[
{
label: '状态',
prop: 'zt',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/rkgl/rktz/init/zt'
}
},
{
label: '事务类型',
prop: 'swlxid',
span: 6,
type: 'RelSelect',
typeConfig: {
src: 'wms/rkgl/rktz/init/swlx'
}
}
]
],
/* 默认启停用 */
showqt: false,
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
}
}
</script>
<style>
</style>
<template>
<BasePage :toolButtonConfig="{
showExcel:false,
showPrint:false,
showField:true
}" :mixedQueryParams='$attrs.mixedQueryParams' ref="basePage" :power='power' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
</template>
</BasePage>
</template>
<script>
export default {
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: false,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'wms/rkgl/sjrw/query/pack',
queryUrl:'wms/rkgl/sjrw/query/pack',
tableTitle: [
{
title: "唯一码",
field: "packCode",
width: 140
},
// {
// title: "容器码",
// field: "rqCode",
// width: 140
// },
// {
// title: "货主编码",
// field: "hzCode",
// width: 140
// },
// {
// title: "货主",
// field: "hzName",
// width: 140
// },
// {
// title: "状态",
// field: "packZt",
// width: 140,
// transform: {
// "url": "wms/jcsj/rq/init/zt",
// "label": "name",
// "value": "id"
// }
// },
{
title: "库存状态",
field: "packKczt",
width: 140,
transform: {
"url": "wms/jcsj/rq/init/kczt",
"label": "name",
"value": "id"
}
},
// {
// title: "容量状态",
// field: "packRlzt",
// width: 140,
// transform: {
// "url": "wms/jcsj/rq/init/rlzt",
// "label": "name",
// "value": "id"
// }
// },
// {
// title: "运输状态",
// field: "packYszt",
// width: 140,
// transform: {
// "url": "wms/jcsj/rq/init/yszt",
// "label": "name",
// "value": "id"
// }
// },
{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 180
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 180
},
{
title: "数量",
field: "sl",
width: 140
},
// {
// title: "入库单号",
// field: "rktzDjid",
// width: 180
// }
],
queryParams: [
[{
label: '唯一码',
prop: 'packCode',
span: 6,
type: 'input',
},
// {
// "label": "状态",
// "prop": "zt",
// "span": 6,
// "type": "RelSelect",
// "value": "",
// "typeConfig": {
// "src": "wms/jcsj/pack/init/zt",
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// },
// {
// "label": "库存状态",
// "prop": "kczt",
// "span": 6,
// "type": "RelSelect",
// "value": "",
// "typeConfig": {
// "src": "wms/jcsj/pack/init/kczt",
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// },
{
label: '物料批号',
prop: 'wlph',
span: 6,
type: 'input',
},
{
label: '物料',
prop: 'wlid',
span: 6,
required: false,
type: 'AuxInput',
typeConfig: {
give: (row) => {
},
isRequest: false,
code: 'WMSWLXX',
label: 'name',
transform: {
value: 'id',
label: 'name'
}
}
}
],
// [, ]
],
/* 默认启停用 */
showqt: false,
}
}
},
mounted() {
},
methods: {
/* 示例*/
},
components: {
// Edit
}
}
</script>
<style>
</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 :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() {
/* 初始化数据 */
},
watch:{
apitype(val){
if(val=='D'){
this.editColItemList.push(
{
label: "库位",
prop: "kwid",
span: 24,
type: 'AuxInput',
typeConfig: {
queryParams:()=>{
return{
ckid:this.app.singleItem.ckid
}
},
"code": "KWWHK",
"label": "kwCode",
"transform": {
"value": "id",
"label": "name"
},
}
}
)
}else{
this.editColItemList.push(
{
label: '工位',
prop: 'gwid',
span: 24,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'SLKGWID',
label: 'gwCode',
transform: {
value: 'id',
label: 'name'
}
},
}
)
}
}
},
data() {
return {
apitype: null,
isLoading: false,
text: '加载中',
readonly: false,
editColItemList: [
]
}
},
methods: {
save() {
if (this.apitype == 'D') {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$post('lxyl/rkgl/sjrw/ckhk/pkhk', {
id: this.app.singleItem.id,
kwid: this.form.kwid
}).then(res => {
if (res.success) {
this.$post('操作成功')
this.app.showDialog = false
this.app.refresh()
}
})
}
})
} else if (this.apitype == 'L') {
this.$refs['form'].validate((valid) => {
if (valid) {
this.$post('lxyl/rkgl/sjrw/ckhk/lksj ', {
id: this.app.singleItem.id,
gwid: this.form.gwid
}).then(res => {
if (res.success) {
this.$post('操作成功')
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