Merge remote-tracking branch 'origin/master'

yangwl
mengjiao 11 months ago
commit f7701f9c7e

@ -58,3 +58,27 @@ export function delItem(itemId) {
method: 'delete'
});
}
/////////////////////////////////////////下面都是汇总报表用
// 查询检查项汇总表
export function getSummaryReport() {
return request({
url: '/device/item/summaryReport',
method: 'get'
});
}
// 查询工作中心
export function getWorkCenter() {
return request({
url: '/device/item/getWorkCenter',
method: 'get'
});
}
// 查询工单匹配检查项
export function selectMatchList(query) {
return request({
url: '/device/item/matchList',
params: query
});
}

@ -17,6 +17,14 @@ export function formatEquItem(data) {
data: data
});
}
// 处理计划-设备信息
export function formatEquItemNoCondition(data) {
return request({
url: '/device/upkeepPlan/formatEquItemNoCondition',
method: 'post',
data: data
});
}
// 查询保养计划列表
export function listUpkeepPlan(query) {

@ -55,3 +55,21 @@ export function changeStatus(id,status) {
data: data
});
}
//批量添加检测项
export function submitProjects(data) {
return request({
url: '/quality/checkTypeProject/submitProjects',
method: 'post',
data: data
});
}
//获取检测项列表
export function getProjectInfoList(query) {
return request({
url: '/quality/checkTypeProject/getProjectInfoList',
method: 'get',
params: query
});
}

@ -145,7 +145,7 @@ export function getDefectList(defectType) {
});
}
// 查询人员列表
// 查询来料单列表
export function getLLWorkOrder(query) {
return request({
url: '/quality/qcIncome/getLLWorkOrder',
@ -153,3 +153,12 @@ export function getLLWorkOrder(query) {
params: query
});
}
// 查询生产过程-工单列表
export function getWorkOrder(query) {
return request({
url: '/quality/qcIncome/getWorkOrder',
method: 'get',
params: query
});
}

@ -9,6 +9,16 @@ export function listProject(query) {
});
}
// 查询检验项目维护列表
export function getProjectList(query) {
return request({
url: '/quality/project/getProjectList',
method: 'get',
params: query
});
}
// 查询检验项目维护详细
export function getProject(id) {
return request({

@ -77,3 +77,15 @@ export function changeProduceStatus(recordId, status) {
data: data
})
}
//获取批次
export function getBatchList(workorderCode) {
const data = {
workorderCode
}
return request({
url: '/quality/qcIncome/getBatchList',
method: 'put',
data: data
});
}

@ -96,3 +96,21 @@ export function changeEquipmentStatus(equipmentId, status) {
data: data
})
}
// 查询人员列表
export function getPersonList(query) {
return request({
url: '/wms/equipment/getPersonList',
method: 'get',
params: query
});
}
// 查询设备管理列表
export function getAuxiliaryEquipmentList(query) {
return request({
url: '/wms/equipment/getAuxiliaryEquipmentList',
method: 'get',
params: query
});
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

@ -100,12 +100,34 @@ export const constantRoutes = [
component: () => import("@/views/kanban/exception/index"),
hidden: true,
},
// 看板路由
// 看板路由
{
path: "/kanban/equipment",
component: () => import("@/views/kanban/equipment/index"),
hidden: true,
},
// 质量看板1
{
path: "/kanban/qualitykanban1",
component: () => import("@/views/kanban/quality/kanban1"),
hidden: true,
}, // 质量看板2
{
path: "/kanban/qualitykanban2",
component: () => import("@/views/kanban/quality/kanban2"),
hidden: true,
}, // 质量看板3
{
path: "/kanban/qualitykanban3",
component: () => import("@/views/kanban/quality/kanban3"),
hidden: true,
},
{
path: "/kanban/circle",
component: () => import("@/views/kanban/quality/circle"),
hidden: true,
},
]
// 动态路由,基于用户权限动态去加载

@ -637,8 +637,7 @@
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
<el-button @click="workDetail = false"> </el-button>
</span>
</el-dialog>
</div>

@ -892,7 +892,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId,
key: response.data[i].userName,
})
}
});
@ -1231,7 +1231,11 @@ export default {
}
this.planLoading = true;
if (this.form.planId != null) {
this.form.personList = this.selectPersonList;
this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
updatePlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("修改成功");
@ -1239,7 +1243,11 @@ export default {
this.getList();
});
} else {
this.form.personList = this.selectPersonList;
this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
addPlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("新增成功");

@ -512,8 +512,7 @@
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
<el-button @click="workDetail = false"> </el-button>
</span>
</el-dialog>

@ -20,7 +20,7 @@
<el-form-item label-width="120px" label="检查项方法" prop="itemMethod">
<el-input
v-model="queryParams.itemMethod"
placeholder="请输入检查项方法/工具"
placeholder="请输入检查项方法"
clearable
@keyup.enter.native="handleQuery"
/>
@ -310,14 +310,14 @@
</el-form-item>
</el-col>
<el-col :span="2">
<el-select v-model="form.itemLoopType" placeholder="周期">
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
<el-select v-model="form.itemLoopType" placeholder="周期">
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-col>
</el-row>
<!-- 动态表单 -->
@ -616,6 +616,7 @@ export default {
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.queryParams.itemTools = null;
this.handleQuery();
},
//

@ -591,8 +591,7 @@
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
<el-button @click="workDetail = false"> </el-button>
</span>
</el-dialog>

@ -799,7 +799,7 @@
<el-dialog
:title="title"
:visible.sync="openWrite"
width="1200px"
width="1500px"
append-to-body
v-if="openWrite"
>
@ -807,10 +807,10 @@
<el-tabs type="border-card">
<el-tab-pane label="维修基本信息">
<el-descriptions
:column="2"
:column="3"
border
:contentStyle="CS"
:label-style="LS"
:contentStyle="CS1"
:label-style="LS1"
>
<el-descriptions-item label="维修工单号">{{
form.workCode
@ -876,8 +876,8 @@
<el-descriptions :column="1" border>
<el-descriptions-item
label="维修前故障图片"
:contentStyle="CS"
:label-style="LSP"
:contentStyle="CS1"
:label-style="LSP1"
>
<el-image
v-for="(item, index) in urlBeforeLists"
@ -889,8 +889,8 @@
<el-descriptions :column="1" border>
<el-descriptions-item
label="维修后故障图片"
:contentStyle="CS"
:label-style="LSP"
:contentStyle="CS1"
:label-style="LSP1"
>
<el-image
v-for="(item, index) in urlAfterLists"
@ -900,6 +900,7 @@
></el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息">
<el-table
:data="detailList"
@ -967,24 +968,9 @@
</el-table-column>
<el-table-column prop="detailUnit" label="单位" width="40">
</el-table-column>
<el-table-column prop="picturePath" label="维修后图片" width="60">
<el-table-column prop="picturePath" label="提交图片">
<template slot-scope="scope">
<el-popover placement="right" width="300" trigger="hover">
<div class="standardUrl_body">
<div
v-for="(url, index) in scope.row.standardUrlLists"
:key="index"
>
<el-image :src="url"></el-image>
</div>
</div>
<el-button
slot="reference"
type="primary"
icon="el-icon-picture"
circle
></el-button>
</el-popover>
<FileUpload v-model="scope.row.picturePath" />
</template>
</el-table-column>
</el-table>
@ -1069,7 +1055,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="维修用时" prop="workCostTime">
<el-input v-model="form.workCostTime" style="width: 195px">
<el-input v-model="form.workCostTime" style="width: 195px" disabled>
</el-input>
</el-form-item>
</el-col>
@ -1083,7 +1069,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="故障类型" prop="faultType">
<el-cascader
:options="faultTypeOption"
@ -1092,7 +1078,7 @@
clearable
></el-cascader>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
@ -1115,6 +1101,16 @@
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="提交备件申领记录">
<!-- 使用备件领用记录 -->
<ItemSelectSpareParts
:optType="optType"
:workCode="form.workCode"
:equipmentCode="form.equipmentCode"
v-if="form.workCode != null"
></ItemSelectSpareParts>
</el-tab-pane>
</el-tabs>
</el-form>
@ -1279,6 +1275,7 @@
<template slot-scope="scope">
<el-input
size="small"
disabled
v-model="scope.row.repairValue"
v-if="scope.row.standardType == 'quantify'"
></el-input>
@ -1401,7 +1398,7 @@
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="8">
<!-- <el-col :span="8">
<el-form-item label="故障类型" prop="faultType">
<el-cascader
disabled
@ -1411,7 +1408,7 @@
clearable
></el-cascader>
</el-form-item>
</el-col>
</el-col> -->
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
@ -1433,6 +1430,7 @@
:optType="optType"
:workCode="form.workCode"
:equipmentCode="form.equipmentCode"
:workStatus="form.workStatus"
v-if="form.workCode != null"
></ItemSelectSpareParts>
</el-tab-pane>
@ -1480,15 +1478,28 @@ export default {
CS: {
"text-align": "center",
},
CS1: {
"text-align": "center",
width: "250px",
},
LS: {
"text-align": "center",
width: "225px",
},
LS1: {
"text-align": "center",
width: "250px",
},
//
LSP: {
"text-align": "center",
width: "225px",
},
//
LSP1: {
"text-align": "center",
width: "250px",
},
//
detailList: [],
//
@ -1808,6 +1819,7 @@ export default {
this.openAdd = true;
this.title = "快速工单";
},
/** 填写按钮操作 */
handleWrite(row) {
this.reset();
@ -1884,7 +1896,18 @@ export default {
standard.repairValue = item.repairValue;
standard.repairReach = item.repairReach;
standard.standardType = item.standardType;
//
if (item.picturePaths != null) {
var newFiles = [];
item.picturePaths.forEach((item) => {
var newFile = {};
newFile.name = item.fileName;
newFile.url = item.fileAddress;
newFiles.push(newFile);
});
standard.picturePath = newFiles;
}
//
var standardUrlLists = [];
if (item.picturePaths != null) {
item.picturePaths.forEach((item2) => {
@ -1970,24 +1993,51 @@ export default {
},
/** 提交填写维修记录按钮 */
submitWriteForm() {
if (Array.isArray(this.form.afterRepairFile)) {
this.form.afterRepairFile = this.listToString(
this.form.afterRepairFile
);
}
this.form.faultType = this.form.faultType.join(",");
console.log(this.form.faultType);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.workId != null) {
this.form.standardList = this.detailList;
console.log(this.form.standardList);
writeRepairOrder(this.form).then((response) => {
this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!");
this.queryParams.workStatus = null;
this.getList();
});
if (this.form.workStatus == null || this.form.workStatus == "") {
Message.warning("维修状态不能为空");
} else if (
this.form.workPerson == null ||
this.form.workPerson == ""
) {
Message.warning("维修人员不能为空");
} else if (
this.form.workStartTime == null ||
this.form.workStartTime == ""
) {
Message.warning("维修开始时间不能为空");
} else if (
this.form.workEndTime == null ||
this.form.workEndTime == ""
) {
Message.warning("维修结束时间不能为空");
} else {
if (Array.isArray(this.form.afterRepairFile)) {
this.form.afterRepairFile = this.listToString(
this.form.afterRepairFile
);
}
if (this.form.faultType != null) {
this.form.faultType = this.form.faultType.join(",");
}
this.form.standardList = this.detailList;
//
this.form.standardList.forEach((item) => {
if (Array.isArray(item.picturePath)) {
item.picturePath = this.listToString(item.picturePath);
}
});
writeRepairOrder(this.form).then((response) => {
this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!");
this.queryParams.workStatus = null;
this.getList();
});
}
}
}
});
@ -2108,10 +2158,6 @@ export default {
margin-left: 452px;
}
.step-body {
margin-top: 30px;
}
.standardUrl_body {
height: 400px;
overflow-y: auto;

@ -8,6 +8,7 @@
icon="el-icon-plus"
size="mini"
@click="handleSelectSparePartsLedger"
v-if = "this.queryParams.workStatus != '1' "
v-hasPermi="['device:sparePartsApplicationRecord:add']"
>新增</el-button
>
@ -24,11 +25,13 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-if = "this.queryParams.workStatus != '1' "
v-hasPermi="['device:sparePartsApplicationRecord:remove']"
>删除</el-button
>
</el-col>
<right-toolbar
v-if = "this.queryParams.workStatus != '1' "
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
@ -169,6 +172,7 @@ export default {
pageSize: 10,
workCode: this.workCode,
equipmentCode: this.equipmentCode,
workStatus:this.workStatus,
applyType: null,
applyCode: null,
spareCode: null,
@ -196,6 +200,7 @@ export default {
equipmentCode: undefined,
workCode: undefined,
optType: undefined,
workStatus: undefined,
},
created() {
this.getList();

@ -26,7 +26,25 @@
style="width: 150px"
/>
</el-form-item>
<el-form-item label="备件类型" prop="spareType">
<el-form-item label="设备厂家" prop="spareSupplier">
<el-input
v-model="queryParams.spareSupplier"
placeholder="请输入设备厂家"
clearable
@keyup.enter.native="handleQuery"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="所属设备名称" prop="ownEquipmentName">
<el-input
v-model="queryParams.ownEquipmentName"
placeholder="请输入所属设备名称"
clearable
@keyup.enter.native="handleQuery"
style="width: 150px"
/>
</el-form-item>
<!-- <el-form-item label="备件类型" prop="spareType">
<el-select
v-model="queryParams.spareType"
placeholder="请选择备件类型"
@ -42,7 +60,7 @@
:value="item.spareType"
></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@ -110,47 +128,39 @@
<el-table
v-loading="loading"
:data="sparePartsLedgerList"
@selection-change="handleSelectionChange"
border
>
<el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
/>
<el-table-column
label="备品备件号"
align="center"
prop="materialCode"
width="120"
/>
<el-table-column
label="备品备件描述"
align="center"
prop="materialDesc"
width="120"
/>
<el-table-column
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"/>
<!-- 缺了所属设备编码设备数量所在产线 -->
<el-table-column label="所属设备名称" align="center" prop="ownEquipmentName" width="120"/>
<!-- 供应商字段里 设备厂家 -->
<el-table-column label="设备厂家" align="center" prop="spareSupplier" width="200"/>
<el-table-column label="备品备件号" align="center" prop="materialCode" width="120"/>
<el-table-column label="备品备件名称" align="center" prop="materialDesc" width="120"/>
<el-table-column label="规格型号" align="center" prop="spareMode" width="200"/>
<el-table-column label="单机装配数量" align="center" prop="unitQuantity" width="50"/>
<el-table-column label="单价" align="center" prop="unitPrice" width="50"/>
<el-table-column label="单位" align="center" prop="userDefined1" width="50"/>
<el-table-column label="代用件" align="center" prop="substituteParts" width="50"/>
<el-table-column label="安全库存" align="center" prop="safeStock" width="50"/>
<el-table-column label="现有库存" align="center" prop="amount" width="50"/>
<el-table-column label="采购方式" align="center" prop="procurementMethod" width="150"/>
<!-- 生产厂商暂时没有用 -->
<!-- <el-table-column label="生产厂商" align="center" prop="spareManufacturer" width="200"/> -->
<el-table-column label="更换周期(月)" align="center" prop="spareReplacementCycle"/>
<el-table-column label="采购周期(天)" align="center" prop="procurementCycle"/>
<el-table-column label="期初结存" align="center" prop="openingBalance"/>
<el-table-column label="入库记录" align="center" prop="inputRecords"/>
<el-table-column label="出库记录" align="center" prop="outputRecords"/>
<el-table-column label="期末盘点" align="center" prop="endInventory"/>
<el-table-column label="期末金额" align="center" prop="endMoney"/>
<!-- <el-table-column
label="备品备件类型"
align="center"
prop="spareType"
width="120"
/>
<el-table-column label="规格型号" align="center" prop="spareMode" />
<el-table-column
label="生产厂商"
align="center"
prop="spareManufacturer"
/>
<el-table-column label="供应商" align="center" prop="spareSupplier" />
<el-table-column
label="循环周期"
align="center"
prop="spareReplacementCycle"
/>
<el-table-column
label="计量单位"
align="center"
@ -175,7 +185,7 @@
label="库存下限"
align="center"
prop="spareInventoryUpper"
/>
/> -->
<el-table-column
v-if="false"
label="工厂号"
@ -183,28 +193,13 @@
prop="factoryCode"
/>
<el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column
label="创建时间"
align="center"
prop="gmtCreate"
width="180"
>
<el-table-column label="创建时间" align="center" prop="gmtCreate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.gmtCreate, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column
label="最后更新人"
align="center"
prop="lastModifiedBy"
width="100"
/>
<el-table-column
label="最后更新时间"
align="center"
prop="gmtModified"
width="200"
>
<el-table-column label="最后更新人" align="center" prop="lastModifiedBy" width="100"/>
<el-table-column label="最后更新时间" align="center" prop="gmtModified" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.gmtModified, "{y}-{m}-{d}") }}</span>
</template>
@ -476,6 +471,7 @@ export default {
spareConversionRatio: null,
spareInventoryFloor: null,
spareInventoryUpper: null,
ownEquipmentName : null,
},
options: [
{
@ -648,6 +644,7 @@ export default {
`sparePartsLedger_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

@ -937,7 +937,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId,
key: response.data[i].userName,
})
}
});
@ -1265,7 +1265,11 @@ export default {
}
this.planLoading = true;
if (this.form.planId != null) {
this.form.personList = this.selectPersonList;
this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
updatePlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("修改成功");
@ -1273,7 +1277,11 @@ export default {
this.getList();
});
} else {
this.form.personList = this.selectPersonList;
this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
addPlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("新增成功");

@ -628,8 +628,7 @@
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
<el-button @click="workDetail = false"> </el-button>
</span>
</el-dialog>

@ -501,8 +501,7 @@
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
<el-button @click="workDetail = false"> </el-button>
</span>
</el-dialog>

@ -0,0 +1,665 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryParams"
size="small"
:inline="true"
v-show="showSearch"
>
<!-- <el-form-item label="所属工作中心" prop="workCenter">
<template>
<el-select
v-model="queryParams.workCenter"
filterable
placeholder="请选择"
style="width: 195px"
>
<el-option
v-for="item in workCenterOptions"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode"
>
</el-option>
</el-select>
</template>
</el-form-item> -->
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentCode"
placeholder="请选择设备编码"
style="width: 200px"
>
<el-button
slot="append"
@click="handleSelectEquipment"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelect ref="itemSelect" @onSelected="onItemSelectedEquipment">
</ItemSelect>
</el-form-item>
<el-form-item prop="orderEnd" label="月份">
<el-date-picker
v-model="queryParams.orderEnd"
type="month"
value-format="yyyy-MM"
placeholder="选择月"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="checkList" border :span-method="objectSpanMethod">
<el-table-column prop="itemTypeName" label="维护类型" width="100" fixed>
</el-table-column>
<el-table-column prop="itemName" label="检查项名称" width="150">
</el-table-column>
<el-table-column prop="itemMethod" label="检查项方法" width="150">
</el-table-column>
<el-table-column prop="itemTools" label="工具" width="150">
</el-table-column>
<el-table-column prop="standardName" label="标准名称" width="500">
</el-table-column>
<el-table-column prop="itemLoop" label="次" width="55"> </el-table-column>
<el-table-column prop="itemLoopType" label="周期" width="55">
</el-table-column>
<el-table-column prop="head" label="责任人" width="70"> </el-table-column>
<el-table-column prop="one" label="1" width="40">
<template slot-scope="scope">
{{ scope.row.one == "1" ? "√" : scope.row.one == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="two" label="2" width="40">
<template slot-scope="scope">
{{ scope.row.two == "1" ? "√" : scope.row.two == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="three" label="3" width="40">
<template slot-scope="scope">
{{ scope.row.three == "1" ? "√" : scope.row.three == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="four" label="4" width="40">
<template slot-scope="scope">
{{ scope.row.four == "1" ? "√" : scope.row.four == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="five" label="5" width="40">
<template slot-scope="scope">
{{ scope.row.five == "1" ? "√" : scope.row.five == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="six" label="6" width="40">
<template slot-scope="scope">
{{ scope.row.six == "1" ? "√" : scope.row.six == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="seven" label="7" width="40">
<template slot-scope="scope">
{{ scope.row.seven == "1" ? "√" : scope.row.seven == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="eight" label="8" width="40">
<template slot-scope="scope">
{{ scope.row.eight == "1" ? "√" : scope.row.eight == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="nine" label="9" width="40">
<template slot-scope="scope">
{{ scope.row.nine == "1" ? "√" : scope.row.nine == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="ten" label="10" width="40">
<template slot-scope="scope">
{{ scope.row.ten == "1" ? "√" : scope.row.ten == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="eleven" label="11" width="40">
<template slot-scope="scope">
{{ scope.row.eleven == "1" ? "√" : scope.row.eleven == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twelve" label="12" width="40">
<template slot-scope="scope">
{{ scope.row.twelve == "1" ? "√" : scope.row.twelve == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="thirteen" label="13" width="40">
<template slot-scope="scope">
{{ scope.row.thirteen == "1" ? "√" : scope.row.thirteen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="fourteen" label="14" width="40">
<template slot-scope="scope">
{{ scope.row.fourteen == "1" ? "√" : scope.row.fourteen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="fifteen" label="15" width="40">
<template slot-scope="scope">
{{ scope.row.fifteen == "1" ? "√" : scope.row.fifteen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="sixteen" label="16" width="40">
<template slot-scope="scope">
{{ scope.row.sixteen == "1" ? "√" : scope.row.sixteen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="seventeen" label="17" width="40">
<template slot-scope="scope">
{{ scope.row.seventeen == "1" ? "√" : scope.row.seventeen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="eighteen" label="18" width="40">
<template slot-scope="scope">
{{ scope.row.eighteen == "1" ? "√" : scope.row.eighteen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="nineteen" label="19" width="40">
<template slot-scope="scope">
{{ scope.row.nineteen == "1" ? "√" : scope.row.nineteen == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twenty" label="20" width="40">
<template slot-scope="scope">
{{ scope.row.twenty == "1" ? "√" : scope.row.twenty == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyOne" label="21" width="40">
<template slot-scope="scope">
{{ scope.row.twentyOne == "1" ? "√" : scope.row.twentyOne == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyTwo" label="22" width="40">
<template slot-scope="scope">
{{ scope.row.twentyTwo == "1" ? "√" : scope.row.twentyTwo == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyThree" label="23" width="40">
<template slot-scope="scope">
{{ scope.row.twentyThree == "1" ? "√" : scope.row.twentyThree == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyFour" label="24" width="40">
<template slot-scope="scope">
{{ scope.row.twentyFour == "1" ? "√" : scope.row.twentyFour == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyFive" label="30" width="40">
<template slot-scope="scope">
{{ scope.row.twentyFive == "1" ? "√" : scope.row.twentyFive == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentySix" label="26" width="40">
<template slot-scope="scope">
{{ scope.row.twentySix == "1" ? "√" : scope.row.twentySix == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentySeven" label="27" width="40">
<template slot-scope="scope">
{{ scope.row.twentySeven == "1" ? "√" : scope.row.twentySeven == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyEight" label="28" width="40">
<template slot-scope="scope">
{{ scope.row.twentyEight == "1" ? "√" : scope.row.twentyEight == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="twentyNine" label="29" width="40">
<template slot-scope="scope">
{{ scope.row.twentyNine == "1" ? "√" : scope.row.twentyNine == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="thirty" label="30" width="40">
<template slot-scope="scope">
{{ scope.row.thirty == "1" ? "√" : scope.row.thirty == "0" ? "X" : ""}}
</template>
</el-table-column>
<el-table-column prop="thirtyOne" label="31" width="40">
<template slot-scope="scope">
{{ scope.row.thirtyOne == "1" ? "√" : scope.row.thirtyOne == "0" ? "X" : ""}}
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import { Message } from "element-ui";
import ItemSelect from "./selectSingleEquipment.vue";
import {
getSummaryReport,
getWorkCenter,
selectMatchList,
} from "@/api/device/item";
export default {
name: "SummaryReport",
components: { ItemSelect },
dicts: ["device_repair_status"],
data() {
return {
//
CS: {
"text-align": "center",
},
LS: {
"text-align": "center",
width: "200px",
},
//
workCenterOptions: [],
//
checkList: [],
//
matchList: [],
optType: undefined,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
repairOrderList: [],
//
title: "",
//
openView: false,
//
queryParams: {
//
equipmentCode: null,
//
orderEnd: null,
//
workCenter: null,
},
//
form: {},
//
rules: {},
};
},
created() {
this.getList();
},
methods: {
//
indexMethod(index) {
return index + 1;
},
/** 查询维修工单列表 */
getList() {
this.loading = true;
getWorkCenter().then((response) => {
this.workCenterOptions = response.data;
});
getSummaryReport(this.queryParams).then((response) => {
this.checkList = response.data;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
if (
this.queryParams.equipmentCode == null ||
this.queryParams.orderEnd == null
) {
this.$message({
message: "设备编码或者年月不能为空!",
type: "warning",
});
} else {
this.loading = true;
console.log("查询参数", this.queryParams);
selectMatchList(this.queryParams).then((response) => {
this.matchList = response.data;
console.log("this.matchList", this.matchList);
//
var i = 0;
var j = 0;
console.log("this.matchList", this.matchList);
console.log("this.checkList", this.checkList);
for (i = 0; i < this.checkList.length; i++) {
for (j = 0; j < this.matchList.length; j++) {
if (
this.checkList[i].itemName == this.matchList[j].itemName &&
this.checkList[i].standardName == this.matchList[j].standardName
) {
var str = this.matchList[j].orderEnd.substr(8);
if (str == "01") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].one = this.matchList[j].repairReach;
}else{
this.checkList[i].one = this.matchList[j].detailReach;
}
} else if (str == "02") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].two = this.matchList[j].repairReach;
}else{
this.checkList[i].two = this.matchList[j].detailReach;
}
} else if (str == "03") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].three = this.matchList[j].repairReach;
}else{
this.checkList[i].three = this.matchList[j].detailReach;
}
} else if (str == "04") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].four = this.matchList[j].repairReach;
}else{
this.checkList[i].four = this.matchList[j].detailReach;
}
} else if (str == "05") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].five = this.matchList[j].repairReach;
}else{
this.checkList[i].five = this.matchList[j].detailReach;
}
} else if (str == "06") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].six = this.matchList[j].repairReach;
}else{
this.checkList[i].six = this.matchList[j].detailReach;
}
} else if (str == "07") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].seven = this.matchList[j].repairReach;
}else{
this.checkList[i].seven = this.matchList[j].detailReach;
}
} else if (str == "08") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].eight = this.matchList[j].repairReach;
}else{
this.checkList[i].eight = this.matchList[j].detailReach;
}
} else if (str == "09") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].nine = this.matchList[j].repairReach;
}else{
this.checkList[i].nine = this.matchList[j].detailReach;
}
} else if (str == "10") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].ten = this.matchList[j].repairReach;
}else{
this.checkList[i].ten = this.matchList[j].detailReach;
}
} else if (str == "11") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].eleven = this.matchList[j].repairReach;
}else{
this.checkList[i].eleven = this.matchList[j].detailReach;
}
} else if (str == "12") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twelve = this.matchList[j].repairReach;
}else{
this.checkList[i].twelve = this.matchList[j].detailReach;
}
} else if (str == "13") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].thirteen = this.matchList[j].repairReach;
}else{
this.checkList[i].thirteen = this.matchList[j].detailReach;
}
} else if (str == "14") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].fourteen = this.matchList[j].repairReach;
}else{
this.checkList[i].fourteen = this.matchList[j].detailReach;
}
} else if (str == "15") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].fifteen = this.matchList[j].repairReach;
}else{
this.checkList[i].fifteen = this.matchList[j].detailReach;
}
} else if (str == "16") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].sixteen = this.matchList[j].repairReach;
}else{
this.checkList[i].sixteen = this.matchList[j].detailReach;
}
} else if (str == "17") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].seventeen = this.matchList[j].repairReach;
}else{
this.checkList[i].seventeen = this.matchList[j].detailReach;
}
} else if (str == "18") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].eighteen = this.matchList[j].repairReach;
}else{
this.checkList[i].eighteen = this.matchList[j].detailReach;
}
} else if (str == "19") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].nineteen = this.matchList[j].repairReach;
}else{
this.checkList[i].nineteen = this.matchList[j].detailReach;
}
} else if (str == "20") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twenty = this.matchList[j].repairReach;
}else{
this.checkList[i].twenty = this.matchList[j].detailReach;
}
} else if (str == "21") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyOne = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyOne = this.matchList[j].detailReach;
}
} else if (str == "22") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyTwo = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyTwo = this.matchList[j].detailReach;
}
} else if (str == "23") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyThree = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyThree = this.matchList[j].detailReach;
}
} else if (str == "24") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyFour = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyFour = this.matchList[j].detailReach;
}
} else if (str == "25") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyFive = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyFive = this.matchList[j].detailReach;
}
} else if (str == "26") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentySix = this.matchList[j].repairReach;
}else{
this.checkList[i].twentySix = this.matchList[j].detailReach;
}
} else if (str == "27") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentySeven = this.matchList[j].repairReach;
}else{
this.checkList[i].twentySeven = this.matchList[j].detailReach;
}
} else if (str == "28") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyEight = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyEight = this.matchList[j].detailReach;
}
} else if (str == "29") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].twentyNine = this.matchList[j].repairReach;
}else{
this.checkList[i].twentyNine = this.matchList[j].detailReach;
}
} else if (str == "30") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].thirty = this.matchList[j].repairReach;
}else{
this.checkList[i].thirty = this.matchList[j].detailReach;
}
} else if (str == "31") {
if(this.matchList[j].repairReach == 1){
this.checkList[i].thirtyOne = this.matchList[j].repairReach;
}else{
this.checkList[i].thirtyOne = this.matchList[j].detailReach;
}
}
console.log("this.checkList[i].one", this.checkList[i].one);
} else {
}
}
}
});
}
},
//
reset() {
this.form = {
workId: null,
orderId: null,
orderCode: null,
workHandle: null,
workPlanTime: null,
workPlanDownTime: null,
orderRelevance: null,
workPerson: null,
workTeam: null,
workOutsource: null,
workDownMachine: null,
equipmentCode: null,
workReason: null,
workFaultDesc: null,
workCostTime: null,
workCost: null,
outWorkId: null,
outWorkCode: null,
attr1: null,
attr2: null,
attr3: null,
createBy: null,
createTime: null,
updateTime: null,
updateBy: null,
delFlag: null,
factoryCode: null,
};
this.resetForm("form");
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.equipmentCode = null;
this.queryParams.year = null;
this.queryParams.mouth = null;
this.queryParams.workCenter = null;
this.queryParams.equipmentCode = null;
this.handleQuery();
},
//
onItemSelectedEquipment(obj) {
this.queryParams.equipmentCode = obj;
},
//
handleSelectEquipment() {
this.$refs.itemSelect.showFlag = true;
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) {
//
const currentValue = row[column.property];
//
const preRow = this.checkList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.checkList.length; i++) {
const nextRow = this.checkList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
if (columnIndex === 1) {
//
const currentValue = row[column.property];
//
const preRow = this.checkList[rowIndex - 1];
const preValue = preRow ? preRow[column.property] : null;
//
if (currentValue === preValue) {
return { rowspan: 0, colspan: 0 };
} else {
//
let rowspan = 1;
for (let i = rowIndex + 1; i < this.checkList.length; i++) {
const nextRow = this.checkList[i];
const nextValue = nextRow[column.property];
if (nextValue === currentValue) {
rowspan++;
} else {
break;
}
}
return { rowspan, colspan: 1 };
}
}
},
},
};
</script>
<style>
.standardUrl_body {
height: 400px;
overflow-y: auto;
}
</style>

@ -0,0 +1,296 @@
<template>
<el-dialog
title="设备选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="1100px"
center
:before-close="cancelEquipmentForm"
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24">
<el-card>
<span>请选择设备类型</span>
<div class="head-container" style="text-align: center">
<el-tree
:data="treeData1"
:props="{ id: 'equipmentTypeCode', label: 'equipmentTypeName' }"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-card>
</el-col>
<!--设备数据-->
<el-col :span="19" :xs="24">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="设备编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="itemList"
@selection-change="handleEquipmentSelectionChange"
ref="myTable"
>
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
></el-table-column>
<el-table-column
label="设备编码"
align="center"
key="itemCode"
prop="equipmentCode"
v-if="columns[0].visible"
>
</el-table-column>
<el-table-column
label="设备类型编码"
align="center"
key="itemTypeCode"
prop="equipmentTypeCode"
v-if="columns[2].visible"
>
</el-table-column>
<el-table-column
label="设备名称"
align="left"
key="itemName"
prop="equipmentName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEquipmentForm"> </el-button>
<el-button @click="cancelEquipmentForm"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {
getEquipmentList,
getEquipmentTypeList,
} from "@/api/device/faultReport";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
// components: { Treeselect },
data() {
return {
treeData1: [],
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
equipmentTypeCode: undefined,
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: null,
equipmentTypeCode: null,
itemTypeId: 0,
itemCodeGet: "",
itemCode: null,
equipmentCode: null,
equipmentName: null,
},
//
columns: [
{ key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true },
],
};
},
created() {
this.getList();
this.getEquipmentType();
},
methods: {
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleEquipmentSelectionChange(val) {
this.itemList = val;
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName;
getEquipmentList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
console.log(response.rows);
this.treeData1 = response.rows;
console.log(this.treeData1);
});
},
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode);
this.handleQuery();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.handleQuery();
},
//
handleEquipmentSelectionChange(selection) {
this.ids = selection.map((item) => item.equipmentCode);
this.single = selection.length !== 1;
this.multiple = !selection.length;
console.log("多选框", this.ids);
},
submitEquipmentForm() {
const data = this.ids;
if (data.length > 1) {
Message.warning("只能选择一个报修机器,请勿选择多个!");
} else {
const equipmentCode = data.toString();
if (this.queryParams.itemCodeGet == "") {
this.queryParams.itemCodeGet = equipmentCode;
} else {
this.queryParams.itemCodeGet =
this.queryParams.itemCodeGet + "," + equipmentCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
},
cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
},
},
};
</script>

@ -43,7 +43,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单状态" prop="orderStatus">
<el-form-item label="工单状态" prop="planStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable>
<el-option
v-for="dict in dict.type.device_order_status"
@ -53,7 +53,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop">
<el-form-item label="循环周期" prop="planLoopType">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
@ -111,7 +111,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-form-item v-if="false" label="设备名称" prop="equipmentName">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
@ -127,7 +127,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="点检人" prop="planPerson">
<el-form-item label="保养人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入点检人"
@ -692,158 +692,138 @@
<el-dialog
title="备件领用"
:visible.sync="spareDialog"
width="900px"
width="50%"
append-to-body
>
<el-tabs type="border-card">
<el-tab-pane label="备件选择">
<el-form :model="spareQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="备件编码">
<el-input
v-model="spareQuery.materialCode"
placeholder="请输入备件编码"
clearable
/>
</el-form-item>
<el-form-item label="备件名称">
<el-input
v-model="spareQuery.materialDesc"
placeholder="请输入备件名称"
clearable
/>
</el-form-item>
<el-form-item v-if="false" label="备件类型">
<el-input
v-model="spareQuery.spareType"
placeholder="请输入备件类型"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSpareList"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSpare"></el-button>
</el-form-item>
</el-form>
<!-- 搜索-备件列表 -->
<el-table
:data="spareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column v-if="false" type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="addSpareList(scope.row)" type="text" size="small">添加</el-button>
</template>
</el-table-column>
</el-table>
<!-- 备件申领 -->
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="choseSpareBtn">
选择备件
</el-button>
</el-col>
</el-row>
<el-table
border
:data="chooseSpareList"
v-loading="spareLoading"
stripe
style="width: 100%">
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="delSpareList(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="spareTotal>0"
:total="spareTotal"
:page.sync="spareQuery.pageNum"
:limit.sync="spareQuery.pageSize"
@pagination="getSpareList"
/>
<!-- 选择备件 -->
<el-dialog
title="选择备件"
:visible.sync="selectSpareDialog"
width="60%"
append-to-body
>
<el-form :model="spareQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="备件编码">
<el-input
v-model="spareQuery.materialCode"
placeholder="请输入备件编码"
clearable
/>
</el-form-item>
<el-form-item label="备件名称">
<el-input
v-model="spareQuery.materialDesc"
placeholder="请输入备件名称"
clearable
/>
</el-form-item>
<el-form-item v-if="false" label="备件类型">
<el-input
v-model="spareQuery.spareType"
placeholder="请输入备件类型"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSpareList"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSpare"></el-button>
</el-form-item>
</el-form>
<!-- 搜索-备件列表 -->
<el-table
:data="spareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
prop="storageAmount"
label="冻结数量">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.applyNum" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
</el-table>
<pagination
v-show="spareTotal>0"
:total="spareTotal"
:page.sync="spareQuery.pageNum"
:limit.sync="spareQuery.pageSize"
@pagination="getSpareList"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="spareDialog = false"> </el-button>
<span slot="footer" class="dialog-footer">
<el-button @click="selectSpareDialog = false"> </el-button>
<el-button type="primary" @click="confirmSelectSpareBtn"> </el-button>
</span>
</el-tab-pane>
<el-tab-pane label="备件数量">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="applyNumDialog = true , applyNum = null">
领用数量
</el-button>
</el-col>
</el-row>
<el-table
:data="chooseSpareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.applyNum" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="delSpareList(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="申领数量"
:visible.sync="applyNumDialog"
width="30%"
append-to-body
>
<el-row>
<el-col :span="8" :offset="7">
<el-input-number v-model="applyNum" @change="changeApplySpareNum" :min="1" label="描述文字"></el-input-number>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button v-if="false" @click="applyNumDialog = false"> </el-button>
<el-button type="primary" @click="applyNumDialog = false"> </el-button>
</span>
</el-dialog>
</el-tab-pane>
<el-button type="primary" class="dialog-footer" @click="spareChangeCom"></el-button>
</el-tabs>
</el-dialog>
</el-dialog>
</el-tab-pane>
@ -1175,8 +1155,7 @@
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
<el-button @click="workDetail = false"> </el-button>
</span>
</el-dialog>
</div>
@ -1190,7 +1169,7 @@ import {
addUpkeepOrder,
updateUpkeepOrder, subInspect
} from "@/api/device/upkeepOrder";
import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan";
import {formatEquItem, formatEquItemNoCondition, querySpareList} from "@/api/device/upkeepPlan";
import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan";
import {delDeviceOrder, getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {getInspectionWork, updateInspectionWork} from "@/api/device/inspectionWork";
@ -1200,6 +1179,10 @@ export default {
dicts: ['device_order_status', 'device_loop_type','device_reach_standard','device_upkeep_type','device_inspect_status'],
data() {
return {
// list
spareOnList:[],
//
selectSpareDialog:false,
standardListVo:[],
workDetail:false,
// VO
@ -1337,6 +1320,7 @@ export default {
open: false,
//
queryParams: {
orderInspect:null,
pageNum: 1,
pageSize: 10,
planId: null,
@ -1398,6 +1382,32 @@ export default {
this.getList();
},
methods: {
//
setSpareList() {
querySpareList(this.spareQuery).then(response => {
this.spareTotal = response.total;
this.spareList = response.rows;
this.spareLoading = false;
})
},
// btn
choseSpareBtn(){
//
this.spareOnList = [];
//
this.selectSpareDialog = true;
},
//
handleEdit(index, row) {
// -
if ((Number(row.amount)-Number(row.storageAmount)) < Number(row.applyNum)) {
this.$message({
message: '领用最大数量为:'+(Number(row.amount)-Number(row.storageAmount)),
type: 'warning'
})
row.applyNum = (Number(row.amount)-Number(row.storageAmount));
}
},
//
resetEqu() {
this.equipmentQuery = {
@ -1409,14 +1419,16 @@ export default {
};
this.getEquList();
},
//
handleEdit(index, row) {
if (row.amount < Number(row.applyNum)) {
this.$message({
message: '超过库存数量!',
type: 'warning'
})
row.applyNum = row.amount;
// -
delSpareList(e) {
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.chooseSpareList.splice(i,1);
this.$message({
message: '删除成功!',
type: 'success'
})
}
}
},
//
@ -1625,7 +1637,7 @@ export default {
this.form.equipmentItem = [];
//
formatEquItem(this.selectEquList).then(response => {
formatEquItemNoCondition(this.selectEquList).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
@ -1664,17 +1676,48 @@ export default {
this.selOnSpare[i].applyNum = e;
}
},
// -
delSpareList(e) {
//
confirmSelectSpareBtn() {
if (this.spareOnList.length == 0) {
this.$message({
message: "请勾选要申领的备件!",
type: "warning"
})
return
}
for (let i = 0; i < this.chooseSpareList.length; i++){
if (this.chooseSpareList[i].materialCode == e.materialCode) {
this.chooseSpareList.splice(i,1);
this.$message({
message: '删除成功!',
type: 'success'
})
for (let j = 0; j < this.spareOnList.length; j++) {
if (this.chooseSpareList[i].materialCode == this.spareOnList[j].materialCode) {
this.$message({
message: '不可重复添加!',
type: 'warning'
})
return;
}
}
}
for (let j = 0; j < this.spareOnList.length; j++) {
if (this.spareOnList[j].applyNum == null) {
this.spareOnList[j].applyNum=1;
}
this.chooseSpareList.push(this.spareOnList[j]);
}
this.$message({
message: '添加成功!',
type: 'success'
})
//
this.selectSpareDialog = false;
},
//
selectChangeSpare(e) {
//
this.spareOnList = [];
//
this.spareOnList = e;
},
// -
addSpareList(e) {
@ -1696,13 +1739,6 @@ export default {
//
changeArray(e) {
},
//
confirmSelectSpareBtn() {
},
//
selectChangeSpare(e) {
this.selOnSpare = e;
},
//
resetSpare() {
this.spareQuery = {
@ -1713,18 +1749,6 @@ export default {
};
this.setSpareList();
},
//
setSpareList() {
querySpareList(this.spareQuery).then(response => {
this.spareTotal = response.total;
this.spareList = response.rows;
// -
for (let i = 0; i < this.spareList.length; i++) {
this.spareList[i].amount = Number(this.spareList[i].amount) - Number(this.spareList[i].storageAmount)
}
this.spareLoading = false;
})
},
//
getSpareList() {
this.setSpareList()
@ -1755,6 +1779,7 @@ export default {
//
reset() {
this.form = {
queryParams:null,
orderId: null,
planId: null,
planCode: null,

@ -675,155 +675,135 @@
width="50%"
append-to-body
>
<el-tabs type="border-card">
<el-tab-pane label="备件选择">
<el-form :model="spareQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="备件编码">
<el-input
v-model="spareQuery.materialCode"
placeholder="请输入备件编码"
clearable
/>
</el-form-item>
<el-form-item label="备件名称">
<el-input
v-model="spareQuery.materialDesc"
placeholder="请输入备件名称"
clearable
/>
</el-form-item>
<el-form-item v-if="false" label="备件类型">
<el-input
v-model="spareQuery.spareType"
placeholder="请输入备件类型"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSpareList"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSpare"></el-button>
</el-form-item>
</el-form>
<!-- 搜索-备件列表 -->
<el-table
:data="spareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column v-if="false" type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="addSpareList(scope.row)" type="text" size="small">添加</el-button>
</template>
</el-table-column>
</el-table>
<!-- 备件申领 -->
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="choseSpareBtn">
选择备件
</el-button>
</el-col>
</el-row>
<el-table
border
:data="chooseSpareList"
v-loading="spareLoading"
stripe
style="width: 100%">
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
</el-table-column>
<el-table-column
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="delSpareList(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="spareTotal>0"
:total="spareTotal"
:page.sync="spareQuery.pageNum"
:limit.sync="spareQuery.pageSize"
@pagination="getSpareList"
/>
<!-- 选择备件 -->
<el-dialog
title="选择备件"
:visible.sync="selectSpareDialog"
width="60%"
append-to-body
>
<el-form :model="spareQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="备件编码">
<el-input
v-model="spareQuery.materialCode"
placeholder="请输入备件编码"
clearable
/>
</el-form-item>
<el-form-item label="备件名称">
<el-input
v-model="spareQuery.materialDesc"
placeholder="请输入备件名称"
clearable
/>
</el-form-item>
<el-form-item v-if="false" label="备件类型">
<el-input
v-model="spareQuery.spareType"
placeholder="请输入备件类型"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSpareList"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetSpare"></el-button>
</el-form-item>
</el-form>
<!-- 搜索-备件列表 -->
<el-table
:data="spareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
prop="storageAmount"
label="冻结数量">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.applyNum" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="spareDialog = false"> </el-button>
<pagination
v-show="spareTotal>0"
:total="spareTotal"
:page.sync="spareQuery.pageNum"
:limit.sync="spareQuery.pageSize"
@pagination="getSpareList"
/>
<span slot="footer" class="dialog-footer">
<el-button @click="selectSpareDialog = false"> </el-button>
<el-button type="primary" @click="confirmSelectSpareBtn"> </el-button>
</span>
</el-tab-pane>
<el-tab-pane label="备件数量">
<el-row>
<el-col class="my-step-mar" :span="1.5">
<el-button
type="primary"
plain
size="mini"
@click="applyNumDialog = true , applyNum = null">
领用数量
</el-button>
</el-col>
</el-row>
<el-table
:data="chooseSpareList"
v-loading="spareLoading"
stripe
@selection-change="selectChangeSpare"
style="width: 100%">
<el-table-column type="selection" width="55" align="center"/>
<el-table-column
prop="materialCode"
label="备件号">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="amount"
label="库存数量">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
<template slot-scope="scope">
<el-input size="small" v-model="scope.row.applyNum" @change="handleEdit(scope.$index,scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column
width="150"
fixed="right"
label="操作"
>
<template slot-scope="scope">
<el-button @click="delSpareList(scope.row)" type="text" size="small">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog
title="申领数量"
:visible.sync="applyNumDialog"
width="30%"
append-to-body
>
<el-row>
<el-col :span="8" :offset="7">
<el-input-number v-model="applyNum" @change="changeApplySpareNum" :min="1" label="描述文字"></el-input-number>
</el-col>
</el-row>
<span slot="footer" class="dialog-footer">
<el-button v-if="false" @click="applyNumDialog = false"> </el-button>
<el-button type="primary" @click="applyNumDialog = false"> </el-button>
</span>
</el-dialog>
</el-tab-pane>
<el-button type="primary" class="dialog-footer" @click="spareChangeCom"></el-button>
</el-tabs>
</el-dialog>
</el-dialog>
@ -893,15 +873,27 @@ import {
delUpkeepPlan,
addUpkeepPlan,
updateUpkeepPlan,
formatEquItem, setSpareList, querySpareList
formatEquItem, setSpareList, querySpareList, formatEquItemNoCondition
} from "@/api/device/upkeepPlan";
import {delPlan, getEquList, getPersonList, getWorkCenter, initUpdatePlanInfo, listPlan} from "@/api/device/plan";
import {
addPlan,
delPlan,
getEquList,
getPersonList,
getWorkCenter,
initUpdatePlanInfo,
listPlan, updatePlan
} from "@/api/device/plan";
export default {
name: "UpkeepPlan",
dicts: ['device_loop_type', 'sys_normal_disable','device_upkeep_type'],
data() {
return {
// list
spareOnList:[],
//
selectSpareDialog:false,
//
pickerOptions: {
shortcuts: [{
@ -1061,14 +1053,22 @@ export default {
this.setWorkCenter();
},
methods: {
// btn
choseSpareBtn(){
//
this.spareOnList = [];
//
this.selectSpareDialog = true;
},
//
handleEdit(index, row) {
if (row.amount < Number(row.applyNum)) {
// -
if ((Number(row.amount)-Number(row.storageAmount)) < Number(row.applyNum)) {
this.$message({
message: '超过库存数量!',
message: '领用最大数量为:'+(Number(row.amount)-Number(row.storageAmount)),
type: 'warning'
})
row.applyNum = row.amount;
row.applyNum = (Number(row.amount)-Number(row.storageAmount));
}
},
//
@ -1212,10 +1212,46 @@ export default {
},
//
confirmSelectSpareBtn() {
if (this.spareOnList.length == 0) {
this.$message({
message: "请勾选要申领的备件!",
type: "warning"
})
return
}
for (let i = 0; i < this.chooseSpareList.length; i++){
for (let j = 0; j < this.spareOnList.length; j++) {
if (this.chooseSpareList[i].materialCode == this.spareOnList[j].materialCode) {
this.$message({
message: '不可重复添加!',
type: 'warning'
})
return;
}
}
}
for (let j = 0; j < this.spareOnList.length; j++) {
if (this.spareOnList[j].applyNum == null) {
this.spareOnList[j].applyNum=1;
}
this.chooseSpareList.push(this.spareOnList[j]);
}
this.$message({
message: '添加成功!',
type: 'success'
})
//
this.selectSpareDialog = false;
},
//
selectChangeSpare(e) {
this.selOnSpare = e;
//
this.spareOnList = [];
//
this.spareOnList = e;
},
//
resetSpare() {
@ -1232,10 +1268,6 @@ export default {
querySpareList(this.spareQuery).then(response => {
this.spareTotal = response.total;
this.spareList = response.rows;
// -
for (let i = 0; i < this.spareList.length; i++) {
this.spareList[i].amount = Number(this.spareList[i].amount) - Number(this.spareList[i].storageAmount)
}
this.spareLoading = false;
})
},
@ -1258,7 +1290,7 @@ export default {
for (let i = 0; i < response.data.length; i++) {
this.personList.push({
label: response.data[i].nickName + '(' + response.data[i].userName + ')',
key: response.data[i].userId,
key: response.data[i].userName,
})
}
});
@ -1369,14 +1401,25 @@ export default {
}
//
formatEquItem(this.selectEquList).then(response => {
if (this.form.calculationRule == "2"){
formatEquItem(this.selectEquList).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
this.selectEqu = false;
})
this.selectEqu = false;
})
}else {
formatEquItemNoCondition(this.selectEquList).then(response => {
for (let i = 0; i < response.data.length; i++) {
this.form.equipmentItem.push(response.data[i]);
}
this.selectEqu = false;
})
}
},
//
@ -1628,16 +1671,24 @@ export default {
}
this.planLoading = true;
if (this.form.planId != null) {
this.form.personList = this.selectPersonList;
updateUpkeepPlan(this.form).then(response => {
this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
updatePlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
this.form.personList = this.selectPersonList;
addUpkeepPlan(this.form).then(response => {
this.form.personList = this.selectPersonList.map(item => {
return{
userName: item.toString()
}
});
addPlan(this.form).then(response => {
this.planLoading = false;
this.$modal.msgSuccess("新增成功");
this.open = false;

@ -0,0 +1,188 @@
<template>
<div class="progress">
<svg
:style="{ transform: clockWise ? 'rotateY(0deg)' : 'rotateY(180deg)' }"
xmlns="http://www.w3.org/2000/svg"
width="100%"
height="100%"
viewBox="0 0 400 400"
>
<!-- 定义渐变色 -->
<defs v-if="showGradient">
<linearGradient
:id="gradient.id"
:x1="gradient.x1"
:y1="gradient.y1"
:x2="gradient.x2"
:y2="gradient.y2"
>
<stop
v-for="(item, index) in gradient.colorStops"
:key="index"
:offset="item.offset"
:stop-color="item.color"
/>
</linearGradient>
</defs>
<!-- 底部背景圆环 -->
<circle
cx="200"
cy="200"
:r="radius"
:stroke="bgRingColor"
:stroke-width="strokeWidth"
fill="none"
/>
<!-- 进度条圆环 -->
<circle
class="progress-bar"
cx="200"
cy="200"
:r="radius"
:stroke="showGradient ? `url(#${gradient.id})` : ringColor"
:stroke-width="strokeWidth"
:stroke-linecap="strokeLinecap"
fill="none"
transform="rotate(-90, 200, 200)"
:stroke-dasharray="strokeDasharray"
:stroke-dashoffset="strokeDashoffset"
/>
<!-- 环形分割细线 -->
<circle
cx="200"
cy="200"
:r="radius"
stroke="#071727"
fill="transparent"
:stroke-width="strokeWidth + 2"
:stroke-dasharray="strokeDasharray1"
transform="rotate(-90, 200, 200)"
></circle>
</svg>
<!-- 中间描述文字 -->
<div class="progress-desc">
<slot></slot>
</div>
</div>
</template>
<script>
export default {
name: "Progress",
props: {
rate: {
type: Number,
default: 0,
},
bgRingColor: {
type: String,
default: "#25b489",
},
ringColor: {
type: String,
default: "#67C23A",
},
strokeLinecap: {
type: String,
default: "round",
},
strokeWidth: {
type: Number,
default: 20,
},
part: {
type: Number,
default: 20,
},
partGap: {
type: Number,
default: 12,
},
showGradient: {
type: Boolean,
default: false,
},
clockWise: {
type: Boolean,
default: true,
},
gradient: {
type: Object,
default: () => {
return {
id: "svg-linear-gradient",
x1: "0%",
y1: "0%",
x2: "0%",
y2: "100%",
colorStops: [
{
offset: "0%",
color: "yellow",
},
{
offset: "100%",
color: "orange",
},
],
};
},
},
},
computed: {
radius() {
return 200 - this.strokeWidth / 2;
},
strokeDasharray() {
let value = 0;
/*
当stroke-linecap的值为round时结尾处会向外延伸描边宽度的一半
首尾两个端点所以就是描边的宽度
*/
if (this.strokeLinecap === "round") {
value = 2 * Math.PI * this.radius + this.strokeWidth;
} else {
value = 2 * Math.PI * this.radius;
}
return value;
},
strokeDashoffset() {
let val = 0;
let rate = this.rate;
if (rate > 1) {
rate = 1;
} else if (rate < 0) {
rate = 0;
}
if (this.strokeLinecap === "round") {
val = 2 * Math.PI * this.radius * (1 - rate) + this.strokeWidth;
} else {
val = 2 * Math.PI * this.radius * (1 - rate);
}
return val;
},
strokeDasharray1() {
var partLength = (2 * Math.PI * this.radius) / this.part;
return `${this.partGap} ${partLength - this.partGap}`;
},
},
};
</script>
<style scoped>
.progress {
position: relative;
width: 100%;
height: 100%;
}
.progress-desc {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
font-family: "Microsoft YaHei";
font-size: 20px;
text-align: center;
}
.progress-bar {
transition: stroke-dashoffset 2s ease;
}
</style>

File diff suppressed because it is too large Load Diff

@ -34,7 +34,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报工时间" prop="feedbackTimeArray">
<el-form-item label="生产时间" prop="feedbackTimeArray">
<el-date-picker
v-model="queryParams.feedbackTimeArray"
format="yyyy-MM-dd"
@ -150,6 +150,7 @@
>{{scope.row.workorderCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="sap工单编码" align="center" prop="workorderCodeSap" width="130"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="130"
:formatter="productCodeFormate"
/>
@ -161,7 +162,7 @@
<el-table-column label="累计报工数量" align="center" prop="quantityFeedback" width="100"/>
<el-table-column label="累计用人数" align="center" prop="useMan" width="100"/>
<el-table-column label="累计工时" align="center" prop="workTime" />
<el-table-column label="报工时间" align="center" prop="feedbackTimeStr" width="100"/><!--加时分秒生成报工单的逻辑要变切记-->
<el-table-column label="生产时间" align="center" prop="productDate" width="100"/>
<el-table-column label="SAP报工状态" align="center" prop="uploadStatus" width="150"/>
<el-table-column label="SAP报工时间" align="center" prop="uploadTime" width="150"/>
@ -724,7 +725,7 @@ export default {
var y = dd.getFullYear();
var m = dd.getMonth() + 1;//
var d = dd.getDate();
return y + "-" + m + "-" + d+" 00:00:00";
return y + "-" + m + "-" + d;
},
/** 查询报工报表列表 */
@ -736,8 +737,8 @@ export default {
}**/
if(this.queryParams.feedbackTimeArray !=null && this.queryParams.feedbackTimeArray.length>0){
this.queryParams.feedbackTimeStart = moment(this.queryParams.feedbackTimeArray[0]).format('YYYY-MM-DD 00:00:00');
this.queryParams.feedbackTimeEnd = moment(this.queryParams.feedbackTimeArray[1]).format('YYYY-MM-DD 23:59:59');
this.queryParams.feedbackTimeStart = moment(this.queryParams.feedbackTimeArray[0]).format('YYYY-MM-DD');
this.queryParams.feedbackTimeEnd = moment(this.queryParams.feedbackTimeArray[1]).format('YYYY-MM-DD');
}
this.loading = true;
listReportWork(this.queryParams).then(response => {
@ -773,7 +774,7 @@ export default {
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
if (!values.every(value => isNaN(value))&& column.label!='用人数') {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {

@ -105,8 +105,8 @@
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则名称" align="center" prop="ruleName" />
<el-table-column label="标准值" align="left" prop="standardValue" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="标准值" align="left" prop="standardValue" :show-overflow-tooltip="true" width="250"/>
<el-table-column label="上差值" align="left" prop="upperDiff" />
<el-table-column label="下差值" align="left" prop="downDiff" />
<el-table-column label="单位" align="center" prop="unit" />
@ -166,7 +166,7 @@
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="规则名称" prop="projectId">
<el-select v-model="form.projectId" @change="handleChange" placeholder="请选择检验规则属性" >
<el-select filterable v-model="form.projectId" @change="handleChange" placeholder="请选择检验规则属性" >
<el-option
v-for="item in checkRuleList"
:key="item.id"
@ -221,6 +221,11 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 选择检测项目 -->
<SelectProject ref="child"
:workorderCode="form.workorderCode"
@onSelected="onSelectProjects"
></SelectProject>
</div>
</template>
@ -231,16 +236,17 @@ import {
delCheckTypeProject,
addCheckTypeProject,
updateCheckTypeProject,
changeStatus
changeStatus,
submitProjects
} from "@/api/quality/checkTypeProject";
import MaterialGroupAdd from "./MaterialGroupAdd.vue";
import {listCheckType} from "@/api/quality/checkType";
import {listProject} from "@/api/quality/project";
import {getProjectList} from "@/api/quality/project";
import SelectProject from "./selectProject.vue";
export default {
name: "CheckTypeProject",
dicts: ["qc_rule_prop",'unit'],
components: {MaterialGroupAdd,},
components: {MaterialGroupAdd,SelectProject},
data() {
return {
//
@ -310,8 +316,8 @@ export default {
methods: {
/**获取检测项目列表**/
getProjectList(){
listProject().then((response) => {
this.checkRuleList = response.rows;
getProjectList().then((response) => {
this.checkRuleList = response;
});
},
/** 查询物料检验项目维护列表 */
@ -355,6 +361,7 @@ export default {
groupId: null,
materialCode: null,
projectNo: null,
projectInfos:[]
};
this.resetForm("form");
},
@ -414,12 +421,17 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加物料检验项目维护";
this.form.groupId = this.groupId;
this.form.materialCode = this.materialCode;
this.form.typeId = this.editableTabsValue;
if(this.groupId==null||this.materialCode){
this.$modal.msgError("请点击左侧节点");
return
};
if(this.queryParams.typeId==null){
this.$modal.msgError("请选择头部节点");
retrun
};
this.$refs.child.showFlag = true;
this.$refs.child.init(this.groupId,this.materialCode,this.queryParams.typeId);
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -525,6 +537,25 @@ export default {
row.status = row.status === "0" ? "1" : "0";
});
},
//
onSelectProjects(objs) {
let _this = this;
objs.forEach(function(item,index,arr){
item.projectId = item.id;
item.projectNo = item.orderNum;
item.unit = item.unitCode;
item.standardValue = item.checkStandard;
item.typeId = _this.queryParams.typeId;
item.groupId = _this.groupId;
item.materialCode = _this.materialCode;
});
submitProjects(objs).then(response => {
this.$modal.msgSuccess("提交成功");
this.open = false;
this.getList();
});
},
},
};
</script>

@ -0,0 +1,170 @@
<template>
<el-dialog title="检测项选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="检测项目名称">
<el-input
v-model="queryParams.ruleName"
placeholder="检测项目名称"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="检测项目Id" align="left" key="id" prop="id" v-if="false" />
<el-table-column label="检测项目编号" align="left" key="orderNum" prop="orderNum" width="110"/>
<el-table-column label="检测项目名称" align="left" key="ruleName" prop="ruleName" width="250" :show-overflow-tooltip="true" />
<el-table-column label="规则属性" align="left" prop="propertyCode">
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="检测标准" align="left" prop="checkStandard" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="上差值" align="center" prop="upperDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.upperDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'></el-input>
</template>
</el-table-column>
<el-table-column label="下差值" align="center" prop="downDiff" width="100">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.downDiff" @change="handleEdit(scope.$index,scope.row)"
:disabled='scope.row.propertyCode=="0"'
></el-input>
</template>
</el-table-column>
<el-table-column label="测量单位" align="left" prop="unitCode" width="90"/>
<el-table-column label="抽样方案" align="left" prop="samplePlan" width="100"/>
<el-table-column label="合格判定" align="left" prop="judge"/ width="100">
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitProjectItems"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getProjectInfoList } from "@/api/quality/checkTypeProject";
export default {
name: "itemSelectUser",
dicts: ["qc_rule_prop"],
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
selectionRows:[],
//
queryParams: {
pageNum: 1,
pageSize: 10,
groupId:null,
materialCode:null,
typeCode:null
}
};
},
created() {
//this.getList();
},
methods: {
init(groupId,materialCode,typeId){
this.queryParams.groupId = groupId;
this.queryParams.materialCode = materialCode;
this.queryParams.typeCode = typeId;
this.getList();
},
/** 查询表格列表*/
getList() {
this.loading = true;
getProjectInfoList(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
this.selectionRows = selection
},
handleEdit(index, row) {
console.log('row:',index, row);
},
submitProjectItems() {
if ( this.selectionRows==0) {
this.$modal.msgError(`请选择数据`);
return false;
}
this.$emit('onSelected', this.$refs.myTable.selection);
this.showFlag = false;
},
}
};
</script>

@ -92,8 +92,8 @@
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="检验规则编号" align="center" prop="orderNum" width="100"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" width="100"/>
<el-table-column label="检验规则编号" align="center" prop="orderNum" width="110"/>
<el-table-column label="检验规则名称" align="center" prop="ruleName" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="检验规则属性" align="center" prop="propertyCode" width="100">
<template slot-scope="scope">
<dict-tag
@ -108,7 +108,6 @@
<el-table-column label="单位" align="center" prop="unitCode" >
<template slot-scope="scope"><dict-tag :options="dict.type.unit" :value="scope.row.unitCode"/></template>
</el-table-column>
<el-table-column label="检验标准" align="center" prop="checkStandard" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="合格判定" align="center" prop="judge" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
@ -207,6 +206,13 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="缺陷等级" prop="defectLevel">
<el-input type='textarea' v-model="form.defectLevel" placeholder="请输入检验标准" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="合格判定" prop="judge">

@ -150,7 +150,6 @@ export default {
this.selectedRows.name = this.idsName;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
}
};

@ -62,7 +62,7 @@
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="检测地点" prop="checkLoc">
<el-input
v-model="queryParams.checkLoc"
@ -78,7 +78,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="检验时间" prop="checkTimeArray">
<el-date-picker
v-model="queryParams.checkTimeArray"
@ -162,10 +162,10 @@
<el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="checkType" align="center" prop="checkType" v-if="false"/>
<el-table-column label="任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="120"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true" />
<el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="250" :show-overflow-tooltip="true" />
<el-table-column label="数量" align="center" prop="quality" />
<el-table-column label="抽样数量" align="center" prop="sampleQuality" />
<el-table-column label="不合格数量" align="center" prop="noOkQuality" width="120"/>
@ -242,7 +242,6 @@
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
@ -256,8 +255,10 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="工单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入工单号" />
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请选择订单号" >
<el-button slot="append" @click="handleSelectWorkOrder" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
@ -280,13 +281,7 @@
</el-form-item>
</el-col>
</el-row>
<el-row
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入批次号" />
</el-form-item>
</el-col>
<el-row>
<el-col :span="8">
<el-form-item label="生产时间" prop="incomeTime">
<el-date-picker clearable
@ -310,6 +305,18 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-select v-model="form.incomeBatchNo" class="selectItem" placeholder="请选择批次" clearable>
<el-option v-for="(item,index) in batchList"
:key="index"
:label="item.batchCode"
:value="item.batchCode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
@ -372,6 +379,11 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--订单选择弹窗-->
<ItemSelectWorkOrder
ref="itemSelectWorkOrder"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrder>
<!--工作中心(车间)选择弹窗-->
<ItemSelectWorkCenter
ref="itemSelectWorkCenter"
@ -391,14 +403,17 @@
</template>
<script>
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,getCheckTypes,changeProduceStatus } from "@/api/quality/qcProduce";
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,
getCheckTypes,changeProduceStatus,getBatchList
} from "@/api/quality/qcProduce";
import moment from 'moment';
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectWorkCenter from "./selectWorkCenter.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue";
import ItemSelectProject from "../qcIncome/checkProjectType.vue";
export default {
name: "QcProduce",
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject},
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
dicts: ["unit","check_status","check_result"],
data() {
return {
@ -453,7 +468,7 @@ export default {
form: {},
checkTypes:[],
batchList:[],
//
rules: {
incomeBatchNo: [
@ -655,6 +670,23 @@ export default {
});
},
/**工单选择弹出框**/
handleSelectWorkOrder() {
this.$refs.itemSelectWorkOrder.showFlag = true;
},
//
onSelectWorkOrder(obj) {
this.form.orderNo = obj.orderNo;
this.form.materialName = obj.materialName;
this.form.materialCode = obj.materialCode;
this.form.quality = obj.quality;
this.form.unit = obj.unit;
this.form.incomeTime = obj.incomeTime;
getBatchList(obj.workorderCode).then(response => {
this.batchList = response;
});
},
/**工作中心选择弹出框**/
handleSelectWorkCenter() {
this.$refs.itemSelectWorkCenter.showFlag = true;

@ -0,0 +1,139 @@
<template>
<el-dialog title="生产订单号选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="订单号">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="180"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="180"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" />
<el-table-column label="生产日期" align="left" prop="incomeTime" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitLLOrderForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getWorkOrder } from "@/api/quality/income";
export default {
name: "itemSelectWorkOrder",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: ''
},
selectionRow:{}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getWorkOrder(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
}
this.selectionRow = selection[0]
},
submitLLOrderForm() {
this.$emit('onSelected', this.selectionRow);
this.showFlag = false;
}
}
};
</script>

@ -9,6 +9,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input
v-model="queryParams.incomeBatchNo"
@ -17,6 +18,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!--
<el-form-item label="订单号" prop="orderNo">
<el-input
v-model="queryParams.orderNo"
@ -24,7 +26,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="物料号" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -33,6 +35,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!--
<el-form-item label="物料名称" prop="materialName">
<el-input
v-model="queryParams.materialName"
@ -40,7 +43,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="仓库名称" prop="supplierName">
<el-input
v-model="queryParams.supplierName"
@ -59,6 +62,7 @@
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="检测地点" prop="checkLoc">
<el-input
v-model="queryParams.checkLoc"
@ -74,7 +78,7 @@
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
</el-form-item>-->
<el-form-item label="检验时间" prop="checkTime">
<el-date-picker
v-model="queryParams.checkTimeArray"
@ -157,10 +161,10 @@
<el-table-column label="id" align="center" prop="recordId" v-if="false"/>
<el-table-column label="checkType" align="center" prop="checkType" v-if="false"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="120"/>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170" />
<el-table-column label="物料名称" align="center" prop="materialName" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="仓库编码" align="center" prop="supplierCode" width="120"/>
@ -235,19 +239,28 @@
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库批次号" prop="incomeBatchNo">
<el-input v-model="form.incomeBatchNo" placeholder="请输入入库批次号" />
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
<el-input v-model="form.orderNo" placeholder="请选择订单号" >
<el-button slot="append" @click="handleSelectWorkOrder" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName" placeholder="请选择物料名称">
<el-button slot="append" @click="handleSelectMaterial" icon="el-icon-search"></el-button>
@ -255,30 +268,28 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="8">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode" placeholder="请输入物料号" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="入库时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择入库时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
@ -291,6 +302,17 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-select v-model="form.incomeBatchNo" class="selectItem" placeholder="请选择批次" clearable>
<el-option v-for="(item,index) in batchList"
:key="index"
:label="item.batchCode"
:value="item.batchCode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
@ -305,16 +327,7 @@
<el-input v-model="form.supplierCode" placeholder="请输入仓库编码" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="入库时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择入库时间">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
@ -341,6 +354,11 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--订单选择弹窗-->
<ItemSelectWorkOrder
ref="itemSelectWorkOrder"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrder>
<!--产品物料选择弹窗-->
<ItemSelectMaterial
ref="itemSelectMaterial"
@ -366,7 +384,9 @@
<script>
import { listWarehousing, getWarehousing, delWarehousing, addWarehousing, updateWarehousing } from "@/api/quality/warehousing";
import { getBatchList} from "@/api/quality/qcProduce";
import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectMaterial from "../qcIncome/selectMaterial.vue";
import ItemSelectLoc from "./selectLoc.vue";
import ItemSelectUser from "../qcIncome/selectUser.vue";
@ -374,7 +394,7 @@ import ItemSelectProject from "../qcIncome/checkProjectType.vue";
import moment from 'moment';
export default {
name: "Warehousing",
components: { ItemSelectMaterial,ItemSelectLoc,ItemSelectUser,ItemSelectProject},
components: { ItemSelectMaterial,ItemSelectLoc,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
dicts: ["unit","check_status","check_result"],
data() {
return {
@ -627,6 +647,22 @@ export default {
});
},
/**工单选择弹出框**/
handleSelectWorkOrder() {
this.$refs.itemSelectWorkOrder.showFlag = true;
},
//
onSelectWorkOrder(obj) {
this.form.orderNo = obj.orderNo;
this.form.materialName = obj.materialName;
this.form.materialCode = obj.materialCode;
this.form.quality = obj.quality;
this.form.unit = obj.unit;
this.form.incomeTime = obj.incomeTime;
getBatchList(obj.workorderCode).then(response => {
this.batchList = response;
});
},
/**物料选择弹出框**/
handleSelectMaterial() {
this.$refs.itemSelectMaterial.showFlag = true;

@ -0,0 +1,139 @@
<template>
<el-dialog title="生产订单号选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="订单号">
<el-input
v-model="queryParams.orderNo"
placeholder="订单号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="180"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="180"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" />
<el-table-column label="生产日期" align="left" prop="incomeTime" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitLLOrderForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getWorkOrder } from "@/api/quality/income";
export default {
name: "itemSelectWorkOrder",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
workorderCode: ''
},
selectionRow:{}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getWorkOrder(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
}
this.selectionRow = selection[0]
},
submitLLOrderForm() {
this.$emit('onSelected', this.selectionRow);
this.showFlag = false;
}
}
};
</script>

@ -116,7 +116,7 @@
>{{scope.row.routeCode}}</el-button>
</template>
</el-table-column>
<el-table-column label="产品编码" align="center" prop="productCode" width="250"/>
<el-table-column label="产品编码" align="center" prop="productCode" width="250" v-if="false"/>
<el-table-column label="工艺路线名称" align="center" prop="routeName" width="250"/>
<el-table-column label="工艺路线说明" align="center" prop="routeDesc" width="250"/>
<el-table-column label="工艺路线版本" align="center" prop="routeVersion" width="100"/>

@ -12,7 +12,7 @@
<el-input
v-model="queryParams.equipmentCode"
placeholder="请输入设备编码"
style="width: 180px"
style="width: 200px"
clearable
@keyup.enter.native="handleQuery"
/>
@ -22,7 +22,7 @@
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
style="width: 180px"
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -33,7 +33,7 @@
@change="$forceUpdate()"
clearable
filterable
style="width: 180px"
style="width: 200px"
@keyup.enter.native="handleQuery"
>
<el-option
@ -48,7 +48,7 @@
<el-select
v-model="queryParams.equipmentStatus"
placeholder="设备状态"
style="width: 180px"
style="width: 200px"
clearable
>
<el-option
@ -59,6 +59,22 @@
/>
</el-select>
</el-form-item>
<el-form-item label="设备类别" prop="equipmentStatus">
<el-select
v-model="queryParams.equipmentCategory"
placeholder="设备类别(组线/设备)"
style="width: 200px"
clearable
>
<el-option
v-for="dict in dict.type.equipment_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -184,7 +200,7 @@
></el-switch>
</template>
</el-table-column>
<el-table-column prop="equipmentStatus" label="设备状态" width="80">
<el-table-column prop="equipmentStatus" label="设备状态" width="100" align="center">
<template slot-scope="scope">
<dict-tag
:options="dict.type.equipment_status"
@ -192,6 +208,19 @@
/>
</template>
</el-table-column>
<el-table-column
align="center"
prop="equipmentCategory"
label="设备类别(组线/设备)"
width="150"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.equipment_category"
:value="scope.row.equipmentCategory"
/>
</template>
</el-table-column>
<el-table-column
label="设备类型编码"
align="center"
@ -328,6 +357,7 @@
<el-step title="设备使用状况"></el-step>
<el-step title="设备资产信息"></el-step>
<el-step title="设备绑定备件"></el-step>
<el-step title="设备绑定辅助设备" v-if="this.form.equipmentCategory == '1' "></el-step>
</el-steps>
</div>
<!-- 维修基本信息 -->
@ -459,6 +489,24 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="8">
<el-form-item label="设备类别" prop="equipmentCategory">
<el-select
v-model="form.equipmentCategory"
placeholder="请选择设备类别"
style="width: 195px"
>
<el-option
v-for="dict in dict.type.equipment_category"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="设备二维码" prop="qrFileList">
@ -512,23 +560,22 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="设备负责人" prop="equipmentHeadName">
<el-select
v-model="queryParams.equipmentHeadName"
<el-form-item label="设备负责人" prop="equipmentHead">
<el-input
v-model="form.equipmentHead"
placeholder="请选择设备负责人"
@change="$forceUpdate()"
filterable
clearable
style="width: 195px"
@keyup.enter.native="handleQuery"
>
<el-option
v-for="item in equipmentHeadOption"
:key="item.userName"
:label="item.teamUserName"
:value="item.userName"
></el-option>
</el-select>
<el-button
slot="append"
@click="handleSelectPerson"
icon="el-icon-search"
></el-button>
</el-input>
<ItemSelectPerson
ref="itemSelectPerson"
@onSelected="onItemSelectedPerson"
>
</ItemSelectPerson>
</el-form-item>
</el-col>
</el-row>
@ -617,8 +664,8 @@
</el-row>
</div>
<!-- 维修基本信息 -->
<div v-if="this.repairRecordSteps == 3" class="step-body">
<!-- 设备绑定备件 -->
<div v-if="this.repairRecordSteps == 3 " class="step-body">
<template>
<el-transfer
filterable
@ -631,16 +678,31 @@
</el-transfer>
</template>
</div>
<!-- 设备绑定辅助设备 -->
<div v-if="this.repairRecordSteps == 4 && this.form.equipmentCategory == '1' " class="step-body">
<template>
<el-transfer
filterable
filter-placeholder="请输入辅助设备名称"
v-model="auxiliaryEquipmentRightList"
:titles="['未绑定辅助设备列表', '已绑定辅助设备列表']"
:button-texts="['取消', '绑定']"
:data="auxiliaryEquipmentLeftList"
>
</el-transfer>
</template>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
>上一步</el-button
>
<el-button v-if="this.repairRecordSteps < 3" @click="stepNext"
<el-button v-if="this.repairRecordSteps < 4" @click="stepNext"
>下一步</el-button
>
<el-button
v-if="this.repairRecordSteps == 3"
v-if="this.repairRecordSteps == 4"
type="primary"
@click="submitForm"
> </el-button
@ -719,7 +781,7 @@
form.department
}}</el-descriptions-item>
<el-descriptions-item label="设备负责人">{{
form.equipmentHeadName
form.equipmentHead
}}</el-descriptions-item>
</el-descriptions>
@ -760,7 +822,12 @@
}}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="辅助设备" >
<ItemEquipment
:optType="optType"
:equipmentCode="form.equipmentCode"
></ItemEquipment>
</el-tab-pane>
<el-tab-pane label="设备相关图片">
<el-descriptions
:column="1"
@ -887,14 +954,20 @@ import {
} from "@/api/wms/equipment";
import { getWorkCenterList, listFactory } from "@/api/wms/factory";
import { listTeamMembers } from "@/api/wms/team";
import EquipmentSpareParts from "./single.vue";
import { Message } from "element-ui";
import { getToken } from "@/utils/auth";
import ItemSelectPerson from "./itemPerson.vue";
import ItemEquipment from "./itemEquipment.vue";
export default {
name: "Equipment",
dicts: ["sys_normal_disable", "equ_type", "equipment_status"],
components: { EquipmentSpareParts },
dicts: [
"sys_normal_disable",
"equ_type",
"equipment_status",
"equipment_category",
],
components: { ItemSelectPerson, ItemEquipment },
data() {
return {
CS: {
@ -969,6 +1042,9 @@ export default {
repairRecordSteps: 0,
leftList: [],
rightList: [],
//
auxiliaryEquipmentRightList: [],
auxiliaryEquipmentLeftList: [],
bind: undefined,
imageFileList: [],
qrFileList: [],
@ -1108,16 +1184,13 @@ export default {
this.queryEquipmentHeadParams.pageNum = 1;
this.queryEquipmentHeadParams.pageSize = 2000;
listTeamMembers(this.queryHeadParams).then((response) => {
console.log(response.rows);
this.equipmentHeadOption = response.rows;
});
},
/** 查询设备分类 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
console.log(response.rows);
this.equipmentTypeOption = response.rows;
console.log(this.treeData1);
});
},
/** 查询设备备件 */
@ -1143,10 +1216,23 @@ export default {
indexMethod(index) {
return index + 1;
},
/** 查询设备管理列表 */
getList() {
this.loading = true;
listEquipment(this.queryParams).then((response) => {
for (let i in response.rows) {
// 穿
this.auxiliaryEquipmentLeftList.push({
key: response.rows[i].equipmentCode,
label: response.rows[i].equipmentName,
});
}
for (let i in response.selected) {
this.auxiliaryEquipmentLeftList.push(response.selected[i].key);
this.form.auxiliaryEquipmentRightData =
this.auxiliaryEquipmentRightList;
}
this.equipmentList = response.rows;
this.total = response.total;
this.loading = false;
@ -1194,6 +1280,7 @@ export default {
workshopSection: null,
equipmentLocation: null,
hourlyUnitPrice: null,
equipmentHead: null,
};
this.resetForm("form");
},
@ -1246,25 +1333,35 @@ export default {
this.reset();
getWorkCenterList().then((response) => {
this.options1 = response.rows;
console.log(this.options1);
});
this.repairRecordSteps = 0;
this.rightList = [];
this.auxiliaryEquipmentRightList = [];
this.open = true;
this.title = "添加设备管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const equipmentId = row.equipmentId || this.ids;
getWorkCenterList().then((response) => {
this.options1 = response.rows;
console.log(this.options1);
});
getEquipment(equipmentId).then((response) => {
this.form = response.data;
this.rightList = [];
for (let i in response.data.selectedData) {
// 穿
// 穿
this.rightList.push(response.data.selectedData[i].spareCode);
}
this.auxiliaryEquipmentRightList = [];
for (let i in response.data.selectedEquipmentData) {
// 穿
this.auxiliaryEquipmentRightList.push(
response.data.selectedEquipmentData[i].auxiliaryEquipmentCode
);
}
if (response.data.imageFiles != null) {
var newFiles = [];
@ -1275,7 +1372,6 @@ export default {
newFiles.push(newFile);
});
this.form.imageFileList = newFiles;
console.log("55555", this.form.imageFileList);
}
if (response.data.qrFiles != null) {
var newFiles = [];
@ -1298,17 +1394,16 @@ export default {
this.form.barCodeFileList = newFiles;
}
this.form.workCenter = this.form.workshopCode;
this.repairRecordSteps = 0;
this.open = true;
this.title = "修改设备管理";
});
},
//
handleView(row) {
this.reset();
const equipmentId = row.equipmentId || this.ids;
getWorkCenterList().then((response) => {
console.log(this.options1);
});
getEquipment(equipmentId).then((response) => {
this.form = response.data;
//
@ -1335,12 +1430,12 @@ export default {
});
this.form.barCodeFileList = newFiles;
}
this.queryOpen = true;
this.title = "查看设备信息";
this.optType = "view";
});
},
/** 提交按钮 */
submitForm() {
if (Array.isArray(this.form.qrFileList)) {
@ -1358,6 +1453,8 @@ export default {
if (valid) {
if (this.form.equipmentId != null) {
this.form.rightData = this.rightList;
this.form.auxiliaryEquipmentRightData =
this.auxiliaryEquipmentRightList;
updateEquipment(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@ -1381,6 +1478,8 @@ export default {
"【设备基础信息】设备类型为空,请选择设备类型!"
);
} else {
this.form.auxiliaryEquipmentRightData =
this.auxiliaryEquipmentRightList;
this.form.rightData = this.rightList;
addEquipment(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
@ -1467,6 +1566,21 @@ export default {
);
},
//
handleSelectPerson() {
this.$refs.itemSelectPerson.showFlag = true;
},
//
onItemSelectedPerson(obj) {
this.$set(
this.form,
"equipmentHead",
obj[0].nickName + "(" + obj[0].userName + ")"
);
console.log(this.form.equipmentHead);
},
//
handleStatusChange(row) {
let text = row.status === "1" ? "启用" : "停用";
@ -1498,4 +1612,8 @@ export default {
.step-body {
margin-top: 50px;
}
.el-transfer-panel {
width: 350px;
}
</style>

@ -0,0 +1,123 @@
<template>
<div class="app-container">
<el-table
:data="itemList"
border
>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column
label="设备编码"
align="center"
prop="equipmentCode"
fixed
/>
<el-table-column
label="设备名称"
align="center"
prop="equipmentName"
/>
<el-table-column
label="设备状态"
align="center"
prop="equipmentStatus"
>
<template slot-scope="scope">
<dict-tag
:options="dict.type.equipment_status"
:value="scope.row.equipmentStatus"
/>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getAuxiliaryEquipmentList } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
dicts: ["equipment_status"],
data() {
return {
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
equipmentCode: this.equipmentCode,
},
};
},
props: {
equipmentCode: undefined,
optType: undefined,
workStatus: undefined,
},
created() {
this.getList();
},
methods: {
//
cancel() {
this.showFlag = false;
this.reset();
},
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
getAuxiliaryEquipmentList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
});
},
},
};
</script>

@ -0,0 +1,229 @@
<template>
<el-dialog
title="人员选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="800px"
center
:before-close="cancel"
>
<el-row :gutter="20">
<!--人员数据-->
<el-col :span="24">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="人员编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入人员编码"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="人员名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入人员名称"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="itemList"
@selection-change="handleSelectionChange"
ref="multipleTable"
>
<el-table-column
width="50"
align="center"
type="selection"
></el-table-column>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
></el-table-column>
<el-table-column
label="人员编码"
align="center"
key="itemCode"
prop="userName"
v-if="columns[0].visible"
>
</el-table-column>
<el-table-column
label="人员名称"
align="left"
key="itemName"
prop="nickName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
<el-table-column
label="人员联系方式"
align="left"
prop="phonenumber"
v-if="columns[2].visible"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="multiple"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getPersonList } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
data() {
return {
treeData1: [],
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: null,
itemCodeGet: "",
itemCode: null,
nickName: null,
userName: null,
},
//
columns: [
{ key: 0, label: `人员编码`, visible: true },
{ key: 1, label: `人员名称`, visible: true },
{ key: 1, label: `联系方式`, visible: true },
],
};
},
created() {
this.getList();
},
methods: {
//
cancel() {
this.showFlag = false;
this.reset();
},
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleSelectionChange(val) {
this.itemList = val;
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
this.loading = true;
this.queryParams.userName = this.queryParams.itemCode;
this.queryParams.nickName = this.queryParams.itemName;
getPersonList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.userId);
this.userCodes = selection.map((item) => item.userName);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
submitForm() {
if (this.$refs.multipleTable.selection.length > 1) {
Message.warning("只能选择一个人员,请勿选择多个!");
} else {
this.$emit("onSelected", this.$refs.multipleTable.selection);
this.showFlag = false;
this.getList();
}
},
},
};
</script>

@ -1,98 +0,0 @@
<template>
<el-dialog
title="备品备件绑定"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="1100px"
center
>
<el-transfer
filterable
filter-placeholder="请输入班组人员名称"
v-model="rightList"
:titles="['未绑定备件列表', '已绑定备件列表']"
:button-texts="['取消绑定', '绑定备件']"
:data="leftList"
>
</el-transfer>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click=""> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getSparePartsList,bindSpareParts } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
data() {
return {
showFlag: false,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
},
//
form: {},
leftList: [],
rightList: [],
};
},
created() {
this.getList();
},
methods: {
/** 查询备品备件列表 */
getList() {
this.loading = true;
getSparePartsList(this.queryParams).then((response) => {
for (let i in response.rows) {
// 穿
this.leftList.push({
key: response.rows[i].materialCode,
label: response.rows[i].materialDesc,
});
}
for (let i in response.selected) {
this.rightList.push(response.selected[i].key);
this.form.rightData = this.rightList;
}
this.loading = false;
});
},
/** 提交按钮 */
submitForm() {
this.form.rightData = this.rightList;
bindSpareParts(this.form).then((response) => {
this.showFlag = false;
this.$modal.msgSuccess("绑定成功");
});
},
},
};
</script>
<style>
.el-transfer-panel {
width: 350px;
}
.query {
display: flex;
justify-content: space-between;
padding-right: 4px;
}
</style>
Loading…
Cancel
Save