Commit 8311e188 authored by 李苏's avatar 李苏 💬

字段

parent db660f63
<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">
<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>
<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">
<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 :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail" >
<!-- <template v-if="type!='view'" #toolbar="ctx">
<div class="editTab">
<editTableForEdit :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail">
<!-- <template v-if="type!='view'" #toolbar="ctx">
<AuxButton :queryParams="{
ckid:form.ckid
}" rename='选择库存' code='WLKC' @save="savekc" />
</template> -->
</editTableForEdit>
</div>
<el-row class="bottomInfo" :gutter="20">
<el-col class="center" :span="12">
创建人:{{
</editTableForEdit>
</div>
<el-row class="bottomInfo" :gutter="20">
<el-col class="center" :span="12">
创建人:{{
form.cjr||localUser
}}
</el-col>
<el-col class="center" :span="12">
创建时间:{{
</el-col>
<el-col class="center" :span="12">
创建时间:{{
$moment(form.cjsj).format('YYYY-MM-DD HH:mm:ss')||$moment().format('YYYY-MM-DD HH:mm:ss')
}}
</el-col>
</el-row>
</el-form>
</el-col>
</el-row>
</el-form>
<!-- editTab数据 -->
</RelDialog>
<!-- editTab数据 -->
</RelDialog>
</template>
<script>
import {
toFixed,
digit,
doRkdChange
} from 'common/src/utils/blur.js'
import {
editMixin,
editMixin_expand
} from 'common'
import {
toFixed,
digit,
doRkdChange
} from 'common/src/utils/blur.js'
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
methods: {
/* 需要整体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.kcsl || 0
// 转换并且push
item.wlid = item.id
item.wlxxName = item.name
item.wlxxCode = item.code
export default {
mixins: [editMixin, editMixin_expand],
methods: {
/* 需要整体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.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))
delete item.id
this.formDetail.push(_.cloneDeep(item))
})
},
/* 选择库存回调 */
savekc(list){
list.forEach( item => {
// 转换并且push
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
this.form.llrName = this.username
this.form.llrid = this.userid
},
data() {
return {
/* 常规edit数据 */
editColItemList: [{
label: '出库单号',
prop: 'djid',
span: 8,
type: 'input',
// "required": true,
},
{
label: '出库日期',
prop: 'llrq',
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": "wms/ckgl/llck/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"
}
}
},
data() {
return {
/* 常规edit数据 */
editColItemList: [{
label: '出库单号',
prop: 'djid',
span: 8,
type: 'input',
// "required": true,
},
{
label: '出库日期',
prop: 'llrq',
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": "wms/ckgl/llck/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,
type: 'RelSelect',
"typeConfig": {
"src": "jcsj/common/hz/query",
"match": {
"value": "id",
"label": "name"
}
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'HZID',
label: 'hzName',
transform: {
value: 'id',
label: 'name'
}
}
},
{
label: '备注',
prop: 'bz',
span: 16,
type: 'input',
},
],
/* 从表编辑数据 */
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物料编号",
field: "wlxxCode",
width: 240,
},
{
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: 200,
// show: JSON.parse(localStorage.getItem('isPhgl'))
},
{
title: "制令号",
field: "zlh",
type: 'inputText',
width: 200,
// show: JSON.parse(localStorage.getItem('isPhgl'))
label: '备注',
prop: 'bz',
span: 16,
type: 'input',
},
{
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"
}
],
/* 从表编辑数据 */
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物料编号",
field: "wlxxCode",
width: 240,
},
{
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: 200,
// show: JSON.parse(localStorage.getItem('isPhgl'))
},
{
title: "制令号",
field: "zlh",
type: 'inputText',
width: 200,
// 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,
}
]
}
}
}
}
},
{
title: "备注",
field: "bz",
width: 200,
type: 'inputText',
allowEdit: true,
}
]
}
}
}
</script>
<style lang="scss" scoped>
@import url("~common/src/assets/styles/editDetail.scss");
</style>
@import url("~common/src/assets/styles/editDetail.scss");
</style>
\ No newline at end of file
......@@ -142,19 +142,21 @@
}
},
{
label: '货主',
prop: 'hzid',
span: 8,
type: 'RelSelect',
"typeConfig": {
"src": "jcsj/common/hz/query",
"match": {
"value": "id",
"label": "name"
}
}
},
label: '货主',
prop: 'hzid',
span: 8,
required: true,
type: 'AuxInput',
typeConfig: {
isRequest: true,
code: 'HZID',
label: 'hzName',
transform: {
value: 'id',
label: 'name'
}
}
},
{
label: '备注',
prop: 'bz',
......
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