384ca73e by 蔡俊立

发证

1 parent 06981cd9
......@@ -162,3 +162,11 @@ export function getCertificateList (data) {
data
})
}
// 发证
export function issueCertificate (data) {
return request({
url: '/business/workFlow/issueCertificate',
method: 'post',
data
})
}
......
......@@ -21,16 +21,14 @@
</el-col>
<el-col :span="6" class="btnCol">
<el-form-item>
<el-button type="primary" icon="el-icon-search">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<div class="from-clues-content">
<lb-table :page-size="pageData.size" border :current-page.sync="pageData.currentPage" :total="tableData.total"
@size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
:data="tableData.data">
<lb-table border :column="tableData.columns" :data="tableData.data" :pagination="false">
</lb-table>
</div>
</div>
......@@ -69,10 +67,7 @@ export default {
this.ruleForm.bsmSldy = this.$parent._data.unitData[0].bsmSldy
getCertificateList(this.ruleForm).then(res => {
if (res.code === 200) {
let { total, records } = res.result
this.tableData.total = total;
this.tableData.data = records ? records : []
this.tableData.data = res.result
}
})
},
......
<template>
<dialogBox title="证书领取" @submitForm="submitForm" saveButton="保存" width="60%"
height='30%' @closeDialog="closeDialog" v-model="value">
<div class="from-clues-content">
<lb-table border :column="tableData.columns" :data="tableData.data" :pagination="false" :heightNum="600">
</lb-table>
</div>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" style="display:flex;">
<el-form-item label="领证人" prop="lzrxm">
<el-input v-model="ruleForm.lzrxm"></el-input>
</el-form-item>
<el-form-item label="证件类型" prop="lzrzjlb">
<el-select v-model="ruleForm.lzrzjlb" filterable clearable placeholder="请选择">
<el-option v-for="item in dictData['A30']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="证件号" prop="lzrzjh">
<el-input v-model="ruleForm.lzrzjh"></el-input>
</el-form-item>
<el-form-item label="领证人电话" prop="lzrdh">
<el-input v-model="ruleForm.lzrdh"></el-input>
</el-form-item>
</el-form>
</dialogBox>
</template>
<script>
import table from "@/utils/mixin/table";
import { getCertificateList,issueCertificate } from "@/api/fqsq.js";
import { datas } from "./fzxxdata";
import { mapGetters } from 'vuex'
export default {
mixins: [table],
components: {
...mapGetters(['dictData']),
},
props: {
value: { type: Boolean, default: false },
},
data () {
return {
ruleForm: {
bsmBdcqz: [],
lzrxm: '',
lzrzjlb: '',
lzrzjh: '',
lzrdh: ''
},
rules: {
lzrxm: [
{ required: true, message: '请输入领证人', trigger: 'blur' }
],
lzrzjlb: [
{ required: true, message: '请选择证件类型', trigger: 'change' }
],
lzrzjh: [
{ required: true, message: '请输入证件号', trigger: 'blur' }
],
lzrdh: [
{ required: true, message: '请输入电话号码', trigger: 'blur' }
],
},
tableData: {
total: 0,
columns: datas.columns(),
data: [],
},
}
},
methods: {
//列表初始化
tablelistFn(){
var bsmSldy = this.$parent._data.unitData[0].bsmSldy
getCertificateList({"bsmSldy":bsmSldy}).then(res => {
if (res.code === 200) {
this.tableData.data = res.result
if(res.result){
res.result.forEach((item,index)=>{
this.ruleForm.bsmBdcqz.push(item.bsmBdcqz)
})
}
}
})
},
submitForm(){
this.$refs.ruleForm.validate(valid => {
if (valid) {
issueCertificate(this.ruleForm).then(res => {
if(res.code == 200){
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs.ruleForm.resetFields();
}else{
this.$message.error(res.message)
}
})
} else {
return false;
}
});
},
closeDialog () {
this.$emit("input", false);
this.$refs.ruleForm.resetFields();
},
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
</style>
......@@ -89,6 +89,7 @@
:bsmBusiness="bsmBusiness"
:queryForm="queryForm"
/>
<zslqDialog ref="zslqDialog" v-model="zslqDialog" />
<zsylDialog v-model="zsylFlag" />
</div>
</template>
......@@ -98,14 +99,16 @@ import comMsg from "@/views/components/comMsg.vue";
import zc from "./components/zc.vue";
import thDialog from "./components/th.vue";
import zsylDialog from "./components/zsyl";
import zslqDialog from "./components/zslq";
export default {
/**注册组件*/
components: { zc, thDialog, zsylDialog, comMsg },
components: { zc, thDialog, zsylDialog, comMsg,zslqDialog},
data() {
return {
zsylFlag: false,
zcDialog: false,
thflag: false,
zslqDialog: false,
queryForm: {
bsmSlsq: "",
bestepid: "",
......@@ -231,6 +234,10 @@ export default {
case "tc":
window.close();
break;
case "zslq":
this.zslqDialog = true;
this.$refs.zslqDialog.tablelistFn();
break;
case "db":
var formdata = new FormData();
formdata.append("bsmSlsq", this.$route.query.bsmSlsq);
......