Commit ca28e83b authored by 李苏's avatar 李苏 💬

sh

parent 4d268db4
<template>
<el-dialog v-autoDisabled :data-type="type" ref="dialog" append-to-body :fullscreen='dialogFull' :show-close='false'
:title="title" :visible.sync="isShow" :width="width||'50%'" v-dialogDragWidth v-dialogDragHeight
v-el-drag-dialog v-dialogCenter :before-close="handleClose">
<!-- 重写头-->
<!-- 弹窗 -->
<el-dialog :append-to-body='true' title="参数隐藏设置" :visible.sync="settingVisible" width="40%">
<div>
<el-row :gutter="30" style="margin:20px;margin-bottom: 30px;">
<el-col :span="8" v-for="(item,index) in paramsList" :key="index" v-if='item.label'>
<div class="search-item" style="height: 30px;">
<el-checkbox v-model="paramsList[index].show">{{item.label}}</el-checkbox>
</div>
</el-col>
</el-row>
</div>
<div class="refooter">
<span slot="footer" class="dialog-footer">
<el-button @click="settingVisible = false">取 消</el-button>
<el-button type="primary" @click="apiSaveSetting">确 定</el-button>
</span>
</div>
</el-dialog>
<!-- -->
<template slot="title">
<div class="avue-crud__dialog__header">
<span class="el-dialog__title">
<span
style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
{{title}}
</span>
<!-- 普通 -->
<div :class="{
'el-dialog__title':!bigTitle,
'bigTitle':bigTitle
}" style="text-align: center;font-weight: 800;">
{{reTitle||mainTitle}}
</div>
<div>
<div v-if='setting' class="avue-crud__dialog__menu" @click="openSetting()">
<i class="el-icon-setting"></i>
</div>
<!-- <div class="avue-crud__dialog__menu" @click="showDialogFull()">
<i :class="{'el-icon-zoom-out':dialogFull,'el-icon-zoom-in':!dialogFull }"></i>
</div> -->
<div class="avue-crud__dialog__menu" @click="closeAll()">
<i class="el-icon-close"></i>
</div>
</div>
</div>
</template>
<span>
<slot :data-type='type' ref="form" name="form">
</slot>
<!-- form表单-->
</span>
<!-- footer-->
<slot name="reFooter">
<span slot="footer">
<el-button @click="closeAll()">取 消</el-button>
<el-button :disabled='butdisabled' v-if="(type=='add')" type="primary" @click="submitForm('form')">保 存
</el-button>
<el-button :disabled='butdisabled' v-if="(type=='edit')" type="primary" @click="submitForm('form')">保 存
</el-button>
<el-button :disabled='butdisabled' v-if="(type=='copy')" type="primary" @click="submitForm('form')">保 存
</el-button>
</span>
</slot>
</el-dialog>
</template>
<script>
export default {
async mounted() {
// 解决样式bug
this.$refs['dialog'].$el.querySelector('.el-dialog').style.cssText =
'margin-top: 0vh; width: 50%; top: 0px;'
this.$refs['dialog'].$el.querySelector('.el-dialog').style.cssText =
'width:'+this.width
/* 根据路由获取基础弹框标题 */
let mainTitle = this.$route.meta.title
if (!this.dialogTitle) {
this.mainTitle = mainTitle
} else {
this.mainTitle = this.dialogTitle
}
if (!this.type) {
this.closeAll()
}
if (this.type == 'field') {
this.title = '表头设置'
this.isShow = this.buttonApp.showField
return
}
if (this.type != 'add') {
let form = JSON.parse(JSON.stringify(this.app.singleItem))
if (this.search) {
// debugger
let newParams={}
let res
newParams[this.queryMatch['key']]=form[this.queryMatch['value']]
if(this.queryMatch.mainMethod){
res = await this.queryMatch.mainMethod(
newParams)
}else{
res = await this.app.query(newParams)
}
if (res && res.data && res.data.records[0]) {
let table = ''
/* 多表查询将保存表名在form中,此处query赋值前预先保存,如果表中form是属性 tableIsParams 设置为True,忽略保留form原始值 */
if (this.editApp.form.table) {
table = this.editApp.form.table
} else {
table = ''
}
if (this.tranString.length > 0) {
try {
this.tranString.forEach(e => {
res.data.records[0][e] = res.data.records[0][e].split(',')
})
} catch (e) {
//TODO handle the exception
}
}
this.editApp.form = res.data.records[0]
if(this.queryMatch.special=='ResIsDetails'){
this.queryMatch.method({
// id: this.editApp.form.id,
timerid: this.editApp.form.id
}).then(res1 => {
if (res1.data && res1.data.records) {
this.editApp.formDetail = res1.data.records || []
this.editApp.sourceFormDetail = JSON.parse(JSON.stringify(res1.data
.records || []))
}
})
// this.editApp.formDetail = _.cloneDeep(res1.data.records)
}
if (this.tableIsParams) {
} else {
this.editApp.form.table = table
}
try {
if ("queryDetail" in this.app) {
this.app.queryDetail({
// id: this.editApp.form.id,
mid: this.editApp.form.id
}).then(res => {
if (res.data && res.data.records) {
this.editApp.formDetail = res.data.records || []
/* 事件 */
this.$emit('getFormDetail')
this.editApp.sourceFormDetail = JSON.parse(JSON.stringify(res.data
.records || []))
}
})
}
} catch (e) {
console.error('查询子表报错', e)
}
} else {
this.$error('数据查询失败')
this.closeAll()
}
} else {
this.editApp.form = form
}
}
if (this.type == 'view') {
this.editApp.title = '查看'
this.editApp.readonly = true
this.isShow = this.buttonApp.showView
// 开启事件捕获优先触发外部事件
// 触发时阻止事件派发
// this.stopEvent && this.$nextTick(() => {
// let body = document.querySelector('.el-dialog__body')
// $(body).find('input').attr('readonly', 'readonly')
// $(body).find('textarea').attr('readonly', 'readonly')
// body.addEventListener('click', function(e) {
// e.stopPropagation()
// e.preventDefault()
// e.cancelBubble = true
// return false
// }, true)
// })
}
if (this.type == 'edit') {
this.title = '编辑'
this.editApp.readonly = false
this.isShow = this.buttonApp.showEdit
}
if (this.type == 'copy') {
this.title = '复制'
this.editApp.readonly = false
this.editApp.form.id = ''
this.isShow = this.buttonApp.showCopy
}
if (this.type == 'add') {
this.title = '新增'
this.editApp.readonly = false
this.isShow = this.buttonApp.showAdd
}
/* 获取显示设置 */
/* 需要判断setting的值再去 */
if(this.setting){
this.$nextTick(()=>{
let path=this.$route.meta.mkid+'/edit'
this.paramsList=JSON.parse(localStorage.getItem(path))||[]
/* 显示 */
this.settingShow(this.getSetting(),this.paramsList)
/* 判断是否拿到了值 */
if(this.paramsList.length==0){
let vdomList= this.getSettingParams(this.getSetting())
vdomList.forEach(item=>item.show=true)
this.paramsList=vdomList
}
})
}
},
props: {
bigTitle:{
type: Boolean,
default: false
},
/* 定义从表明细 */
detailTable:{
type:String,
default:''
},
reTitle:{
type:String,
default:''
},
/* 执行 add/edit/copy后事件 */
afterUpdate:{
typeof:Function,
default:()=>{
return ()=>{
console.log('afterUpdate')
}
}
},
queryMatch:{
typeof: Object,
default:()=>{
return{
key:'id',
value:'id'
}
}
},
/* SUBMIT */
updateMatch:{
typeof: Object,
default:()=>{
return{
key:'id',
value:'id'
}
}
},
setting:{
typeof: Boolean,
default: true
},
stopEvent: {
typeof: Boolean,
default: true
},
tranString: {
typeof: Array,
default: function() {
return []
}
},
/* 解决判断单双表存在table相同名称判断失效问题,如存在单表form.table,传入true,将不会重置table字段 */
tableIsParams: {
typeof: Boolean,
default: false
},
search: {
typeof: Boolean,
default: true
},
dialogTitle: {
type: String,
default: ''
},
width: {
type: String,
default: '50%'
},
editApp: {
type: Object,
default: function() {
return {}
}
},
type: {
type: String,
default: 'edit'
},
app: {
type: Object,
default: function() {
return {}
}
},
buttonApp: {
type: Object,
default: function() {
return {}
}
}
},
name: 'relDialog',
data() {
return {
// 参数列表
paramsList:[],
settingVisible:false,
butdisabled: false,
mainTitle: '',
title: '查看',
dialogFull: false,
isShow: false,
}
},
methods: {
/* setting设置 */
openSetting(){
this.settingVisible=true
},
apiSaveSetting(){
/* 设置 */
let path=this.$route.meta.mkid+'/edit'
localStorage.setItem(path,JSON.stringify(this.paramsList))
this.settingShow(this.getSetting(),this.paramsList)
this.settingVisible=false
},
/* 获取col实例 */
getSetting(){
/* 获取col实例 */
let elCows=[]
let outCows=[]
function getElCols(vnode) {
if(vnode.componentOptions){
if(vnode.componentOptions.tag=='el-col'){
elCows.push(vnode.componentInstance)
}
else if(vnode.componentOptions.tag=='EditColItem'){
elCows.push(vnode.componentInstance)
}
else if(vnode.componentOptions.children&&vnode.componentOptions.children.length>0){
vnode.componentOptions.children.forEach(item=>{
getElCols(item)
})
}
}else if(vnode.children&&vnode.children.length>0){
vnode.children.forEach(item=>{
getElCols(item)
})
}
// 遍历vnode
}
getElCols(this.$slots.form[0])
elCows.forEach(item=>{
if(!item.$attrs.config){
/* 没有设置config设置默认值 */
item.$attrs.config={
isParam:true
}
}
/* 判断特殊节点 */
if(item.$attrs&&item.$attrs.config){
/* 节点设置判定 */
const config=item.$attrs.config
if(config.isParam==false){
}else{
outCows.push(item)
}
}
}) /* 获取col prop预留指令config */
// this.getSettingParams(outCows)
return outCows
},
/* 隐藏col */
settingShow(elCows,paramsList){
/* */
paramsList.forEach((item,index)=>{
if(item.show==false){
if(elCows[index].$el){
elCows[index].$el.style.display='none'
}
}else{
if(elCows[index].$el){
elCows[index].$el.style.display='block'
}
}
})
elCows.forEach(item=>{
item
})
},
/* 读取rol参数 */
getSettingParams(elCows){
let params=[]
elCows.forEach(item=>{
let obj={
label:$(item.$el).find('label').text(),
/* 预留其他参数 */
// value:$(item.$el).find('label').attr('for')
}
params.push(obj)
})
return params
},
/* 默认apI操作*/
submitForm(formName) {
/* 过滤details新增*/
this.editApp.formDetail.forEach((item, index) => {
if (!item.id) {
this.editApp.formDetail[index].flag = 'I'
}
})
/* 过滤details删除数据 */
let delArray = []
this.editApp.sourceFormDetail.forEach((item, index) => {
let isRepeat = false
this.editApp.formDetail.forEach((items, indexs) => {
if (items.id == item.id) {
isRepeat = true
}
})
if (!isRepeat) {
item.flag = 'D'
delArray.push(item)
}
})
/* 判定是否是更新
查看没有flag标识的数据
*/
this.editApp.formDetail.forEach((item,index)=>{
if(!item.flag){
/* 开始和原数组对比 */
this.editApp.sourceFormDetail.forEach(sitem=>{
if(item.id==sitem.id){
let isupdate=false
let keys=Object.keys(item)
keys.forEach(key=>{
if(item[key]!=!item[key]){
isupdate=true
}
})
if(isupdate){
item.flag='U'
}
}
})
}
})
this.editApp.$refs[formName].validate((valid) => {
if (valid) {
this.butdisabled = true
/* 验证成功触发*/
/* 转化数组为字符串 */
if (this.tranString.length > 0) {
try {
this.tranString.forEach(e => {
this.editApp.form[e] = this.editApp.form[e].toString()
})
} catch (e) {
//TODO handle the exception
}
}
if (this.editApp.type == 'add') {
let params = {
...this.editApp.form
}
this.app.apiAdd(params).then(res => {
if (res.success) {
this.$success('添加成功')
this.closeAll()
/* 不刷新*/
try {
if (this.app.$refs['TablePager'].type == 'treeTable') {
this.app.$refs['TablePager'].reLoad()
return
}
if (res.data && res.data.id) {
let params = {
id: res.data.id
}
this.app.query(params).then(res => {
if (res && res.success) {
let newData = res.data.records[0]
this.app.$refs.TablePager.tableData.unshift(
newData)
/* 选中当前行 */
this.app.$refs.TablePager.setCurrent(newData)
}
})
}
} catch (e) {
console.warn('reldialog组件报错:', e)
}
} else {
this.$error(res.message || '添加失败')
}
}).finally(() => {
this.butdisabled = false
this.afterUpdate()
})
} else if (this.type == 'copy') {
/* 清除自定义数据 */
this.buttonApp.clearKey.forEach(item => {
/* debugger */
this.editApp.form[item] && (this.editApp.form[item] = '')
})
let params = {
...this.editApp.form
}
this.app.apiAdd(params).then(res => {
if (res.success) {
this.$success('添加成功')
this.app.$refs['TablePager'].reLoad()
this.closeAll()
} else {
this.$error(res.message || '添加失败')
}
}).finally(() => {
this.butdisabled = false
this.afterUpdate()
})
} else if (this.type == 'edit') {
if(this.editApp.form[this.updateMatch.key]&&this.editApp.form[this.updateMatch.value]){
this.editApp.form[this.updateMatch.key]=this.editApp.form[this.updateMatch.value]
}
if(this.updateMatch.beforeUpdate){
this.updateMatch.beforeUpdate()
}
let params = {
...this.editApp.form
}
this.app.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.app.$refs['TablePager'].reLoad()
this.closeAll()
// let tableData = this.app.$refs['TablePager'].tableData
// let nowIndex = false
// tableData.forEach((data, index) => {
// if (data.id == params.master.id) {
// nowIndex = index
// }
// })
// if (nowIndex !== false) {
// this.app.$refs['TablePager'].tableData.splice(nowIndex, 1, params
// .master)
// this.app.$refs['TablePager'].setCurrent(params.master)
// }
} else {
this.$error(res.message || '更新失败')
}
}).finally(() => {
this.afterUpdate()
this.butdisabled = false
})
}
/* updataed */
} else {
/* 验证失败触发*/
return false;
}
});
},
handleClose() {
},
showDialogFull() {
this.$refs['dialog'].$el.querySelector('.el-dialog').style.cssText =
'margin-top: 15vh; width: 50%; top: 0px;'
this.$nextTick(() => {
this.dialogFull ? this.dialogFull = false : this.dialogFull = true
})
},
closeAll() {
this.buttonApp.showField = false
this.buttonApp.showAdd = false
this.buttonApp.showEdit = false
this.buttonApp.showView = false
this.buttonApp.showCopy = false
},
}
}
</script>
<style scoped>
.bigTitle{
transform: translate(0,18px) scale(1.25);
}
/deep/.el-dialog__body {
/* padding-top: 20px;
padding-bottom: 0px;
padding-left: 20px;
padding-right: 20px; */
}
/* dialog*/
.el-dialog__header {
padding: 15px 20px 15px;
}
.el-dialog__headerbtn {
top: 15px;
}
/*dialog header*/
.el-dialog__header {
background: #e3eaed;
}
.avue-crud__dialog__header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.el-dialog__title {
color: rgba(0, 0, 0, .85);
font-weight: 500;
word-wrap: break-word;
}
.avue-crud__dialog__menu {
padding-right: 20px;
float: left;
cursor: pointer !important;
}
.avue-crud__dialog__menu i {
color: #909399;
font-size: 15px;
}
.el-icon-full-screen {
cursor: pointer;
}
.el-icon-full-screen:before {
content: "\e719";
}
</style>
<template>
<el-dialog ref="dialog" :fullscreen='dialogFull' :show-close='false' :title="title" :visible.sync="isShow" width="50%" v-dialogDragWidth v-dialogDragHeight
v-el-drag-dialog
:before-close="handleClose">
<!-- 重写头-->
<template slot="title">
<div class="avue-crud__dialog__header">
<span class="el-dialog__title">
<span
style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
{{title}}
</span>
<div>
<div class="avue-crud__dialog__menu" @click="showDialogFull()">
<i :class="{'el-icon-zoom-out':dialogFull,'el-icon-zoom-in':!dialogFull }"></i>
</div>
<div class="avue-crud__dialog__menu" @click="closeAll()">
<i class="el-icon-close"></i>
</div>
</div>
</div>
</template>
<span>
<slot name="form">
</slot>
<!-- form表单-->
</span>
<!-- footer-->
<slot name="reFooter">
<span slot="footer" class="dialog-footer">
<el-button @click="closeAll()">取 消</el-button>
<el-button v-if="(type=='add')" type="primary" @click="submitForm('form')">保 存</el-button>
<el-button v-if="(type=='edit')" type="primary" @click="submitForm('form')">保 存</el-button>
<el-button v-if="(type=='copy')" type="primary" @click="submitForm('form')">保 存</el-button>
</span>
</slot>
</el-dialog>
</template>
<script>
export default {
async mounted() {
if (!this.type) {
this.closeAll()
}
if (this.type != 'add') {
let form = JSON.parse(JSON.stringify(this.app.singleItem))
let res = await this.app.query({
id: form.id
})
if (res && res.data && res.data.records[0]) {
this.editApp.form = res.data.records[0]
} else {
this.$error('数据查询失败')
this.closeAll()
}
}
if (this.type == 'view') {
this.editApp.title = '查看'
this.editApp.readonly = true
this.isShow = this.buttonApp.showView
}
if (this.type == 'edit') {
this.title = '编辑'
this.editApp.readonly = false
this.isShow = this.buttonApp.showEdit
}
if (this.type == 'copy') {
this.title = '复制'
this.editApp.readonly = false
this.editApp.form.id = ''
this.isShow = this.buttonApp.showCopy
}
if (this.type == 'add') {
this.title = '新增'
this.editApp.readonly = false
this.isShow = this.buttonApp.showAdd
}
},
props: {
editApp: {
type: Object,
default: {}
},
type: {
type: String,
default: 'edit'
},
app: {
type: Object,
default: {}
},
buttonApp: {
type: Object,
default: {}
}
},
name: 'relDialog',
data() {
return {
title: '查看',
dialogFull: false,
isShow: false,
}
},
methods: {
/* 默认apI操作*/
submitForm(formName) {
this.editApp.$refs[formName].validate((valid) => {
if (valid) {
/* 验证成功触发*/
if (this.editApp.type == 'add') {
let params = {
details: [],
master: this.editApp.form
}
this.app.apiAdd(params).then(res => {
if (res.success) {
this.$success('添加成功')
this.app.$refs['TablePager'].reLoad()
this.closeAll()
} else {
this.$error(res.message || '添加失败')
}
})
} else if (this.type == 'copy') {
let params = {
details: [],
master: this.editApp.form
}
this.app.apiAdd(params).then(res => {
if (res.success) {
this.$success('添加成功')
this.app.$refs['TablePager'].reLoad()
this.closeAll()
} else {
this.$error(res.message || '添加失败')
}
})
} else if (this.type == 'edit') {
let params = {
details: [],
master: this.editApp.form
}
this.app.apiUpdate(params).then(res => {
if (res.success) {
this.$success('更新成功')
this.closeAll()
this.app.$refs['TablePager'].reLoad()
} else {
this.$error(res.message || '更新失败')
}
})
}
} else {
/* 验证失败触发*/
return false;
}
});
},
handleClose() {
},
showDialogFull() {
this.$refs['dialog'].$el.querySelector('.el-dialog').style.cssText = 'margin-top: 15vh; width: 50%; top: 0px;'
this.$nextTick(() => {
this.dialogFull ? this.dialogFull = false : this.dialogFull = true
})
},
closeAll() {
this.buttonApp.showAdd = false
this.buttonApp.showEdit = false
this.buttonApp.showView = false
this.buttonApp.showCopy = false
},
}
}
</script>
<style scoped lang="scss">
/* dialog*/
.el-dialog__header {
padding: 15px 20px 15px;
}
.el-dialog__headerbtn {
top: 15px;
}
/*dialog header*/
.el-dialog__header {
background: #e3eaed;
}
.avue-crud__dialog__header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.el-dialog__title {
color: rgba(0, 0, 0, .85);
font-weight: 500;
word-wrap: break-word;
}
.avue-crud__dialog__menu {
padding-right: 20px;
float: left;
cursor: pointer !important;
}
.avue-crud__dialog__menu i {
color: #909399;
font-size: 15px;
}
.el-icon-full-screen {
cursor: pointer;
}
.el-icon-full-screen:before {
content: "\e719";
}
</style>
......@@ -2,6 +2,7 @@ import Vue from 'vue'
import VueParticles from 'vue-particles'
import VueVideoPlayer from 'vue-video-player';
import 'video.js/dist/video-js.css';
import HjRelDialog from '@/components/HjRelDialog/index.vue'
/* 引入公用UI插件 */
......@@ -85,6 +86,8 @@ Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview)
Vue.component('selectMaterial', selectMaterial)
Vue.component('HjRelDialog', HjRelDialog)
Vue.use(framework)
Vue.use(plugins)
......
......@@ -156,6 +156,48 @@ export const powerRoutes=[
name: 'freeze',
path: "freeze",
},
{
component: 'warehousing/seal/index',
hidden: false,
meta: {
"title": "查封",
"icon": "",
"noCache": false,
"link": null,
"mkid": '901020300',
},
name: 'seal',
path: "seal",
},
{
component: 'warehousing/registration/index',
hidden: false,
meta: {
"title": "登记保存",
"icon": "",
"noCache": false,
"link": null,
"mkid": '901020400',
},
name: 'registration',
path: "registration",
},
{
component: 'warehousing/extension/index',
hidden: false,
meta: {
"title": "延期扣押",
"icon": "",
"noCache": false,
"link": null,
"mkid": '901020500',
},
name: 'extension',
path: "extension",
},
]
},
......
......@@ -49,45 +49,44 @@
config: {
/* 基本配置*/
url: 'jcsj/u_wpgl',
tableTitle: [{
tableTitle: [
{
title: "案件编码",
field: "code",
fieldType: "upper",
field: "ajbm",
width: 140
},
{
title: "案件名称",
field: "name",
field: "ajmc",
width: 140
},
{
title: "序列号",
field: "tybz",
fieldType: "tybz"
field: "xlh",
width: 140
},
{
title: "物品编码",
field: "tyrq",
field: "wpbm",
fieldType: "ftDate"
},
{
title: "物品名称",
field: "tyrq",
field: "wpmc",
fieldType: "ftDate"
},
{
title: "数量",
field: "tyrq",
fieldType: "ftDate"
field: "count",
},
{
title: "物品持有人",
field: "tyrq",
field: "wpcyr",
fieldType: "ftDate"
},
{
title: "物品特征",
field: "tyrq",
field: "wptz",
fieldType: "ftDate"
},
{
......
<template>
<RelDialog width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<HjRelDialog :master='false' width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules">
<!-- 结构-->
<div class="editMain">
<div class="editMain_left">
<!-- 扫码-->
<div class="editMain_left1">
<el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
<el-button slot="append" icon="el-icon-search"></el-button>
<el-input placeholder="请输入序列号" v-model="xlh" class="input-with-select">
<el-button @click="cxxlh" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="editMain_left2">
<editTableForEdit :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="formDetail" />
<editTableForEdit :expandTitle='false' :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="form.details" />
</div>
</div>
<el-row class="editMain_right" :gutter="20" :app="this">
......@@ -23,7 +23,7 @@
</div>
</el-form>
</RelDialog>
</HjRelDialog>
</template>
<script>
import {
......@@ -33,14 +33,52 @@
export default {
mixins: [editMixin, editMixin_expand],
methods:{
save(){
/* 过滤序列号添加*/
filter(obj){
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
if(item.xlh==xlh){
iscf=true
}
})
if(!iscf){
this.form.details.push(obj)
}else{
console.warn(`重复序列号${obj.xlh}`)
}
},
cxxlh(){
if(this.xlh){
this.$post('jcsj/u_wpgl/query',{
xlh:this.xlh
}).then(res=>{
if(res.data.records){
if(res.data.records.length!=0){
this.filter(res.data.records[0])
this.xlh=''
}else{
this.$warning('未查询到数据')
}
}
})
}else{
this.$warning('请输入序列号')
}
},
save(list){
list.forEach(item=>{
this.filter(item)
})
}
},
data() {
return {
xlh:'',
form: {
swlx: 1
swlx: 1,
details:[]
},
formDetail: [],
editColItemList: [
......@@ -79,7 +117,12 @@
span: 24,
"type": "RelSelect",
"typeConfig": {
optionsData: [{
"match": {
"value": "value",
"label": "name"
},
optionsData: [
{
name: '行政扣押',
value: '0'
},
......@@ -172,7 +215,7 @@
},
{
title: "案件编号",
field: "ajbh",
field: "ajbm",
width: 90,
align: "center"
},
......@@ -184,13 +227,13 @@
},
{
title: "物品持有人",
field: "cyr",
width: 60,
field: "wpcyr",
width: 100,
align: "center"
},
{
title: "入库数量",
field: "rksl",
field: "count",
width: 100,
align: "center"
},
......
......@@ -5,9 +5,10 @@
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
<AttachFileButton :app='ctx.basePage'></AttachFileButton>
<el-button @click="jfzky(ctx.basePage)" size='mini' type="primary">解封转扣押N</el-button>
<el-button @click="bcdjzky(ctx.basePage)" size='mini' type="primary">保存登记转扣押N</el-button>
</template>
</BasePage>
</template>
......@@ -19,6 +20,14 @@
this.$refs.basepage.queryParams.swlx = '1'
this.$refs.basepage.refresh()
},
methods: {
jfzky(ctx) {
},
bcdjzky(ctx) {
}
},
data() {
return {
config: {
......@@ -37,22 +46,41 @@
},
{
title: "扣押日期至",
field: "kyrqz",
field: "rkjzrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ck",
field: "ckmc",
width: 140
},
{
title: "事务类型",
field: "swlx",
width: 140
width: 140,
formatter(a, b, value) {
let map = {
'1': '扣押',
'2': '先行保存库',
'3': '冻结',
'4': '查封',
'5': '登记保存',
'6': '归还入库',
'7': '调度出库',
'8': '发还出库',
'9': '调拨出库',
'10': '随案移动',
'11': '拍卖',
'12': '销毁',
'13': '解除出库',
}
return map[value]
}
},
{
title: "扣押方式",
field: "swlx",
field: "rklxmc",
width: 140
},
{
......@@ -149,6 +177,35 @@
type: 'input',
value: ''
}
],
[{
label: '案件信息',
prop: 'ajxx',
span: 4,
type: 'input',
value: ''
},
{
label: '扣押方式',
prop: 'rklx',
span: 4,
"type": "RelSelect",
"typeConfig": {
"match": {
"value": "value",
"label": "name"
},
optionsData: [{
name: '行政扣押',
value: '0'
},
{
name: '刑事扣押',
value: '1'
}
]
},
},
]
],
......@@ -157,12 +214,7 @@
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components: {
Edit
}
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</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 {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<HjRelDialog width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="120px" :rules="rules">
<!-- 结构-->
<div class="editMain">
<div class="editMain_left">
<!-- 扫码-->
<div class="editMain_left1">
<el-input placeholder="请输入序列号" v-model="xlh" class="input-with-select">
<el-button @click="cxxlh" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="editMain_left2">
<editTableForEdit :expandTitle='false' :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="form.details" />
</div>
</div>
<el-row class="editMain_right" :gutter="20" :app="this">
<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>
</el-form>
</HjRelDialog>
</template>
<script>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
methods:{
/* 过滤序列号添加*/
filter(obj){
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
if(item.xlh==xlh){
iscf=true
}
})
if(!iscf){
this.form.details.push(obj)
}else{
console.warn(`重复序列号${obj.xlh}`)
}
},
cxxlh(){
if(this.xlh){
this.$post('jcsj/u_wpgl/query',{
xlh:this.xlh
}).then(res=>{
if(res.data.records){
if(res.data.records.length!=0){
this.filter(res.data.records[0])
this.xlh=''
}else{
this.$warning('未查询到数据')
}
}
})
}else{
this.$warning('请输入序列号')
}
},
save(list){
list.forEach(item=>{
this.filter(item)
})
}
},
data() {
return {
xlh:'',
form: {
swlx: 1,
details:[]
},
formDetail: [],
editColItemList: [
{
label: '入库单号',
prop: 'rkdh',
span: 24,
type: 'input',
},
{
label: '入库日期',
prop: 'rkrq',
span: 24,
type: 'date',
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
}
}
},
{
label: '扣押方式',
prop: 'rklx',
span: 24,
"type": "RelSelect",
"typeConfig": {
"match": {
"value": "value",
"label": "name"
},
optionsData: [
{
name: '行政扣押',
value: '0'
},
{
name: '刑事扣押',
value: '1'
}
]
},
required: true,
},
{
label: '保存至第三方库',
prop: 'dsfkbc',
span: 24,
type: 'Rcheckbox',
typeConfig: {
true: '1',
false: '0'
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: "KY"
}
},
required: true,
},
{
label: '第三方名称',
prop: 'dsfmc',
span: 24,
type: 'input',
},
{
label: '第三方地点',
prop: 'dsfkdd',
span: 24,
type: 'input',
},
{
label: '扣押时间至',
prop: 'rkjzrq',
span: 24,
type: 'date',
required: true,
},
{
label: '经手人',
prop: 'jsr',
span: 24,
type: 'input',
}
],
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物品编码",
field: "wpbm",
width: 100,
align: "center"
},
{
title: "物品名称",
field: "wpmc",
width: 120,
align: "center"
},
{
title: "物品特征",
field: "wptz",
width: 140,
align: "center"
},
{
title: "案件编号",
field: "ajbm",
width: 90,
align: "center"
},
{
title: "案件名称",
field: "ajmc",
width: 120,
align: "center"
},
{
title: "物品持有人",
field: "wpcyr",
width: 100,
align: "center"
},
{
title: "入库数量",
field: "count",
width: 100,
align: "center"
},
{
title: "备注",
field: "bz",
width: 150,
align: "center"
}
]
}
}
}
</script>
<style lang="scss" scoped>
.editMain {
display: flex;
}
.editMain_left {
width: 70%;
min-height: 400px;
border-right: 5px solid #fff;
}
.editMain_left1 {
height: 30px;
width: 100%;
}
.editMain_left2 {
width: 100%;
height: calc(100% - 30px);
}
.editMain_right {
background-color: #eee;
width: 30%;
min-height: 400px;
padding-top: 10px;
}
</style>
<template>
<BasePage :power="{
add: false,
copy: false,
delButton: false,
editButton: false,
operateButtons: false,
workFlow: false,
/* 表格 */
showSelection: false,
saveSelected: false
}" ref="basepage" :autoQuery='false' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<AttachFileButton :app='ctx.basePage'></AttachFileButton>
<el-button @click="kyyq(ctx.basePage)" size='mini' type="primary">扣押延期</el-button>
<el-button @click="yqjl(ctx.basePage)" size='mini' type="primary">延期记录</el-button>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
/* 赋值swlx主动查询*/
mounted() {
this.$refs.basepage.queryParams.swlx = '1'
this.$refs.basepage.refresh()
},
methods: {
kyyq(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$prompt('请输入新的延期时间', '', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputType: 'date'
}).then(({
value
}) => {
if (value) {
ctx.singleItem.rkjzrq = new Date(value).getTime()
this.$post('jcsj/u_rkgl/update', {
...ctx.singleItem
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.showDialog = false,
ctx.refresh()
}
})
}
}).catch(res => {
this.$warning('请填入日期')
})
} else {
this.$warning('请选择一条数据')
}
},
yqjl(ctx) {
}
},
data() {
return {
config: {
/* 基本配置*/
url: 'jcsj/u_rkgl',
tableTitle: [{
title: "入库单号",
field: "rkdh",
fieldType: "upper",
width: 140
},
{
title: "入库日期",
field: "rkrq",
fieldType: "ftDate"
},
{
title: "扣押日期至",
field: "rkjzrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ckmc",
width: 140
},
{
title: "事务类型",
field: "swlx",
width: 140,
formatter(a, b, value) {
let map = {
'1': '扣押',
'2': '先行保存库',
'3': '冻结',
'4': '查封',
'5': '登记保存',
'6': '归还入库',
'7': '调度出库',
'8': '发还出库',
'9': '调拨出库',
'10': '随案移动',
'11': '拍卖',
'12': '销毁',
'13': '解除出库',
}
return map[value]
}},
{
title: "扣押方式",
field: "rklxmc",
width: 140
},
{
title: "部门",
field: "bm",
width: 140
},
{
title: "第三方保存",
field: "dsfbc",
width: 140
},
{
title: "第三方名称",
field: "dsfmc",
width: 140
},
{
title: "第三方库地点",
field: "dsfkdd",
width: 140
},
{
title: "经手人",
field: "jsr",
width: 140
},
{
title: "备注",
field: "bz"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '部门',
prop: 'ssbm',
span: 4,
type: 'RelSelect',
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
},
}
},
{
"label": "仓库",
"prop": "ckid",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: 'KY'
}
}
},
{
label: '维护时间',
startProp: "kssj",
endProp: "jssj",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '入库单号',
prop: 'rkdh',
span: 4,
type: 'input',
value: ''
},
{
label: '序列号',
prop: 'xlh',
span: 4,
type: 'input',
value: ''
}
],
[{
label: '案件信息',
prop: 'ajxx',
span: 4,
type: 'input',
value: ''
},
{
label: '扣押方式',
prop: 'rklx',
span: 4,
"type": "RelSelect",
"typeConfig": {
"match": {
"value": "value",
"label": "name"
},
optionsData: [{
name: '行政扣押',
value: '0'
},
{
name: '刑事扣押',
value: '1'
}
]
},
},
]
],
}
}
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<RelDialog width="50%" :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">
<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>
<HjRelDialog width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="90px" :rules="rules">
<!-- 结构-->
<div class="editMain">
<div class="editMain_left">
<!-- 扫码-->
<div class="editMain_left1">
<el-input placeholder="请输入序列号" v-model="xlh" class="input-with-select">
<el-button @click="cxxlh" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="editMain_left2">
<editTableForEdit :expandTitle='false' :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="form.details" />
</div>
</div>
<el-row class="editMain_right" :gutter="20" :app="this">
<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>
</el-form>
</RelDialog>
</HjRelDialog>
</template>
<script>
import {
editMixin
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin],
mixins: [editMixin, editMixin_expand],
methods:{
/* 过滤序列号添加*/
filter(obj){
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
if(item.xlh==xlh){
iscf=true
}
})
if(!iscf){
this.form.details.push(obj)
}else{
console.warn(`重复序列号${obj.xlh}`)
}
},
cxxlh(){
if(this.xlh){
this.$post('jcsj/u_wpgl/query',{
xlh:this.xlh
}).then(res=>{
if(res.data.records){
if(res.data.records.length!=0){
this.filter(res.data.records[0])
this.xlh=''
}else{
this.$warning('未查询到数据')
}
}
})
}else{
this.$warning('请输入序列号')
}
},
save(list){
list.forEach(item=>{
this.filter(item)
})
}
},
data() {
return {
xlh:'',
form: {
swlx: 3,
details:[]
},
formDetail: [],
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
label: '入库单号',
prop: 'rkdh',
span: 24,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
label: '入库日期',
prop: 'rkrq',
span: 24,
type: 'date',
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
}
}
},
{
label: '备注',
prop: 'bz',
label: '仓库',
prop: 'ckid',
span: 24,
type: 'input'
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: "DJ"
}
},
required: true,
},
{
label: '经手人',
prop: 'jsr',
span: 24,
type: 'input',
}
],
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物品编码",
field: "wpbm",
width: 100,
align: "center"
},
{
title: "物品名称",
field: "wpmc",
width: 120,
align: "center"
},
{
title: "物品特征",
field: "wptz",
width: 140,
align: "center"
},
{
title: "案件编号",
field: "ajbm",
width: 90,
align: "center"
},
{
title: "案件名称",
field: "ajmc",
width: 120,
align: "center"
},
{
title: "物品持有人",
field: "wpcyr",
width: 100,
align: "center"
},
{
title: "入库数量",
field: "count",
width: 100,
align: "center"
},
{
title: "备注",
field: "bz",
width: 150,
align: "center"
}
]
}
}
}
</script>
<style lang="scss" scoped>
.editMain {
display: flex;
}
.editMain_left {
width: 70%;
min-height: 400px;
border-right: 5px solid #fff;
}
.editMain_left1 {
height: 30px;
width: 100%;
}
.editMain_left2 {
width: 100%;
height: calc(100% - 30px);
}
.editMain_right {
background-color: #eee;
width: 30%;
min-height: 400px;
padding-top: 10px;
}
</style>
<template>
<BasePage class="min_full" :config="config" >
<template #dialog="ctx" >
<BasePage ref="basepage" :autoQuery='false' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx" >
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
<AttachFileButton :app='ctx.basePage'></AttachFileButton>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default{
data(){
return{
config:{
export default {
/* 赋值swlx主动查询*/
mounted() {
this.$refs.basepage.queryParams.swlx = '3'
this.$refs.basepage.refresh()
},
methods: {
},
data() {
return {
config: {
/* 基本配置*/
url:'jcsj/gysfl',
tableTitle: [
{title: "编码", field: "code", fieldType:"upper", width: 140},
{title: "名称", field: "name", width: 140},
{title: "停用", field: "tybz",fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"},
],
queryParams:[[
url: 'jcsj/u_rkgl',
tableTitle: [{
title: "入库单号",
field: "rkdh",
fieldType: "upper",
width: 140
},
{
title: "入库日期",
field: "rkrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ck",
width: 140
},
{
title: "事务类型",
field: "swlx",
width: 140,
formatter(a, b, value) {
let map = {
'1': '扣押',
'2': '先行保存库',
'3': '冻结',
'4': '查封',
'5': '登记保存',
'6': '归还入库',
'7': '调度出库',
'8': '发还出库',
'9': '调拨出库',
'10': '随案移动',
'11': '拍卖',
'12': '销毁',
'13': '解除出库',
}
return map[value]
}},
{
title: "部门",
field: "ckmc",
width: 140
},
{
title: "经手人",
field: "jsr",
width: 140
},
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value:''
title: "备注",
field: "bz"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '部门',
prop: 'ssbm',
span: 4,
type: 'RelSelect',
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
},
}
},
{
"label": "仓库",
"prop": "ckid",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: 'DJ'
}
}
},
{
label: '维护时间',
startProp: "kssj",
endProp: "jssj",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '入库单号',
prop: 'rkdh',
span: 4,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
label: '序列号',
prop: 'xlh',
span: 4,
type: 'input',
value:''
value: ''
}
],[
{
label: '案件信息',
prop: 'ajxx',
span: 4,
type: 'input',
value: ''
}
]
],
]],
/* 默认启停用 */
showqt:true,
// qtUrl:'',
/* 树的支持*/
// hasTree:false,
// treeTitle:'',
// treeDefaultProps: {
// children: 'children',
// label: 'name',
// fatherId: 'pid',
// sonId: 'id',
// rootName: "全部",
// rootId:'root'
// },
// treeQueryParams:{
// },
// treeUrl:''
}
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components:{
components: {
Edit
}
}
</script>
<style>
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</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 {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<HjRelDialog width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="90px" :rules="rules">
<!-- 结构-->
<div class="editMain">
<div class="editMain_left">
<!-- 扫码-->
<div class="editMain_left1">
<el-input placeholder="请输入序列号" v-model="xlh" class="input-with-select">
<el-button @click="cxxlh" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="editMain_left2">
<editTableForEdit :expandTitle='false' :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="form.details" />
</div>
</div>
<el-row class="editMain_right" :gutter="20" :app="this">
<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>
</el-form>
</HjRelDialog>
</template>
<script>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
methods:{
/* 过滤序列号添加*/
filter(obj){
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
if(item.xlh==xlh){
iscf=true
}
})
if(!iscf){
this.form.details.push(obj)
}else{
console.warn(`重复序列号${obj.xlh}`)
}
},
cxxlh(){
if(this.xlh){
this.$post('jcsj/u_wpgl/query',{
xlh:this.xlh
}).then(res=>{
if(res.data.records){
if(res.data.records.length!=0){
this.filter(res.data.records[0])
this.xlh=''
}else{
this.$warning('未查询到数据')
}
}
})
}else{
this.$warning('请输入序列号')
}
},
save(list){
list.forEach(item=>{
this.filter(item)
})
}
},
data() {
return {
xlh:'',
form: {
swlx: 5,
details:[]
},
formDetail: [],
editColItemList: [
{
label: '入库单号',
prop: 'rkdh',
span: 24,
type: 'input',
},
{
label: '入库日期',
prop: 'rkrq',
span: 24,
type: 'date',
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: "DJBC"
}
},
required: true,
},
{
label: '经手人',
prop: 'jsr',
span: 24,
type: 'input',
}
],
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物品编码",
field: "wpbm",
width: 100,
align: "center"
},
{
title: "物品名称",
field: "wpmc",
width: 120,
align: "center"
},
{
title: "物品特征",
field: "wptz",
width: 140,
align: "center"
},
{
title: "案件编号",
field: "ajbm",
width: 90,
align: "center"
},
{
title: "案件名称",
field: "ajmc",
width: 120,
align: "center"
},
{
title: "物品持有人",
field: "wpcyr",
width: 100,
align: "center"
},
{
title: "入库数量",
field: "count",
width: 100,
align: "center"
},
{
title: "备注",
field: "bz",
width: 150,
align: "center"
}
]
}
}
}
</script>
<style lang="scss" scoped>
.editMain {
display: flex;
}
.editMain_left {
width: 70%;
min-height: 400px;
border-right: 5px solid #fff;
}
.editMain_left1 {
height: 30px;
width: 100%;
}
.editMain_left2 {
width: 100%;
height: calc(100% - 30px);
}
.editMain_right {
background-color: #eee;
width: 30%;
min-height: 400px;
padding-top: 10px;
}
</style>
<template>
<BasePage ref="basepage" :autoQuery='false' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<AttachFileButton :app='ctx.basePage'></AttachFileButton>
<el-button @click="kyzdjbc(ctx.basePage)" size='mini' type="primary">扣押转登记保存N</el-button>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
/* 赋值swlx主动查询*/
mounted() {
this.$refs.basepage.queryParams.swlx = '5'
this.$refs.basepage.refresh()
},
methods: {
kyzdjbc(){
}
},
data() {
return {
config: {
/* 基本配置*/
url: 'jcsj/u_rkgl',
tableTitle: [{
title: "入库单号",
field: "rkdh",
fieldType: "upper",
width: 140
},
{
title: "入库日期",
field: "rkrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ckmc",
width: 140
},
{
title: "事务类型",
field: "swlx",
width: 140,
formatter(a, b, value) {
let map = {
'1': '扣押',
'2': '先行保存库',
'3': '冻结',
'4': '查封',
'5': '登记保存',
'6': '归还入库',
'7': '调度出库',
'8': '发还出库',
'9': '调拨出库',
'10': '随案移动',
'11': '拍卖',
'12': '销毁',
'13': '解除出库',
}
return map[value]
}},
{
title: "部门",
field: "bm",
width: 140
},
{
title: "经手人",
field: "jsr",
width: 140
},
{
title: "备注",
field: "bz"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '部门',
prop: 'ssbm',
span: 4,
type: 'RelSelect',
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
},
}
},
{
"label": "仓库",
"prop": "ckid",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: 'DJBC'
}
}
},
{
label: '维护时间',
startProp: "kssj",
endProp: "jssj",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '入库单号',
prop: 'rkdh',
span: 4,
type: 'input',
value: ''
},
{
label: '序列号',
prop: 'xlh',
span: 4,
type: 'input',
value: ''
}
],[
{
label: '案件信息',
prop: 'ajxx',
span: 4,
type: 'input',
value: ''
}
]
],
}
}
},
components: {
Edit
}
}
</script>
<style>
</style>
<template>
<RelDialog width="50%" :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">
<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>
<HjRelDialog width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="90px" :rules="rules">
<!-- 结构-->
<div class="editMain">
<div class="editMain_left">
<!-- 扫码-->
<div class="editMain_left1">
<el-input placeholder="请输入序列号" v-model="xlh" class="input-with-select">
<el-button @click="cxxlh" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="editMain_left2">
<editTableForEdit :expandTitle='false' :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="form.details" />
</div>
</div>
<el-row class="editMain_right" :gutter="20" :app="this">
<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>
</el-form>
</RelDialog>
</HjRelDialog>
</template>
<script>
import {
editMixin
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin],
mixins: [editMixin, editMixin_expand],
methods:{
/* 过滤序列号添加*/
filter(obj){
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
if(item.xlh==xlh){
iscf=true
}
})
if(!iscf){
this.form.details.push(obj)
}else{
console.warn(`重复序列号${obj.xlh}`)
}
},
cxxlh(){
if(this.xlh){
this.$post('jcsj/u_wpgl/query',{
xlh:this.xlh
}).then(res=>{
if(res.data.records){
if(res.data.records.length!=0){
this.filter(res.data.records[0])
this.xlh=''
}else{
this.$warning('未查询到数据')
}
}
})
}else{
this.$warning('请输入序列号')
}
},
save(list){
list.forEach(item=>{
this.filter(item)
})
}
},
data() {
return {
xlh:'',
form: {
swlx: 2,
details:[]
},
formDetail: [],
editColItemList: [
{
label: '编码',
prop: 'code',
span: 12,
label: '入库单号',
prop: 'rkdh',
span: 24,
type: 'input',
required:true,
},
{
label: '名称',
prop: 'name',
span: 12,
type: 'input',
required:true,
label: '入库日期',
prop: 'rkrq',
span: 24,
type: 'date',
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
}
}
},
{
label: '备注',
prop: 'bz',
label: '仓库',
prop: 'ckid',
span: 24,
type: 'input'
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: "XXDJBC"
}
},
required: true,
},
{
label: '经手人',
prop: 'jsr',
span: 24,
type: 'input',
}
],
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物品编码",
field: "wpbm",
width: 100,
align: "center"
},
{
title: "物品名称",
field: "wpmc",
width: 120,
align: "center"
},
{
title: "物品特征",
field: "wptz",
width: 140,
align: "center"
},
{
title: "案件编号",
field: "ajbm",
width: 90,
align: "center"
},
{
title: "案件名称",
field: "ajmc",
width: 120,
align: "center"
},
{
title: "物品持有人",
field: "wpcyr",
width: 100,
align: "center"
},
{
title: "入库数量",
field: "count",
width: 100,
align: "center"
},
{
title: "备注",
field: "bz",
width: 150,
align: "center"
}
]
}
}
}
</script>
<style lang="scss" scoped>
.editMain {
display: flex;
}
.editMain_left {
width: 70%;
min-height: 400px;
border-right: 5px solid #fff;
}
.editMain_left1 {
height: 30px;
width: 100%;
}
.editMain_left2 {
width: 100%;
height: calc(100% - 30px);
}
.editMain_right {
background-color: #eee;
width: 30%;
min-height: 400px;
padding-top: 10px;
}
</style>
<template>
<BasePage class="min_full" :config="config" >
<template #dialog="ctx" >
<BasePage ref="basepage" :autoQuery='false' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx" >
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!-- <el-button @click="demo(ctx.basePage)" size='mini' type="primary">示例按钮</el-button> -->
<AttachFileButton :app='ctx.basePage'></AttachFileButton>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default{
data(){
return{
config:{
export default {
/* 赋值swlx主动查询*/
mounted() {
this.$refs.basepage.queryParams.swlx = '2'
this.$refs.basepage.refresh()
},
methods: {
},
data() {
return {
config: {
/* 基本配置*/
url:'jcsj/gysfl',
tableTitle: [
{title: "编码", field: "code", fieldType:"upper", width: 140},
{title: "名称", field: "name", width: 140},
{title: "停用", field: "tybz",fieldType:"tybz"},
{title: "停用日期", field: "tyrq", fieldType:"ftDate"},
{title: "维护人", field: "whr"},
{title: "维护时间", field: "whsj", fieldType:"ftDateTime"},
],
queryParams:[[
url: 'jcsj/u_rkgl',
tableTitle: [{
title: "入库单号",
field: "rkdh",
fieldType: "upper",
width: 140
},
{
title: "入库日期",
field: "rkrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ckmc",
width: 140
},
{
title: "事务类型",
field: "swlx",
width: 140,
formatter(a, b, value) {
let map = {
'1': '扣押',
'2': '先行保存库',
'3': '冻结',
'4': '查封',
'5': '登记保存',
'6': '归还入库',
'7': '调度出库',
'8': '发还出库',
'9': '调拨出库',
'10': '随案移动',
'11': '拍卖',
'12': '销毁',
'13': '解除出库',
}
return map[value]
}},
{
title: "部门",
field: "bm",
width: 140
},
{
title: "经手人",
field: "jsr",
width: 140
},
{
label: '编码',
prop: 'code',
span: 6,
type: 'input',
value:''
title: "备注",
field: "bz"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '部门',
prop: 'ssbm',
span: 4,
type: 'RelSelect',
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
},
}
},
{
"label": "仓库",
"prop": "ckid",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: 'XXDJBC'
}
}
},
{
label: '维护时间',
startProp: "kssj",
endProp: "jssj",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '入库单号',
prop: 'rkdh',
span: 4,
type: 'input',
value: ''
},
{
label: '名称',
prop: 'name',
span: 6,
label: '序列号',
prop: 'xlh',
span: 4,
type: 'input',
value:''
value: ''
}
],[
{
label: '案件信息',
prop: 'ajxx',
span: 4,
type: 'input',
value: ''
}
]
],
]],
/* 默认启停用 */
showqt:true,
// qtUrl:'',
/* 树的支持*/
// hasTree:false,
// treeTitle:'',
// treeDefaultProps: {
// children: 'children',
// label: 'name',
// fatherId: 'pid',
// sonId: 'id',
// rootName: "全部",
// rootId:'root'
// },
// treeQueryParams:{
// },
// treeUrl:''
}
}
}
},
methods: {
/* 示例*/
// demo(basePage){
// }
},
components:{
components: {
Edit
}
}
</script>
<style>
......
<template>
<DefaultDialog :app='app'>
<div slot="form" style="display: flex;height: 70vh;">
DialogTitle:'新增',
showDialog:false,
</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 {
}
},
methods: {
}
}
</script>
<style scoped>
</style>
<template>
<HjRelDialog width="70%" :type='type' :editApp='editApp' :app='app' :buttonApp='buttonApp'>
<el-form slot="form" ref="form" :model="form" label-width="90px" :rules="rules">
<!-- 结构-->
<div class="editMain">
<div class="editMain_left">
<!-- 扫码-->
<div class="editMain_left1">
<el-input placeholder="请输入序列号" v-model="xlh" class="input-with-select">
<el-button @click="cxxlh" slot="append" icon="el-icon-search"></el-button>
</el-input>
</div>
<div class="editMain_left2">
<editTableForEdit :expandTitle='false' :rename="'选择物品'" code="SHHJTHING" :indexApp='app' :type='type' @save='save' ref="editTableForEdit"
:editTableTitle='editTableTitle' v-if="editTableForEdit" :editTableData="form.details" />
</div>
</div>
<el-row class="editMain_right" :gutter="20" :app="this">
<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>
</el-form>
</HjRelDialog>
</template>
<script>
import {
editMixin,
editMixin_expand
} from 'common'
export default {
mixins: [editMixin, editMixin_expand],
methods:{
/* 过滤序列号添加*/
filter(obj){
let xlh=obj.xlh
let iscf=false
this.form.details.forEach(item=>{
if(item.xlh==xlh){
iscf=true
}
})
if(!iscf){
this.form.details.push(obj)
}else{
console.warn(`重复序列号${obj.xlh}`)
}
},
cxxlh(){
if(this.xlh){
this.$post('jcsj/u_wpgl/query',{
xlh:this.xlh
}).then(res=>{
if(res.data.records){
if(res.data.records.length!=0){
this.filter(res.data.records[0])
this.xlh=''
}else{
this.$warning('未查询到数据')
}
}
})
}else{
this.$warning('请输入序列号')
}
},
save(list){
list.forEach(item=>{
this.filter(item)
})
}
},
data() {
return {
xlh:'',
form: {
swlx: 4,
details:[]
},
formDetail: [],
editColItemList: [
{
label: '入库单号',
prop: 'rkdh',
span: 24,
type: 'input',
},
{
label: '入库日期',
prop: 'rkrq',
span: 24,
type: 'date',
value:new Date().getTime(),
required: true,
},
{
"label": "部门",
"prop": "bm",
"span": 24,
"type": "RelSelect",
"value": "",
"required": true,
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
}
}
},
{
label: '仓库',
prop: 'ckid',
span: 24,
"type": "RelSelect",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: "CF"
}
},
required: true,
},
{
label: '经手人',
prop: 'jsr',
span: 24,
type: 'input',
}
],
editTableTitle: [{
title: "序号",
field: "xh",
width: 50,
align: "center"
},
{
title: "物品编码",
field: "wpbm",
width: 100,
align: "center"
},
{
title: "物品名称",
field: "wpmc",
width: 120,
align: "center"
},
{
title: "物品特征",
field: "wptz",
width: 140,
align: "center"
},
{
title: "案件编号",
field: "ajbm",
width: 90,
align: "center"
},
{
title: "案件名称",
field: "ajmc",
width: 120,
align: "center"
},
{
title: "物品持有人",
field: "wpcyr",
width: 100,
align: "center"
},
{
title: "入库数量",
field: "count",
width: 100,
align: "center"
},
{
title: "备注",
field: "bz",
width: 150,
align: "center"
}
]
}
}
}
</script>
<style lang="scss" scoped>
.editMain {
display: flex;
}
.editMain_left {
width: 70%;
min-height: 400px;
border-right: 5px solid #fff;
}
.editMain_left1 {
height: 30px;
width: 100%;
}
.editMain_left2 {
width: 100%;
height: calc(100% - 30px);
}
.editMain_right {
background-color: #eee;
width: 30%;
min-height: 400px;
padding-top: 10px;
}
</style>
<template>
<BasePage ref="basepage" :autoQuery='false' class="min_full" :config="config">
<template #dialog="ctx">
<!-- 嵌入默认页面额外弹框的插槽 ctx.pagePage来操作默认页面 -->
</template>
<template #toolbar="ctx">
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<AttachFileButton :app='ctx.basePage'></AttachFileButton>
</template>
</BasePage>
</template>
<script>
import Edit from './edit.vue'
export default {
/* 赋值swlx主动查询*/
mounted() {
this.$refs.basepage.queryParams.swlx = '4'
this.$refs.basepage.refresh()
},
methods: {
},
data() {
return {
config: {
/* 基本配置*/
url: 'jcsj/u_rkgl',
tableTitle: [{
title: "入库单号",
field: "rkdh",
fieldType: "upper",
width: 140
},
{
title: "入库日期",
field: "rkrq",
fieldType: "ftDate"
},
{
title: "仓库",
field: "ckmc",
width: 140
},
{
title: "事务类型",
field: "swlx",
width: 140,
formatter(a, b, value) {
let map = {
'1': '扣押',
'2': '先行保存库',
'3': '冻结',
'4': '查封',
'5': '登记保存',
'6': '归还入库',
'7': '调度出库',
'8': '发还出库',
'9': '调拨出库',
'10': '随案移动',
'11': '拍卖',
'12': '销毁',
'13': '解除出库',
}
return map[value]
}},
{
title: "部门",
field: "bm",
width: 140
},
{
title: "经手人",
field: "jsr",
width: 140
},
{
title: "备注",
field: "bz"
},
{
title: "维护人",
field: "whr"
},
{
title: "维护时间",
field: "whsj",
fieldType: "ftDateTime"
},
],
queryParams: [
[{
label: '部门',
prop: 'ssbm',
span: 4,
type: 'RelSelect',
"typeConfig": {
"src": "hjbm/query",
"match": {
"value": "bmid",
"label": "bmmc"
},
}
},
{
"label": "仓库",
"prop": "ckid",
"span": 4,
"type": "RelSelect",
"value": "",
"typeConfig": {
"src": "jcsj/u_ckwh/query",
"match": {
"value": "id",
"label": "ckmc"
},
params: {
cklx: 'DJ'
}
}
},
{
label: '维护时间',
startProp: "kssj",
endProp: "jssj",
span: 8,
type: 'RelDaterangeV2',
startValue: new Date().getTime() - 1000 * 60 * 60 * 24 * 30,
endValue: new Date().getTime(),
},
{
label: '入库单号',
prop: 'rkdh',
span: 4,
type: 'input',
value: ''
},
{
label: '序列号',
prop: 'xlh',
span: 4,
type: 'input',
value: ''
}
],[
{
label: '案件信息',
prop: 'ajxx',
span: 4,
type: 'input',
value: ''
}
]
],
}
}
},
components: {
Edit
}
}
</script>
<style>
</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