|
|
@@ -38,40 +38,58 @@
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@click="declarationForm(row, 'edit')"
|
|
|
- v-if="(row.orderStatus == 1 || row.orderStatus == 6) && $hasPermission('eom:aftersalesworkorder:update')"
|
|
|
+ v-if="
|
|
|
+ (row.orderStatus == 1 || row.orderStatus == 6) &&
|
|
|
+ $hasPermission('eom:aftersalesworkorder:update')
|
|
|
+ "
|
|
|
>修改</el-link
|
|
|
- >
|
|
|
+ >
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
:underline="false"
|
|
|
@click="declarationForm(row, 'report')"
|
|
|
- v-if="(row.orderStatus == 1 || row.orderStatus == 6) && $hasPermission('eom:aftersalesworkorder:reportWorking')"
|
|
|
+ v-if="
|
|
|
+ (row.orderStatus == 1 || row.orderStatus == 6) &&
|
|
|
+ $hasPermission('eom:aftersalesworkorder:reportWorking')
|
|
|
+ "
|
|
|
>报工</el-link
|
|
|
>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- v-if="row.orderStatus == 0 && $hasPermission('eom:aftersalesworkorder:receive')"
|
|
|
+ v-if="
|
|
|
+ row.orderStatus == 0 &&
|
|
|
+ $hasPermission('eom:aftersalesworkorder:receive')
|
|
|
+ "
|
|
|
:underline="false"
|
|
|
@click="handleCommand('handleReceive', row)"
|
|
|
>接收</el-link
|
|
|
>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- v-if="(row.orderStatus == 0 || row.orderStatus == 1) && $hasPermission('eom:aftersalesworkorder:reassignment')"
|
|
|
+ v-if="
|
|
|
+ (row.orderStatus == 0 || row.orderStatus == 1) &&
|
|
|
+ $hasPermission('eom:aftersalesworkorder:reassignment')
|
|
|
+ "
|
|
|
:underline="false"
|
|
|
@click="handleCommand('toRedeploy', row)"
|
|
|
>转派</el-link
|
|
|
>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- v-if="(row.orderStatus == 1 || row.orderStatus == 2) && $hasPermission('eom:sparepartsapply:save')"
|
|
|
+ v-if="
|
|
|
+ (row.orderStatus == 1 || row.orderStatus == 2) &&
|
|
|
+ $hasPermission('eom:sparepartsapply:save')
|
|
|
+ "
|
|
|
:underline="false"
|
|
|
@click="handleCommand('addSpareItems', row)"
|
|
|
>申请配件</el-link
|
|
|
>
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- v-if="acceptShow(row) && $hasPermission('eom:aftersalesworkorder:checkAndAccept')"
|
|
|
+ v-if="
|
|
|
+ acceptShow(row) &&
|
|
|
+ $hasPermission('eom:aftersalesworkorder:checkAndAccept')
|
|
|
+ "
|
|
|
:underline="false"
|
|
|
@click="handleCommand('checkAndAccept', row)"
|
|
|
>验收</el-link
|
|
|
@@ -79,7 +97,10 @@
|
|
|
<!-- v-if="row.orderStatus == 4" -->
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
- v-if="evaluateShow(row) && $hasPermission('eom:aftersalesworkorder:comment')"
|
|
|
+ v-if="
|
|
|
+ evaluateShow(row) &&
|
|
|
+ $hasPermission('eom:aftersalesworkorder:comment')
|
|
|
+ "
|
|
|
:underline="false"
|
|
|
@click="handleCommand('evaluate', row)"
|
|
|
>评价</el-link
|
|
|
@@ -179,7 +200,7 @@
|
|
|
applyForSpare,
|
|
|
declarationDialog,
|
|
|
redeployOther,
|
|
|
- addDialog
|
|
|
+ addDialog,
|
|
|
// fileMain
|
|
|
},
|
|
|
data() {
|
|
|
@@ -369,25 +390,15 @@
|
|
|
},
|
|
|
|
|
|
computed: {
|
|
|
- // 登录人id
|
|
|
- loginPersonId() {
|
|
|
- return this.$store.state.user?.info.id;
|
|
|
- },
|
|
|
// 评价
|
|
|
evaluateShow() {
|
|
|
return (row) => {
|
|
|
- if (row.executeUserId == this.loginPersonId) {
|
|
|
- return false;
|
|
|
- }
|
|
|
return row.orderStatus == 4;
|
|
|
};
|
|
|
},
|
|
|
// 验收
|
|
|
acceptShow() {
|
|
|
return (row) => {
|
|
|
- if (row.executeUserId == this.loginPersonId) {
|
|
|
- return false;
|
|
|
- }
|
|
|
return row.orderStatus == 3 || row.orderStatus == 6;
|
|
|
};
|
|
|
}
|
|
|
@@ -544,15 +555,18 @@
|
|
|
} catch (err) {}
|
|
|
}
|
|
|
if (command == 'checkAndAccept') {
|
|
|
- this.visibleCheckAndAccept = true;
|
|
|
- this.form = {
|
|
|
- accepterUserId: '',
|
|
|
- accepterUserName: '',
|
|
|
- accepterRemark: ''
|
|
|
- };
|
|
|
- const { afterSalesDemandVO } = await getSalesWorkOrderById(row.id);
|
|
|
- this.contactInfoVOS = afterSalesDemandVO.contactInfoVOS || [];
|
|
|
- this.row = row;
|
|
|
+ try {
|
|
|
+ await afterSalesEvaluation(row.id);
|
|
|
+ this.visibleCheckAndAccept = true;
|
|
|
+ this.form = {
|
|
|
+ accepterUserId: '',
|
|
|
+ accepterUserName: '',
|
|
|
+ accepterRemark: ''
|
|
|
+ };
|
|
|
+ const { afterSalesDemandVO } = await getSalesWorkOrderById(row.id);
|
|
|
+ this.contactInfoVOS = afterSalesDemandVO.contactInfoVOS || [];
|
|
|
+ this.row = row;
|
|
|
+ } catch (err) {}
|
|
|
}
|
|
|
}
|
|
|
}
|