Commit 21b1905f authored by 李苏's avatar 李苏 💬

备料登记调整

parent 2fc0443c
<template>
<RelDialog width="50%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<RelDialog ref="RelDialog" bigTitle @getForm='getForm' detailTable='BLDJMX'
@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">
<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 :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="app.showDialog=false">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button>
</span>
</div> -->
</RelDialog>
</template>
<script>
import RqComponents from './rqgl/index.vue'
import Wym from './wym/index.vue'
import WMSLLD from './wmsckd'
import {
editMixin
toFixed,
digit,
doRkdChange
} from 'common/src/utils/blur.js'
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin],
mixins: [editMixin, editMixin_expand],
methods: {
save() {
this.$refs['form'].validate((valid)=>{
if(valid){
this.$post('lxyl/rkgl/sjrw/pkrk/save',{
...this.form,
datas:this.formDetail
}).then(res=>{
if(res.data.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) {
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 {
Wym: Wym,
form: {
// djly:'M'
},
/* 常规edit数据 */
editColItemList: [{
"label": "仓库",
"prop": "ckid",
"span": 8,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "lxyl/jcsj/uck/ck/queryCjckid",
"match": {
"value": "id",
"label": "name"
},
params:{
flid:'D'
}
}
},
{
label: '库位',
prop: 'kwid',
span: 8,
required: true,
type: 'AuxInput',
typeConfig: {
queryParams:()=>{
return{
ckid:this.form.ckid
}
},
isRequest: false,
code: 'WMSKWWH',
label: 'kwCode',
transform: {
value: 'id',
label: 'code'
}
},
},
{
label: '容器',
prop: 'rqid',
span: 12,
type: 'AuxInput',
span: 8,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: false,
code: true,
dynamic: true,
code: 'RQGLKMS',
label: 'rqCode',
component: RqComponents,
dialogTitle: '选择容器',
transform: {
value: 'id',
label: 'code'
},
give:(item)=>{
this.$post('wms/common/queryRqmxByCode',{
code:item.code
}).then(res=>{
if(res.success){
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: 12,
label: '出库单',
prop: 'lydjid',
span: 8,
required: false,
type: 'AuxInput',
required: true,
typeConfig: {
isRequest: false,
"code": "WMSKWWH",
"label": "kwCode",
"transform": {
"value": "id",
"label": "name"
code: true,
dynamic: true,
component: WMSLLD,
label: 'lydjDjid',
transform: {
value: 'id',
label: 'djid'
}
}
}
],
/* 从表编辑数据 */
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" :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: 'lxyl/ckgl/cktz',
// queryUrl:'wms/rkgl/mpzy/query/rktz',
tableTitle: [
{
title: "状态",
field: "zt",
fieldType: "ftString",
align: 'center',
width: 80,
"transform": {
"url": "lxyl/ckgl/cktz/init/zt",
"label": "name",
"value": "id"
}
},
{
title: "出库单号",
field: "djid",
width: 140
},
{
title: "业务日期",
field: "ywrq",
fieldType: 'ftDate'
},
{
title: "货主",
field: "hzName",
width: 140
},
{
title: "事务类型",
field: "swlxName",
width: 100
},
{
title: "仓库编码",
field: "ckCode",
width: 140
},
{
title: "仓库",
field: "ckName",
width: 140
},
// {
// title: "需求日期",
// field: "xqrq",
// fieldType: 'ftDate'
// },
{
title: "领料部门",
field: "bmName",
width: 140
},
{
title: "单据来源",
field: "djly",
width: 140,
"transform": {
"url": "lxyl/ckgl/cktz/init/djly",
"label": "name",
"value": "id"
}
},
{
title: "来源单据号",
field: "lydjDjid",
width: 140
},
{
title: "备注",
field: "bz",
width: 240
},
{
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/common/ck/queryCkid",
"match": {
"value": "id",
"label": "name"
}
}
},
{
label: '单据编号',
prop: 'djid',
span: 8,
type: 'input',
value: ''
}
],
[{
label: '状态',
prop: 'zt',
span: 8,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/ckgl/cktz/init/zt'
}
},
{
label: '事务类型',
prop: 'swlxid',
span: 8,
type: 'RelSelect',
typeConfig: {
src: 'lxyl/ckgl/cktz/init/swlx'
}
},
{
label: '货主',
prop: 'hzName',
span: 8,
type: 'input',
}
]
],
/* 默认启停用 */
showqt: false,
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
}
}
</script>
<style>
</style>
<template>
<BasePage 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/jcsj/pack/queryPackDetail',
queryUrl:'wms/jcsj/pack/queryPackDetail',
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: {
/* 示例*/
// demo(basePage){
// }
},
components: {
// Edit
}
}
</script>
<style>
</style>
......@@ -262,6 +262,9 @@
::v-deep .wh {
/* 无样式*/
}
// ::v-deep .infoCar{
// width: 200px;
// }
::v-deep .yh {
background-size: 100% 100%;
background-image: url(./lkdp/xz.svg);
......@@ -269,7 +272,7 @@
::v-deep .dj {
background: #009ae7;
background-size: 100% 100%;
background-image: url(./lkdp/sd.svg);
background-image: url(./lkdp/dj.svg);
}
::v-deep .sd {
background-color: darkorange;
......
......@@ -5,7 +5,7 @@
<div class="full container">
<div @click='eclick(item)' :code='item.code' :item='JSON.stringify(item)' ref="mx1"
v-for="(item,index) in boxList" :key="item.code" class="box" :class="{
yh:item.kczt=='U', wh:item.kczt=='E', dj:item.zt=='F', sd:item.zt=='L', kccj:item.cjzt=='Y',sdkccj:item.cjzt=='Y'&&item.zt=='L',sdkccj:item.cjzt=='Y'&&item.zt=='F'
yh:item.kczt=='U', wh:item.kczt=='E', dj:item.zt=='F', sd:item.zt=='L',djyh:item.kczt=='U'&&item.zt=='F',sdyh:item.kczt=='U'&&item.zt=='L',kccj:item.cjzt=='Y',sdkccj:item.cjzt=='Y'&&item.zt=='L',sdkccj:item.cjzt=='Y'&&item.zt=='F'
}">
<!-- {{item.code}} -->
</div>
......
......@@ -2,8 +2,8 @@
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<!-- basePage-->
<BasePage @basePageCreated='basePageCreated' ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;"
:config="config">
<BasePage @basePageCreated='basePageCreated' ref="basePage" :power='power' :toolButton='false' class="min_full"
style="height: 100%;" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
......@@ -63,20 +63,20 @@
width: 140
},
{
title: "库区",
field: "kqName",
width: 140
},
{
title: "库位",
field: "kwCode",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
title: "库区",
field: "kqName",
width: 140
},
{
title: "库位",
field: "kwCode",
width: 140
},
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "容器",
field: "rqCode",
......@@ -87,20 +87,20 @@
field: "rqKczt",
width: 140,
"transform": {
"url": "wms/jcsj/rq/init/kczt",
"label": "name",
"value": "id"
}
"url": "wms/jcsj/rq/init/kczt",
"label": "name",
"value": "id"
}
},
{
title: "状态",
field: "rqZt",
width: 140,
"transform": {
"url": "wms/jcsj/rq/init/zt",
"label": "bmmc",
"value": "id"
}
"url": "wms/jcsj/rq/init/zt",
"label": "bmmc",
"value": "id"
}
},
],
......@@ -120,19 +120,33 @@
}
},
{
"label": "货主",
"prop": "hzid",
"span": 6,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "wms/jcsj/hz/query",
"match": {
"value": "id",
"label": "name"
}
}
},
label: '库位编码',
prop: 'kwCode',
span: 6,
type: 'input',
value: ''
},
{
label: '容器编码',
prop: 'rqCode',
span: 6,
type: 'input',
value: ''
}
// {
// "label": "货主",
// "prop": "hzid",
// "span": 6,
// "type": "RelSelect",
// "value": "",
// "typeConfig": {
// "src": "wms/jcsj/hz/query",
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// },
]
]
......@@ -142,15 +156,15 @@
}
},
methods: {
basePageCreated(ctx){
ctx.queryParams.ckid=this.app.form.ckid
basePageCreated(ctx) {
ctx.queryParams.ckid = this.app.form.ckid
},
save() {
/* 判定是否勾选*/
let list = this.$refs.basePage.$refs.TablePager.selectedList
if (list.length != 0) {
/* 触发save事件 */
this.$emit('save', list)
/* 触发save事件 */
this.$emit('save', list)
} else {
this.$warning('请至少勾选一条数据')
}
......
......@@ -201,12 +201,12 @@
label: '工位',
prop: 'gwid',
span: 8,
required: false,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'GWID',
label: 'gwName',
label: 'gwCode',
transform: {
value: 'id',
label: 'name'
......
......@@ -28,8 +28,8 @@
},
config: {
/* 基本配置*/
url: 'wms/rkgl/mpzy/query/rktz',
queryUrl:'wms/rkgl/sjrw/query/rktz',
url: 'wms/rkgl/sjrw/query/rktz',
queryUrl:'wms/rkgl/sjrw/query/rktz',
tableTitle: [
{
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