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

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

parent 91c24e94
......@@ -64,7 +64,20 @@ import DictData from '@/components/DictData'
/* */
/* 全局适应访问 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
......
<template>
<!-- 根据后端返回值字段进行展示-->
<DefaultDialog :app='app'>
<div style=slot="form" style="display: flex;height: 70vh;width: 100%;">
<el-form slot="form" ref="form" :model="form" label-width="100px" :rules="rules">
......@@ -40,7 +41,7 @@
</el-form-item>
</el-col>
<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-form-item>
</el-col>
......@@ -50,74 +51,74 @@
</el-form-item>
</el-col>
<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-form-item>
</el-col>
<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-form-item>
</el-col>
<!-- 调用-->
<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-form-item>
</el-col>
<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-form-item>
</el-col>
<!-- 归还人-->
<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-form-item>
</el-col>
<!-- 发还-->
<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-form-item>
</el-col>
<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-form-item>
</el-col>
<!-- 没收-->
<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-form-item>
</el-col>
<!-- <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-form-item>
</el-col> -->
<!-- 移送-->
<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-form-item>
</el-col>
<!-- 拍卖-->
<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-form-item>
</el-col>
<!-- 销毁-->
<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-form-item>
</el-col>
<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-form-item>
</el-col>
......
......@@ -35,7 +35,11 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
console.log(obj)
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
/* 首先判定是否ckid重复*/
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -98,42 +102,42 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
// cklx: "KY"
// {
// label: '仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '预计归还日期',
prop: 'yjghrq',
......
......@@ -35,6 +35,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -99,40 +103,40 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '经手人',
prop: 'jsr',
......
......@@ -36,6 +36,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -97,40 +101,40 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '销毁单位',
prop: 'xhdw',
......
......@@ -35,6 +35,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -99,40 +103,40 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '拍得单位',
prop: 'pddw',
......
......@@ -36,6 +36,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -97,42 +101,42 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx:'DJBC',
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
// cklx:'DJBC',
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '经手人',
prop: 'jsr',
......
......@@ -35,6 +35,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -96,37 +100,37 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '调出仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
}
},
required: true,
},
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '调出仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
// }
// },
// required: true,
// },
{
label: '调入仓库',
prop: 'msdrck',
......
......@@ -35,6 +35,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -97,40 +101,40 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '出库仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '出库仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '移送单位',
prop: 'ysdw',
......
......@@ -35,6 +35,10 @@
methods:{
/* 过滤序列号添加*/
filter(obj){
if(!this.$isCkJoin(obj,this.form.details)){
this.$warning('请确保所选物品仓库相同!')
return
}
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
......@@ -99,41 +103,41 @@
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "id",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx:'CF',
// {
// "label": "部门",
// "prop": "bm",
// "span": 24,
// "type": "RelSelect",
// "value": "",
// "required": true,
// "typeConfig": {
// "src": "hjbm/query",
// "match": {
// "value": "id",
// "label": "bmmc"
// }
// }
// },
// {
// label: '仓库',
// prop: 'ckid',
// span: 24,
// "type": "RelSelect",
// "typeConfig": {
// "src": "jcsj/u_ckwh/query",
// "match": {
// "value": "id",
// "label": "ckmc"
// },
// params: {
// cklx:'CF',
},
linkParams:['bm'],
linkage:true
},
required: true,
},
// },
// linkParams:['bm'],
// linkage:true
// },
// required: true,
// },
{
label: '经手人',
prop: 'jsr',
......
......@@ -28,18 +28,18 @@
this.$refs.basepage.refresh()
},
methods: {
autoParams(params,row){
params.master.rkdh=row.rkdh
autoParams(params, row) {
params.master.rkdh = row.rkdh
},
jfzky(ctx) {
ctx.DialogWidth='70vw'
ctx.DialogTitle='查封转扣押'
ctx.showDialog=true
ctx.DialogWidth = '70vw'
ctx.DialogTitle = '查封转扣押'
ctx.showDialog = true
},
bcdjzky(ctx) {
ctx.DialogWidth='70vw'
ctx.DialogTitle='登记保存转扣押'
ctx.showDialog=true
ctx.DialogWidth = '70vw'
ctx.DialogTitle = '登记保存转扣押'
ctx.showDialog = true
}
},
data() {
......@@ -235,7 +235,9 @@
},
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