Commit 94db46aa authored by 李苏's avatar 李苏 💬

出库选择卡物品 和 取消显示部门仓库字段, 冗余代码优化

parent 91c24e94
...@@ -64,7 +64,20 @@ import DictData from '@/components/DictData' ...@@ -64,7 +64,20 @@ import DictData from '@/components/DictData'
/* */ /* */
/* 全局适应访问 this.form时候form未创建,满足不合规的接口规范 */ /* 全局适应访问 this.form时候form未创建,满足不合规的接口规范 */
Vue.prototype.$isCkJoin=(obj,arr2)=>{
/* 遍历参数 */
let ckList=[]
ckList.push(obj.szk)
arr2.forEach(item=>{
ckList.push(item.szk)
})
let newArr=[...new Set(ckList)]
if(newArr.length==1){
return true
}else{
return false
}
}
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts
......
<template> <template>
<!-- 根据后端返回值字段进行展示-->
<DefaultDialog :app='app'> <DefaultDialog :app='app'>
<div style=slot="form" style="display: flex;height: 70vh;width: 100%;"> <div style=slot="form" style="display: flex;height: 70vh;width: 100%;">
<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">
...@@ -40,7 +41,7 @@ ...@@ -40,7 +41,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.dsfmc" :span="12"> <el-col v-if="form.dsfmc" :span="12">
<el-form-item label="三方仓库名" ref="content" prop="content"> <el-form-item label="三方仓库名" >
<el-input :readonly="readonly" type="input" v-model="form.dsfmc"></el-input> <el-input :readonly="readonly" type="input" v-model="form.dsfmc"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -50,74 +51,74 @@ ...@@ -50,74 +51,74 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.rkjzrq" :span="12"> <el-col v-if="form.rkjzrq" :span="12">
<el-form-item label="扣押日期" ref="content" prop="content"> <el-form-item label="扣押日期" >
<el-date-picker style="width: 100%;" :readonly="readonly" type="date" v-model="form.rkjzrq"></el-date-picker> <el-date-picker style="width: 100%;" :readonly="readonly" type="date" v-model="form.rkjzrq"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.jsr" :span="12"> <el-col v-if="form.jsr" :span="12">
<el-form-item label="经手人" ref="content" prop="content"> <el-form-item label="经手人" >
<el-input :readonly="readonly" type="input" v-model="form.jsr"></el-input> <el-input :readonly="readonly" type="input" v-model="form.jsr"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 调用--> <!-- 调用-->
<el-col v-if="form.yjghrq" :span="12"> <el-col v-if="form.yjghrq" :span="12">
<el-form-item label="归还日期" ref="content" prop="content"> <el-form-item label="归还日期" >
<el-date-picker style="width: 100%;" :readonly="readonly" type="date" v-model="form.yjghrq"></el-date-picker> <el-date-picker style="width: 100%;" :readonly="readonly" type="date" v-model="form.yjghrq"></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.dyr" :span="12"> <el-col v-if="form.dyr" :span="12">
<el-form-item label="调用人" ref="content" prop="content"> <el-form-item label="调用人" >
<el-input :readonly="readonly" type="input" v-model="form.dyr"></el-input> <el-input :readonly="readonly" type="input" v-model="form.dyr"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 归还人--> <!-- 归还人-->
<el-col v-if="form.swlxr" :span="12"> <el-col v-if="form.swlxr" :span="12">
<el-form-item label="归还人" ref="content" prop="content"> <el-form-item label="归还人" >
<el-input :readonly="readonly" type="input" v-model="form.swlxr"></el-input> <el-input :readonly="readonly" type="input" v-model="form.swlxr"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 发还--> <!-- 发还-->
<el-col v-if="form.fhdx" :span="12"> <el-col v-if="form.fhdx" :span="12">
<el-form-item label="发还人" ref="content" prop="content"> <el-form-item label="发还人" >
<el-input :readonly="readonly" type="input" v-model="form.fhdx"></el-input> <el-input :readonly="readonly" type="input" v-model="form.fhdx"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.lqr" :span="12"> <el-col v-if="form.lqr" :span="12">
<el-form-item label="领取人" ref="content" prop="content"> <el-form-item label="领取人" >
<el-input :readonly="readonly" type="input" v-model="form.lqr"></el-input> <el-input :readonly="readonly" type="input" v-model="form.lqr"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 没收--> <!-- 没收-->
<el-col v-if="form.msdrckmc" :span="12"> <el-col v-if="form.msdrckmc" :span="12">
<el-form-item label="调入仓库" ref="content" prop="content"> <el-form-item label="调入仓库" >
<el-input :readonly="readonly" type="input" v-model="form.msdrckmc"></el-input> <el-input :readonly="readonly" type="input" v-model="form.msdrckmc"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- <el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="调出仓库" ref="content" prop="content"> <el-form-item label="调出仓库" >
<el-input :readonly="readonly" type="input" v-model="form.dh"></el-input> <el-input :readonly="readonly" type="input" v-model="form.dh"></el-input>
</el-form-item> </el-form-item>
</el-col> --> </el-col> -->
<!-- 移送--> <!-- 移送-->
<el-col v-if="form.ysdw" :span="12"> <el-col v-if="form.ysdw" :span="12">
<el-form-item label="移送单位" ref="content" prop="content"> <el-form-item label="移送单位" >
<el-input :readonly="readonly" type="input" v-model="form.ysdw"></el-input> <el-input :readonly="readonly" type="input" v-model="form.ysdw"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 拍卖--> <!-- 拍卖-->
<el-col v-if="form.pddw" :span="12"> <el-col v-if="form.pddw" :span="12">
<el-form-item label="拍得单位" ref="content" prop="content"> <el-form-item label="拍得单位" >
<el-input :readonly="readonly" type="input" v-model="form.pddw"></el-input> <el-input :readonly="readonly" type="input" v-model="form.pddw"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 销毁--> <!-- 销毁-->
<el-col v-if="form.xhdw" :span="12"> <el-col v-if="form.xhdw" :span="12">
<el-form-item label="销毁单位" ref="content" prop="content"> <el-form-item label="销毁单位" >
<el-input :readonly="readonly" type="input" v-model="form.xhdw"></el-input> <el-input :readonly="readonly" type="input" v-model="form.xhdw"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col v-if="form.xhfs" :span="12"> <el-col v-if="form.xhfs" :span="12">
<el-form-item label="销毁方式" ref="content" prop="content"> <el-form-item label="销毁方式" >
<el-input :readonly="readonly" type="input" v-model="form.xhfs"></el-input> <el-input :readonly="readonly" type="input" v-model="form.xhfs"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
......
...@@ -35,7 +35,11 @@ ...@@ -35,7 +35,11 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
console.log(obj) if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
/* 首先判定是否ckid重复*/
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -98,42 +102,42 @@ ...@@ -98,42 +102,42 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '仓库', // label: '仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
// cklx: "KY"
},
linkParams:['bm'], // },
linkage:true // linkParams:['bm'],
}, // linkage:true
required: true, // },
}, // required: true,
// },
{ {
label: '预计归还日期', label: '预计归还日期',
prop: 'yjghrq', prop: 'yjghrq',
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -99,40 +103,40 @@ ...@@ -99,40 +103,40 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '仓库', // label: '仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
}, // },
linkParams:['bm'], // linkParams:['bm'],
linkage:true // linkage:true
}, // },
required: true, // required: true,
}, // },
{ {
label: '经手人', label: '经手人',
prop: 'jsr', prop: 'jsr',
......
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -97,40 +101,40 @@ ...@@ -97,40 +101,40 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '仓库', // label: '仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
}, // },
linkParams:['bm'], // linkParams:['bm'],
linkage:true // linkage:true
}, // },
required: true, // required: true,
}, // },
{ {
label: '销毁单位', label: '销毁单位',
prop: 'xhdw', prop: 'xhdw',
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -99,40 +103,40 @@ ...@@ -99,40 +103,40 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '仓库', // label: '仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
}, // },
linkParams:['bm'], // linkParams:['bm'],
linkage:true // linkage:true
}, // },
required: true, // required: true,
}, // },
{ {
label: '拍得单位', label: '拍得单位',
prop: 'pddw', prop: 'pddw',
......
...@@ -36,6 +36,10 @@ ...@@ -36,6 +36,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -97,42 +101,42 @@ ...@@ -97,42 +101,42 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '仓库', // label: '仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
cklx:'DJBC', // cklx:'DJBC',
}, // },
linkParams:['bm'], // linkParams:['bm'],
linkage:true // linkage:true
}, // },
required: true, // required: true,
}, // },
{ {
label: '经手人', label: '经手人',
prop: 'jsr', prop: 'jsr',
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -96,37 +100,37 @@ ...@@ -96,37 +100,37 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '调出仓库', // label: '调出仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
} // }
}, // },
required: true, // required: true,
}, // },
{ {
label: '调入仓库', label: '调入仓库',
prop: 'msdrck', prop: 'msdrck',
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -97,40 +101,40 @@ ...@@ -97,40 +101,40 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '出库仓库', // label: '出库仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
}, // },
linkParams:['bm'], // linkParams:['bm'],
linkage:true // linkage:true
}, // },
required: true, // required: true,
}, // },
{ {
label: '移送单位', label: '移送单位',
prop: 'ysdw', prop: 'ysdw',
......
...@@ -35,6 +35,10 @@ ...@@ -35,6 +35,10 @@
methods:{ methods:{
/* 过滤序列号添加*/ /* 过滤序列号添加*/
filter(obj){ filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh let xlh=obj.xlh
let iscf=false let iscf=false
this.form.details.forEach(item=>{ this.form.details.forEach(item=>{
...@@ -99,41 +103,41 @@ ...@@ -99,41 +103,41 @@
value:new Date().getTime(), value:new Date().getTime(),
required: true, required: true,
}, },
{ // {
"label": "部门", // "label": "部门",
"prop": "bm", // "prop": "bm",
"span": 24, // "span": 24,
"type": "RelSelect", // "type": "RelSelect",
"value": "", // "value": "",
"required": true, // "required": true,
"typeConfig": { // "typeConfig": {
"src": "hjbm/query", // "src": "hjbm/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "bmmc" // "label": "bmmc"
} // }
} // }
}, // },
{ // {
label: '仓库', // label: '仓库',
prop: 'ckid', // prop: 'ckid',
span: 24, // span: 24,
"type": "RelSelect", // "type": "RelSelect",
"typeConfig": { // "typeConfig": {
"src": "jcsj/u_ckwh/query", // "src": "jcsj/u_ckwh/query",
"match": { // "match": {
"value": "id", // "value": "id",
"label": "ckmc" // "label": "ckmc"
}, // },
params: { // params: {
cklx:'CF', // cklx:'CF',
}, // },
linkParams:['bm'], // linkParams:['bm'],
linkage:true // linkage:true
}, // },
required: true, // required: true,
}, // },
{ {
label: '经手人', label: '经手人',
prop: 'jsr', prop: 'jsr',
......
...@@ -28,18 +28,18 @@ ...@@ -28,18 +28,18 @@
this.$refs.basepage.refresh() this.$refs.basepage.refresh()
}, },
methods: { methods: {
autoParams(params,row){ autoParams(params, row) {
params.master.rkdh=row.rkdh params.master.rkdh = row.rkdh
}, },
jfzky(ctx) { jfzky(ctx) {
ctx.DialogWidth='70vw' ctx.DialogWidth = '70vw'
ctx.DialogTitle='查封转扣押' ctx.DialogTitle = '查封转扣押'
ctx.showDialog=true ctx.showDialog = true
}, },
bcdjzky(ctx) { bcdjzky(ctx) {
ctx.DialogWidth='70vw' ctx.DialogWidth = '70vw'
ctx.DialogTitle='登记保存转扣押' ctx.DialogTitle = '登记保存转扣押'
ctx.showDialog=true ctx.showDialog = true
} }
}, },
data() { data() {
...@@ -235,7 +235,9 @@ ...@@ -235,7 +235,9 @@
}, },
components: { components: {
Edit,Jfzky,Bcdjzky Edit,
Jfzky,
Bcdjzky
} }
} }
......
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