feat:输入物料详情添加搜素查询(提到第一行并可编辑)

This commit is contained in:
shijing 2025-10-28 14:28:18 +08:00
parent 7f21f2209f
commit e3721d91ea
1 changed files with 16 additions and 3 deletions

View File

@ -27,7 +27,7 @@
<el-main id="mlogbwMain"> <el-main id="mlogbwMain">
<el-button type="primary" v-if="!isSubmit&&processType=='20'&&mode=='outs'" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button> <el-button type="primary" v-if="!isSubmit&&processType=='20'&&mode=='outs'" @click="check_start" style="position: absolute;top: 20px;left: 150px;">检验</el-button>
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button> <el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;top: 20px;left: 210px;">批量操作</el-button>
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;top: 20px;left: 308px;"></el-input> <el-input v-if="multipleSet||insInput" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;top: 20px;left: 308px;"></el-input>
<sc-form-table <sc-form-table
hideDelete hideDelete
id="mlogbwlist" id="mlogbwlist"
@ -508,6 +508,7 @@ export default {
route_code:"", route_code:"",
wprInputText:"", wprInputText:"",
params: {mlogb:'',page:0}, params: {mlogb:'',page:0},
insInput:false,
canMultiple:false, canMultiple:false,
checkAll: false, checkAll: false,
hideAdd: true, hideAdd: true,
@ -568,6 +569,9 @@ export default {
that.hideAdd = that.isSubmit; that.hideAdd = that.isSubmit;
that.params.mlogb = that.addTemplate.mlogb = that.mlogb; that.params.mlogb = that.addTemplate.mlogb = that.mlogb;
that.currentDate = that.$TOOL.dateFormat2(new Date()); that.currentDate = that.$TOOL.dateFormat2(new Date());
if(that.route_code=='niuzhuan'){
that.insInput = true;
}
}, },
methods: { methods: {
open(mode = "",qct = '') { open(mode = "",qct = '') {
@ -1155,13 +1159,22 @@ export default {
that.mlogbwlist.forEach((item,index) => { that.mlogbwlist.forEach((item,index) => {
let indexs = item.number.indexOf(that.wprInputText) let indexs = item.number.indexOf(that.wprInputText)
if(indexs>-1&&that.wprInputText !== ""){ if(indexs>-1&&that.wprInputText !== ""){
// if(item.number == that.wprInputText){
let obj = Object.assign({},item); let obj = Object.assign({},item);
obj.isEdit = true; obj.isEdit = true;
that.mlogbwlist.splice(index,1); that.mlogbwlist.splice(index,1);
that.wprInputText = ""; that.wprInputText = "";
that.mlogbwlist.unshift(obj); that.mlogbwlist.unshift(obj);
if(that.setForm.cd_req_addr!==null){ if(that.insInput){
if(that.mlogbwlist[0].work_start_time==''||that.mlogbwlist[0].work_start_time==null){
let date = new Date();
that.mlogbwlist[0].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
that.timeChange(that.mlogbwlist[0]);
}
if(that.optionsEq.length==0){
that.getEquipment4();
}
}
if(that.setForm.cd_req_addr!==null&&!that.insInput){
//cd_req_addr, //cd_req_addr,
that.getEqData(0); that.getEqData(0);
} }