| | |
| | | :data="packagedataList" |
| | | node-key="proId" |
| | | :props="defaultpackProps" |
| | | :filter-node-method="filterpackage" |
| | | @check-change="handlePackageChecked" |
| | | :default-checked-keys="checkedListkey1" |
| | | :render-content="renderContent" |
| | | > |
| | | </el-tree> |
| | |
| | | treedataList: [], |
| | | checkedkey: [], |
| | | checkedListkey: [], |
| | | checkedListkey1: [], |
| | | defaultProps: { |
| | | children: [], |
| | | label: "proName", |
| | |
| | | pacName: null, |
| | | pacRemark: null, |
| | | }, |
| | | valueUrl: "ws://127.0.0.1:18890", |
| | | // valueUrl: "ws://127.0.0.1:18890", |
| | | valueUrl: "ws://127.0.0.1:6789/websocket", |
| | | valueUrls: "ws://127.0.0.1:6789/websocket", |
| | | // valueUrls: "ws://"+getIp() +":6789/websocket", |
| | | WebSocket: null, |
| | | webSocket: null, |
| | | // 身份证需要 |
| | | // socket: null, |
| | | // value: 1, |
| | |
| | | |
| | | // 表单参数 |
| | | // 表单参数 |
| | | obj: {}, |
| | | form: { |
| | | cusIdcard: "", |
| | | tjType: "2", |
| | | tjType: "3", |
| | | cusSex: 1, |
| | | cusNational: "1", |
| | | cusMarryStatus: "1", |
| | | cusMarryStatus: "5", |
| | | idType: "1", |
| | | ageUnit: "0", |
| | | }, |
| | |
| | | this.startTimer(); |
| | | this.getList1(); |
| | | // this.getData(); |
| | | }, |
| | | mounted(){ |
| | | console.log(this.dict.type.dict_user_marry,555); |
| | | |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | this.discount = this.form.discount; |
| | | } |
| | | if (this.form.tjType === null) { |
| | | this.form.tjType = "2"; |
| | | this.form.tjType = "3"; |
| | | } |
| | | if (this.form.reservationId != null) { |
| | | if (this.form.groupingId) { |
| | |
| | | } else { |
| | | let configKey = "getInfoFromSqlData"; |
| | | getconfigKey(configKey).then((res) => { |
| | | console.log(res); |
| | | if (res.code == 200) { |
| | | if (res.msg == "N") { |
| | | var websocket = null; |
| | |
| | | this.websocket = websocket; |
| | | // 连接设备 |
| | | var jsonObj = { |
| | | name: "connect", |
| | | // name: "connect", |
| | | type: "1", |
| | | }; |
| | | var jStr = JSON.stringify(jsonObj); |
| | | this.websocket.send(jStr); |
| | | alert("请放身份证再点确认"); |
| | | var jsonObj = { |
| | | name: "readCert", |
| | | // name: "readCert", |
| | | }; |
| | | var jStr = JSON.stringify(jsonObj); |
| | | this.websocket.send(jStr); |
| | | // var jStr = JSON.stringify(jsonObj); |
| | | // this.websocket.send(jStr); |
| | | this.dialogVisible = false; |
| | | }; |
| | | |
| | |
| | | websocket.onmessage = function (event) { |
| | | var resultObj = eval("(" + event.data + ")"); |
| | | //resultFlag为0代表读卡成功 |
| | | |
| | | if ( |
| | | resultObj.name == "readCard" || |
| | | resultObj.name == "readCert" || |
| | |
| | | } |
| | | } |
| | | _this.form.cusAddr = resultObj.data.addres; |
| | | |
| | | |
| | | _this.cardreader = false; |
| | | }; |
| | | |
| | |
| | | websocket.onmessage = function (event) { |
| | | var resultObj = JSON.parse(event.data); |
| | | _this.form.cusName = resultObj.data.name; |
| | | |
| | | if( resultObj.data.nation == "汉族"){ |
| | | _this.form.cusNational ="1"; |
| | | |
| | | if (resultObj.data.nation == "汉族") { |
| | | _this.form.cusNational = "1"; |
| | | } |
| | | if(resultObj.data.gender == "男"){ |
| | | if (resultObj.data.gender == "男") { |
| | | _this.form.cusSex = 0; |
| | | }else{ |
| | | } else { |
| | | _this.form.cusSex = 1; |
| | | } |
| | | _this.form.cusBrithday = resultObj.data.birthday; |
| | |
| | | getZhList().then((response) => { |
| | | if (response.data) { |
| | | this.packageList = response.data; |
| | | // this.checkedkeys.push(this.packageList[0].id); |
| | | // let datas = { |
| | | // zhId: this.packageList[0].id, |
| | | // }; |
| | | // getlistByZhId(datas).then((res) => { |
| | | // this.packagedataList = res.data.tjProjectList; |
| | | // for (var i = 0; i < this.packagedataList.length; i++) { |
| | | // let proId = this.packagedataList[i].proId; |
| | | // getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // this.DataLists.push(item); |
| | | // if (this.DataLists.length >= 1) { |
| | | // this.marryalls = 0; |
| | | // this.DataLists.forEach((item1) => { |
| | | // this.marryalls += item1.proPrice; |
| | | // this.packagedataList.forEach((item3) => { |
| | | // if (item1.proParentId == item3.proId) { |
| | | // item1.propinName = item3.proName; |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }); |
| | | } |
| | | this.loading = false; |
| | | }); |
| | |
| | | this.loading = true; |
| | | getProParentIdDxList().then((response) => { |
| | | this.Treedata = response.data.list; |
| | | console.log(response, 77788); |
| | | |
| | | if (this.tableData[0]) { |
| | | this.tableData[0].tjProjectList.forEach((selectionitem) => { |
| | | this.Treedata.forEach((item) => { |
| | |
| | | }); |
| | | }); |
| | | } |
| | | // if (this.DataLists.length != 0) { |
| | | // this.DataLists.forEach((selectionitem) => { |
| | | // this.Treedata.forEach((item) => { |
| | | // if (selectionitem.propinName == item.proName) { |
| | | // item.disabled = true; |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // this.checkedkey.push(this.Treedata[0].proId); |
| | | // let proId = this.Treedata[0].proId; |
| | | // getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // this.checkedListkey.push(item.proId); |
| | | // this.DataList.push(item); |
| | | // this.DataList.forEach((item) => { |
| | | // item.propinName = this.Treedata[0].proName; |
| | | // }); |
| | | // }); |
| | | // this.TotalPrice1 = 0; |
| | | // this.marryall = 0; |
| | | // if (this.DataList.length != 0) { |
| | | // this.list1 = false; |
| | | // this.DataList.forEach((item) => { |
| | | // this.TotalPrice1 = item.proPrice + this.TotalPrice1; |
| | | // this.marryall += item.proPrice; |
| | | // }); |
| | | // } |
| | | // }); |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | handlepackage(data, checked, checkedNodes) { |
| | | this.dataObj = data; |
| | | if (checked.checkedNodes.length != 0) { |
| | | this.$refs.treas.setCheckedKeys([data.id]); |
| | | let datas = { |
| | |
| | | }; |
| | | getlistByZhId(datas).then((res) => { |
| | | this.packagedataList = res.data.tjProjectList; |
| | | console.log(this.packagedataList, 1122); |
| | | this.DataLists = []; |
| | | this.checkedListkey1 = []; |
| | | for (var i = 0; i < this.packagedataList.length; i++) { |
| | | let proId = this.packagedataList[i].proId; |
| | | this.checkedListkey1.push(proId); |
| | | // this.DataLists.push(this.packagedataList[i]); |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | console.log(this.TreedataList, 888); |
| | | |
| | | this.TreedataList.forEach((item) => { |
| | | // this.checkedListkey1.push(item.proId); |
| | | |
| | | this.DataLists.push(item); |
| | | // console.log(this.DataLists,556644); |
| | | if (this.DataLists.length >= 1) { |
| | | this.marryalls = 0; |
| | | this.DataLists.forEach((item1) => { |
| | | this.marryalls += item1.proPrice; |
| | | |
| | | this.packagedataList.forEach((item3) => { |
| | | if (item1.proParentId == item3.proId) { |
| | | item1.propinName = item3.proName; |
| | |
| | | } |
| | | }); |
| | | } else if (checked.checkedNodes.length == 0) { |
| | | // for (var i = 0; i < data.tjProjectList.length; i++) { |
| | | // let proId = data.tjProjectList[i].proId; |
| | | // getProSonDxList(proId).then((res) => { |
| | | // this.TreedataList = res.data.list; |
| | | // this.TreedataList.forEach((item) => { |
| | | // this.DataLists.forEach((item1, index) => { |
| | | // if (item.proId == item1.proId) { |
| | | // this.DataLists.splice(index, 1); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // this.marryalls = 0 |
| | | // if(this.DataLists.length != 0){ |
| | | // this.DataLists.forEach((item1, index) => { |
| | | // this.marryalls += item1.proPrice; |
| | | // }) |
| | | // } |
| | | // }); |
| | | // } |
| | | this.DataLists = []; |
| | | this.marryalls = 0; // 清零总价 |
| | | this.checkedListkey1 = []; |
| | | |
| | | // 你可以在此处根据需要进行其他操作,如更新 UI |
| | | console.log("取消选中,数据已清空,总价已重置"); |
| | | } |
| | | }, |
| | | objectspanmethod({ row, column, rowIndex, columnIndex }) { |
| | |
| | | // return [rowspan, 1]; |
| | | // } |
| | | }, |
| | | |
| | | handlePackageChecked(data, checked, checkedNodes) { |
| | | if (checked == false) { |
| | | this.DataLists.forEach((item, index) => { |
| | | if (item.proId == data.proId) { |
| | | this.DataLists.splice(index, 1); |
| | | this.marryalls = 0; // 重置合计金额 |
| | | this.DataLists.forEach((item1) => { |
| | | this.marryalls += item1.proPrice; // 重新计算合计金额 |
| | | }); |
| | | } |
| | | }); |
| | | } else if (checked == true) { |
| | | this.DataLists.push(data); // 添加数据到已选列表 |
| | | this.DataLists.forEach((item1) => { |
| | | if (item1.proParentId == this.dataObj.proId) { |
| | | item1.propinName = this.dataObj.proName; // 设置父级名称 |
| | | } |
| | | }); |
| | | // this.spliceData(); |
| | | this.marryalls = 0; // 重置合计金额 |
| | | this.DataLists.forEach((item1) => { |
| | | this.marryalls += item1.proPrice; // 重新计算合计金额 |
| | | }); |
| | | } |
| | | }, |
| | | // 点击获取每个树节点 |
| | | handleCurrentChecked(data, checked, checkedNodes) { |
| | | this.dataObj = data; |
| | | if (checked.checkedNodes.length != 0) { |
| | | this.$refs.tree.setCheckedKeys([data.proId]); |
| | | |
| | | let proId = data.proId; |
| | | getProSonDxList(proId).then((res) => { |
| | | this.TreedataList = res.data.list; |
| | | this.TreedataList.forEach((item) => { |
| | | this.checkedListkey.push(item.proId); |
| | | |
| | | this.DataList.push(item); |
| | | this.spliceData(); |
| | | this.DataList.forEach((item1) => { |