Commit 4ce86364 authored by 李苏's avatar 李苏 💬

add new function about issue orders by inventory to outbound notification

parent d99c5dd5
<template>
<RelDialog bigTitle detailTable='LLCKMX' @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">
<Kc @save='kcSave' v-if="showDialog" :app='this' />
<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 :AuxButton='false' code='WMSWLXX' :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail">
<template #toolbar="ctx">
<el-button @click="xzkc(ctx.basePage)" size='mini' type="primary">选择库存</el-button>
<!-- <AuxButton :queryParams="{
ckid:form.ckid
}" rename='选择库存' code='WLKC' @save="savekc" /> -->
</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" >
</EditColItem>
</el-row>
</el-form>
<!-- editTab数据 -->
</RelDialog>
</template>
<script>
import {
toFixed,
digit,
doRkdChange
} from 'common/src/utils/blur.js'
import {
editMixin,
editMixin_expand
} from 'common'
import Kc from './kc.vue'
export default {
mixins: [editMixin, editMixin_expand],
methods: {
kcSave(obj){
debugger
let {list}=obj
this.form.ckid=list[0].ckid
this.form.hzid=list[0].hzid
this.form.hzName=list[0].hzName
// this.form.ywrq=row.ywrq
let length = this.formDetail.length
this.formDetail.splice(0, length)
list.forEach(item => {
item.yfsl=item.kcsl
item.lydjid = item.id
delete item.id
this.formDetail.push(_.cloneDeep(item))
})
},
xzkc(){
this.showDialog=true
},
/* 需要整体row时的回调 */
computedRow(row) {
// this.$refs.editTableForEdit.$forceUpdate()
},
/* 选择list时的回调 */
save(list) {
list.forEach(
async item => {
// let res = await this.$post('kc/common/query/kcsl', {
// ckid: this.form.ckid,
// wlid: item.id
// })
// item.kcsl = res.data.records?res.data.records.kcsl:0
// 转换并且push
item.wlid = item.id
item.wlxxName = item.name
item.wlxxCode = item.code
item.wlxxGg = item.gg
delete item.id
this.formDetail.push(_.cloneDeep(item))
})
},
/* 选择库存回调 */
savekc(list) {
list.forEach(item => {
// 转换并且push
delete item.id
this.formDetail.push(_.cloneDeep(item))
})
}
},
mounted() {
this.form.llrName = this.username
this.form.llrid = this.userid
},
components:{
Kc
},
data() {
return {
DialogWidth: '70vw',
DialogName: '',
DialogTitle: '选择库存',
showDialog:false,
form:{
djly:'KC'
},
/* 常规edit数据 */
editColItemList: [{
label: '出库单号',
prop: 'djid',
span: 8,
type: 'input',
// "required": true,
},
{
label: '业务日期',
prop: 'ywrq',
span: 8,
type: 'date',
value: new Date().getTime(),
"required": true,
},
{
"label": "仓库",
"prop": "ckid",
"span": 8,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "jcsj/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
},
change: (row) => {
this.form.bgy = row.bgy
}
}
},
// {
// label: '需求日期',
// prop: 'xqrq',
// span: 8,
// type: 'date',
// value: new Date().getTime(),
// "required": true,
// },
{
"label": "事务类型",
"prop": "swlxid",
"span": 8,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "lxyl/ckgl/cktz/init/swlx",
"match": {
"value": "id",
"label": "name"
}
}
},
{
"label": "领料部门",
"prop": "bmid",
"span": 8,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "jcsj/common/bm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '货主',
prop: 'hzid',
span: 8,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'HZID',
label: 'hzName',
transform: {
value: 'id',
label: 'name'
}
}
},
{
label: '备注',
prop: 'bz',
span: 24,
type: 'input',
},
],
/* 从表编辑数据 */
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物料编码",
field: "wlxxCode",
width: 180,
},
{
title: "物料名称",
field: "wlxxName",
width: 160
},
{
title: "规格",
field: "wlxxGg",
width: 140
},
{
title: "应出数量",
field: "yfsl",
allowEdit: true,
type: 'inputNumber',
// width: 200,
blur: toFixed(null),
},
// {
// title: "库存数量",
// field: "kcsl",
// width: 200,
// blur: toFixed(null),
// },
{
title: "计量单位",
field: "jldwName",
width: 100,
allowEdit: false
},
{
title: "物料批号",
field: "wlph",
type: 'inputText',
width: 180,
// show: JSON.parse(localStorage.getItem('isPhgl'))
},
{
title: "制令号",
field: "zlh",
type: 'inputText',
width: 180,
// show: JSON.parse(localStorage.getItem('isPhgl'))
},
{
show: JSON.parse(localStorage.getItem('isKwgl')),
title: "库位",
field: "kwid",
width: 240,
type: 'AuxInput',
typeConfig: {
isRequest: false,
"code": "KWWH",
"label": "kwName",
queryParams: (row) => {
return {
ckid: this.form.ckid
}
},
"transform": {
"value": "id",
"label": "name"
}
}
},
{
title: "备注",
field: "bz",
width: 200,
type: 'inputText',
allowEdit: true,
}
]
}
}
}
</script>
<style lang="scss" scoped>
@import url("~common/src/assets/styles/editDetail.scss");
</style>
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
<template #dialog="ctx"> <template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
<Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" /> <Tbwl :app='ctx.basePage' v-if="ctx.basePage.showDialog" />
<Akck :type="'add'" v-if="ctx.basePage.showAdd" :app='ctx.basePage' :buttonApp='ctx.basePage' />
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> --> <!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">直接入库</el-button> -->
...@@ -10,6 +11,7 @@ ...@@ -10,6 +11,7 @@
ctx.basePage.refresh() ctx.basePage.refresh()
}" :url="'/lxyl/ckgl/cktz/import'" /> }" :url="'/lxyl/ckgl/cktz/import'" />
<el-button @click="tbwl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">同步sap出库单</el-button> <el-button @click="tbwl(ctx.basePage)" size='mini' type="primary" style="margin-left: 10px;">同步sap出库单</el-button>
<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="qr(ctx.basePage)" size='mini' type="primary">确认</el-button>
<el-button @click="qxqr(ctx.basePage)" size='mini' type="primary">取消确认</el-button> <el-button @click="qxqr(ctx.basePage)" size='mini' type="primary">取消确认</el-button>
</template> </template>
...@@ -20,6 +22,7 @@ ...@@ -20,6 +22,7 @@
<script> <script>
import Edit from './edit.vue' import Edit from './edit.vue'
import Tbwl from './tbwl.vue' import Tbwl from './tbwl.vue'
import Akck from './akck.vue'
export default { export default {
data() { data() {
return { return {
...@@ -171,6 +174,9 @@ ...@@ -171,6 +174,9 @@
}, },
methods: { methods: {
akck(ctx){
ctx.showAdd=true
},
qr(ctx){ qr(ctx){
if (ctx.singleItem && ctx.singleItem.id) { if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('是否继续操作, 是否继续?', '提示', { this.$confirm('是否继续操作, 是否继续?', '提示', {
...@@ -221,7 +227,8 @@ ...@@ -221,7 +227,8 @@
} }
}, },
components: { components: {
Edit,Tbwl Edit,Tbwl,
Akck
} }
} }
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<BasePage ref="basePage" :power='power' class="min_full" style="height: 100%;" :config="config"> 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>
</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>
export default {
props: {
app: {
type: Object,
default: ()=>{
return {}
}
}
},
async mounted() {
},
data() {
return {
power: {
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: true,
saveSelected: true
},
config: {
/* 基本配置*/
url: 'lxyl/ckgl/cktz/query/kc',
queryUrl:'lxyl/ckgl/cktz/query/kc',
tableTitle: [{
title: "库位",
field: "kwName",
width: 100,
},
{
title: "容器",
field: "rqCode",
width: 160,
},
{
title: "唯一码",
field: "packCode",
width: 180,
},
{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 160
},
{
title: "规格",
field: "wlxxGg",
width: 140
},
{
title: "计量单位",
field: "jldwName",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140,
},
{
title: "库位名称",
field: "wlxxName",
width: 120,
},
{
title: "制令号",
field: "zlh",
width: 180,
},
{
title: "库存数量",
field: "kcsl",
width: 120,
fieldType: 'float'
},
{
title: "货主",
field: "hzName",
width: 180,
},
],
queryParams: [
[{
label: '物料信息',
prop: 'wlinfo',
span: 6,
type: 'input',
value: ''
},
{
"label": "仓库",
"prop": "ckid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
}
}
}
]
],
/* 默认启停用 */
showqt: false,
}
}
},
methods: {
save(){
let list=this.$refs.basePage.$refs.TablePager.selectedList||[]
if(list.length==0){
this.$warning('请至少勾选一条数据')
}else{
let obj={
list:list
}
/* 判定list wlid是否重复*/
let hzid=list.map(item=>item.hzid)
hzid=[...new Set(hzid)]
if(hzid.length>1){
this.$warning('所选项货主不唯一,请选择相同货主的数据。')
}else{
this.$emit('save',obj)
this.app.showDialog=false
}
}
}
}
}
</script>
<style scoped>
</style>
...@@ -34,21 +34,28 @@ ...@@ -34,21 +34,28 @@
/* 基本配置*/ /* 基本配置*/
url: 'wms/kcgl/rqdj', url: 'wms/kcgl/rqdj',
queryUrl: 'wms/kcgl/rqdj/query/detail', queryUrl: 'wms/kcgl/rqdj/query/detail',
tableTitle: [{ tableTitle: [
title: "唯一码",
field: "packCode",
width: 140
},
{ {
title: "容器", title: "单据类型",
field: "rqCode", field: "djlx",
width: 140 width: 140,
"transform": {
"url": "wms/kcgl/rqdj/init/rqdjmx/djlx",
"label": "name",
"value": "id"
}
}, },
{ {
title: "货主", title: "唯一码",
field: "hzName", field: "packCode",
width: 140 width: 140
}, },
// {
// title: "货主",
// field: "hzName",
// width: 140
// },
/* 分割*/ /* 分割*/
{ {
title: "物料编码", title: "物料编码",
......
...@@ -82,13 +82,13 @@ ...@@ -82,13 +82,13 @@
}, },
{ {
title: "来源单据号", title: "来源单据号",
field: "lydjid", field: "lydjDjid",
width: 200, width: 150,
}, },
{ {
title: "状态", title: "状态",
field: "zt", field: "zt",
width: 140, width: 80,
"transform": { "transform": {
"url": "wms/kcgl/rqdj/init/zt", "url": "wms/kcgl/rqdj/init/zt",
"label": "name", "label": "name",
...@@ -121,6 +121,13 @@ ...@@ -121,6 +121,13 @@
span: 6, span: 6,
type: 'input', type: 'input',
value: '' value: ''
},
{
label: '单据号',
prop: 'djid',
span: 6,
type: 'input',
value: ''
} }
......
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