| | |
| | | <template> |
| | | <div style="padding: 10px; position: relative;"> |
| | | <div style="padding: 10px; position: relative"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | |
| | | >编辑</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | </el-col> |
| | | <el-col :span="1.5"> </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | >反禁用</el-button |
| | | > |
| | | </el-col> --> |
| | | |
| | | |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | | type="primary" |
| | |
| | | type="text" |
| | | @click.stop="handleEdit(row, (OperationType = 3))" |
| | | v-else-if="column.property == '计量单位代码'" |
| | | >{{ row.计量单位代码}}</el-button |
| | | >{{ row.计量单位代码 }}</el-button |
| | | > |
| | | <span v-else>{{ row[column.label] }}</span> |
| | | </div> |
| | |
| | | selectedRow: null, // 当前选中的行 |
| | | rowForm: {}, |
| | | checkedSysZb: [], |
| | | editData: [], |
| | | editData: [], |
| | | activeName: "first", |
| | | searchOpen: false, |
| | | // 弹出层标题 |
| | |
| | | this.editGyClose(); // 组件内的方法绑定到windows |
| | | }; |
| | | this.queryParams.HOrgID = sessionStorage["OrganizationID"]; |
| | | |
| | | this.riqiChange(); |
| | | this.handleQuery(); |
| | | }, |
| | | |
| | | beforeDestroy() { |
| | | // 组件销毁时清理全局方法,避免内存泄漏 |
| | | delete window.editGyClose; |
| | | }, |
| | | created() { |
| | | this.riqiChange(); |
| | | this.handleQuery(); |
| | | }, |
| | | created() {}, |
| | | methods: { |
| | | onDateScanOptionChangerHandler(e) { |
| | | this.queryParams.timeSpan = e; |
| | |
| | | this.pageSize = 50; |
| | | } |
| | | // 计量单位列表 |
| | | |
| | | |
| | | try { |
| | | let res = await axios.get(this.baseURL + "/Gy_Unit/list1", { |
| | | params: { |
| | | sWhere: this.sWhere, |
| | | user: sessionStorage["HUserName"], |
| | | Organization:this.getOrgNameById(this.queryParams.HOrgID) |
| | | Organization: this.getOrgNameById(this.queryParams.HOrgID), |
| | | }, |
| | | }); |
| | | this.tyResList = [...JSON.parse(JSON.stringify(res.data.data))]; //总数据 |
| | |
| | | // if (this.queryParams.HBeginDate && this.queryParams.HEndDate) { |
| | | // this.sWhere += ` and CONVERT(varchar(100),日期, 23) >= '${this.queryParams.HBeginDate}' and CONVERT(varchar(100),日期, 23) <= '${this.queryParams.HEndDate}'`; |
| | | // } |
| | | |
| | | |
| | | this.sWhere += this.addSWhereByOpenType(); |
| | | // this.sWhere += this.getOrgIDByUser(); |
| | | this.searchOpen = false; |
| | |
| | | var sWhere = ""; |
| | | //this.openPage判断是否有值,有代表其它页面通过选择按钮打开 |
| | | if (this.openPage || window.parent != window.self) { |
| | | sWhere += " and 禁用标志 != '1' and ISNULL(审核人,'') != ''"; |
| | | sWhere += " and 禁用标记 = '' and ISNULL(审核人,'') != ''"; |
| | | return sWhere; |
| | | } |
| | | |
| | | return sWhere; |
| | | }, |
| | | //根据用户获取用户关联组织的过滤条件 |
| | |
| | | .confirm("确认要删除吗,删除后不能恢复") |
| | | .then(() => { |
| | | if (!this.rowForm.审核人) { |
| | | const InterID = this.rowForm.hmainid || this.rowForm.HItemID || this.rowForm.HInterID; |
| | | const InterID = |
| | | this.rowForm.hmainid || this.rowForm.HItemID || this.rowForm.HInterID; |
| | | axios |
| | | .get(this.baseURL + "DeltetGy_Unit", { |
| | | params: { |
| | |
| | | .then((res) => { |
| | | let result = res.data; |
| | | if (result.code == 1) { |
| | | |
| | | this.handleQuery(); |
| | | this.$modal.msgError("错误:" + result.code + result.Message); |
| | | } else { |
| | |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | |
| | | |
| | | |
| | | // 反禁用/禁用数据 |
| | | set_De_Stop(num, form) { |
| | |
| | | }, |
| | | // 假设您有一个组织ID |
| | | |
| | | |
| | | // 方法1.1:使用 find 方法 |
| | | // 方法1.1:使用 find 方法 |
| | | getOrgNameById(id) { |
| | | const org = this.organizationList.find(item => |
| | | item.ID.toString() === id.toString() |
| | | const org = this.organizationList.find( |
| | | (item) => item.ID.toString() === id.toString() |
| | | ); |
| | | return org ? org.Name : ''; // 只返回组织名称 |
| | | return org ? org.Name : ""; // 只返回组织名称 |
| | | }, |
| | | |
| | | |
| | | // 提交上传文件 |
| | | // 提交上传文件 |
| | | submitFileForm() { |
| | | this.$refs.upload.submit(); |
| | | }, |