Merge remote-tracking branch 'origin/dev2.0' into dev2.0

20231126-yw
anthonywj 2 years ago
commit 2cd5e86cff

@ -402,6 +402,7 @@ export default {
this.selInvVisible = false;
store.dispatch('GetInfo').then(() => {
this.inv = store.getters.locInvName
this.deptName = store.getters.locDeptName
});
} else {
this.$message.error(res.message);

@ -4,13 +4,13 @@
<el-form :model="repairOrder" ref="dataForm" label-width="120px" style="margin-bottom: -15px" :rules="formRules">
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<el-button
type="primary"
@click.native="selectDevice()"
type="primary"
@click.native="selectDevice()"
>选择设备
</el-button>
<el-button
type="primary"
@click.native="submit()"
type="primary"
@click.native="submit()"
>保存
</el-button>
</el-button-group>
@ -21,15 +21,15 @@
<el-select v-model="repairOrder.deptCode"
placeholder="请选择部门"
clearable="true"
:disabled="repairOrder.code != null"
disabled
@change="deptChange"
style="width: 90%"
>
<el-option
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
v-for="item in deptList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
@ -41,14 +41,14 @@
<el-select v-model="repairOrder.invCode"
placeholder="请选择仓库"
clearable="true"
:disabled="repairOrder.code != null"
disabled
style="width: 90%"
>
<el-option
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
@ -71,15 +71,23 @@
</el-col>
</el-row>
<el-row>
<!-- <el-col :span="10">-->
<!-- <el-form-item class="query-form-item" label="维修类型:" prop="repairType">-->
<!-- <el-select v-model="repairOrder.repairType" placeholder="请选择维修类型" style="width: 90%" clearable>-->
<!-- <el-option label="自行维修" :value=1></el-option>-->
<!-- <el-option label="外部维修" :value=2></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="10">
<el-form-item class="query-form-item" label="维修类型:" prop="repairType">
<el-select v-model="repairOrder.repairType" placeholder="请选择维修类型" style="width: 90%" clearable>
<el-option label="自行维修" :value=1></el-option>
<el-option label="外部维修" :value=2></el-option>
</el-select>
<el-form-item class="query-form-item" label="规格型号:" prop="code">
<el-input v-model="repairOrder.ggxh" placeholder="请输入规格型号" style="width: 90%" clearable
disabled></el-input>
</el-form-item>
</el-col>
<el-col :span="10">
<el-form-item class="query-form-item" label="紧急程度:" prop="urgencyType">
<el-select v-model="repairOrder.urgencyType" placeholder="请选择紧急程度" style="width: 90%" clearable>
@ -90,10 +98,27 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="10">
<el-form-item label="负责人:" prop="inspectUser">
<el-select v-model="repairOrder.inspectUser"
placeholder="请选择负责人" clearable
style="width: 90%">
<el-option
v-for="item in userList"
:key="item.userid"
:label="item.employeeName"
:value="item.userid">
<span style="float: left">{{ item.employeeName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="19">
<el-form-item label="备注:" prop="remark">
<el-input type="textarea" :rows="3" v-model="repairOrder.remark"></el-input>
<el-input type="textarea" :rows="3" v-model="repairOrder.remark"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -101,11 +126,11 @@
</el-card>
<el-card>
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 10px">
<el-button type="primary" @click.native.stop="selectPlanFunction(null)" :loading="loading">选入</el-button>
</el-button-group>
<!-- <el-button-group style="display: flex;margin-bottom: 15px; margin-right: 10px">-->
<!-- <el-button type="primary" @click.native.stop="selectPlanFunction(null)" :loading="loading">选入</el-button>-->
<!-- </el-button-group>-->
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :loading="loading">新增</el-button>
<el-button type="primary" @click.native.stop="setPlanFunction(null)" :loading="loading">新增问题</el-button>
</el-button-group>
</el-row>
@ -160,17 +185,14 @@
</el-dialog>
<el-dialog
title="选择报修设备"
:visible.sync="deviceDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="65%"
v-if="deviceDialogVisible"
append-to-body
title="选择报修设备"
:visible.sync="deviceDialogVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="65%"
v-if="deviceDialogVisible"
append-to-body
>
<el-card class="el-card">
<el-form :model="filterQuery" label-width="100px">
@ -209,7 +231,8 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="deviceLoading" :data="deviceList" style="width: 100%" highlight-current-row border ref="ref"
<el-table v-loading="deviceLoading" :data="deviceList" style="width: 100%" highlight-current-row border
ref="ref"
@current-change="handleCurrentChange"
>
<el-table-column label="序号" type="index"></el-table-column>
@ -225,11 +248,11 @@
</el-table>
<pagination
v-show="deviceTotal>0"
:total="deviceTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getDeviceList"
v-show="deviceTotal>0"
:total="deviceTotal"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getDeviceList"
></pagination>
</el-card>
@ -241,7 +264,7 @@
<script>
import {isBlank} from "@/utils/strUtil";
import {getDeptListByUser} from "@/api/auth/authDept";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getInvListByUser, warehouseUserList} from "@/api/system/invWarehouse";
import {getDeptDeviceList} from "@/api/inventory/deptDevice";
import store from "@/store";
import {saveDeviceRepairOrder} from "@/api/inventory/deviceRepairOrder"
@ -267,12 +290,13 @@ export default {
return {
deptList: [],
invList: [],
userList:[],
deviceDialogVisible: false,
deviceLoading: false,
filterQuery: {
code: null,
deptCode: null,
invCode: null,
deptCode: this.$store.getters.locDeptCode,
invCode: this.$store.getters.locInvCode,
page: 1,
limit: 10
},
@ -317,12 +341,12 @@ export default {
getInvList() {
let params = {deptCode: this.repairOrder.deptCode};
getInvListByUser(params)
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
.then((response) => {
this.invList = response.data || [];
this.getList();
})
.catch(() => {
});
},
submit() {
if (isBlank(this.repairOrder.deptCode)) {
@ -341,10 +365,6 @@ export default {
this.$message.error("请输入物资编码")
return;
}
if (isBlank(this.repairOrder.repairType)) {
this.$message.error("请选择维修类型")
return;
}
if (isBlank(this.repairOrder.urgencyType)) {
this.$message.error("请选择紧急程度")
return;
@ -442,6 +462,7 @@ export default {
}
this.deviceDialogVisible = false;
this.repairOrder.code = this.selectRow.code;
this.repairOrder.ggxh = this.selectRow.ggxh;
this.repairOrder.deviceName = this.selectRow.deviceName;
},
uploadHandlePreview(file) {
@ -452,9 +473,9 @@ export default {
},
uploadHandleExceed(files, fileList) {
this.$message.warning(
`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
files.length + fileList.length
} 个文件`
);
},
uploadOnchange(file, fileList) {
@ -463,10 +484,10 @@ export default {
let pos = fileName.lastIndexOf(".");
let lastName = fileName.substring(pos, fileName.length);
if (
lastName.toLowerCase() !== ".jpg" &&
lastName.toLowerCase() !== ".png" &&
lastName.toLowerCase() !== ".doc" &&
lastName.toLowerCase() !== ".pdf"
lastName.toLowerCase() !== ".jpg" &&
lastName.toLowerCase() !== ".png" &&
lastName.toLowerCase() !== ".doc" &&
lastName.toLowerCase() !== ".pdf"
) {
this.$message.error("上传文件只能是 jpg,png,doc,pdf 格式");
for (let i = 0; i < fileList.length; i++) {
@ -503,12 +524,12 @@ export default {
},
uploadHandleError() {
},
selectPlanFunction(row){
selectPlanFunction(row) {
if (this.repairOrder.id != null) {
if(isBlank(row)){
if (isBlank(row)) {
this.inputQuery = {};
this.inputQuery.orderIdFk = this.repairOrder.orderId
}else{
} else {
this.inputQuery = row
}
this.inspectSelectPlanSetVisible = true;
@ -538,10 +559,10 @@ export default {
},
setPlanFunction(row) {
if (this.repairOrder.id != null) {
if(isBlank(row)){
if (isBlank(row)) {
this.inputQuery = {};
this.inputQuery.orderIdFk = this.repairOrder.orderId
}else{
} else {
this.inputQuery = row
}
this.repairOrderSetVisible = true;
@ -549,7 +570,7 @@ export default {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
let formName = isBlank(this.repairOrder.id) ? "add" : "edit";
if(formName == "add"){
if (formName == "add") {
this.repairOrder.planStatus = 1;
}
saveDeviceRepairOrder(this.repairOrder, formName).then((res) => {
@ -585,6 +606,18 @@ export default {
this.inspectSelectPlanSetVisible = false;
this.selectDevicerepairOrderDelect({orderIdFk: this.inputQuery.orderIdFk})
},
getUserBus() {
let query = {
code: this.repairOrder.invCode,
}
//
warehouseUserList(query).then((res) => {
this.userList = [];
this.userList = res.data.list;
}).catch((error) => {
this.$message.error("用户数据加载失败")
});
},
selectDevicerepairOrderDelect(obj) {
filterByorderIdFk(obj).then((res) => {
this.loading = false;
@ -601,8 +634,8 @@ export default {
})
},
},
components:{
deviceInspectPlanProjectSet,deviceProjectSelect
components: {
deviceInspectPlanProjectSet, deviceProjectSelect
},
created() {
this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file";
@ -610,9 +643,12 @@ export default {
ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token,
};
this.repairOrder.deptCode = this.$store.getters.locDeptCode
this.repairOrder.invCode = this.$store.getters.locInvCode
this.repairOrder.uploadImage = null;
this.getDeptList();
if(this.repairOrder.id !=null){
this.getDeptList()
this.getUserBus()
if (this.repairOrder.id != null) {
this.selectDevicerepairOrderDelect({orderIdFk: this.repairOrder.orderId})
}
},

@ -92,14 +92,8 @@
<el-table-column label="规格型号" prop="ggxh" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="资产编码" prop="code" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="负责人" prop="inspectUserName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="创建人" prop="createUserName" show-overflow-tooltip width="120"></el-table-column>
<el-table-column label="维修类型" prop="repairType" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.repairType) | statusFilterType">
{{ repairType[scope.row.repairType] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="紧急程度" prop="urgencyType" show-overflow-tooltip width="120">
<template slot-scope="scope">
<el-tag :type="(scope.row.urgencyType) | statusFilterType">

Loading…
Cancel
Save