|
|
@ -152,11 +152,21 @@
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
|
|
<!-- 序号 -->
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
type="index"
|
|
|
|
|
|
|
|
width="90"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
:index="indexMethod"
|
|
|
|
|
|
|
|
label="序号"
|
|
|
|
|
|
|
|
fixed
|
|
|
|
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
label="委外工单编码"
|
|
|
|
label="委外工单编码"
|
|
|
|
align="center"
|
|
|
|
align="center"
|
|
|
|
prop="workCode"
|
|
|
|
prop="workCode"
|
|
|
|
width="180"
|
|
|
|
width="180"
|
|
|
|
|
|
|
|
fixed
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column
|
|
|
|
label="报修单号"
|
|
|
|
label="报修单号"
|
|
|
@ -276,8 +286,8 @@
|
|
|
|
@pagination="getList"
|
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改委外工单对话框 -->
|
|
|
|
<!-- 添加委外工单对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="openAdd" width="500px" append-to-body>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode">
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
@ -373,9 +383,111 @@
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button @click="cancelAdd">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 修改委外工单对话框 -->
|
|
|
|
|
|
|
|
<el-dialog :title="title" :visible.sync="openUpdate" width="500px" append-to-body>
|
|
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="130px">
|
|
|
|
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode" v-if>
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.equipmentCode"
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<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 label="委外类型" prop="workType">
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="form.workType"
|
|
|
|
|
|
|
|
@change="$forceUpdate()"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in options"
|
|
|
|
|
|
|
|
:key="item.workType"
|
|
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
|
|
:value="item.workType"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="委外维修人员" prop="workPerson">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.workPerson"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="委外单位" prop="workOutsourcingUnit">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.workOutsourcingUnit"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="委外单位联系方式" prop="workConnection">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.workConnection"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="委外原因" prop="workReason">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.workReason"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
type="textarea"
|
|
|
|
|
|
|
|
:autosize="{ minRows: 2, maxRows: 4 }"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="委外费用" prop="workCost">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.workCost"
|
|
|
|
|
|
|
|
placeholder="请输入委外费用"
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="委外用时" prop="workCostTime">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.workCostTime"
|
|
|
|
|
|
|
|
placeholder="请输入委外用时"
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="是否完成维修" prop="workStatus">
|
|
|
|
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="form.workStatus"
|
|
|
|
|
|
|
|
placeholder="请选择是否完成维修"
|
|
|
|
|
|
|
|
@change="$forceUpdate()"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
style="width: 270px"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in workStatusOption"
|
|
|
|
|
|
|
|
:key="item.workStatus"
|
|
|
|
|
|
|
|
:label="item.label"
|
|
|
|
|
|
|
|
:value="item.workStatus"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="cancelUpdate">取 消</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
@ -411,7 +523,9 @@ export default {
|
|
|
|
// 弹出层标题
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
open: false,
|
|
|
|
openAdd: false,
|
|
|
|
|
|
|
|
//是否显示更新弹出层
|
|
|
|
|
|
|
|
openUpdate: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
|
queryParams: {
|
|
|
|
queryParams: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
@ -462,6 +576,10 @@ export default {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 生成表头序号
|
|
|
|
|
|
|
|
indexMethod(index) {
|
|
|
|
|
|
|
|
return index + 1;
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 查询委外工单列表 */
|
|
|
|
/** 查询委外工单列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
@ -471,9 +589,16 @@ export default {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 取消按钮
|
|
|
|
|
|
|
|
|
|
|
|
// 取消更新按钮
|
|
|
|
cancel() {
|
|
|
|
cancel() {
|
|
|
|
this.open = false;
|
|
|
|
this.openUpdate = false;
|
|
|
|
|
|
|
|
this.reset();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 取消更新按钮
|
|
|
|
|
|
|
|
cancelAdd() {
|
|
|
|
|
|
|
|
this.openAdd = false;
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单重置
|
|
|
|
// 表单重置
|
|
|
@ -530,7 +655,7 @@ export default {
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
this.open = true;
|
|
|
|
this.openAdd = true;
|
|
|
|
this.title = "添加委外工单";
|
|
|
|
this.title = "添加委外工单";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
@ -539,7 +664,7 @@ export default {
|
|
|
|
const workId = row.workId || this.ids;
|
|
|
|
const workId = row.workId || this.ids;
|
|
|
|
getOutsourceWorkOrder(workId).then((response) => {
|
|
|
|
getOutsourceWorkOrder(workId).then((response) => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data;
|
|
|
|
this.open = true;
|
|
|
|
this.openUpdate = true;
|
|
|
|
this.title = "修改委外工单";
|
|
|
|
this.title = "修改委外工单";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -550,13 +675,13 @@ export default {
|
|
|
|
if (this.form.workId != null) {
|
|
|
|
if (this.form.workId != null) {
|
|
|
|
updateOutsourceWorkOrder(this.form).then((response) => {
|
|
|
|
updateOutsourceWorkOrder(this.form).then((response) => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.openUpdate = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addOutsourceWorkOrder(this.form).then((response) => {
|
|
|
|
addOutsourceWorkOrder(this.form).then((response) => {
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.$modal.msgSuccess("新增成功");
|
|
|
|
this.open = false;
|
|
|
|
this.openAdd = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|