0a1507f8 by 蔡俊立

证书入库

1 parent 5d61be3d
......@@ -28,4 +28,14 @@ export function zsrk (data) {
method: 'post',
data
})
}
/*
证书管理-删除证书入库
*/
export function removeZsgl (params) {
return request({
url: '/sys/zsgl/removeZsgl',
method: 'get',
params: params
})
}
\ No newline at end of file
......
......@@ -4,8 +4,8 @@
<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 label="入库编号:" prop="batchno">
<el-input v-model="ruleForm.batchno" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
......@@ -74,7 +74,7 @@ export default {
return {
tableData: {},
ruleForm: {
batchNo: '',
batchno: '',
djjg: '',
rkry: '超级管理员',
rksj: '',
......@@ -91,13 +91,15 @@ export default {
name: '不动产权证书',
ksysxlh: '',
jsysxlh: '',
bs: 0
bs: 0,
zslx:1
},
{
name: '不动产权登记证明',
ksysxlh: '',
jsysxlh: '',
bs: 0
bs: 0,
zslx:2
}
],
ywhQueryForm: {
......@@ -125,12 +127,19 @@ export default {
methods: {
//表单提交
submitForm () {
zsrk().then(res => {
this.tableForm.forEach((item,index)=>{
if(item.bs < 0){
return;
}
})
zsrk(this.ruleForm).then(res => {
if(res.code == 200){
this.$message.sucess("保存成功");
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs.ruleForm.resetFields();
this.$refs.tableForm.resetFields();
this.resetTableFields();
console.log(this.ruleForm);
console.log(this.tableForm)
}else{
this.$message.error(res.message);
}
......@@ -138,11 +147,11 @@ export default {
},
//序列号获取
ywhSerial(){
// getSysSerialSingle(this.ywhQueryForm).then(res => {
// if(res.code == 200){
// this.ruleForm.batchNo = res.message;
// }
// })
getSysSerialSingle(this.ywhQueryForm).then(res => {
if(res.code == 200){
this.ruleForm.batchno = res.message;
}
})
},
//印刷序列号处理
ysxlhDeal(item){
......@@ -152,10 +161,54 @@ export default {
item.bs = -1;
return;
}
item.bs = item.jsysxlh - item.ksysxlh;
if(item.ksysxlh > item.jsysxlh){
item.bs = -1;
return;
}
item.bs = item.jsysxlh - item.ksysxlh + 1;
if(item.zslx == 1){
this.ruleForm.zsstarno = item.ksysxlh;
this.ruleForm.zsendno = item.jsysxlh;
this.ruleForm.zsnum = item.bs
}else if(item.zslx == 2){
this.ruleForm.zmstarno = item.ksysxlh;
this.ruleForm.zmendno = item.jsysxlh;
this.ruleForm.zmnum = item.bs
}
}else{
item.bs = -1;
}
}else{
item.bs = 0;
if(item.zslx == 1){
this.ruleForm.zsstarno = '';
this.ruleForm.zsendno = '';
this.ruleForm.zsnum = item.bs
}else if(item.zslx == 2){
this.ruleForm.zmstarno = '';
this.ruleForm.zmendno = '';
this.ruleForm.zmnum = item.bs
}
}
},
resetTableFields() {
this.tableForm = [
{
name: '不动产权证书',
ksysxlh: '',
jsysxlh: '',
bs: 0,
zslx:1
},
{
name: '不动产权登记证明',
ksysxlh: '',
jsysxlh: '',
bs: 0,
zslx:2
}
]
},
closeDialog () {
this.$emit("input", false);
},
......
......@@ -39,7 +39,7 @@
import table from "@/utils/mixin/table";
import { datas, sendThis } from "./zsrkdata";
import addDialog from "./components/addDialog.vue"
import { getZsglrkList } from "@/api/zsgl.js"
import { getZsglrkList ,removeZsgl} from "@/api/zsgl.js"
export default {
name: "zsrk",
components: {addDialog},
......@@ -81,6 +81,27 @@ export default {
this.$refs.addDialog.ywhSerial();
})
},
delZsrk(item){
this.$confirm('确定要删除吗, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
removeZsgl({"bsmBatch":item.bsmBatch}).then(res => {
if(res.code == 200){
this.$message.success("删除成功")
this.fetchData();
}else{
this.$message.error(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
};
</script>
......
......@@ -60,7 +60,7 @@ class data extends filter {
case '0':
return <div>
<el-button type="text" icon="el-icon-edit-outline" onClick={() => { vm.openDialog(scope.row) }}>确认审核</el-button>
<el-button type="text" icon="el-icon-delete" onClick={() => { vm.openDialog(scope.row) }}>删除</el-button>
<el-button type="text" icon="el-icon-delete" onClick={() => { vm.delZsrk(scope.row) }}>删除</el-button>
</div>
case '1':
return <el-button type="text" onClick={() => { vm.openDialog(scope) }}>查看</el-button>
......