Commit 0d2daefe authored by 周毅's avatar 周毅

修改WCS作业列表显示

parent c99205f1
<template> <template>
<RelDialog ref="RelDialog" bigTitle @getForm='getForm' <RelDialog
@getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'> ref="RelDialog"
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> 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"> <el-row :gutter="20" :app="this" class="editRow">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <EditColItem
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" :required="item.required || false"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" /> :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-row>
<div class="editTab"> <div class="editTab">
<editTableForEdit :expandTitle='true' :phsxTitle='true' :AuxButton="false" :indexApp='app' :type='type' <editTableForEdit
ref="editTableForEdit" :editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow' :expandTitle="true"
:editTableData="formDetail"> :phsxTitle="true"
<template v-if="type!='view'" #toolbar="ctx"> :AuxButton="false"
<AuxButton :dynamic='true' :component='Wym' rename='选择唯一码' code='dynamic' @save="savewym" /> :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> </template>
</editTableForEdit> </editTableForEdit>
</div> </div>
<el-row :gutter="20" :app="this" class="editRow bottomInfo"> <el-row :gutter="20" :app="this" class="editRow bottomInfo">
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <EditColItem
v-for="(item,index) in editColItemList2 " :value="item.value" :span="item.span" :label="item.label" :required="item.required || false"
:prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig' :rule="item.rule" /> :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-row>
</el-form> </el-form>
<!-- editTab数据 --> <!-- editTab数据 -->
<div slot="reFooter" class="refooter"> <div slot="reFooter" class="refooter">
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="$refs.RelDialog.closeAll()">取 消</el-button> <el-button @click="$refs.RelDialog.closeAll()">取 消</el-button>
<el-button type="primary" @click="save()">保 存</el-button> <el-button type="primary" @click="save()">保 存</el-button>
</span> </span>
</div> </div>
</RelDialog> </RelDialog>
</template> </template>
<script> <script>
import Wym from './wym/index.vue' import Wym from "./wym/index.vue";
import WMSRKD from './wmsRkd' import WMSRKD from "./wmsRkd";
import { import { toFixed, digit, doRkdChange } from "common/src/utils/blur.js";
toFixed, import { editMixin, editMixin_expand } from "common";
digit,
doRkdChange
} from 'common/src/utils/blur.js'
import {
editMixin,
editMixin_expand
} from 'common'
export default { export default {
mixins: [editMixin, editMixin_expand], mixins: [editMixin, editMixin_expand],
methods: { methods: {
save() { save() {
this.$refs["form"].validate((valid) => {
this.$refs['form'].validate((valid)=>{ if (valid) {
if(valid){ this.$post("lxyl/rkgl/sjrw/pkrk/save", {
this.$post('lxyl/rkgl/sjrw/pkrk/save',{ ...this.form,
...this.form, datas: this.formDetail,
datas:this.formDetail }).then((res) => {
}).then(res=>{ if (res.success) {
if(res.success){ this.$success("操作成功");
this.$success('操作成功') this.$refs.RelDialog.closeAll();
this.$refs.RelDialog.closeAll() this.app.refresh();
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() { getForm(val) {
// this.form.llrName = this.username // val.djly = 'M'
// this.form.llrid = this.userid
}, },
/* 需要整体row时的回调 */
computedRow(row) {
// this.$refs.editTableForEdit.$forceUpdate()
},
/* 选择list时的回调 */
data() { /* 选择库存回调 */
return { savewym(list) {
Wym: Wym, let packidList = this.formDetail.map((pitem) => pitem.packid);
form: { list.forEach((item) => {
// djly:'M' if (packidList.includes(item.packid)) {
}, console.log("重复");
/* 常规edit数据 */ } else {
editColItemList: [{ delete item.id;
"label": "仓库", this.formDetail.push(_.cloneDeep(item));
"prop": "ckid", }
"span": 8, // 转换并且push
"type": "RelSelect", // item.lydjid = item.id
"value": "", });
"required": true, },
"typeConfig": { },
"src": "lxyl/jcsj/uck/ck/queryCjckid", mounted() {
"match": { // this.form.llrName = this.username
"value": "id", // this.form.llrid = this.userid
"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'
}
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: 'rqid', label: "库位",
span: 8, prop: "kwid",
required: true, span: 8,
type: 'AuxInput', required: true,
typeConfig: { type: "AuxInput",
isRequest: false, typeConfig: {
code: 'RQGLKMS', queryParams: () => {
label: 'rqCode', return {
transform: { ckid: this.form.ckid,
value: 'id', };
label: 'code' },
}, isRequest: false,
give:(item)=>{ code: "WMSKWWH",
this.$post('wms/common/queryRqmxByCode',{ label: "kwCode",
code:item.code transform: {
}).then(res=>{ value: "id",
if(res.success){ label: "code",
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: 'lydjid',
span: 8,
required: false,
type: 'AuxInput',
typeConfig: {
isRequest: false,
code: true,
dynamic: true,
component: WMSRKD,
label: 'lydjDjid',
transform: {
value: 'id',
label: 'djid'
}
}
}
],
/* 从表编辑数据 */
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "唯一码",
field: "packCode",
width: 180,
}, },
{ },
title: "物料编码", {
field: "wlxxCode", label: "容器",
width: 180, 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/rkgl/sjrw/queryRqmxByCodeForSj", {
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) => {
if (item.wlid){
item.sl = item.packmxSl;
delete item.id;
if (packidList.includes(item.packid)) {
console.log("重复");
} else {
this.formDetail.push(item);
}
}
});
}
});
},
}, },
{ },
title: "物料名称", {
field: "wlxxName", label: "入库单",
width: 160 prop: "lydjid",
span: 8,
required: false,
type: "AuxInput",
typeConfig: {
isRequest: false,
code: true,
dynamic: true,
component: WMSRKD,
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: "规格", title: "规格",
field: "wlxxGg", field: "wlxxGg",
width: 140 width: 140,
}, },
{ {
title: "数量", title: "数量",
field: "sl", field: "sl",
// type: 'inputText', // type: 'inputText',
width: 160 width: 160,
}, },
{ {
title: "物料批号", title: "物料批号",
field: "wlph", field: "wlph",
width: 180, width: 180,
}, },
{ {
title: "制令号", title: "制令号",
field: "zlh", field: "zlh",
// type: 'inputText', // type: 'inputText',
width: 180, width: 180,
} },
] ],
} };
} },
} };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import url("~common/src/assets/styles/editDetail.scss"); @import url("~common/src/assets/styles/editDetail.scss");
</style> </style>
...@@ -38,17 +38,16 @@ ...@@ -38,17 +38,16 @@
/* 基本配置*/ /* 基本配置*/
url: 'lxyl/rkgl/sjrw/pkrk', url: 'lxyl/rkgl/sjrw/pkrk',
tableTitle: [ tableTitle: [
{
title: "入库单号",
field: "lydjDjid",
width: 140
},
{ {
title: "任务号", title: "任务号",
field: "djid", field: "djid",
width: 140 width: 140
}, },
{
title: "日期",
field: "ywrq",
fieldType: "ftDate"
},
{ {
title: "仓库", title: "仓库",
field: "ckName", field: "ckName",
...@@ -60,12 +59,7 @@ ...@@ -60,12 +59,7 @@
width: 140 width: 140
}, },
{ {
title: "起始位", title: "库位",
field: "gwName",
width: 140
},
{
title: "目标位",
field: "kwName", field: "kwName",
width: 140 width: 140
}, },
...@@ -74,19 +68,26 @@ ...@@ -74,19 +68,26 @@
field: "rqCode", field: "rqCode",
width: 140 width: 140
}, },
// { {
// title: "唯一码", title: "唯一码",
// field: "packCode", field: "packCode",
// width: 140 width: 140
// }, },
{
title: "入库单号",
field: "lydjDjid",
width: 140
},
{ {
title: "创建人", title: "创建人",
field: "cjr" field: "cjr",
hidden: true
}, },
{ {
title: "创建时间", title: "创建时间",
field: "cjsj", field: "cjsj",
fieldType: "ftDateTime" fieldType: "ftDateTime",
hidden: true
}, },
{ {
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
title: "维护时间", title: "维护时间",
field: "whsj", field: "whsj",
fieldType: "ftDateTime" fieldType: "ftDateTime"
}, }
], ],
queryParams: [ queryParams: [
[{ [{
......
...@@ -5,154 +5,155 @@ ...@@ -5,154 +5,155 @@
</template> </template>
<template #toolbar="ctx"> <template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 --> <!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
</template> </template>
</BasePage> </BasePage>
</template> </template>
<script> <script>
// import Edit from './edit.vue' // import Edit from './edit.vue'
export default { export default {
data() { data() {
return { return {
power: { power: {
add: false, add: false,
copy: false, copy: false,
/* 手动控制删除 */ /* 手动控制删除 */
delButton: true, delButton: true,
/* 手动控制编辑按钮权限 */ /* 手动控制编辑按钮权限 */
editButton: false, editButton: false,
/* 是否渲染右侧操作按钮 */ /* 是否渲染右侧操作按钮 */
operateButtons: false, operateButtons: false,
/* 是否开启工作流按钮 */ /* 是否开启工作流按钮 */
workFlow: false, workFlow: false,
/* 表格开启选择,以及记住选择 */ /* 表格开启选择,以及记住选择 */
showSelection: false, showSelection: false,
saveSelected: false saveSelected: false,
}, },
config: { config: {
/* 基本配置*/ /* 基本配置*/
url: 'lxyl/wcszy', url: "lxyl/wcszy",
tableTitle: [{ tableTitle: [
title: "单据来源", {
field: "djly", title: "下架状态",
width: 140, field: "zt",
transform: { width: 100,
"url": "lxyl/wcszy/init/djly", transform: {
"label": "name", url: "lxyl/wcszy/init/zt",
"value": "id" label: "name",
} value: "id",
}, },
{ },
title: "仓库编码", {
field: "ckCode", title: "上架状态",
width: 140 field: "sjzt",
width: 100,
transform: {
url: "lxyl/wcszy/init/zt",
label: "name",
value: "id",
}, },
{ },
title: "仓库名称", {
field: "ckName", title: "类型",
width: 140 field: "djly",
width: 140,
transform: {
url: "lxyl/wcszy/init/djly",
label: "name",
value: "id",
}, },
{ },
title: "货主编码", {
field: "hzCode", title: "仓库",
width: 140 field: "ckName",
}, width: 140,
{ },
title: "货主编码", {
field: "hzName", title: "容器",
width: 140 field: "rqCode",
width: 120,
},
{
title: "库位",
field: "kwName",
width: 140,
},
{
title: "业务单号",
field: "lydjDjid",
width: 140,
},
{
title: "业务日期",
field: "ywrq",
fieldType: "ftDate",
},
{
title: "创建人",
field: "cjr",
hidden: true
}, },
{ {
title: "来源单据", title: "创建时间",
field: "lydjDjid", field: "cjsj",
width: 140 fieldType: "ftDateTime",
hidden: true
}, },
{ {
title: "上架状态", title: "维护人",
field: "sjzt", field: "whr"
width: 140,
transform: {
"url": "lxyl/wcszy/init/zt",
"label": "name",
"value": "id"
}
}, },
{ {
title: "下架状态", title: "维护时间",
field: "zt", field: "whsj",
width: 140, fieldType: "ftDateTime"
transform: { }
"url": "lxyl/wcszy/init/zt", ],
"label": "name", queryParams: [
"value": "id" [
}
},
{ {
title: "业务日期", label: "单据来源",
field: "ywrq", prop: "djly",
fieldType: "ftDate" span: 8,
}, type: "RelSelect",
value: "",
], typeConfig: {
queryParams: [ src: "lxyl/wcszy/init/djly",
[ match: {
value: "id",
{ label: "name",
label: '单据来源', },
prop: 'djly',
span: 8,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "lxyl/wcszy/init/djly",
"match": {
"value": "id",
"label": "name"
}
}
}, },
// { },
// "label": "状态", // {
// "prop": "zt", // "label": "状态",
// "span": 8, // "prop": "zt",
// "type": "RelSelect", // "span": 8,
// "value": "", // "type": "RelSelect",
// "typeConfig": { // "value": "",
// "src": "lxyl/wcszy/init/zt", // "typeConfig": {
// "match": { // "src": "lxyl/wcszy/init/zt",
// "value": "id", // "match": {
// "label": "name" // "value": "id",
// } // "label": "name"
// } // }
// }, // }
// },
],
], ],
],
},
} };
} },
methods: {
}, /* 示例*/
methods: { // demo(basePage){
// }
/* 示例*/ },
// demo(basePage){ components: {
// Edit
// } },
}, };
components: {
// Edit
}
}
</script> </script>
<style> <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