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; this.selInvVisible = false;
store.dispatch('GetInfo').then(() => { store.dispatch('GetInfo').then(() => {
this.inv = store.getters.locInvName this.inv = store.getters.locInvName
this.deptName = store.getters.locDeptName
}); });
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);

@ -21,7 +21,7 @@
<el-select v-model="repairOrder.deptCode" <el-select v-model="repairOrder.deptCode"
placeholder="请选择部门" placeholder="请选择部门"
clearable="true" clearable="true"
:disabled="repairOrder.code != null" disabled
@change="deptChange" @change="deptChange"
style="width: 90%" style="width: 90%"
> >
@ -41,7 +41,7 @@
<el-select v-model="repairOrder.invCode" <el-select v-model="repairOrder.invCode"
placeholder="请选择仓库" placeholder="请选择仓库"
clearable="true" clearable="true"
:disabled="repairOrder.code != null" disabled
style="width: 90%" style="width: 90%"
> >
<el-option <el-option
@ -71,15 +71,23 @@
</el-col> </el-col>
</el-row> </el-row>
<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-col :span="10">
<el-form-item class="query-form-item" label="维修类型:" prop="repairType"> <el-form-item class="query-form-item" label="规格型号:" prop="code">
<el-select v-model="repairOrder.repairType" placeholder="请选择维修类型" style="width: 90%" clearable> <el-input v-model="repairOrder.ggxh" placeholder="请输入规格型号" style="width: 90%" clearable
<el-option label="自行维修" :value=1></el-option> disabled></el-input>
<el-option label="外部维修" :value=2></el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item class="query-form-item" label="紧急程度:" prop="urgencyType"> <el-form-item class="query-form-item" label="紧急程度:" prop="urgencyType">
<el-select v-model="repairOrder.urgencyType" placeholder="请选择紧急程度" style="width: 90%" clearable> <el-select v-model="repairOrder.urgencyType" placeholder="请选择紧急程度" style="width: 90%" clearable>
@ -90,6 +98,23 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </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-row>
<el-col :span="19"> <el-col :span="19">
<el-form-item label="备注:" prop="remark"> <el-form-item label="备注:" prop="remark">
@ -101,11 +126,11 @@
</el-card> </el-card>
<el-card> <el-card>
<el-row type="flex" justify="end"> <el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 10px"> <!-- <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 type="primary" @click.native.stop="selectPlanFunction(null)" :loading="loading">选入</el-button>-->
</el-button-group> <!-- </el-button-group>-->
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px"> <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-button-group>
</el-row> </el-row>
@ -160,9 +185,6 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="选择报修设备" title="选择报修设备"
:visible.sync="deviceDialogVisible" :visible.sync="deviceDialogVisible"
@ -209,7 +231,8 @@
<el-divider style="margin: 15px"></el-divider> <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" @current-change="handleCurrentChange"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
@ -241,7 +264,7 @@
<script> <script>
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {getDeptListByUser} from "@/api/auth/authDept"; 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 {getDeptDeviceList} from "@/api/inventory/deptDevice";
import store from "@/store"; import store from "@/store";
import {saveDeviceRepairOrder} from "@/api/inventory/deviceRepairOrder" import {saveDeviceRepairOrder} from "@/api/inventory/deviceRepairOrder"
@ -267,12 +290,13 @@ export default {
return { return {
deptList: [], deptList: [],
invList: [], invList: [],
userList:[],
deviceDialogVisible: false, deviceDialogVisible: false,
deviceLoading: false, deviceLoading: false,
filterQuery: { filterQuery: {
code: null, code: null,
deptCode: null, deptCode: this.$store.getters.locDeptCode,
invCode: null, invCode: this.$store.getters.locInvCode,
page: 1, page: 1,
limit: 10 limit: 10
}, },
@ -341,10 +365,6 @@ export default {
this.$message.error("请输入物资编码") this.$message.error("请输入物资编码")
return; return;
} }
if (isBlank(this.repairOrder.repairType)) {
this.$message.error("请选择维修类型")
return;
}
if (isBlank(this.repairOrder.urgencyType)) { if (isBlank(this.repairOrder.urgencyType)) {
this.$message.error("请选择紧急程度") this.$message.error("请选择紧急程度")
return; return;
@ -442,6 +462,7 @@ export default {
} }
this.deviceDialogVisible = false; this.deviceDialogVisible = false;
this.repairOrder.code = this.selectRow.code; this.repairOrder.code = this.selectRow.code;
this.repairOrder.ggxh = this.selectRow.ggxh;
this.repairOrder.deviceName = this.selectRow.deviceName; this.repairOrder.deviceName = this.selectRow.deviceName;
}, },
uploadHandlePreview(file) { uploadHandlePreview(file) {
@ -503,12 +524,12 @@ export default {
}, },
uploadHandleError() { uploadHandleError() {
}, },
selectPlanFunction(row){ selectPlanFunction(row) {
if (this.repairOrder.id != null) { if (this.repairOrder.id != null) {
if(isBlank(row)){ if (isBlank(row)) {
this.inputQuery = {}; this.inputQuery = {};
this.inputQuery.orderIdFk = this.repairOrder.orderId this.inputQuery.orderIdFk = this.repairOrder.orderId
}else{ } else {
this.inputQuery = row this.inputQuery = row
} }
this.inspectSelectPlanSetVisible = true; this.inspectSelectPlanSetVisible = true;
@ -538,10 +559,10 @@ export default {
}, },
setPlanFunction(row) { setPlanFunction(row) {
if (this.repairOrder.id != null) { if (this.repairOrder.id != null) {
if(isBlank(row)){ if (isBlank(row)) {
this.inputQuery = {}; this.inputQuery = {};
this.inputQuery.orderIdFk = this.repairOrder.orderId this.inputQuery.orderIdFk = this.repairOrder.orderId
}else{ } else {
this.inputQuery = row this.inputQuery = row
} }
this.repairOrderSetVisible = true; this.repairOrderSetVisible = true;
@ -549,7 +570,7 @@ export default {
this.$refs["dataForm"].validate((valid) => { this.$refs["dataForm"].validate((valid) => {
if (valid) { if (valid) {
let formName = isBlank(this.repairOrder.id) ? "add" : "edit"; let formName = isBlank(this.repairOrder.id) ? "add" : "edit";
if(formName == "add"){ if (formName == "add") {
this.repairOrder.planStatus = 1; this.repairOrder.planStatus = 1;
} }
saveDeviceRepairOrder(this.repairOrder, formName).then((res) => { saveDeviceRepairOrder(this.repairOrder, formName).then((res) => {
@ -585,6 +606,18 @@ export default {
this.inspectSelectPlanSetVisible = false; this.inspectSelectPlanSetVisible = false;
this.selectDevicerepairOrderDelect({orderIdFk: this.inputQuery.orderIdFk}) 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) { selectDevicerepairOrderDelect(obj) {
filterByorderIdFk(obj).then((res) => { filterByorderIdFk(obj).then((res) => {
this.loading = false; this.loading = false;
@ -601,8 +634,8 @@ export default {
}) })
}, },
}, },
components:{ components: {
deviceInspectPlanProjectSet,deviceProjectSelect deviceInspectPlanProjectSet, deviceProjectSelect
}, },
created() { created() {
this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file"; this.uploadUrl = this.BASE_URL + "/udiwms/upload/register/file";
@ -610,9 +643,12 @@ export default {
ADMIN_ID: store.getters.adminId, ADMIN_ID: store.getters.adminId,
ADMIN_TOKEN: store.getters.token, ADMIN_TOKEN: store.getters.token,
}; };
this.repairOrder.deptCode = this.$store.getters.locDeptCode
this.repairOrder.invCode = this.$store.getters.locInvCode
this.repairOrder.uploadImage = null; this.repairOrder.uploadImage = null;
this.getDeptList(); this.getDeptList()
if(this.repairOrder.id !=null){ this.getUserBus()
if (this.repairOrder.id != null) {
this.selectDevicerepairOrderDelect({orderIdFk: this.repairOrder.orderId}) 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="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="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="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="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"> <el-table-column label="紧急程度" prop="urgencyType" show-overflow-tooltip width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag :type="(scope.row.urgencyType) | statusFilterType"> <el-tag :type="(scope.row.urgencyType) | statusFilterType">

Loading…
Cancel
Save