|
|
|
@ -29,14 +29,14 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
<template slot-scope="{ row }" slot="menu"> |
|
|
|
<el-button v-show="permission.ordinaryView" @click="handleView(row)">查看</el-button> |
|
|
|
<el-button v-show="permission.ordinaryView" @click="handleView(row)">查看</el-button> |
|
|
|
<el-button v-show="permission.ordinaryOrder && (row.status == 0 || row.status == 100)" @click="takeOrders(row)">接单</el-button> |
|
|
|
<el-button v-show="permission.ordinaryOrder && (row.status == 101 || row.status == 400)" @click="takeOrders(row)">接单</el-button> |
|
|
|
<el-button v-show="permission.ordinaryClose && row.status == 0" @click="handleClone(row)">关闭</el-button> |
|
|
|
<el-button v-show="permission.ordinaryClose && row.status == 101" @click="handleClone(row)">关闭</el-button> |
|
|
|
<el-button v-show="permission.ordinaryConfirm && row.status == 1" @click="reciveOrder(row)">确认</el-button> |
|
|
|
<el-button v-show="permission.ordinaryConfirm && row.status == 201" @click="reciveOrder(row)">确认</el-button> |
|
|
|
<el-button v-show="permission.ordinaryRefuse && row.status == 1" @click="repairReject(row)">驳回</el-button> |
|
|
|
<el-button v-show="permission.ordinaryRefuse && row.status == 201" @click="repairReject(row)">驳回</el-button> |
|
|
|
<el-button v-show="permission.ordinarySubmit && (row.status == 2 || row.status == 101)" @click="handleRepair(row)">提交</el-button> |
|
|
|
<el-button v-show="permission.ordinarySubmit && (row.status == 401 || row.status == 300)" @click="handleRepair(row)">提交</el-button> |
|
|
|
<el-button v-show="permission.ordinaryFinish && row.status == 5" @click="handleRepairFinish(row)">维修完成</el-button> |
|
|
|
<el-button v-show="permission.ordinaryFinish && row.status == 103" @click="handleRepairFinish(row)">维修完成</el-button> |
|
|
|
<el-button v-show="permission.ordinaryExamine && row.status == 3 || row.status == 102" @click="handleExamine(row)">审批</el-button> |
|
|
|
<el-button v-show="permission.ordinaryExamine && row.status == 402 || row.status == 102" @click="handleExamine(row)">审批</el-button> |
|
|
|
<el-button v-show="row.status == 7" @click="handlePayment(row)">确认付款</el-button> |
|
|
|
<el-button v-show="row.status == 104" @click="handlePayment(row)">确认付款</el-button> |
|
|
|
<el-button @click="handleExport(row)">导出</el-button> |
|
|
|
<el-button @click="handleExport(row)">导出</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</avue-crud> |
|
|
|
</avue-crud> |
|
|
|
@ -186,13 +186,13 @@ |
|
|
|
<el-input placeholder="请输入备注" v-model="addForm.remark" type="textarea" style="width:98%;"></el-input> |
|
|
|
<el-input placeholder="请输入备注" v-model="addForm.remark" type="textarea" style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="((addForm.repaiRejectReason != '' && addForm.status == 100) || addForm.repaiTeamRejectReason != '' )"> |
|
|
|
<div v-show="((addForm.repaiRejectReason != '' && addForm.status == 400) || addForm.repaiTeamRejectReason != '' )"> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">驳回详情</div> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">驳回详情</div> |
|
|
|
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="addForm.repaiRejectReason != '' && addForm.status == 100"> |
|
|
|
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="addForm.repaiRejectReason != '' && addForm.status == 400"> |
|
|
|
<el-input placeholder="请输入驳回维修人" disabled v-model="addForm.repairPersonName" |
|
|
|
<el-input placeholder="请输入驳回维修人" disabled v-model="addForm.repairPersonName" |
|
|
|
style="width:98%;"></el-input> |
|
|
|
style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="addForm.repaiRejectReason != '' && addForm.status == 100"> |
|
|
|
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="addForm.repaiRejectReason != '' && addForm.status == 400"> |
|
|
|
<el-input placeholder="请输入驳回原因" v-model="addForm.repaiRejectReason" type="textarea" disabled style="width:98%;"></el-input> |
|
|
|
<el-input placeholder="请输入驳回原因" v-model="addForm.repaiRejectReason" type="textarea" disabled style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="驳回运维主管" prop="maintenanceTeamName" v-show="addForm.repaiTeamRejectReason != ''"> |
|
|
|
<el-form-item label="驳回运维主管" prop="maintenanceTeamName" v-show="addForm.repaiTeamRejectReason != ''"> |
|
|
|
@ -278,32 +278,35 @@ |
|
|
|
</el-input> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="(repairForm.status >= 2)"> |
|
|
|
<div v-show="(repairForm.status == 401 ||repairForm.status == 402 ||repairForm.status == 403 || repairForm.status == 301 || repairForm.status == 300 || repairForm.status == 102 || repairForm.status == 103 || repairForm.status == 104)"> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">维修详情</div> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">维修详情</div> |
|
|
|
<el-form-item label="维修人" prop="repairPersonName"> |
|
|
|
<el-form-item label="维修人" prop="repairPersonName"> |
|
|
|
<el-input placeholder="请输入维修人" |
|
|
|
<el-input placeholder="请输入维修人" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status >= 3) || dialogType == 'view'" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 402 || repairForm.status == 301 || repairForm.status == 403 || repairForm.status == 103 || repairForm.status == 202 || repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 204) || dialogType == 'view'" |
|
|
|
v-model="repairForm.repairPersonName" style="width:98%;"></el-input> |
|
|
|
v-model="repairForm.repairPersonName" style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="设备名称" prop="deviceId"> |
|
|
|
<el-form-item label="设备名称" prop="deviceId"> |
|
|
|
<el-input |
|
|
|
<!-- <el-input |
|
|
|
v-show="role_id == '1839600115013713921' || (repairForm.status == 3 || repairForm.status == 5 || repairForm.status == 4) || repairForm.status == 3 || dialogType != 'view'" |
|
|
|
v-show="role_id == '1839600115013713921' || (repairForm.status == 402 || repairForm.status == 103 || repairForm.status == 301) || repairForm.status == 3 || dialogType != 'view'" |
|
|
|
style="width: 98%" disabled v-model="repairForm.deviceName"></el-input> |
|
|
|
style="width: 98%" disabled v-model="repairForm.deviceName"></el-input> --> |
|
|
|
|
|
|
|
<el-select placeholder="请选择设备" v-model="repairForm.deviceId" style="width:98%;" :disabled="dialogType == 'view' || dialogType == 'examine'"> |
|
|
|
|
|
|
|
<el-option v-for="item in deviceList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
|
|
|
|
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="故障原因" prop="faultCause"> |
|
|
|
<el-form-item label="故障原因" prop="faultCause"> |
|
|
|
<el-input placeholder="请输入故障原因" |
|
|
|
<el-input placeholder="请输入故障原因" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 5 || repairForm.status == 4 || repairForm.status == 3) || dialogType == 'view' || dialogType == 'examine'" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 103 || repairForm.status == 301 || repairForm.status == 402) || dialogType == 'view' || dialogType == 'examine'" |
|
|
|
type="textarea" v-model="repairForm.faultCause" style="width:98%;"></el-input> |
|
|
|
type="textarea" v-model="repairForm.faultCause" style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="处理方法" prop="processMethod"> |
|
|
|
<el-form-item label="处理方法" prop="processMethod"> |
|
|
|
<el-input placeholder="请输入处理方法" |
|
|
|
<el-input placeholder="请输入处理方法" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 5 || repairForm.status == 4 || repairForm.status == 3) || dialogType == 'view' || dialogType == 'examine'" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 103 || repairForm.status == 301 || repairForm.status == 402) || dialogType == 'view' || dialogType == 'examine'" |
|
|
|
type="textarea" v-model="repairForm.processMethod" style="width:98%;"></el-input> |
|
|
|
type="textarea" v-model="repairForm.processMethod" style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="是否需要申领物料" prop="isNeedMaterial" |
|
|
|
<el-form-item label="是否需要申领物料" prop="isNeedMaterial" |
|
|
|
v-show="role_id != '1839600115013713921' && (repairForm.status != 5 && repairForm.status != 4) && dialogType != 'view'"> |
|
|
|
v-show="role_id != '1839600115013713921' && (repairForm.status != 103 && repairForm.status != 301) && dialogType != 'view'"> |
|
|
|
<el-select placeholder="请选择是否需要申领物料" style="width:98%;" @change="changeMaterial" |
|
|
|
<el-select placeholder="请选择是否需要申领物料" style="width:98%;" @change="changeMaterial" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 5 || repairForm.status == 4 || repairForm.status == 3) || dialogType == 'view' || dialogType == 'examine'" |
|
|
|
:disabled="role_id == '1839600115013713921' || (repairForm.status == 103 || repairForm.status == 301 || repairForm.status == 402) || dialogType == 'view' || dialogType == 'examine'" |
|
|
|
v-model="repairForm.isNeedMaterial"> |
|
|
|
v-model="repairForm.isNeedMaterial"> |
|
|
|
<el-option label="是" :value="1"></el-option> |
|
|
|
<el-option label="是" :value="1"></el-option> |
|
|
|
<el-option label="否" :value="0"></el-option> |
|
|
|
<el-option label="否" :value="0"></el-option> |
|
|
|
@ -373,7 +376,8 @@ |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="维修材料" |
|
|
|
<el-form-item label="维修材料" |
|
|
|
v-if="(repairForm.isNeedMaterial == 1 && (repairForm.status >= 3)) && dialogType != 'repair'"> |
|
|
|
v-if="(repairForm.isNeedMaterial == 1 && (repairForm.status == 402 || repairForm.status == 301 || repairForm.status == 403 || repairForm.status == 103 || repairForm.status == 202 || repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 204 || repairForm.status == 102)) && dialogType != 'repair'"> |
|
|
|
|
|
|
|
<!-- v-if="(repairForm.isNeedMaterial == 1 && (repairForm.status >= 3)) && dialogType != 'repair'"> --> |
|
|
|
<el-table :data="tableData" border style="width: 98%"> |
|
|
|
<el-table :data="tableData" border style="width: 98%"> |
|
|
|
<el-table-column prop="materialName" align="center" label="物料名称"></el-table-column> |
|
|
|
<el-table-column prop="materialName" align="center" label="物料名称"></el-table-column> |
|
|
|
<el-table-column prop="inventoryId" align="center" label="库存ID"></el-table-column> |
|
|
|
<el-table-column prop="inventoryId" align="center" label="库存ID"></el-table-column> |
|
|
|
@ -386,7 +390,7 @@ |
|
|
|
{{ scope.row.price }}元 |
|
|
|
{{ scope.row.price }}元 |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<template slot="append" v-if="(repairForm.status == 3 && role_id == '1839537055389515777') || repairForm.status == 4 || repairForm.status == 5 || repairForm.status == 6 || repairForm.status == 102"> |
|
|
|
<template slot="append" v-if="(repairForm.status == 402 && role_id == '1839537055389515777') || repairForm.status == 301 || repairForm.status == 103 || repairForm.status == 403 || repairForm.status == 202 || repairForm.status == 102 || repairForm.status == 104"> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td> |
|
|
|
<td style="padding: 10px;padding-right: 0;font-size: 14px;color: #909399;font-weight: 600;">总计:</td> |
|
|
|
<td>{{ totalPrice == '' ? totalPrice : totalPrice.toFixed(2) }} 元</td> |
|
|
|
<td>{{ totalPrice == '' ? totalPrice : totalPrice.toFixed(2) }} 元</td> |
|
|
|
@ -403,7 +407,7 @@ |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="repairType == 'examine' || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 2)"> |
|
|
|
<div v-show="repairType == 'examine' || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 402)"> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">主管审批</div> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">主管审批</div> |
|
|
|
<el-form-item label="审批结果" prop="approveResult" > |
|
|
|
<el-form-item label="审批结果" prop="approveResult" > |
|
|
|
<el-select placeholder="请选择审批结果" v-model="chargeForm.approveResult" style="width: 98%;" :disabled="repairForm.status == 4 || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 2)"> |
|
|
|
<el-select placeholder="请选择审批结果" v-model="chargeForm.approveResult" style="width: 98%;" :disabled="repairForm.status == 4 || (repairForm.approvePoint == '主管审批维修方案' && repairForm.approveRemark != '' && repairForm.status == 2)"> |
|
|
|
@ -439,13 +443,13 @@ |
|
|
|
<el-input style="width: 98%;" placeholder="请输入审批意见" v-model="clientForm.approveTime" :disabled="repairForm.status == 4 || repairForm.status == 2"></el-input> |
|
|
|
<el-input style="width: 98%;" placeholder="请输入审批意见" v-model="clientForm.approveTime" :disabled="repairForm.status == 4 || repairForm.status == 2"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="((repairForm.repaiRejectReason != '' && addForm.status == 100) || repairForm.repaiTeamRejectReason != '' )"> |
|
|
|
<div v-show="((repairForm.repaiRejectReason != '' && repairForm.status == 400) || repairForm.repaiTeamRejectReason != '' )"> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">驳回详情</div> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">驳回详情</div> |
|
|
|
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="repairForm.repaiRejectReason != '' && addForm.status == 100"> |
|
|
|
<el-form-item label="驳回维修人" prop="repairPersonName" v-show="repairForm.repaiRejectReason != '' && repairForm.status == 400"> |
|
|
|
<el-input placeholder="请输入驳回维修人" disabled v-model="repairForm.repairPersonName" |
|
|
|
<el-input placeholder="请输入驳回维修人" disabled v-model="repairForm.repairPersonName" |
|
|
|
style="width:98%;"></el-input> |
|
|
|
style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="repairForm.repaiRejectReason != '' && addForm.status == 100"> |
|
|
|
<el-form-item label="驳回原因" prop="repaiRejectReason" v-show="repairForm.repaiRejectReason != '' && repairForm.status == 400"> |
|
|
|
<el-input placeholder="请输入驳回原因" v-model="repairForm.repaiRejectReason" type="textarea" disabled style="width:98%;"></el-input> |
|
|
|
<el-input placeholder="请输入驳回原因" v-model="repairForm.repaiRejectReason" type="textarea" disabled style="width:98%;"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -455,8 +459,8 @@ |
|
|
|
<el-input placeholder="请输入关闭原因" v-model="repairForm.closeReason" type="textarea" disabled></el-input> |
|
|
|
<el-input placeholder="请输入关闭原因" v-model="repairForm.closeReason" type="textarea" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="repairForm.status == 101 || repairForm.status == 102"> |
|
|
|
<div v-show="repairForm.status == 300 || repairForm.status == 102"> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">{{repairForm.status == 101 ? '主管' : repairForm.status == 102 ? '客户' : ''}}审批结果</div> |
|
|
|
<div style="color: #101010;font-size: 20px;font-weight: 550;margin-bottom: 20px;">{{repairForm.status == 300 ? '主管' : repairForm.status == 102 ? '客户' : ''}}审批结果</div> |
|
|
|
<el-form-item label="审批结果" prop="approveResult"> |
|
|
|
<el-form-item label="审批结果" prop="approveResult"> |
|
|
|
<el-select disabled v-model="repairForm.approveResult" |
|
|
|
<el-select disabled v-model="repairForm.approveResult" |
|
|
|
placeholder="请选择审批结果" style="width: 99%;"> |
|
|
|
placeholder="请选择审批结果" style="width: 99%;"> |
|
|
|
@ -478,7 +482,7 @@ |
|
|
|
v-model="repairForm.approveRemark"></el-input> |
|
|
|
v-model="repairForm.approveRemark"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="repairForm.status == 7 || repairForm.status == 8 || repairForm.status == 9"> |
|
|
|
<div v-show="repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 9"> |
|
|
|
<div style=" |
|
|
|
<div style=" |
|
|
|
color: #101010; |
|
|
|
color: #101010; |
|
|
|
font-size: 20px; |
|
|
|
font-size: 20px; |
|
|
|
@ -557,7 +561,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="repairForm.status == 7 || repairForm.status == 8 || repairForm.status == 9"> |
|
|
|
<div v-show="repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 9"> |
|
|
|
<div style=" |
|
|
|
<div style=" |
|
|
|
color: #101010; |
|
|
|
color: #101010; |
|
|
|
font-size: 20px; |
|
|
|
font-size: 20px; |
|
|
|
@ -566,7 +570,7 @@ |
|
|
|
"> |
|
|
|
"> |
|
|
|
签名 |
|
|
|
签名 |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="repairForm.status == 7 || repairForm.status == 8 || repairForm.status == 9"> |
|
|
|
<div v-show="repairForm.status == 104 || repairForm.status == 203 || repairForm.status == 9"> |
|
|
|
<img :src="repairForm.signatureUrl" alt=""> |
|
|
|
<img :src="repairForm.signatureUrl" alt=""> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-form-item label="签名人" prop="signaturePerson"> |
|
|
|
<el-form-item label="签名人" prop="signaturePerson"> |
|
|
|
@ -850,6 +854,7 @@ export default { |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
|
this.role_id = this.userInfo.role_id |
|
|
|
this.role_id = this.userInfo.role_id |
|
|
|
console.log('role_id---------->', this.role_id) |
|
|
|
console.log('role_id---------->', this.role_id) |
|
|
|
|
|
|
|
this.getDeviceList() |
|
|
|
getRepairPeople({ isRepair: this.role_id == '1839537055389515777' ? true : false }).then(res => { |
|
|
|
getRepairPeople({ isRepair: this.role_id == '1839537055389515777' ? true : false }).then(res => { |
|
|
|
this.repairPersonList = res.data.data |
|
|
|
this.repairPersonList = res.data.data |
|
|
|
}) |
|
|
|
}) |
|
|
|
@ -874,6 +879,11 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
getDeviceList(){ |
|
|
|
|
|
|
|
getDeviceList({current:1,size:100}).then(res =>{ |
|
|
|
|
|
|
|
this.deviceList = res.data.data.records |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
sortChange(val){ |
|
|
|
sortChange(val){ |
|
|
|
console.log('val============>',val) |
|
|
|
console.log('val============>',val) |
|
|
|
}, |
|
|
|
}, |
|
|
|
@ -967,7 +977,6 @@ export default { |
|
|
|
this.totalPrice = res.data.data.totalPrice == -1 ? res.data.data.materials.reduce((sum, item) => sum + item.materialPrice, 0) : res.data.data.totalPrice |
|
|
|
this.totalPrice = res.data.data.totalPrice == -1 ? res.data.data.materials.reduce((sum, item) => sum + item.materialPrice, 0) : res.data.data.totalPrice |
|
|
|
this.discount = res.data.data.discount == -1 ? '' : res.data.data.discount |
|
|
|
this.discount = res.data.data.discount == -1 ? '' : res.data.data.discount |
|
|
|
this.discountPrice = res.data.data.discountPrice == -1 ? '' : res.data.data.discountPrice |
|
|
|
this.discountPrice = res.data.data.discountPrice == -1 ? '' : res.data.data.discountPrice |
|
|
|
this.$refs['repairForm'].resetFields() |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 关闭弹窗 |
|
|
|
// 关闭弹窗 |
|
|
|
@ -1040,7 +1049,7 @@ export default { |
|
|
|
this.dialogType = 'repair' |
|
|
|
this.dialogType = 'repair' |
|
|
|
this.repairForm.errorVideo = res.data.data.videoAttaches.length > 0 ? res.data.data.videoAttaches[0].link : '' |
|
|
|
this.repairForm.errorVideo = res.data.data.videoAttaches.length > 0 ? res.data.data.videoAttaches[0].link : '' |
|
|
|
this.repairForm.errorImg = res.data.data.picAttaches.map(item => { return { name: item.originalName, url: item.link } }) |
|
|
|
this.repairForm.errorImg = res.data.data.picAttaches.map(item => { return { name: item.originalName, url: item.link } }) |
|
|
|
this.repairForm.isNeedMaterial = (this.repairForm.status == 1 || this.repairForm.status == 2 || this.repairForm.status == 3) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial |
|
|
|
this.repairForm.isNeedMaterial = (this.repairForm.status == 201 || this.repairForm.status == 401 || this.repairForm.status == 402) && this.repairForm.isNeedMaterial == -1 ? '' : this.repairForm.isNeedMaterial |
|
|
|
if (this.repairForm.isNeedMaterial != '') { |
|
|
|
if (this.repairForm.isNeedMaterial != '') { |
|
|
|
this.tableData = [] |
|
|
|
this.tableData = [] |
|
|
|
this.repairForm.materials.map(item => { |
|
|
|
this.repairForm.materials.map(item => { |
|
|
|
@ -1437,7 +1446,7 @@ export default { |
|
|
|
handleRepairConfirm() { |
|
|
|
handleRepairConfirm() { |
|
|
|
this.$refs.repairForm.validate(valid => { |
|
|
|
this.$refs.repairForm.validate(valid => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
if (this.repairForm.status == 2 || this.repairForm.status == 101) { |
|
|
|
if (this.repairForm.status == 401 || this.repairForm.status == 300) { |
|
|
|
if (this.repairForm.isNeedMaterial == '1') { |
|
|
|
if (this.repairForm.isNeedMaterial == '1') { |
|
|
|
if (this.tableData.length == 0) { |
|
|
|
if (this.tableData.length == 0) { |
|
|
|
this.$message.error('请至少填写一条维修材料信息') |
|
|
|
this.$message.error('请至少填写一条维修材料信息') |
|
|
|
@ -1461,7 +1470,7 @@ export default { |
|
|
|
faultCause: this.repairForm.faultCause, |
|
|
|
faultCause: this.repairForm.faultCause, |
|
|
|
processMethod: this.repairForm.processMethod, |
|
|
|
processMethod: this.repairForm.processMethod, |
|
|
|
isNeedMaterial: this.repairForm.isNeedMaterial, |
|
|
|
isNeedMaterial: this.repairForm.isNeedMaterial, |
|
|
|
status: 4, |
|
|
|
deviceId:this.repairForm.deviceId, |
|
|
|
materials: data |
|
|
|
materials: data |
|
|
|
} |
|
|
|
} |
|
|
|
console.log('query---------->', query) |
|
|
|
console.log('query---------->', query) |
|
|
|
@ -1481,9 +1490,7 @@ export default { |
|
|
|
faultCause: this.repairForm.faultCause, |
|
|
|
faultCause: this.repairForm.faultCause, |
|
|
|
processMethod: this.repairForm.processMethod, |
|
|
|
processMethod: this.repairForm.processMethod, |
|
|
|
isNeedMaterial: this.repairForm.isNeedMaterial, |
|
|
|
isNeedMaterial: this.repairForm.isNeedMaterial, |
|
|
|
status: 4 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
console.log('query------------->',query) |
|
|
|
|
|
|
|
editData(query).then(res => { |
|
|
|
editData(query).then(res => { |
|
|
|
if (res.data.code == 200) { |
|
|
|
if (res.data.code == 200) { |
|
|
|
this.$message.success("提交成功") |
|
|
|
this.$message.success("提交成功") |
|
|
|
@ -1492,7 +1499,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}else if(this.repairForm.status == 3 || this.repairForm.status == 102){ |
|
|
|
}else if(this.repairForm.status == 402 || this.repairForm.status == 102){ |
|
|
|
let query = { |
|
|
|
let query = { |
|
|
|
id:this.repairForm.id, |
|
|
|
id:this.repairForm.id, |
|
|
|
approvePerson:this.userInfo.user_id, |
|
|
|
approvePerson:this.userInfo.user_id, |
|
|
|
@ -1550,9 +1557,9 @@ export default { |
|
|
|
handleEdit(row) { |
|
|
|
handleEdit(row) { |
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
getDetail({ id: row.id }).then(res => { |
|
|
|
this.addForm = res.data.data |
|
|
|
this.addForm = res.data.data |
|
|
|
this.addForm.maintenanceTeam = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.maintenanceTeam |
|
|
|
this.addForm.maintenanceTeam = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.maintenanceTeam |
|
|
|
this.addForm.dispatchTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.dispatchTime |
|
|
|
this.addForm.dispatchTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.dispatchTime |
|
|
|
this.addForm.planCompleteTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.planCompleteTime |
|
|
|
this.addForm.planCompleteTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.planCompleteTime |
|
|
|
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson |
|
|
|
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson |
|
|
|
this.addForm = { |
|
|
|
this.addForm = { |
|
|
|
...this.addForm, |
|
|
|
...this.addForm, |
|
|
|
@ -1565,9 +1572,9 @@ export default { |
|
|
|
reciveOrder(row){ |
|
|
|
reciveOrder(row){ |
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
this.addForm = res.data.data |
|
|
|
this.addForm = res.data.data |
|
|
|
this.addForm.maintenanceTeam = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.maintenanceTeam |
|
|
|
this.addForm.maintenanceTeam = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.maintenanceTeam |
|
|
|
this.addForm.dispatchTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.dispatchTime |
|
|
|
this.addForm.dispatchTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.dispatchTime |
|
|
|
this.addForm.planCompleteTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.planCompleteTime |
|
|
|
this.addForm.planCompleteTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.planCompleteTime |
|
|
|
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson |
|
|
|
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson |
|
|
|
this.addForm = { |
|
|
|
this.addForm = { |
|
|
|
...this.addForm, |
|
|
|
...this.addForm, |
|
|
|
@ -1581,9 +1588,9 @@ export default { |
|
|
|
takeOrders(row){ |
|
|
|
takeOrders(row){ |
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
getDetail({id:row.id}).then(res =>{ |
|
|
|
this.addForm = res.data.data |
|
|
|
this.addForm = res.data.data |
|
|
|
this.addForm.maintenanceTeam = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.maintenanceTeam |
|
|
|
this.addForm.maintenanceTeam = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.maintenanceTeam |
|
|
|
this.addForm.dispatchTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.dispatchTime |
|
|
|
this.addForm.dispatchTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.dispatchTime |
|
|
|
this.addForm.planCompleteTime = (res.data.data.status == 0 || res.data.data.status == 8) ? '' : res.data.data.planCompleteTime |
|
|
|
this.addForm.planCompleteTime = (res.data.data.status == 101 || res.data.data.status == 203) ? '' : res.data.data.planCompleteTime |
|
|
|
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson |
|
|
|
this.addForm.repairPerson = this.role_id == '1839536982874193922' ? '' : res.data.data.repairPerson |
|
|
|
this.addForm = { |
|
|
|
this.addForm = { |
|
|
|
...this.addForm, |
|
|
|
...this.addForm, |
|
|
|
@ -1669,7 +1676,7 @@ export default { |
|
|
|
dispatchTime: this.addForm.dispatchTime, |
|
|
|
dispatchTime: this.addForm.dispatchTime, |
|
|
|
planCompleteTime: this.addForm.planCompleteTime, |
|
|
|
planCompleteTime: this.addForm.planCompleteTime, |
|
|
|
repairPerson: this.role_id == '1839536982874193922' ? this.addForm.repairPerson : null, |
|
|
|
repairPerson: this.role_id == '1839536982874193922' ? this.addForm.repairPerson : null, |
|
|
|
status: this.role_id == '1839536982874193922' ? 2 : this.role_id == '1839537055389515777' ? 2 : this.role_id == '1839552581620793346' ? 3 : '', |
|
|
|
// status: this.role_id == '1839536982874193922' ? 2 : this.role_id == '1839537055389515777' ? 2 : this.role_id == '1839552581620793346' ? 3 : '', |
|
|
|
remark: this.addForm.remark, |
|
|
|
remark: this.addForm.remark, |
|
|
|
customerOpinion: this.addForm.customerOpinion |
|
|
|
customerOpinion: this.addForm.customerOpinion |
|
|
|
} |
|
|
|
} |
|
|
|
@ -1759,11 +1766,11 @@ export default { |
|
|
|
let query = { |
|
|
|
let query = { |
|
|
|
current: this.page.currentPage, //页数 |
|
|
|
current: this.page.currentPage, //页数 |
|
|
|
size: this.page.pageSize, //条数 |
|
|
|
size: this.page.pageSize, //条数 |
|
|
|
startTime: this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[0].toString() + ' 00:00:00' : '', //开始时间 |
|
|
|
startTime: this.searchForm.timeRange && this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[0].toString() + ' 00:00:00' : '', //开始时间 |
|
|
|
endTime: this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[1].toString() + ' 23:59:59' : '', //结束时间 |
|
|
|
endTime: this.searchForm.timeRange && this.searchForm.timeRange.length != 0 ? this.searchForm.timeRange[1].toString() + ' 23:59:59' : '', //结束时间 |
|
|
|
faultType: this.searchForm.faultType ? this.searchForm.faultType : '', //故障类型 |
|
|
|
faultType: this.searchForm.faultType ? this.searchForm.faultType : '', //故障类型 |
|
|
|
reportUnitName: this.searchForm.reportUnitName ? this.searchForm.reportUnitName : '', |
|
|
|
reportUnitName: this.searchForm.reportUnitName ? this.searchForm.reportUnitName : '', |
|
|
|
dataType: this.role_id == '1839536982874193922' || this.role_id == '1839600115013713921' ? 2 : this.role_id == '1839537055389515777' ? 3 : this.role_id == '1839552581620793346' ? 4 : '' |
|
|
|
// dataType: this.role_id == '1839536982874193922' || this.role_id == '1839600115013713921' ? 2 : this.role_id == '1839537055389515777' ? 3 : this.role_id == '1839552581620793346' ? 4 : '' |
|
|
|
} |
|
|
|
} |
|
|
|
getList(query).then(res => { |
|
|
|
getList(query).then(res => { |
|
|
|
this.data = res.data.data.records |
|
|
|
this.data = res.data.data.records |
|
|
|
|