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

修改WCS作业列表显示

parent c99205f1
<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">
<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" />
<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" />
<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" />
<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>
<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'
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: {
export default {
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.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
})
}
this.$refs["form"].validate((valid) => {
if (valid) {
this.$post("lxyl/rkgl/sjrw/pkrk/save", {
...this.form,
datas: this.formDetail,
}).then((res) => {
if (res.success) {
this.$success("操作成功");
this.$refs.RelDialog.closeAll();
this.app.refresh();
}
});
}
});
},
mounted() {
// this.form.llrName = this.username
// this.form.llrid = this.userid
getForm(val) {
// val.djly = 'M'
},
/* 需要整体row时的回调 */
computedRow(row) {
// this.$refs.editTableForEdit.$forceUpdate()
},
/* 选择list时的回调 */
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'
}
/* 选择库存回调 */
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: '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: '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,
},
{
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",
},
},
{
title: "物料编码",
field: "wlxxCode",
width: 180,
},
{
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/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",
width: 160
},
{
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",
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,
}
]
}
}
}
{
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");
@import url("~common/src/assets/styles/editDetail.scss");
</style>
......@@ -38,17 +38,16 @@
/* 基本配置*/
url: 'lxyl/rkgl/sjrw/pkrk',
tableTitle: [
{
title: "入库单号",
field: "lydjDjid",
width: 140
},
{
title: "任务号",
field: "djid",
width: 140
},
{
title: "日期",
field: "ywrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ckName",
......@@ -60,12 +59,7 @@
width: 140
},
{
title: "起始位",
field: "gwName",
width: 140
},
{
title: "目标位",
title: "库位",
field: "kwName",
width: 140
},
......@@ -74,19 +68,26 @@
field: "rqCode",
width: 140
},
// {
// title: "唯一码",
// field: "packCode",
// width: 140
// },
{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "入库单号",
field: "lydjDjid",
width: 140
},
{
title: "创建人",
field: "cjr"
field: "cjr",
hidden: true
},
{
title: "创建时间",
field: "cjsj",
fieldType: "ftDateTime"
fieldType: "ftDateTime",
hidden: true
},
{
......@@ -97,7 +98,7 @@
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
}
],
queryParams: [
[{
......
......@@ -5,154 +5,155 @@
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
</template>
</BasePage>
</template>
<script>
// import Edit from './edit.vue'
export default {
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false
},
config: {
/* 基本配置*/
url: 'lxyl/wcszy',
tableTitle: [{
title: "单据来源",
field: "djly",
width: 140,
transform: {
"url": "lxyl/wcszy/init/djly",
"label": "name",
"value": "id"
}
// import Edit from './edit.vue'
export default {
data() {
return {
power: {
add: false,
copy: false,
/* 手动控制删除 */
delButton: true,
/* 手动控制编辑按钮权限 */
editButton: false,
/* 是否渲染右侧操作按钮 */
operateButtons: false,
/* 是否开启工作流按钮 */
workFlow: false,
/* 表格开启选择,以及记住选择 */
showSelection: false,
saveSelected: false,
},
config: {
/* 基本配置*/
url: "lxyl/wcszy",
tableTitle: [
{
title: "下架状态",
field: "zt",
width: 100,
transform: {
url: "lxyl/wcszy/init/zt",
label: "name",
value: "id",
},
{
title: "仓库编码",
field: "ckCode",
width: 140
},
{
title: "上架状态",
field: "sjzt",
width: 100,
transform: {
url: "lxyl/wcszy/init/zt",
label: "name",
value: "id",
},
{
title: "仓库名称",
field: "ckName",
width: 140
},
{
title: "类型",
field: "djly",
width: 140,
transform: {
url: "lxyl/wcszy/init/djly",
label: "name",
value: "id",
},
{
title: "货主编码",
field: "hzCode",
width: 140
},
{
title: "货主编码",
field: "hzName",
width: 140
},
{
title: "仓库",
field: "ckName",
width: 140,
},
{
title: "容器",
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: "来源单据",
field: "lydjDjid",
width: 140
title: "创建时间",
field: "cjsj",
fieldType: "ftDateTime",
hidden: true
},
{
title: "上架状态",
field: "sjzt",
width: 140,
transform: {
"url": "lxyl/wcszy/init/zt",
"label": "name",
"value": "id"
}
title: "维护人",
field: "whr"
},
{
title: "下架状态",
field: "zt",
width: 140,
transform: {
"url": "lxyl/wcszy/init/zt",
"label": "name",
"value": "id"
}
},
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
}
],
queryParams: [
[
{
title: "业务日期",
field: "ywrq",
fieldType: "ftDate"
},
],
queryParams: [
[
{
label: '单据来源',
prop: 'djly',
span: 8,
"type": "RelSelect",
"value": "",
"typeConfig": {
"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",
// "span": 8,
// "type": "RelSelect",
// "value": "",
// "typeConfig": {
// "src": "lxyl/wcszy/init/zt",
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// },
],
},
// {
// "label": "状态",
// "prop": "zt",
// "span": 8,
// "type": "RelSelect",
// "value": "",
// "typeConfig": {
// "src": "lxyl/wcszy/init/zt",
// "match": {
// "value": "id",
// "label": "name"
// }
// }
// },
],
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
// Edit
}
}
],
},
};
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
// Edit
},
};
</script>
<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