|
|
@@ -110,6 +110,7 @@
|
|
|
@click="handleCommand('checkAndAccept', row)"
|
|
|
>验收</el-link
|
|
|
>
|
|
|
+ <!-- v-if="row.orderStatus == 4" -->
|
|
|
<el-link
|
|
|
type="primary"
|
|
|
v-if="row.orderStatus == 4"
|
|
|
@@ -199,7 +200,8 @@
|
|
|
receiveSalesWorkOrder,
|
|
|
checkAndAccept,
|
|
|
getSalesWorkOrderById,
|
|
|
- checkByWorkId
|
|
|
+ checkByWorkId,
|
|
|
+ afterSalesEvaluation
|
|
|
} from '@/api/salesServiceManagement/index';
|
|
|
import { getByCode } from '@/api/system/dictionary-data';
|
|
|
import dictMixins from '@/mixins/dictMixins';
|
|
|
@@ -211,7 +213,7 @@
|
|
|
applyForSpare,
|
|
|
declarationDialog,
|
|
|
redeployOther,
|
|
|
- addDialog,
|
|
|
+ addDialog
|
|
|
// fileMain
|
|
|
},
|
|
|
data() {
|
|
|
@@ -465,27 +467,28 @@
|
|
|
},
|
|
|
async addSpareItems(row) {
|
|
|
let data = await getSalesWorkOrderById(row.id);
|
|
|
- this.$refs.edit.open(
|
|
|
- {
|
|
|
- receivingDeptName: data.executeGroupName,
|
|
|
- receivingDeptId: data.executeGroupId,
|
|
|
- recipientName: data.executeUserName,
|
|
|
- recipientId: data.executeUserId,
|
|
|
- name: data.name,
|
|
|
- receptionUserId:data.receptionUserId,
|
|
|
- id: data.id,
|
|
|
- details: data.costListVOS.filter((item) => {
|
|
|
- if (item.typeId == 2 && item.isApply != 1) {
|
|
|
- item.totalPrice = item.settlementPrice;
|
|
|
- item.categoryCode = item.code;
|
|
|
- item.categoryName = item.name;
|
|
|
+ let dataP = {
|
|
|
+ receivingDeptName: data.executeGroupName,
|
|
|
+ receivingDeptId: data.executeGroupId,
|
|
|
+ recipientName: data.executeUserName,
|
|
|
+ recipientId: data.executeUserId,
|
|
|
+ name: data.name,
|
|
|
+ receptionUserId: data.receptionUserId,
|
|
|
+ id: data.id,
|
|
|
+ userId: data.executeUserId,
|
|
|
+ userName: data.executeUserName,
|
|
|
+ details: data.costListVOS.filter((item) => {
|
|
|
+ if (item.typeId == 2 && item.isApply != 1) {
|
|
|
+ item.totalPrice = item.settlementPrice;
|
|
|
+ item.categoryCode = item.code;
|
|
|
+ item.categoryName = item.name;
|
|
|
|
|
|
- return item;
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- 'work'
|
|
|
- );
|
|
|
+ return item;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ };
|
|
|
+ console.log(dataP, 'dataPdataPdataPdataPdataPdataPdataPdataP');
|
|
|
+ this.$refs.edit.open(JSON.parse(JSON.stringify(dataP)), 'work');
|
|
|
},
|
|
|
//接收
|
|
|
async handleReceive(row) {
|
|
|
@@ -526,7 +529,12 @@
|
|
|
}
|
|
|
this.$refs.declarationDialogRef.open(row, type);
|
|
|
},
|
|
|
- async permission(row) {
|
|
|
+ // 校验
|
|
|
+ async permission(row, command) {
|
|
|
+ // 点评论的话不走这个方法
|
|
|
+ if (command == 'evaluate') {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
try {
|
|
|
await checkByWorkId(row.id);
|
|
|
return true;
|
|
|
@@ -538,7 +546,7 @@
|
|
|
this.$refs.declarationDialogRef.open(row, 'view');
|
|
|
},
|
|
|
async handleCommand(command, row) {
|
|
|
- let flag = await this.permission(row);
|
|
|
+ let flag = await this.permission(row, command);
|
|
|
if (!flag) return;
|
|
|
if (command === 'addSpareItems') {
|
|
|
this.addSpareItems(row);
|
|
|
@@ -550,7 +558,10 @@
|
|
|
this.toRedeploy(row);
|
|
|
}
|
|
|
if (command == 'evaluate') {
|
|
|
- this.$refs.addDialogRef.open(row, 'add');
|
|
|
+ try {
|
|
|
+ await afterSalesEvaluation(row.id);
|
|
|
+ this.$refs.addDialogRef.open(row, 'add');
|
|
|
+ } catch (err) {}
|
|
|
}
|
|
|
if (command == 'checkAndAccept') {
|
|
|
this.visibleCheckAndAccept = true;
|