5d61be3d by 蔡俊立

证书入库

1 parent 384ca73e
import request from '@/utils/request'
/*
证书管理-获取序列号
*/
export function getSysSerialSingle (params) {
return request({
url: '/system/sysSerial/getSysSerialSingle',
method: 'get',
params: params
})
}
/*
证书管理-证书入库列表
*/
export function getZsglrkList (data) {
return request({
url: '/sys/zsgl//getZsglrkList',
url: '/sys/zsgl/getZsglrkList',
method: 'post',
data
})
}
/*
证书管理-新增证书入库
*/
export function zsrk (data) {
return request({
url: '/sys/zsgl/zsrk',
method: 'post',
data
})
......
<template>
<dialogBox title="证书入库" @submitForm="submitForm" saveButton="保存" width="45%" @closeDialog="closeDialog" v-model="value">
<div>
<el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules">
<el-row>
<el-col :span="12">
<el-form-item label="入库编号:" prop="batchNo">
<el-input v-model="ruleForm.batchNo" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="登记机构:" prop="djjg">
<el-select v-model="ruleForm.djjg" placeholder="请选择">
<el-option v-for="item in dictData['ywly']" :key="item.dname" :label="item.dname" :value="item.dname"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="入库人员:" prop="rkry">
<el-input v-model="ruleForm.rkry" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="入库时间:" prop="rksj">
<el-date-picker v-model="ruleForm.rksj" type="datetime" placeholder="选择日期时间"></el-date-picker>
</el-form-item>
</el-col>
</el-row>
<div>
<el-table :data="tableForm" border style="width: 100%" :header-cell-style="{'text-align':'center',background: 'rgb(236, 245, 255)'}" :cell-style="{'text-align':'center'}">
<el-table-column prop="name" label="纸质证书类型" width="200"></el-table-column>
<el-table-column prop="ksysxlh" label="开始印刷序列号" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.ksysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11"></el-input>
</template>
</el-table-column>
<el-table-column prop="jsysxlh" label="结束印刷序列号" width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.jsysxlh" @blur="ysxlhDeal(scope.row)" maxlength="11"></el-input>
</template>
</el-table-column>
<el-table-column prop="bs" label="本数">
<template slot-scope="scope">
<span v-if="scope.row.bs == 0" style="color:red">系统计算</span>
<span v-else-if="scope.row.bs < 0" style="color:red">印刷序列号有误</span>
<span v-else>{{scope.row.bs}}</span>
</template>
</el-table-column>
</el-table>
</div>
<el-form-item label="备注" style="margin-top:20px">
<el-input type="textarea" v-model="ruleForm.bz" :rows="4"></el-input>
</el-form-item>
</el-form>
</div>
</dialogBox>
</template>
<script>
import { mapGetters } from 'vuex'
import { getSysSerialSingle,zsrk} from "@/api/zsgl.js"
export default {
components: {
},
computed: {
...mapGetters(['dictData']),
},
props: {
value: { type: Boolean, default: false },
},
data () {
return {
tableData: {},
ruleForm: {
batchNo: '',
djjg: '',
rkry: '超级管理员',
rksj: '',
bz: '',
zsstarno: '',
zsendno: '',
zsnum: '',
zmstarno: '',
zmendno: '',
zmnum: ''
},
tableForm: [
{
name: '不动产权证书',
ksysxlh: '',
jsysxlh: '',
bs: 0
},
{
name: '不动产权登记证明',
ksysxlh: '',
jsysxlh: '',
bs: 0
}
],
ywhQueryForm: {
serialtype: 'zsrkbh',
serialname: '证书入库编号',
serialcode: 'zsrk',
digit: '5'
},
rules: {
batchNo: [
{ required: true, message: '入库编号不能为空', trigger: 'blur' }
],
djjg: [
{ required: true, message: '请选择登记机构', trigger: 'change' }
],
rkry: [
{ required: true, message: '入库人员不能为空', trigger: 'blur' }
],
rksj: [
{ required: true, message: '请选择入库时间', trigger: 'change' }
],
},
}
},
methods: {
//表单提交
submitForm () {
zsrk().then(res => {
if(res.code == 200){
this.$message.sucess("保存成功");
this.$emit("input", false);
this.$refs.ruleForm.resetFields();
this.$refs.tableForm.resetFields();
}else{
this.$message.error(res.message);
}
})
},
//序列号获取
ywhSerial(){
// getSysSerialSingle(this.ywhQueryForm).then(res => {
// if(res.code == 200){
// this.ruleForm.batchNo = res.message;
// }
// })
},
//印刷序列号处理
ysxlhDeal(item){
if(item.ksysxlh && item.jsysxlh){
if(item.ksysxlh.length == item.jsysxlh.length){
if(item.ksysxlh.length != 11){
item.bs = -1;
return;
}
item.bs = item.jsysxlh - item.ksysxlh;
}
}
},
closeDialog () {
this.$emit("input", false);
},
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
</style>
......@@ -19,7 +19,7 @@
<el-col :span="11" class="btnCol">
<el-form-item>
<el-button type="primary" @click="queryClick()">查询</el-button>
<el-button type="primary">新增</el-button>
<el-button type="primary" @click="openDialog()">新增</el-button>
</el-form-item>
</el-col>
</el-row>
......@@ -32,21 +32,24 @@
:data="tableData.data">
</lb-table>
</div>
<addDialog ref="addDialog" v-model="isDialog"/>
</div>
</template>
<script>
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./zsrkdata";
import addDialog from "./components/addDialog.vue"
import { getZsglrkList } from "@/api/zsgl.js"
export default {
name: "zsrk",
components: {},
components: {addDialog},
mixins: [table],
mounted () {
sendThis(this);
},
data () {
return {
isDialog: false,
ruleForm: {
rkbh: "",
rksj: ""
......@@ -73,7 +76,10 @@ export default {
})
},
openDialog () {
console.log(999999999999999);
this.isDialog = true;
this.$nextTick(()=> {
this.$refs.addDialog.ywhSerial();
})
},
},
};
......