214fab76 by 田浩浩
2 parents 821b5506 92a29bbb
......@@ -51,20 +51,16 @@
</template>
<script>
import personInfoTable from "./personInfoTable";
import { addJtfcCxjgXx, getJtfcInfo } from "@/api/sqcx";
import { datas, sendThis } from "./addjtfcdata";
import { mapGetters } from "vuex";
export default {
components: {
personInfoTable,
},
computed: {
...mapGetters(["dictData"]),
},
props: {
value: { type: Boolean, default: false },
bsmSqcx: { type: String, default: "" },
sqcxBsm: { type: String, default: "" },
},
mounted () {
sendThis(this);
......@@ -99,19 +95,19 @@ export default {
watch: {
value (val) {
this.myValue = val;
let that = this
if (val) {
//this.$alert(this.bsmSqcx);
if (this.bsmSqcx == "") {
this.add("sqr");
this.add("qlr");
if (this.sqcxBsm == "") {
that.add("sqr");
that.add("qlr");
} else {
this.loadData();
that.loadData();
}
}
},
"form.djSqcxDO.ycyrgx" (val) {
if (val == "1") {
this.form.qlrList = this.form.sqrList;
this.form.qlrList = _.cloneDeep(this.form.sqrList);
} else {
this.form.qlrList = [];
this.add("qlr");
......@@ -119,20 +115,23 @@ export default {
},
"form.sqrList" (val) {
if (this.form.djSqcxDO.ycyrgx == '1') {
this.form.qlrList = this.form.sqrList
this.form.qlrList = _.cloneDeep(this.form.sqrList)
}
}
},
methods: {
closeDialog () {
this.form.sqrList = []
this.form.qlrList = []
this.isSearch = false
this.$emit("input", false);
},
loadData () {
this.$startLoading();
getJtfcInfo({ sqcxBsm: sqcxBsm }).then((res) => {
getJtfcInfo({ sqcxBsm: this.sqcxBsm }).then((res) => {
this.$endLoading();
if (res.code == 200) {
this.form = res.result;
this.form = _.cloneDeep(res.result);
this.isSearch = true;
}
});
......
<!--
功能:个人信息table
作者:calliope
-->
<template>
<lb-table :column="tableData.columns" :data="tableData.data" :maxHeight="200" heightNumSetting :pagination="false">
</lb-table>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
dataList: { type: Array, default: () => [{}] },
},
created () {
if (this.dataList.length == 0) {
this.add();
}
},
computed: {
...mapGetters(["dictData"]),
},
data () {
return {
tableData: {
columns: [
{
width: "60",
renderHeader: (h, scope) => {
return (
<i
class="el-icon-plus pointer"
onClick={() => {
this.add();
}}
style="color:#409EFF"
></i>
);
},
render: (h, scope) => {
return (
<i
class="el-icon-minus pointer"
onClick={() => {
this.remove(scope.$index, scope.row);
}}
></i>
);
},
},
{
width: "150",
label: "身份证读卡器",
render: (h, scope) => {
return (
<div>
<el-button
type="text"
icon="el-icon-edit-outline"
onClick={() => {
this.handleRead(scope);
}}
>
读取
</el-button>
</div>
);
},
},
{
width: "150",
prop: "sqrxm",
label: "姓名/名称",
render: (h, scope) => {
return (
<el-input
placeholder="姓名/名称"
value={scope.row[scope.column.property]}
onInput={(val) => {
scope.row[scope.column.property] = val;
}}
></el-input>
);
},
},
{
prop: "sqrzjlxbm",
label: "证件种类",
render: (h, scope) => {
return (
<el-select
class="width100"
value={scope.row[scope.column.property]}
onChange={(val) => {
scope.row[scope.column.property] = val;
}}
>
{this.dictData["A30"].map((option) => {
return (
<el-option
label={option.dname}
value={option.dcode}
></el-option>
);
})}
</el-select>
);
},
},
{
prop: "sqrzjhm",
label: "证件号",
render: (h, scope) => {
return (
<el-input
placeholder="证件号"
value={scope.row[scope.column.property]}
onInput={(val) => {
scope.row[scope.column.property] = val;
}}
maxlength="21"
></el-input>
);
},
},
{
prop: "lxdh",
label: "联系电话",
render: (h, scope) => {
return (
<div class="typePhone">
<el-input
placeholder="联系电话"
value={scope.row[scope.column.property]}
onInput={(val) => {
scope.row[scope.column.property] = val;
}}
onBlur={(val) => {
this.teltest(scope.row);
}}
type="tel"
maxlength="11"
></el-input>
<span
v-show={scope.row.inputErr}
style={{
fontSize: "12px",
color: "red",
position: "absolute",
bottom: "-2px",
left: "0",
}}
>
请输入正确手机号
</span>
</div>
);
},
},
],
data: this.dataList,
},
};
},
watch: {
// 'tableData.data': {
// handler (newValue, oldName) {
// if (newValue.length != 0) {
// //this.$alert(newValue);
// //this.$emit('getInfoList', newValue)
// }
// },
// deep: true,
// immediate: true
// },
// dataList: {
// handler (newValue, oldName) {
// this.tableData.data = _.cloneDeep(newValue)
// //console.log(this.tableData.data, 'this.tableData.datathis.tableData.data');
// },
// deep: true,
// immediate: true
// },
},
methods: {
add () {
this.tableData.data.push({
sqrxm: "",
sqrzjlxbm: "",
sqrzjhm: "",
lxdh: "",
inputErr: false,
});
},
remove (index, row) {
this.tableData.data.splice(index, 1);
},
teltest (row) {
const reg = /^1([38]\d|5[0-35-9]|7[3678])\d{8}$/;
if (row.lxdh == "" || row.lxdh.length <= 10 || !reg.test(row.lxdh)) {
row.inputErr = true;
return false;
} else {
row.inputErr = false;
return true;
}
},
},
};
</script>
<style scoped lang='scss'>
/deep/.el-table__cell {
padding: 12px 0;
}
</style>
\ No newline at end of file
......@@ -18,11 +18,11 @@
</el-col>
<el-col :span="10">
<el-form-item label="查询时间">
<el-date-picker v-model="queryForm.sqr" type="date"
placeholder="开始日期" value-format="yyyy-MM-dd" clearable>
<el-date-picker v-model="queryForm.sqr" type="date" placeholder="开始日期" value-format="yyyy-MM-dd"
clearable>
</el-date-picker>
<el-date-picker v-model="queryForm.sqr" type="date"
placeholder="结束日期" value-format="yyyy-MM-dd" clearable>
<el-date-picker v-model="queryForm.sqr" type="date" placeholder="结束日期" value-format="yyyy-MM-dd"
clearable>
</el-date-picker>
</el-form-item>
</el-col>
......@@ -52,11 +52,11 @@ export default {
name: "jtfc",
components: { addjtfc },
mixins: [table],
mounted() {
mounted () {
sendThis(this);
this.queryClick();
},
data() {
data () {
return {
timer: "",
isDialog: false,
......@@ -73,7 +73,7 @@ export default {
},
methods: {
// 初始化数据
queryClick() {
queryClick () {
this.$startLoading();
getJtfcPage({ ...this.queryForm, ...this.pageData }).then((res) => {
this.$endLoading();
......@@ -84,26 +84,17 @@ export default {
}
});
},
handleSort(name, sort) {
handleSort (name, sort) {
console.log(name, sort);
},
handleAdd() {
//this.handleLoad();
handleAdd () {
this.isDialog = true;
},
handleViewClick(scope) {
//this.handleLoad();
this.bsmSqcx = scope.row.bsmSqcx;
handleViewClick (row) {
this.sqcxBsm = row.bsmSqcx;
this.isDialog = true;
// this.$popup("申请查询记录", "sqcx/sqcxjl/components/sqcxjlInfo", {
// formData: {
// sqcxBsm: sqcxBsm,
// },
// cancel: function () { }, //取消事件的回调
// confirm: function () { },
// });
},
handleLoad() {
handleLoad () {
this.timer = new Date().getTime();
},
},
......
......@@ -65,7 +65,7 @@ class data extends filter {
label: "操作",
width: 80,
render: (h, scope) => {
return <el-button type="text" icon='el-icon-view' onClick={() => { vm.handleViewClick(scope) }}>查看</el-button>
return <el-button type="text" icon='el-icon-view' onClick={() => { vm.handleViewClick(scope.row) }}>查看</el-button>
}
}
]
......