修饰编号

This commit is contained in:
mashuai 2024-12-20 17:34:30 +08:00
parent 2d38ccd56d
commit 23b9e2cbe9
1 changed files with 55 additions and 55 deletions

View File

@ -13,12 +13,12 @@
<el-button type="primary" icon="el-icon-search" size="mini" @click="getTaskInfo" >搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-form>
<el-table v-loading="loading" :data="equipmentList" row-key="id">
<el-table-column label="序号" align="center" type="index" />
<el-table-column label="物资名称" align="center" prop="typeName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="typeModelName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="计量单位" align="center" prop="unitName" :show-overflow-tooltip="true"/>
<el-table-column label="预入库数量" align="center" prop="repairNum" :show-overflow-tooltip="true"/>
<el-table-column label="待入库数量" align="center" prop="pendingInputNum" :show-overflow-tooltip="true"/>
<el-table-column label="已入库数量" align="center" prop="inputNum" :show-overflow-tooltip="true" />
@ -30,14 +30,14 @@
<div v-if="scope.row.manageType==1">数量管理</div>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<el-table-column label="状态" align="center" prop="status" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.repair_end_task_status" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<el-button size="mini" style="margin-bottom: 10px" type="success" v-if="scope.row.status == '0'" @click="handlePass(scope.row)">入库</el-button>
<el-button size="mini" style="margin-bottom: 10px" type="success" v-if="scope.row.status == '0'" @click="handlePass(scope.row)">入库</el-button>
<el-button size="mini" type="danger" v-if="scope.row.status == '0'" @click="handleFail(scope.row)">驳回</el-button>
<el-button size="mini" v-if="(scope.row.status == '1'||scope.row.status == '2')&&scope.row.manageType==0" @click="handleViewCode(scope.row)">查看</el-button>
</template>
@ -45,19 +45,19 @@
</el-table>
<!-- 数量入库确认框 -->
<el-dialog title="数量入库" :visible.sync="numOpen" width="600px" append-to-body>
<el-dialog title="数量入库" :visible.sync="numOpen" width="600px" append-to-body>
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span style="width: 100px;">入库数量</span>
<el-input v-model="numInput" type="number" min="0" @input="(v)=>(rowData.unitValue==1?numInput=Number(v.replace(/[^\d.]/g,'')) : numInput=Number(v.replace(/[^\d]/g,'')))"
placeholder="请输入入库数量" clearable maxlength="50" style="width: 400px"/>
</div>
</div>
<div style="width: 100%;height: 50px;display: flex;justify-content: flex-end;align-items: center;">
<el-button type="primary" size="mini" @click="saveNumInput">确定</el-button>
<el-button type="normal" size="mini" @click="numOpen=false">取消</el-button>
</div>
</el-dialog>
<!-- 数量入库驳回框 -->
<el-dialog title="数量入库" :visible.sync="numOpen2" width="600px" append-to-body>
<!-- 数量入库驳回框 -->
<el-dialog title="数量入库" :visible.sync="numOpen2" width="600px" append-to-body>
<div style="width: 100%;height: 100%;display: flex;align-items: center;margin-bottom: 10px;">
<span style="width: 100px;">驳回数量</span>
<el-input v-model="numInput2" type="number" min="0" @input="(v)=>(rowData.unitValue==1?numInput2=Number(v.replace(/[^\d.]/g,'')) : numInput2=Number(v.replace(/[^\d]/g,'')))"
@ -65,9 +65,9 @@
</div>
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span style="width: 100px;">驳回原因</span>
<el-input v-model="rejectReason" type="textarea"
<el-input v-model="rejectReason" type="textarea"
placeholder="请输入驳回原因:" clearable maxlength="50" style="width: 400px"/>
</div>
</div>
<div style="width: 100%;height: 50px;display: flex;justify-content: flex-end;align-items: center;">
<el-button type="primary" size="mini" @click="rejectNumInput">确定</el-button>
<el-button type="normal" size="mini" @click="numOpen2=false">取消</el-button>
@ -75,7 +75,7 @@
</el-dialog>
<!-- 编码类型编码列表 -->
<el-dialog title="编码退料" :visible.sync="open" width="1200px" append-to-body>
<el-dialog title="编码退料" :visible.sync="open" width="1200px" append-to-body>
<el-row :gutter="10" class="mb8">
<el-col :span="6">
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
@ -121,14 +121,14 @@
<el-table-column type="selection" width="55" align="center" :selectable="selectable"/>
<el-table-column label="序号" type="index" width="55" align="center"/>
<el-table-column label="类型名称" prop="typeName" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" prop="materialName" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" prop="materialName" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="设备编码" prop="maCode" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="设备状态" prop="maStatus" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope">
<dict-tag :options="dict.type.ma_machine_status" :value="scope.row.maStatus"/>
</template>
</el-table-column>
<el-table-column label="驳回原因" prop="rejectReason" align="center" :show-overflow-tooltip="true"/>
</el-table-column>
<el-table-column label="驳回原因" prop="rejectReason" align="center" :show-overflow-tooltip="true"/>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="codeWarehouse(scope.row)" v-if="!isReject&&scope.row.maStatus=='5'">入库</el-button>
@ -140,24 +140,24 @@
<el-button type="primary" size="mini" @click="saveDevCode">保存</el-button>
<el-button type="normal" size="mini" @click="open=false">取消</el-button>
</div> -->
</el-dialog>
</el-dialog>
<!-- 编码入库驳回框 -->
<el-dialog :visible.sync="codeOpen" width="500px" append-to-body :show-close="false">
<!-- 编码入库驳回框 -->
<el-dialog :visible.sync="codeOpen" width="500px" append-to-body :show-close="false">
<div style="width: 100%;height: 100%;display: flex;align-items: center;margin-bottom: 20px;">
<span style="width: 100%;font-size: 16px;">是否确认驳回所选择的设备编码</span>
</div>
<div style="width: 100%;height: 100%;display: flex;align-items: center;">
<span style="width: 100px;">驳回原因</span>
<el-input v-model="rejectReason" type="textarea"
<el-input v-model="rejectReason" type="textarea"
placeholder="请输入驳回原因:" clearable maxlength="100" style="width: 400px"/>
</div>
</div>
<div style="width: 100%;height: 50px;display: flex;justify-content: flex-end;align-items: center;">
<el-button type="primary" size="mini" @click="confirmRejectCode">确定</el-button>
<el-button type="normal" size="mini" @click="codeOpen=false">取消</el-button>
</div>
</el-dialog>
</div>
</template>
@ -169,7 +169,7 @@ import { auditPass } from "@/api/repair/testExamine";
export default {
name: "",
dicts: ["ma_machine_status","repair_end_task_status"],
components: {
components: {
},
props: {
isEdit: {
@ -177,7 +177,7 @@ export default {
default: () => {
return false;
},
},
},
queryId: {
type: [String, Number],
default: () => {
@ -197,14 +197,14 @@ export default {
//ID
taskId: "",
//
loading: true,
loading: true,
//
uniteList: [],
//
projectList: [],
//
equipmentList: [],
maForm: {
maForm: {
keyWord: undefined
},
passTemp: [],
@ -232,17 +232,17 @@ export default {
};
},
computed: {},
mounted() {
mounted() {
this.taskId = this.param.taskId
console.log(this.param)
this.paramTemp = this.param;
this.getTaskInfo();
},
methods: {
methods: {
resetQuery(){
this.maForm.keyWord="";
this.getTaskInfo()
},
},
//-
getTaskInfo() {
this.loading = true;
@ -250,8 +250,8 @@ export default {
taskId:this.taskId,
keyWord:this.maForm.keyWord
}
getTestedDetailListApi(param).then((response) => {
this.equipmentList = response.data;
getTestedDetailListApi(param).then((response) => {
this.equipmentList = response.data;
this.loading = false;
});
},
@ -265,10 +265,10 @@ export default {
this.rowData=row;
}else{//-
this.rowData=row;
this.isReject=false;
this.isReject=false;
this.keyWord=""
this.queryCodeList()
this.open=true;
this.open=true;
}
},
//
@ -288,15 +288,15 @@ export default {
pendingInputNum:this.rowData.pendingInputNum,
inputNum:this.numInput
}
repairInputWarehouseApi(param).then((response) => {
repairInputWarehouseApi(param).then((response) => {
if(response.code==200){
this.$modal.msgSuccess("入库成功");
this.numOpen=false;
this.getTaskInfo();
}
});
}
},
}
},
//-
handleFail(row) {
console.log(row)
@ -311,7 +311,7 @@ export default {
this.isReject=true;
this.keyWord=""
this.queryCodeList()
this.open=true;
this.open=true;
}
},
//--
@ -325,7 +325,7 @@ export default {
this.$modal.msgError("驳回数量不能大于预入库数量!");
this.numInput2 = this.rowData.pendingInputNum;
}else{
//
//
let param = {
agreementId:this.rowData.agreementId,
taskId:this.rowData.taskId,
@ -334,14 +334,14 @@ export default {
pendingInputNum:this.rowData.pendingInputNum,
rejectNum:this.numInput2
}
rejectWarehouseApi(param).then((response) => {
rejectWarehouseApi(param).then((response) => {
if(response.code==200){
this.$modal.msgSuccess("驳回成功");
this.numOpen2=false;
this.getTaskInfo();
}
});
}
});
}
},
//-
handleViewCode(row){
@ -349,7 +349,7 @@ export default {
this.isReject=true;
this.keyWord=""
this.queryCodeList()
this.open=true;
this.open=true;
},
//
queryCodeList(){
@ -359,12 +359,12 @@ export default {
keyWord:this.keyWord,
taskId:this.rowData.taskId,
typeId:this.rowData.typeId
}
}
getCodeListApi(param).then((response) => {
if (response.code == 200) {
if (response.code == 200) {
this.maCodeList = response.data
}
});
}
});
},
//-
resetCodeQuery(){
@ -373,12 +373,12 @@ export default {
},
//-
codeWarehouse(codeRow){
console.log(this.rowData)
console.log(this.rowData)
console.log(codeRow)
let param = {
taskId:this.rowData.taskId,
typeId:this.rowData.typeId,
maCodeList:[{maId:codeRow.maId}]
maCodeList:[{maId:codeRow.maId, maCode:codeRow.maCode}]
}
this.$modal.confirm("是否确认入库所选择的设备编码?")
.then(function () {
@ -394,7 +394,7 @@ export default {
},
//--
rejectCodeWarehouse(codeRow){
console.log(this.rowData)
console.log(this.rowData)
console.log(codeRow)
this.rejectReason="";
this.codeOpen=true;
@ -415,10 +415,10 @@ export default {
// this.getTaskInfo();
// }
// })
// .catch(() => {});
// .catch(() => {});
},
//---
confirmRejectCode(){
confirmRejectCode(){
let param = {
agreementId:this.rowData.agreementId,
taskId:this.rowData.taskId,
@ -433,7 +433,7 @@ export default {
this.queryCodeList();
this.getTaskInfo();
}
})
})
},
//
selectable(row) {
@ -442,7 +442,7 @@ export default {
} else {
return false;
}
},
},
//
handleSelectionChange(selection) {
this.passTemp = [];
@ -455,7 +455,7 @@ export default {
this.failTemp.push({maId:item.maId});
});
this.single = selection.length != 1;
this.multiple = !selection.length;
this.multiple = !selection.length;
},
//-
handlePassAll() {
@ -494,9 +494,9 @@ export default {
this.getTaskInfo();
}
})
.catch(() => {});
},
.catch(() => {});
},
},
};