From 011aa2dfe849e7c8cd6fe9f5639e3a32fb80221d Mon Sep 17 00:00:00 2001 From: zhen <1173776308@qq.com> Date: Mon, 15 Jul 2024 12:13:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E7=A5=A8=EF=BC=88=E5=BC=A0?= =?UTF-8?q?=E5=90=8C=E6=9C=95=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/smart/operationticket.vue | 4 +++ src/views/smart/operationticketDetail.vue | 34 ++++++++--------------- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/src/views/smart/operationticket.vue b/src/views/smart/operationticket.vue index 58e2ef9..71d54e9 100644 --- a/src/views/smart/operationticket.vue +++ b/src/views/smart/operationticket.vue @@ -254,6 +254,8 @@ import {getList, getDetail, add, update, remove, closeticket} from "@/api/smart/ { label: "计划结束时间", prop: "plannedEndTime", + format: 'yyyy/MM/dd', + valueFormat: "yyyyMMdd", rules: [{ required: true, message: "请输入计划结束时间", @@ -263,6 +265,8 @@ import {getList, getDetail, add, update, remove, closeticket} from "@/api/smart/ { label: "签发时间", prop: "workIssuanceTime", + format: 'yyyy/MM/dd', + valueFormat: "yyyyMMdd", rules: [{ required: true, message: "请输入签发时间", diff --git a/src/views/smart/operationticketDetail.vue b/src/views/smart/operationticketDetail.vue index a825655..8a0cb61 100644 --- a/src/views/smart/operationticketDetail.vue +++ b/src/views/smart/operationticketDetail.vue @@ -91,6 +91,7 @@ import website from "@/config/website"; import {readonly} from "vue"; import {getToken} from "@/util/auth"; import request from "@/router/axios"; +import {Alert} from "element-ui"; export default { name: "operationticketDetail", data () { @@ -109,6 +110,7 @@ export default { value: "4", label: ' ' }], + defaultOperationTicketNo: "", frame_class: '', type: {}, shouldShowButton:{}, @@ -200,7 +202,6 @@ export default { { label: "操作票编号", prop: "operationTicketNo", - value: this.$route.query.operationTicketNo, rules: [{ required: true, message: "请输入操作票编号", @@ -460,7 +461,9 @@ export default { label: "操作票编号", prop: "operationTicketNo", span: 20, - // disabled: true, + // value: this.defaultOperationTicketNo, + disabled: true, + hide: true, rules: [{ required: true, message: "请输入操作票编号", @@ -471,11 +474,8 @@ export default { label: "操作项目编号", prop: "operationItemNo", span: 20, - rules: [{ - required: true, - message: "请输入操作项目编号", - trigger: "blur" - }] + disabled: true, + display: false, }, { label: "项目名称", @@ -595,7 +595,7 @@ export default { cancelButtonText: "取消", type: "warning" }).then(() => { - update(this.tab1_form).then(() => { + add(this.tab1_form).then(() => { this.$router.push({ path: "/smart/operationticket", query: {}, @@ -639,21 +639,13 @@ export default { if (column.prop == 'operationItem') { this.item_onLoad(); } - }else { - if(this.tab1_form.operationTicketNo == null){ - this.$message({ - type: "error", - message: "请填写操作票编号再填写操作项目!" - }); - column.prop = "information"; - } } + this.item_form.operationTicketNo = this.tab1_form.operationTicketNo; }, // 操作项目 新增按钮处理 item_rowSave (form, done, loading) { loading(); - form.id = this.$route.query.id; item_add(form).then(() => { done(form); this.item_onLoad(this.page); @@ -661,6 +653,7 @@ export default { type: "success", message: "操作成功!" }); + this.item_form.operationTicketNo = this.tab1_form.operationTicketNo; }, error => { window.console.log(error); loading(); @@ -704,10 +697,6 @@ export default { console.log(res); this.tab1_form = res.data.data; }); - // getItemDetail(this.$route.query.id,this.tab1_form.operationTicketNo).then(res => { - // console.log(res); - // this.item_data = res.data.data; - // }); }, auditing() { this.$confirm("是否将数据审核?", "提示", { @@ -774,7 +763,8 @@ export default { }, item_onLoad(row, params = {}) { this.loading = true; - item_getListByItemId(this.$route.query.operationTicketNo).then(res => { + alert(this.item_data[0]); + item_getListByItemId(this.item_data[0].operationTicketNo).then(res => { this.item_data = res.data.data; this.loading = false; });