|
@@ -42,7 +42,7 @@
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in options.worktype"
|
|
|
|
|
|
|
+ v-for="item in options.endcustomerserviceworktype"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="$t(item.value)"
|
|
:label="$t(item.value)"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
@@ -62,7 +62,7 @@
|
|
|
clearable
|
|
clearable
|
|
|
>
|
|
>
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in options.serviceworktype"
|
|
|
|
|
|
|
+ v-for="item in options.servicebookingtype"
|
|
|
:key="item.value"
|
|
:key="item.value"
|
|
|
:label="$t(item.value)"
|
|
:label="$t(item.value)"
|
|
|
:value="item.value"
|
|
:value="item.value"
|
|
@@ -132,21 +132,37 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:tbOpreation="scope">
|
|
<template v-slot:tbOpreation="scope">
|
|
|
- <!-- v-if="tool.checkAuth($route.name, 'assignAgent')" -->
|
|
|
|
|
- <el-button type="text" @click="onStop(scope.data.data)" size="mini">
|
|
|
|
|
|
|
+ <!-- v-if="tool.checkAuth($route.name, 'stop')" -->
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.data.data.statue === '进行中'"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="onStop(scope.data.data)"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ >
|
|
|
{{ $t(`暂 停`) }}
|
|
{{ $t(`暂 停`) }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <!-- v-if="tool.checkAuth($route.name, 'assignAgent')" -->
|
|
|
|
|
- <el-button type="text" @click="onTurnOn(scope.data.data)" size="mini">
|
|
|
|
|
|
|
+ <!-- v-if="tool.checkAuth($route.name, 'turnOn')" -->
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ v-if="scope.data.data.statue === '暂停'"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="onTurnOn(scope.data.data)"
|
|
|
|
|
+ size="mini"
|
|
|
|
|
+ >
|
|
|
{{ $t(`启 用`) }}
|
|
{{ $t(`启 用`) }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <!-- v-if="tool.checkAuth($route.name, 'assignAgent')" -->
|
|
|
|
|
<!-- <el-button type="text" @click="onCancellation(scope.data.data)" size="mini">
|
|
<!-- <el-button type="text" @click="onCancellation(scope.data.data)" size="mini">
|
|
|
{{$t(`作 废`)}}
|
|
{{$t(`作 废`)}}
|
|
|
</el-button> -->
|
|
</el-button> -->
|
|
|
|
|
+ <!-- v-if="tool.checkAuth($route.name, 'cancellation')" -->
|
|
|
<Del
|
|
<Del
|
|
|
|
|
+ v-if="
|
|
|
|
|
+ scope.data.data.statue !== '已完成' &&
|
|
|
|
|
+ scope.data.data.statue !== '作废' &&
|
|
|
|
|
+ scope.data.data.statue !== '质保卡审批'
|
|
|
|
|
+ "
|
|
|
class="inline-16"
|
|
class="inline-16"
|
|
|
:id="scope.data.data.sc_workorderid"
|
|
:id="scope.data.data.sc_workorderid"
|
|
|
|
|
+ :disabled="true"
|
|
|
@deleteSuccess="onSuccess"
|
|
@deleteSuccess="onSuccess"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
@@ -157,12 +173,12 @@
|
|
|
<script>
|
|
<script>
|
|
|
import Del from "./components/del";
|
|
import Del from "./components/del";
|
|
|
export default {
|
|
export default {
|
|
|
- components: {Del},
|
|
|
|
|
|
|
+ components: { Del },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
options: {
|
|
options: {
|
|
|
- worktype: [],
|
|
|
|
|
- serviceworktype: [],
|
|
|
|
|
|
|
+ endcustomerserviceworktype: [],
|
|
|
|
|
+ servicebookingtype: [],
|
|
|
},
|
|
},
|
|
|
where: {
|
|
where: {
|
|
|
status: [], //工单状态,可多选
|
|
status: [], //工单状态,可多选
|
|
@@ -180,7 +196,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
onStop(value) {
|
|
onStop(value) {
|
|
|
- console.log("value", value);
|
|
|
|
|
this.$confirm(
|
|
this.$confirm(
|
|
|
this.$t("是否确定将工单") +
|
|
this.$t("是否确定将工单") +
|
|
|
this.$t(value.billno) +
|
|
this.$t(value.billno) +
|
|
@@ -194,19 +209,28 @@ export default {
|
|
|
beforeClose: async (action, instance, done) => {
|
|
beforeClose: async (action, instance, done) => {
|
|
|
if (action === "confirm") {
|
|
if (action === "confirm") {
|
|
|
instance.confirmButtonLoading = true;
|
|
instance.confirmButtonLoading = true;
|
|
|
- const res = await this.$api.requested({
|
|
|
|
|
- id: "2026052113545402",
|
|
|
|
|
- content: {
|
|
|
|
|
- sc_workorderid: value.sc_workorderid,
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- this.tool.showMessage(res, () => {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ id: "2026052113545402",
|
|
|
|
|
+ content: {
|
|
|
|
|
+ sc_workorderid: value.sc_workorderid,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.code !== 1) {
|
|
|
|
|
+ this.$message.error(this.$t(res.msg));
|
|
|
instance.confirmButtonLoading = false;
|
|
instance.confirmButtonLoading = false;
|
|
|
- done();
|
|
|
|
|
- this.onSuccess();
|
|
|
|
|
- }, 500);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
|
+ done();
|
|
|
|
|
+ this.onSuccess();
|
|
|
|
|
+ }, 500);
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
done();
|
|
done();
|
|
|
}
|
|
}
|
|
@@ -229,19 +253,28 @@ export default {
|
|
|
beforeClose: async (action, instance, done) => {
|
|
beforeClose: async (action, instance, done) => {
|
|
|
if (action === "confirm") {
|
|
if (action === "confirm") {
|
|
|
instance.confirmButtonLoading = true;
|
|
instance.confirmButtonLoading = true;
|
|
|
- const res = await this.$api.requested({
|
|
|
|
|
- id: "2026052113553202",
|
|
|
|
|
- content: {
|
|
|
|
|
- sc_workorderid: value.sc_workorderid,
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- this.tool.showMessage(res, () => {
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await this.$api.requested({
|
|
|
|
|
+ id: "2026052113553202",
|
|
|
|
|
+ content: {
|
|
|
|
|
+ sc_workorderid: value.sc_workorderid,
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.code !== 1) {
|
|
|
|
|
+ this.$message.error(this.$t(res.msg));
|
|
|
instance.confirmButtonLoading = false;
|
|
instance.confirmButtonLoading = false;
|
|
|
- done();
|
|
|
|
|
- this.onSuccess();
|
|
|
|
|
- }, 500);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ this.tool.showMessage(res, () => {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
|
+ done();
|
|
|
|
|
+ this.onSuccess();
|
|
|
|
|
+ }, 500);
|
|
|
|
|
+ });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ instance.confirmButtonLoading = false;
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
done();
|
|
done();
|
|
|
}
|
|
}
|