| | |
| | | prop="allProName" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <!-- :selectable="checkSelectable" --> |
| | | <!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" icon="el-icon-circle-check" @click="handleSeach(scope.row)" |
| | | v-hasPermi="['system:package:Seach']">套餐详情 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | |
| | | </el-tab-pane> |
| | | <el-tab-pane label="单项" name="second"> |
| | | <div class="tab8"> |
| | | <!-- <div class="tab7"> |
| | | <v-tree-transfer |
| | | :treeData="treedataList" |
| | | :defaultProps="{ children: 'tjProjectList', label: 'proName' }" |
| | | :defaultKeys="defaultKeys" |
| | | @changeKeys="changeCategoryKeys" |
| | | :key="datekey" |
| | | ></v-tree-transfer> --> |
| | | <!-- <el-tree :data="data" show-checkbox node-key="proId" :props="defaultProps" :default-checked-keys="treeList" |
| | | @check-change="handleCurrentChecked"> |
| | | </el-tree> --> |
| | | <!-- </div> --> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="6"> |
| | | <div |
| | |
| | | ref="inputNumber" |
| | | style="width: 150px" |
| | | v-model="discount" |
| | | :precision="2" |
| | | :precision="1" |
| | | :step="0.1" |
| | | :max="10" |
| | | :min="0" |
| | | @change="numberChange" |
| | | @change="debounceNumberChange" |
| | | :disabled="isfalse" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | |
| | | placeholder="实收金额" |
| | | v-model="TotalPrice" |
| | | style="width: 206px" |
| | | ></el-input> |
| | | @input="changeXianjia" |
| | | @blur="numberChangeXianPrice(discount, discount)" |
| | | /> |
| | | </el-form-item> |
| | | <br /> |
| | | |
| | |
| | | <el-table-column label="折扣"> |
| | | <template slot-scope="scope"> |
| | | <!-- 只输入纯数字折扣 --> |
| | | <el-input |
| | | <el-input-number |
| | | v-model.number="scope.row.discount" |
| | | @input="validateDiscount(scope.row)" |
| | | placeholder="输入折扣" |
| | | size="small" |
| | | type="number" |
| | | min="0" |
| | | step="1" |
| | | max="10" |
| | | :precision="1" |
| | | :step="0.1" |
| | | :max="10" |
| | | :min="0" |
| | | > |
| | | </el-input> |
| | | </el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="nowPrice" label="实收金额"> |
| | |
| | | <el-input-number |
| | | style="width: 140px" |
| | | v-model="discount" |
| | | :precision="2" |
| | | :precision="1" |
| | | :step="0.1" |
| | | :max="10" |
| | | :min="0" |
| | | @change="numberChange" |
| | | @change="debounceNumberChange" |
| | | :disabled="isfalse" |
| | | ></el-input-number> |
| | | </el-form-item> |
| | |
| | | mounted() {}, |
| | | |
| | | methods: { |
| | | debounceNumberChange(currentValue, oldValue) { |
| | | clearTimeout(this.debounceTimer); |
| | | this.debounceTimer = setTimeout(() => { |
| | | this.numberChange(currentValue, oldValue); |
| | | }, 300); |
| | | }, |
| | | changeXianjia() { |
| | | // 原始折扣率计算 |
| | | if (this.TotalPrice1 !== 0) { |
| | | this.discount = |
| | | (Math.floor((this.TotalPrice / this.TotalPrice1) * 100) / 100) * 10; |
| | | } |
| | | }, |
| | | clear() { |
| | | this.form.firmId = ""; |
| | | }, |
| | |
| | | this.srcUrl = response.url; |
| | | }); |
| | | }, |
| | | // base64转文件 |
| | | // dataURLtoFile(image, filename) { |
| | | // var arr = image.split(","); |
| | | // var mime = arr[0].match(/:(.*?);/)[1]; |
| | | // var bstr = atob(arr[1]); |
| | | // var n = bstr.length; |
| | | // var u8arr = new Uint8Array(n); |
| | | // while (n--) { |
| | | // u8arr[n] = bstr.charCodeAt(n); |
| | | // } |
| | | // return new File([u8arr], filename, { type: mime }); |
| | | // }, |
| | | |
| | | // 关闭摄像头 |
| | | |
| | | // stopNavigator() { |
| | | // this.thisVideo.srcObject.getTracks()[0].stop(); |
| | | // this.beat = false; |
| | | // }, |
| | | |
| | | handleClose(done) { |
| | | this.$confirm("确认关闭?") |
| | |
| | | |
| | | /** 查询信息列表 */ |
| | | getList() { |
| | | // listCustomer(this.queryParams).then((response) => { |
| | | // this.customerList = response.rows; |
| | | // this.total = response.total; |
| | | // this.loading = false; |
| | | // }); |
| | | getInfo().then((response) => { |
| | | this.getInfodis = response.user.discount; |
| | | if (this.getInfodis === null) { |
| | |
| | | }, |
| | | /** 重置按钮操作 */ |
| | | resetQuery() { |
| | | // this.resetForm("form"); |
| | | // this.form = {}; |
| | | if (this.confirm === true) { |
| | | this.$tab.refreshPage(); |
| | | } else { |
| | |
| | | item.discount = this.discount; |
| | | const ordPrice = new Big(item.ordPrice); |
| | | const discount = new Big(item.discount); |
| | | const result = ordPrice.times(discount.div(10)); // ordPrice * (discount / 10) |
| | | const result = ordPrice.times(discount.div(10)); |
| | | item.nowPrice = result.toNumber(); |
| | | this.TotalPrice = this.tableData1.reduce((sum, item) => { |
| | | return sum.plus(new Big(item.nowPrice || "0")); |
| | | }, new Big(0)); |
| | | }); |
| | | // ---------------------------------------------------------- |
| | | }) |
| | | .catch(() => { |
| | | this.discount = oldValue; |
| | | }); |
| | | }, |
| | | |
| | | numberChangeXianPrice(currentValue, oldValue) { |
| | | this.$confirm("确定修改所有子项的折扣吗?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.discount = currentValue; |
| | | if (this.discount < this.getInfodis) { |
| | | this.discount = this.getInfodis; |
| | | } |
| | | let totalYsprice = new Big(0); |
| | | this.tableData1.forEach((item) => { |
| | | item.discount = this.discount; |
| | | const ordPrice = new Big(item.ordPrice); |
| | | const discount = new Big(item.discount); |
| | | const result = ordPrice.times(discount.div(10)); |
| | | item.nowPrice = result.toNumber(); |
| | | totalYsprice = totalYsprice.plus(new Big(item.nowPrice)); |
| | | }); |
| | | if (!totalYsprice.eq(this.TotalPrice)) { |
| | | const diff = new Big(this.TotalPrice).minus(totalYsprice); |
| | | if (this.tableData1.length > 0) { |
| | | const lastItem = this.tableData1[this.tableData1.length - 1]; |
| | | const newYsPrice = new Big(lastItem.nowPrice) |
| | | .plus(diff) |
| | | .toNumber(); |
| | | console.log( |
| | | "hhh", |
| | | this.tableData1[this.tableData1.length - 1].nowPrice, |
| | | newYsPrice |
| | | ); |
| | | this.$set( |
| | | this.tableData1[this.tableData1.length - 1], |
| | | "nowPrice", |
| | | newYsPrice |
| | | ); |
| | | } |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | this.discount = oldValue; |
| | | }); |
| | | }, |
| | | /** 登记提交按钮 */ |
| | | submitForm() { |
| | | let _this = this; |
| | |
| | | } |
| | | } else { |
| | | this.$message.warning("请放置身份证后再点击读取"); |
| | | } /* if (resultObj.resultFlag == "-1") { |
| | | if (resultObj.errorMsg == "端口打开失败") { |
| | | //alert("读卡器未连接"); |
| | | } else { |
| | | //alert(resultObj.errorMsg); |
| | | } |
| | | } else if (resultObj.resultFlag == "-2") { |
| | | //alert(resultObj.errorMsg); |
| | | } */ |
| | | } |
| | | }, |
| | | // TODO 以下代码可能是泾川使用的 |
| | | jingChuanHandlerWebSocketResult(resultObj) { |
| | |
| | | alert("请检查读卡器连接是否正常"); |
| | | }; |
| | | } else { |
| | | // if (_this.inputSSS.indexOf(":1") != -1) { |
| | | |
| | | // var str1 = _this.inputSSS.indexOf(":1"); |
| | | // var result1 = _this.inputSSS.substring(0, str1); |
| | | |
| | | // var str2 = _this.inputSSS.indexOf(":1"); |
| | | // var result2 = _this.inputSSS.substring( |
| | | // str2 + 2, |
| | | // _this.inputSSS.length |
| | | // ); |
| | | |
| | | // _this.inputSSS = result1 + result2; |
| | | // } |
| | | _this.inputSSS = _this.inputSSS.replace(":1", ""); |
| | | var websocket = null; |
| | | var url = this.valueUrls; |
| | | // var url = 'ws://'+ getIp() +':6789/websocket' |
| | | if ("WebSocket" in window) { |
| | | websocket = new WebSocket(url); |
| | | } else if ("MozWebSocket" in window) { |
| | |
| | | } |
| | | }, |
| | | |
| | | // 点击多选框获取选中数据 |
| | | // handleSelectionChange(selection, row) { |
| | | // this.tableData = selection; |
| | | // if (selection.length > 1) { |
| | | // let del_row = selection.shift(); |
| | | // this.$refs.tb.toggleRowSelection(del_row, false); //设置这一行取消选中 |
| | | // } |
| | | // this.single = selection.length !== 1; |
| | | // this.multiple = !selection.length; |
| | | // this.tableData.forEach((item) => { |
| | | // this.fData = item.tjProjectList; |
| | | // }); |
| | | // if (selection[0]) { |
| | | // this.DataList = []; |
| | | // this.data = JSON.parse(JSON.stringify(this.dXData)); |
| | | // if (selection[0].tjProjectList) { |
| | | // selection[0].tjProjectList.forEach((selectionitem) => { |
| | | // this.treedataList.forEach((item) => { |
| | | // if (selectionitem.proName == item.proName) { |
| | | // item.disabled = true; |
| | | // item.tjProjectList = []; |
| | | // } |
| | | // if (item.tjProjectList) { |
| | | // item.tjProjectList.forEach((item1) => { |
| | | // if (selectionitem.proName == item1.proName) { |
| | | // item1.disabled = true; |
| | | // item1.tjProjectList = []; |
| | | // } |
| | | // if (item1.tjProjectList) { |
| | | // item1.tjProjectList.forEach((item2) => { |
| | | // if (selectionitem.proName == item2.proName) { |
| | | // item2.disabled = true; |
| | | // item2.tjProjectList = []; |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // } else { |
| | | // this.treedataList = JSON.parse(JSON.stringify(this.dXData)); |
| | | // return; |
| | | // } |
| | | // }, |
| | | |
| | | resetpackage() { |
| | | this.discount = 10; |
| | | if (this.form.cusIdcard) { |
| | |
| | | _this.pacId = ""; |
| | | this.proIds = []; |
| | | this.tjCategory = "12"; |
| | | |
| | | this.DataList = []; // 清空已选项目列表 |
| | | this.checkedkey = []; // 清空树的选中状态 |
| | | this.checkedListkey = []; |
| | | this.TreedataList = []; |
| | | this.$refs.tree.setCheckedKeys([]); // 重置树选中状态 |
| | | |
| | | let data = { |
| | | cusId, |
| | | pacId: _this.pacId, |
| | |
| | | this.treeList.push(item9.proId); |
| | | }); |
| | | } |
| | | this.TotalPrice = 0; |
| | | this.TotalPrice1 += item.ordPrice; |
| | | this.TotalPrice += item.nowPrice; |
| | | |
| | |
| | | this.treeList.push(item9.proId); |
| | | }); |
| | | } |
| | | this.TotalPrice = 0; |
| | | this.TotalPrice1 += item.ordPrice; |
| | | this.TotalPrice += item.nowPrice; |
| | | |
| | |
| | | listgetOrder(data) { |
| | | getOrder(data).then((res) => { |
| | | this.$modal.msgSuccess("提交成功"); |
| | | // this.dialogVisibles = true; |
| | | // this.url = window.webkitURL.createObjectURL(res); //将后端返回的blob文件读取出url |
| | | //调接口显示导检单 |
| | | const tjNumber = res.msg; |
| | | const viewNum = "792931586196398080"; |