Commit 22870d8d authored by 李苏's avatar 李苏 💬

bug

parent b6e40a2d
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
<!-- basePage-->
<BasePage ref="basePage" :power='power' :toolButton='false' class="min_full" style="height: 100%;"
:autoQuery='false' :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
</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/kcgl/zlhbg/queryZkPackOrRq',
queryUrl: 'lxyl/kcgl/zlhbg/queryZkPackOrRq',
tableTitle: [{
title: "唯一码",
field: "packCode",
width: 140
},
{
title: "容器",
field: "rqCode",
width: 140
},
{
title: "货主",
field: "hzName",
width: 140
},
/* 分割*/
{
title: "物料编码",
field: "wlxxCode",
width: 140
},
{
title: "物料名称",
field: "wlxxName",
width: 140
},
{
title: "物料规格",
field: "wlxxGg",
width: 140
},
{
title: "物料批号",
field: "wlph",
width: 140
},
{
title: "制令号",
field: "zlh",
width: 140
}
],
queryParams: [[
{
label: '制令号',
prop: 'zlh',
span: 6,
type: 'input',
value: ''
}
]]
}
}
},
methods: {
save(){
/* 判定是否勾选*/
let list =this.$refs.basePage.$refs.TablePager.selectedList
if(list.length!=0){
this.$prompt('请输入变更后的制令号', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
}).then(({ value }) => {
if(value){
list.forEach(item=>{
item.bghzlh=value
})
/* 触发save事件 */
this.$emit('save',list)
}else{
this.$warning('请输入变更后制令号')
}
})
}else{
this.$warning('请至少勾选一条数据')
}
}
}
}
</script>
<style scoped lang="scss">
</style>
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<RelDialog bigTitle detailTable='RKTZMX' @getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp' <RelDialog bigTitle detailTable='RKTZMX' @getFormDetail='getFormDetail' width="70%" :type='type' :editApp='editApp'
:app='app' :buttonApp='buttonApp'> :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules"> <el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
<!-- 查询弹框-->
<Cx @save="save" :app="this" v-if='this.showDialog' />
<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 :required="item.required||false" :readonly="item.readonly?true:false "
v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label" v-for="(item,index) in editColItemList " :value="item.value" :span="item.span" :label="item.label"
...@@ -11,29 +13,15 @@ ...@@ -11,29 +13,15 @@
</el-row> </el-row>
<div class="editTab"> <div class="editTab">
<editTableForEdit :indexApp='app' code='WMSWLXX' :type='type' @save='save' ref="editTableForEdit" <editTableForEdit :indexApp='app' :AuxButton='false' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow' :editTableTitle='editTableTitle' v-if="editTableForEdit" :computedRow='computedRow'
:editTableData="formDetail"> :editTableData="formDetail">
<template v-if="type!='view'" #toolbar="ctx"> <template v-if="type!='view'" #toolbar="ctx">
<!-- <AuxButton :queryParams="{ <el-button @click="add" size='mini' type="primary">新增</el-button>
ckid:form.ckid
}" rename='按码盘单开' code='MPD' @save="save" /> -->
</template> </template>
</editTableForEdit> </editTableForEdit>
</div> </div>
<!-- <el-row class="bottomInfo" :gutter="20">
<el-col class="center" :span="12">
创建人:{{
form.cjr||localUser
}}
</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-form>
<!-- editTab数据 --> <!-- editTab数据 -->
...@@ -48,36 +36,37 @@ ...@@ -48,36 +36,37 @@
editMixin, editMixin,
editMixin_expand editMixin_expand
} from 'common' } from 'common'
import Cx from './cx.vue'
export default { export default {
mixins: [editMixin, editMixin_expand], mixins: [editMixin, editMixin_expand],
methods: { methods: {
add(){
this.showDialog=true
},
/* 需要整体row时的回调 */ /* 需要整体row时的回调 */
computedRow(row) { computedRow(row) {
// this.$refs.editTableForEdit.$forceUpdate() // this.$refs.editTableForEdit.$forceUpdate()
}, },
/* 选择list时的回调 */ /* 选择list时的回调 */
save(list) { save(list){
list.forEach(item => { this.showDialog=false
// 转换并且push
item.wlid = item.id
item.wlmc = item.name
item.wlcode = item.code
item.xqsl = 0
item.xqrq = new Date().getTime()
delete item.id
this.formDetail.push(_.cloneDeep(item))
})
} }
}, },
components:{
Cx
},
mounted() { mounted() {
}, },
data() { data() {
return { return {
DialogTitle:'新增',
DialogWidth:'60vw',
showDialog:false,
/* 常规edit数据 */ /* 常规edit数据 */
editColItemList: [{ editColItemList: [{
label: '变更单号', label: '变更单号',
...@@ -128,101 +117,53 @@ ...@@ -128,101 +117,53 @@
}, },
{ {
title: "物料编码", title: "物料编码",
field: "code", field: "wlxxCode",
width: 180, width: 160
type: 'AuxInput',
typeConfig: {
"code": "MATERIAL",
"label": "wlcode",
"transform": {
"value": "code",
"label": "code"
},
give(data) {
this.form.wlid = data.id
this.form.wlmc = data.name
this.form.wlcode = data.code
}
}
}, },
{ {
title: "物料名称", title: "物料名称",
field: "wlmc", field: "wlxxName",
width: 160 width: 160
}, },
{ {
title: "规格", title: "规格",
field: "gg", field: "wlxxGg",
width: 140 width: 140
}, },
// {
// title: "计量单位",
// field: "jldwname",
// width: 100,
// allowEdit: false
// },
/* 不可编辑*/
{ {
title: "物料批号", title: "物料批号",
field: "wlph", field: "wlph",
type: 'inputText',
width: 200, width: 200,
// show: JSON.parse(localStorage.getItem('isPhgl'))
}, },
{ {
title: "制令号", title: "唯一码",
field: "zlh", field: "packid",
type: 'inputText', width: 200,
width: 180,
allowEdit: true
}, },
{ {
title: "数量", title: "容器",
field: "yssl", field: "rqCode",
allowEdit: true, width: 200,
type: 'inputNumber',
blur: toFixed(null),
}, },
{ {
title: "已入库数量", title: "货主",
field: "rksl", field: "hzName",
width: 200,
},
{
title: "制令号",
field: "zlh",
width: 200,
}, },
// {
// 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"
// }
// },
// show: JSON.parse(localStorage.getItem('isKwgl')),
// },
{ {
title: "备注", title: "变更后制令号",
field: "bz", field: "bghzlh",
width: 200,
},
{
title: "数量",
field: "sl",
width: 200, width: 200,
type: 'inputText',
allowEdit: true
} }
......
...@@ -69,6 +69,11 @@ ...@@ -69,6 +69,11 @@
field: "mpsl", field: "mpsl",
width: 140 width: 140
}, },
{
title: "容器",
field: "rqCode",
width: 140
},
{ {
title: "制令号", title: "制令号",
field: "zlh", field: "zlh",
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
</editTableForEdit> </editTableForEdit>
</div> </div>
<el-row :gutter="20" :app="this" class="editRow bottomInfo"> <el-row :gutter="20" :app="this" class="editRow bottomInfo">
<!-- 判定readonlu是否是函数-->
<EditColItem :required="item.required||false" :readonly="item.readonly?true:false " <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" 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' :prop='item.prop' :key="item.prop" :type="item.type" :typeConfig='item.typeConfig'
...@@ -138,6 +139,16 @@ ...@@ -138,6 +139,16 @@
} }
}, },
watch:{
formDetail(val){
console.log(val)
if(val&&val.length==0){
this.editColItemList[0].readonly=false
}else{
this.editColItemList[0].readonly=true
}
}
},
data() { data() {
return { return {
form:{ form:{
...@@ -151,13 +162,6 @@ ...@@ -151,13 +162,6 @@
editColItemList: [ editColItemList: [
/* 入库单 辅助输入 关联入库单*/ /* 入库单 辅助输入 关联入库单*/
{ {
// readonly:()=>{
// if(this.formDetail.length==0){
// return false
// }else{
// return true
// }
// },
label: '入库单', label: '入库单',
"required": true, "required": true,
prop: 'lydjid', prop: 'lydjid',
...@@ -319,6 +323,11 @@ ...@@ -319,6 +323,11 @@
field: "wlxxGg", field: "wlxxGg",
width: 140 width: 140
}, },
{
title: "容器",
field: "rqCode",
width: 140
},
{ {
title: "物料批号", title: "物料批号",
field: "wlph", field: "wlph",
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
label:'packCode', label:'packCode',
value:'packid' value:'packid'
}" :queryParams='{ }" :queryParams='{
id:form.lydjid id:app.form["lydjid"]
}' code='WMSBZGLMXMPZY' :form='form' /> }' code='WMSBZGLMXMPZY' :form='form' />
</div> </div>
</el-col> </el-col>
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
async mounted() { async mounted() {
this.$nextTick(() => { this.$nextTick(() => {
this.form.lydjid = this.app.form.lydjid this.form.lydjid = this.app.form.lydjid
console.log( this.form)
}) })
}, },
data() { data() {
......
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