静态台账编码和kks编码 工器具编码 活性控制

main
weitingdong 12 months ago
parent c932acbd83
commit 0d51d6f3f3
  1. 30
      src/views/leger/equipmentledgerDetail.vue
  2. 27
      src/views/leger/toolinventoryrecordDetail.vue

@ -117,6 +117,7 @@
import website from "@/config/website";
import {readonly} from "vue";
import {getToken} from "@/util/auth";
import request from "@/router/axios";
export default {
name: "equipmentledgerDetail",
data () {
@ -155,6 +156,7 @@
{
label: "设备台账编码",
prop: "eqLedgerCode",
disabled:false,
rules: [{
required: true,
message: "请输入设备台账编码",
@ -196,11 +198,35 @@
{
label: "KKS编码",
prop: "kksEncoding",
disabled:false,
rules: [{
required: true,
message: "请输入KKS编码",
trigger: "blur",
}],
event: {
blur: (val) => {
if (!val) return
if (val) {
request({
url: "/api/equipmentledger/getKksKey",
method: 'get',
params: {
KksNo: val
}
}).then((res) => {
if (res.data.data.kksEncoding !== undefined){
this.$message({
type: "error",
message: this.tab1_form.kksEncoding + "已存在,请检查后重新输入!"
}
)
this.tab1_form.kksEncoding="";
}
})
}
},
},
span: 6,
maxlength: 20,
},
@ -677,6 +703,10 @@
this.UpdateShowButton=true;
this.frame_class = 'frame_class1';
this.SearchDetail();
const kksEncoding = this.findObject(this.tab1_option.column, "kksEncoding");
kksEncoding.disabled =true;
const eqLedgerCode = this.findObject(this.tab1_option.column, "eqLedgerCode");
eqLedgerCode.disabled =true;
}else{
this.readonlyForm=false;
this.shouldShowButton=false;

@ -172,6 +172,7 @@ import website from "@/config/website";
import {readonly} from "vue";
import {getToken} from "@/util/auth";
import {getListByTaskNo} from "@/api/inspection/inspectionresult";
import request from "@/router/axios";
export default {
name: "toolinventoryrecordDetail",
data () {
@ -225,11 +226,35 @@ export default {
{
label: "工器具编码",
prop: "toolsCodeId",
disabled: false,
rules: [{
required: true,
message: "请输入工器具编码",
trigger: "blur"
}],
event: {
blur: (val) => {
if (!val) return
if (val) {
request({
url: '/api/leger/toolinventoryrecord/getToolsCodeId',
method: 'get',
params: {
toolsCodeId: val
}
}).then((res) => {
if (res.data.data.toolsCodeId !== undefined ){
this.$message({
type: "error",
message: this.tab1_form.toolsCodeId + "已存在,请检查后重新输入!"
}
)
this.tab1_form.toolsCodeId="";
}
})
}
},
},
span: 24,
maxlength: 20,
},
@ -631,6 +656,8 @@ export default {
this.frame_class = 'frame_class1';
this.checkStatusValue = this.$route.query.checkstatus;
this.SearchDetail();
const toolsCodeId = this.findObject(this.tab1_option.column, "toolsCodeId");
toolsCodeId.disabled =true;
}else{
this.readonlyForm=false;
this.shouldShowButton=false;

Loading…
Cancel
Save