Преглед на файлове

Merge branch 'allTestUrgent' into ai

xiaohaizhao преди 1 ден
родител
ревизия
0a12eb6878

+ 2 - 2
src/Form/headquartersServiceMaterial/add.vue

@@ -468,13 +468,13 @@ export default {
                     this.loading = false;
                     this.$message.error(
                         res.msg ||
-                            (this.title_btn == "编辑" ? "编辑失败" : "新建失败")
+                            (this.title_btn == "编辑" ? this.$t("编辑失败") : this.$t("新建失败"))
                     );
                     return;
                 }
                 this.loading = false;
                 this.$message.success(
-                    this.title_btn == "编辑" ? "编辑成功" : "新建成功"
+                    this.title_btn == "编辑" ? this.$t("编辑成功") : this.$t("新建成功")
                 );
                 this.bindData = {
                     ownertable: "sc_item",

+ 2 - 2
src/Form/ourServiceMaterial/add.vue

@@ -454,13 +454,13 @@ export default {
                     this.loading = false;
                     this.$message.error(
                         res.msg ||
-                            (this.title_btn == "编辑" ? "编辑失败" : "新建失败")
+                           (this.title_btn == "编辑" ? this.$t("编辑失败") : this.$t("新建失败"))
                     );
                     return;
                 }
                 this.loading = false;
                 this.$message.success(
-                    this.title_btn == "编辑" ? "编辑成功" : "新建成功"
+                    this.title_btn == "编辑" ? this.$t("编辑成功") : this.$t("新建成功")
                 );
                 this.bindData = {
                     ownertable: "sc_item_local",

+ 214 - 258
src/Form/serviceWorkItem/add.vue

@@ -1,270 +1,226 @@
 <template>
-    <div>
+  <div>
+    <el-button
+      :size="btn_size ? btn_size : 'small'"
+      type="primary"
+      @click="show"
+    >
+      {{ title_btn ? $t(title_btn) : $t("新 建") }}
+    </el-button>
+    <el-drawer
+      :title="title_drawer ? $t(title_drawer) : $t(`新建服务工作项`)"
+      :visible.sync="dialogFormVisible"
+      direction="rtl"
+      append-to-body
+      :show-close="false"
+      size="700px"
+      @close="onCancel"
+    >
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form
+            :model="form"
+            :rules="rules"
+            ref="form"
+            :label-width="tool.onlyZh('170px')"
+            label-position="right"
+            size="mini"
+          >
+            <el-col :span="24">
+              <el-form-item :label="$t('工作名:')" prop="workname">
+                <el-input
+                  v-model="form.workname"
+                  :placeholder="$t('请输入工作名')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('操作说明:')" prop="remarks">
+                <el-input
+                  type="textarea"
+                  v-model="form.remarks"
+                  :placeholder="$t('请输入操作说明')"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('上传附件:')" prop="fileupload">
+                <el-radio-group v-model="form.fileupload">
+                  <el-radio :label="11">{{ $t("必填") }}</el-radio>
+                  <el-radio :label="1">{{ $t("非必填") }}</el-radio>
+                  <el-radio :label="0">{{ $t("无") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('是否添加物料:')" prop="additem">
+                <el-radio-group v-model="form.additem">
+                  <el-radio :label="11">{{ $t("必填") }}</el-radio>
+                  <el-radio :label="1">{{ $t("非必填") }}</el-radio>
+                  <el-radio :label="0">{{ $t("无") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('上传全景影像:')" prop="panorama">
+                <el-radio-group v-model="form.panorama">
+                  <el-radio :label="11">{{ $t("必填") }}</el-radio>
+                  <el-radio :label="1">{{ $t("非必填") }}</el-radio>
+                  <el-radio :label="0">{{ $t("无") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('是否合格:')" prop="passcheck">
+                <el-radio-group v-model="form.passcheck">
+                  <el-radio :label="11">{{ $t("必填") }}</el-radio>
+                  <el-radio :label="1">{{ $t("非必填") }}</el-radio>
+                  <el-radio :label="0">{{ $t("无") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('是否客户签名:')" prop="signature">
+                <el-radio-group v-model="form.signature">
+                  <el-radio :label="11">{{ $t("必填") }}</el-radio>
+                  <el-radio :label="1">{{ $t("非必填") }}</el-radio>
+                  <el-radio :label="0">{{ $t("无") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item
+                :label="$t('内容是否需要验证表单:')"
+                prop="formcheck"
+              >
+                <el-radio-group v-model="form.formcheck">
+                  <el-radio :label="1">{{ $t("是") }}</el-radio>
+                  <el-radio :label="0">{{ $t("否") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item
+                :label="$t('是否必填服务节点:')"
+                prop="servicenode"
+              >
+                <el-radio-group v-model="form.servicenode">
+                  <el-radio :label="1">{{ $t("是") }}</el-radio>
+                  <el-radio :label="0">{{ $t("否") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t('是否施工日志汇报:')" prop="logreport">
+                <el-radio-group v-model="form.logreport">
+                  <el-radio :label="1">{{ $t("是") }}</el-radio>
+                  <el-radio :label="0">{{ $t("否") }}</el-radio>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onCancel" class="normal-btn-width">{{
+          $t("取 消")
+        }}</el-button>
         <el-button
-            :size="btn_size ? btn_size : 'small'"
-            type="primary"
-            @click="show"
-        >
-            {{ title_btn ? $t(title_btn) : $t("新 建") }}
+          :loading="loading"
+          class="normal-btn-width"
+          size="small"
+          :type="title_btn == '编辑' ? 'warning' : 'primary'"
+          @click="onSubmit"
+          >{{ title_btn == "编辑" ? $t("保 存") : $t("确 定") }}
         </el-button>
-        <el-drawer
-            :title="title_drawer ? $t(title_drawer) : $t(`新建服务工作项`)"
-            :visible.sync="dialogFormVisible"
-            direction="rtl"
-            append-to-body
-            :show-close="false"
-            size="700px"
-            @close="onCancel"
-        >
-            <div class="drawer__panel">
-                <el-row :gutter="20">
-                    <el-form
-                        :model="form"
-                        :rules="rules"
-                        ref="form"
-                        :label-width="tool.onlyZh('170px')"
-                        label-position="right"
-                        size="mini"
-                    >
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('工作名:')"
-                                prop="workname"
-                            >
-                                <el-input
-                                    v-model="form.workname"
-                                    :placeholder="$t('请输入工作名')"
-                                ></el-input>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('操作说明:')"
-                                prop="remarks"
-                            >
-                                <el-input
-                                    type="textarea"
-                                    v-model="form.remarks"
-                                    :placeholder="$t('请输入操作说明')"
-                                ></el-input>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('上传附件:')"
-                                prop="fileupload"
-                            >
-                                <el-radio-group v-model="form.fileupload">
-                                    <el-radio :label="11">{{
-                                        $t("必填")
-                                    }}</el-radio>
-                                    <el-radio :label="1">{{
-                                        $t("非必填")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("无")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('是否添加物料:')"
-                                prop="additem"
-                            >
-                                <el-radio-group v-model="form.additem">
-                                    <el-radio :label="11">{{
-                                        $t("必填")
-                                    }}</el-radio>
-                                    <el-radio :label="1">{{
-                                        $t("非必填")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("无")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('上传全景影像:')"
-                                prop="panorama"
-                            >
-                                <el-radio-group v-model="form.panorama">
-                                    <el-radio :label="11">{{
-                                        $t("必填")
-                                    }}</el-radio>
-                                    <el-radio :label="1">{{
-                                        $t("非必填")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("无")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('是否合格:')"
-                                prop="passcheck"
-                            >
-                                <el-radio-group v-model="form.passcheck">
-                                    <el-radio :label="11">{{
-                                        $t("必填")
-                                    }}</el-radio>
-                                    <el-radio :label="1">{{
-                                        $t("非必填")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("无")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('是否客户签名:')"
-                                prop="signature"
-                            >
-                                <el-radio-group v-model="form.signature">
-                                    <el-radio :label="11">{{
-                                        $t("必填")
-                                    }}</el-radio>
-                                    <el-radio :label="1">{{
-                                        $t("非必填")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("无")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('内容是否需要验证表单:')"
-                                prop="formcheck"
-                            >
-                                <el-radio-group v-model="form.formcheck">
-                                    <el-radio :label="1">{{
-                                        $t("是")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("否")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="24">
-                            <el-form-item
-                                :label="$t('是否必填服务节点:')"
-                                prop="servicenode"
-                            >
-                                <el-radio-group v-model="form.servicenode">
-                                    <el-radio :label="1">{{
-                                        $t("是")
-                                    }}</el-radio>
-                                    <el-radio :label="0">{{
-                                        $t("否")
-                                    }}</el-radio>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                    </el-form>
-                </el-row>
-            </div>
-            <div class="fixed__btn__panel">
-                <el-button
-                    size="small"
-                    @click="onCancel"
-                    class="normal-btn-width"
-                    >{{ $t("取 消") }}</el-button
-                >
-                <el-button
-                    :loading="loading"
-                    class="normal-btn-width"
-                    size="small"
-                    :type="title_btn == '编辑' ? 'warning' : 'primary'"
-                    @click="onSubmit"
-                    >{{ title_btn == "编辑" ? $t("保 存") : $t("确 定") }}
-                </el-button>
-            </div>
-        </el-drawer>
-    </div>
+      </div>
+    </el-drawer>
+  </div>
 </template>
 <script>
 export default {
-    name: "add",
-    props: {
-        btn_size: String,
-        title_btn: String,
-        title_drawer: String,
-        data: Object,
+  name: "add",
+  props: {
+    btn_size: String,
+    title_btn: String,
+    title_drawer: String,
+    data: Object,
+  },
+  data() {
+    return {
+      loading: false,
+      dialogFormVisible: false,
+      currentData: {},
+      form: {
+        sc_workpresetid: 0,
+        workname: "",
+        remarks: "",
+        fileupload: 0, //附件上传,0不需要 1可上传 11必须上传
+        signature: 0, //客户签名,0不需要 1可填写 11必须填写
+        additem: 0, //物料添加,0不添加 1添加 11必须添加
+        passcheck: 0, //合格确认,0不需要 1需要 11必须
+        formcheck: 0, //表单验证,0 不需要 1 需要
+        panorama: 0, //全景影像,0不需要 1可上传 11必须上传
+        servicenode: 0, //服务节点,0 不需要 1 需要
+        logreport: 0, //是否施工日志汇报,0 不需要 1 需要
+      },
+      rules: {
+        workname: [
+          {
+            required: true,
+            message: this.$t("请输入工作名"),
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    //初始化
+    show() {
+      this.dialogFormVisible = true;
+      if (this.title_btn == "编辑") {
+        this.form = Object.assign({}, this.form, this.data);
+      }
     },
-    data() {
-        return {
-            loading: false,
-            dialogFormVisible: false,
-            currentData: {},
-            form: {
-                sc_workpresetid: 0,
-                workname: "",
-                remarks: "",
-                fileupload: 0, //附件上传,0不需要 1可上传 11必须上传
-                signature: 0, //客户签名,0不需要 1可填写 11必须填写
-                additem: 0, //物料添加,0不添加 1添加 11必须添加
-                passcheck: 0, //合格确认,0不需要 1需要 11必须
-                formcheck: 0, //表单验证,0 不需要 1 需要
-                panorama: 0, //全景影像,0不需要 1可上传 11必须上传
-                servicenode: 0, //服务节点,0 不需要 1 需要
+    onSubmit() {
+      this.$refs["form"].validate(async (valid) => {
+        if (!valid) return false;
+        this.loading = true;
+        const res = await this.$api.requested({
+          id: "2026051416454302",
+          content: this.form,
+        });
+        if (res.code === 0) {
+          this.loading = false;
+          this.$message.error(
+            res.msg || (this.title_btn == "编辑" ? this.$t("编辑失败") : this.$t("新建失败"))
+          );
+          return;
+        }
+        this.loading = false;
+        this.$message.success(
+          this.title_btn == "编辑" ? this.$t("编辑成功") : this.$t("新建成功")
+        );
+        this.$emit("onSuccess");
+        this.$refs["form"].resetFields();
+        this.dialogFormVisible = false;
+        setTimeout(() => {
+          this.$router.push({
+            path: "/serviceWorkItemDetail",
+            query: {
+              id: res.data.sc_workpresetid,
+              rowindex: res.data.rowindex,
             },
-            rules: {
-                workname: [
-                    {
-                        required: true,
-                        message: this.$t("请输入工作名"),
-                        trigger: "blur",
-                    },
-                ],
-            },
-        };
+          });
+          this.$store.dispatch("changeDetailDrawer", true);
+        }, 500);
+      });
     },
-    methods: {
-        //初始化
-        show() {
-            this.dialogFormVisible = true;
-            if (this.title_btn == "编辑") {
-                this.form = Object.assign({}, this.form, this.data);
-            }
-        },
-        onSubmit() {
-            console.log(this.form);
-            this.$refs["form"].validate(async (valid) => {
-                if (!valid) return false;
-                this.loading = true;
-                const res = await this.$api.requested({
-                    id: "2026051416454302",
-                    content: this.form,
-                });
-                this.tool.showMessage(res, () => {
-                    this.$emit("onSuccess");
-                    this.loading = false;
-                    this.$refs["form"].resetFields();
-                    this.dialogFormVisible = false;
-                    this.$store.dispatch("changeDetailDrawer", true);
-                    this.$router.push({
-                        path: "/serviceWorkItemDetail",
-                        query: {
-                            id: res.data.sc_workpresetid,
-                            rowindex: res.data.rowindex,
-                        },
-                    });
-                });
-            });
-        },
-        onCancel() {
-            this.dialogFormVisible = false;
-            this.$refs["form"].resetFields();
-        },
+    onCancel() {
+      this.dialogFormVisible = false;
+      this.$refs["form"].resetFields();
     },
+  },
 };
 </script>

+ 3 - 3
src/bgj/serviceAppointment/index.vue

@@ -44,8 +44,8 @@
                     <el-select
                         class="inline-24"
                         v-model="where.type"
-                        :placeholder="$t(`请选择工单类型`)"
-                        @focus="queryType('serviceworktype')"
+                        :placeholder="$t(`请选择服务类型`)"
+                        @focus="queryType('servicebookingtype')"
                         @change="selectChange"
                         size="small"
                         clearable
@@ -185,7 +185,7 @@ export default {
             if (this.options[type].length == 0) {
                 const res = await this.$store.dispatch(
                     "optiontypeselect",
-                    "servicebookingtype"
+                    type
                 );
                 this.options[type] = res.data;
             }

+ 69 - 61
src/bgj/serviceWorkItem/index.vue

@@ -1,73 +1,81 @@
 <template>
-    <div>
-        <basicLayout
-            ref="list"
-            formPath="serviceWorkItem"
-            tableName="serviceWorkItemTable"
-            idName="sc_workpresetid"
-            :apiId="{ query: 2026051416494002, del: 2026051416503602 }"
-            :detailPath="{
-                path: '/serviceWorkItemDetail',
-            }"
+  <div>
+    <basicLayout
+      ref="list"
+      formPath="serviceWorkItem"
+      tableName="serviceWorkItemTable"
+      idName="sc_workpresetid"
+      :apiId="{ query: 2026051416494002, del: 2026051416503602 }"
+      :detailPath="{
+        path: '/serviceWorkItemDetail',
+      }"
+    >
+      <template v-slot:tbList="scope">
+        <div
+          :style="
+            getColumnColor(
+              scope.data.column.columnname,
+              scope.data.column.data[scope.data.column.columnname]
+            )
+          "
         >
-            <template v-slot:tbList="scope">
-                <div>
-                    {{
-                        formatColumnValue(
-                            scope.data.column.columnname,
-                            scope.data.column.data[scope.data.column.columnname]
-                        )
-                    }}
-                </div>
-            </template>
-            <template v-slot:tbOpreation="scope"> </template>
-        </basicLayout>
-    </div>
+          {{
+            formatColumnValue(
+              scope.data.column.columnname,
+              scope.data.column.data[scope.data.column.columnname]
+            )
+          }}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope"> </template>
+    </basicLayout>
+  </div>
 </template>
 
 <script>
 export default {
-    data() {
-        return {
-            // 是否类型字段
-            booleanFields: ["formcheck", "servicenode"],
-
-            // 通用状态
-            commonStatusMap: {
-                0: "无",
-                1: "非必填",
-                11: "必填",
-            },
-
-            // 是否状态
-            booleanStatusMap: {
-                0: "否",
-                1: "是",
-            },
-        };
+  data() {
+    return {
+      // 是否类型字段
+      booleanFields: ["formcheck", "servicenode", "logreport"],
+      // 通用状态
+      commonStatusMap: { 0: "无", 1: "非必填", 11: "必填" },
+      // 是否状态
+      booleanStatusMap: { 0: "否", 1: "是" },
+    };
+  },
+  methods: {
+    formatColumnValue(columnName, value) {
+      const map = this.booleanFields.includes(columnName)
+        ? this.booleanStatusMap
+        : this.commonStatusMap;
+      return this.$t(map[value] || value || "--");
     },
-    methods: {
-        formatColumnValue(columnName, value) {
-            const map = this.booleanFields.includes(columnName)
-                ? this.booleanStatusMap
-                : this.commonStatusMap;
-            return this.$t(map[value] || value || "--");
-        },
-        detailGo(row) {
-            let route = this.$route;
-            if (route.path !== "/serviceWorkItemDetail") {
-                this.oldRoute = { path: route.path, query: route.query };
-                this.$store.dispatch("setHistoryRouter", this.oldRoute);
-            }
-            this.$router.push({
-                path: "/serviceWorkItemDetail",
-                query: {
-                    id: row.sc_workpresetid,
-                    rowindex: row.rowindex,
-                },
-            });
+    // 返回颜色样式
+    getColumnColor(columnName, value) {
+      if (this.booleanFields.includes(columnName)) {
+        return value === 1 ? "color:#ff0000" : "color:#666666";
+      } else {
+        if (value === 11) return "color:#ff0000";
+        if (value === 1) return "color:#008000";
+        return "";
+      }
+    },
+    detailGo(row) {
+      let route = this.$route;
+      if (route.path !== "/serviceWorkItemDetail") {
+        this.oldRoute = { path: route.path, query: route.query };
+        this.$store.dispatch("setHistoryRouter", this.oldRoute);
+      }
+      this.$router.push({
+        path: "/serviceWorkItemDetail",
+        query: {
+          id: row.sc_workpresetid,
+          rowindex: row.rowindex,
         },
+      });
     },
+  },
 };
 </script>
 <style></style>

+ 18 - 0
src/bgj/serviceWorkItem/modules/detail.vue

@@ -226,6 +226,24 @@ export default {
                         return style;
                     },
                 },
+                {
+                    label: "是否施工日志汇报",
+                    value: this.mainData.logreport ? "是" : "否",
+                    style: function () {
+                        let style = {};
+                        switch (that.mainData.logreport) {
+                            case 1:
+                                style = { color: "#ff0000" };
+                                break;
+                            case 0:
+                                style = { color: "#666666" };
+                                break;
+                            default:
+                                break;
+                        }
+                        return style;
+                    },
+                },
                 {
                     label: "操作说明",
                     value: this.mainData.remarks || "--",

+ 2 - 2
src/bgj/terminalWorkBillModule/index.vue

@@ -73,9 +73,9 @@ export default {
     },
     methods: {
         switchChange(data, newVal) {
-            const actionText = newVal == 1 ? "启用" : "用";
+            const actionText = newVal == 1 ? "启用" : "用";
             this.$confirm(
-                this.$t(`确认${actionText}当前工单模板吗`) + "?",
+                this.$t('确认') + this.$t(actionText) + this.$t('当前工单模板')+'?',
                 this.$t("提示"),
                 {
                     confirmButtonText: this.$t("确定"),

+ 21 - 3
src/bgj/terminalWorkBillModule/modules/detail.vue

@@ -37,8 +37,8 @@
                     type="warning"
                     size="mini"
                     :loading="btnLoading"
-                    @click="onToggleUsed(0, '用')"
-                    >{{ $t(" 用") }}</el-button
+                    @click="onToggleUsed(0, '用')"
+                    >{{ $t(" 用") }}</el-button
                 >
                 <el-button type="danger" @click="onDelete" size="mini">{{
                     $t(`删 除`)
@@ -81,7 +81,7 @@ export default {
     methods: {
         onToggleUsed(value, actionText) {
             this.$confirm(
-                this.$t(`确认${actionText}当前工单模板吗`) + "?",
+                this.$t('确认') + this.$t(actionText) + this.$t('当前工单模板')+'?',
                 this.$t("提示"),
                 {
                     confirmButtonText: this.$t("确定"),
@@ -305,6 +305,24 @@ export default {
                             return style;
                         },
                     },
+                    {
+                    label: "是否工单完结时生成质保卡",
+                    value: this.mainData.iswarrantycard ? "是" : "否",
+                    style: function () {
+                        let style = {};
+                        switch (that.mainData.iswarrantycard) {
+                            case 1:
+                                style = { color: "#ff0000" };
+                                break;
+                            case 0:
+                                style = { color: "#666666" };
+                                break;
+                            default:
+                                break;
+                        }
+                        return style;
+                    },
+                },
                 ],
                 systemInfo: [
                     { label: "创建人", value: this.mainData.createby },

+ 33 - 19
src/bgj/terminalWorkBillModule/modules/taskDetail/components/addTop.vue

@@ -48,9 +48,9 @@
                             :style="
                                 scope.column.data.fileupload
                                     ? scope.column.data.fileupload == 1
-                                        ? 'color:green'
-                                        : 'color:red'
-                                    : 'color:#333333'
+                                        ? 'color:#008000'
+                                        : 'color:#ff0000'
+                                    : ''
                             "
                         >
                             {{
@@ -66,9 +66,9 @@
                             :style="
                                 scope.column.data.additem
                                     ? scope.column.data.additem == 1
-                                        ? 'color:green'
-                                        : 'color:red'
-                                    : 'color:#333333'
+                                        ? 'color:#008000'
+                                        : 'color:#ff0000'
+                                    : ''
                             "
                         >
                             {{
@@ -83,8 +83,8 @@
                             v-else-if="scope.column.columnname == 'formcheck'"
                             :style="
                                 scope.column.data.formcheck == 1
-                                    ? 'color:green'
-                                    : 'color:red'
+                                    ? 'color:#ff0000'
+                                    : 'color:#666666'
                             "
                         >
                             {{
@@ -98,9 +98,9 @@
                             :style="
                                 scope.column.data.panorama
                                     ? scope.column.data.panorama == 1
-                                        ? 'color:green'
-                                        : 'color:red'
-                                    : 'color:#333333'
+                                        ? 'color:#008000'
+                                        : 'color:#ff0000'
+                                    : ''
                             "
                         >
                             {{
@@ -116,9 +116,9 @@
                             :style="
                                 scope.column.data.passcheck
                                     ? scope.column.data.passcheck == 1
-                                        ? 'color:green'
-                                        : 'color:red'
-                                    : 'color:#333333'
+                                        ? 'color:#008000'
+                                        : 'color:#ff0000'
+                                    : ''
                             "
                         >
                             {{
@@ -134,9 +134,9 @@
                             :style="
                                 scope.column.data.signature
                                     ? scope.column.data.signature == 1
-                                        ? 'color:green'
-                                        : 'color:red'
-                                    : 'color:#333333'
+                                        ? 'color:#008000'
+                                        : 'color:#ff0000'
+                                    : ''
                             "
                         >
                             {{
@@ -151,8 +151,8 @@
                             v-else-if="scope.column.columnname == 'servicenode'"
                             :style="
                                 scope.column.data.servicenode == 1
-                                    ? 'color:green'
-                                    : 'color:red'
+                                    ? 'color:#ff0000'
+                                    : 'color:#666666'
                             "
                         >
                             {{
@@ -161,6 +161,20 @@
                                     : $t("否")
                             }}
                         </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'logreport'"
+                            :style="
+                                scope.column.data.logreport == 1
+                                    ? 'color:#ff0000'
+                                    : 'color:#666666'
+                            "
+                        >
+                            {{
+                                scope.column.data.logreport == 1
+                                    ? $t("是")
+                                    : $t("否")
+                            }}
+                        </div>
                         <div v-else>
                             {{
                                 scope.column.data[[scope.column.columnname]]

+ 15 - 12
src/bgj/terminalWorkBillModule/modules/taskDetail/index.vue

@@ -49,14 +49,14 @@
                 prop="workname"
                 :label="$t(`工序内容`)"
                 show-overflow-tooltip
-                width="160"
+                 min-width="160"
             >
             </el-table-column>
             <el-table-column
                 prop="remarks"
                 show-overflow-tooltip
                 :label="$t(`操作说明`)"
-                width="160"
+                min-width="180"
             >
                 <template slot-scope="scope">
                     {{ scope.row.remarks ? scope.row.remarks : "--" }}
@@ -65,7 +65,7 @@
             <el-table-column
                 prop="fileupload"
                 :label="$t(`上传附件`)"
-                width="100"
+                width="120"
             >
                 <template slot-scope="scope">
                     {{
@@ -80,7 +80,7 @@
             <el-table-column
                 prop="additem"
                 :label="$t(`是否添加物料`)"
-                width="100"
+                width="120"
             >
                 <template slot-scope="scope">
                     {{
@@ -104,7 +104,7 @@
             <el-table-column
                 prop="panorama"
                 :label="$t(`上传全景影像`)"
-                width="120"
+                width="140"
             >
                 <template slot-scope="scope">
                     {{
@@ -150,15 +150,18 @@
                 prop="servicenode"
                 :label="$t(`是否必填服务节点`)"
                 width="160"
+            >
+                 <template slot-scope="scope">
+                    {{ scope.row.servicenode == 1 ? $t("是") : $t("否") }}
+                </template>
+            </el-table-column>
+            <el-table-column
+                prop="logreport"
+                :label="$t(`是否施工日志汇报`)"
+                width="160"
             >
                 <template slot-scope="scope">
-                    {{
-                        scope.row.servicenode
-                            ? scope.row.servicenode == 1
-                                ? $t("非必填")
-                                : $t("必填")
-                            : $t("无")
-                    }}
+                    {{ scope.row.logreport == 1 ? $t("是") : $t("否") }}
                 </template>
             </el-table-column>
             <el-table-column :label="$t('操作')" width="200" fixed="right">

+ 107 - 0
src/bgj/workOrderManage/components/del.vue

@@ -0,0 +1,107 @@
+<template>
+  <div>
+    <el-button
+      slot="reference"
+      :type="disabled ? 'text' : 'primary'"
+      size="mini"
+      
+      @click="dialogTableVisible = true"
+      >{{ $t("作 废") }}</el-button
+    >
+    <el-dialog
+      :title="$t(`提示`)"
+      append-to-body
+      :visible.sync="dialogTableVisible"
+      width="500px"
+    >
+      <el-row :gutter="20">
+        <el-form
+          label-position="top"
+          ref="form"
+          :rules="rules"
+          inline
+          :label-width="tool.onlyZh('100px')"
+          :model="form"
+          size="small"
+        >
+         <el-col :span="24">
+            <el-form-item :label="$t(`作废原因`)" prop="voidreason">
+              <el-input
+                v-model="form.voidreason"
+                :placeholder="$t(`请填写`)"
+                style="width: 100%;"
+              ></el-input>
+            </el-form-item>
+            </el-col>
+        </el-form>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <div>
+          <el-button @click="dialogTableVisible = false" size="small">{{
+            $t("取 消")
+          }}</el-button>
+          <el-button type="primary" @click="submit" size="small">{{
+            $t("确 定")
+          }}</el-button>
+        </div>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+/*
+id:数据id
+nameId:接口id
+nameKey:接口字段
+ */
+export default {
+  data() {
+    return {
+      dialogTableVisible: false,
+      form: {
+        sc_workorderid: "",
+        voidreason: "",
+      },
+      rules: {
+        voidreason: [
+          {
+            required: true,
+            message: this.$t("请填写作废原因"),
+            trigger: "blur",
+          },
+        ],
+      },
+    };
+  },
+  props: ["id", "disabled"],
+  methods: {
+    submit() {
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false;
+        this.form.sc_workorderid = this.id;
+        let res = await this.$api.requested({
+          id: 2026052113565202,
+          content: this.form,
+        });
+        this.tool.showMessage(res, () => {
+          this.$emit("deleteSuccess");
+          this.dialogTableVisible = false;
+        });
+      });
+    },
+  },
+  created() {},
+};
+</script>
+<style scoped>
+/deep/.el-form-item {
+  width: 100% !important;
+}
+/deep/.el-dialog__header{
+  border-bottom: 1px solid #dcdfe6;
+}
+/deep/.el-dialog__footer{
+  border-top: 1px solid #dcdfe6;
+}
+</style>

+ 343 - 0
src/bgj/workOrderManage/index.vue

@@ -0,0 +1,343 @@
+<template>
+  <div>
+    <basicLayout
+      ref="list"
+      formPath="workOrderManage"
+      tableName="workOrderManageTable"
+      idName="sc_workorderid"
+      :apiId="{ query: 2026052113525502 }"
+      :detailPath="{
+        path: '/workOrderManageDetail',
+      }"
+    >
+      <template #custom>
+        <div class="mt-10">
+          <label class="search__label">{{ $t("状态") }}:</label>
+          <el-select
+            class="inline-24"
+            v-model="status"
+            :placeholder="$t(`请选择状态`)"
+            @change="selectChange"
+            size="small"
+            clearable
+          >
+            <el-option :label="$t(`待开始`)" value="待开始"></el-option>
+            <el-option :label="$t(`进行中`)" value="进行中"></el-option>
+            <el-option :label="$t(`暂停`)" value="暂停"></el-option>
+            <el-option :label="$t(`已完成`)" value="已完成"> </el-option>
+            <el-option :label="$t(`质保卡审批`)" value="质保卡审批">
+            </el-option>
+            <el-option :label="$t(`作废`)" value="作废"></el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label">{{ $t("工单类型") }}:</label>
+          <el-select
+            class="inline-24"
+            v-model="where.type"
+            :placeholder="$t(`请选择工单类型`)"
+            @focus="queryType('endcustomerserviceworktype')"
+            @change="selectChange"
+            size="small"
+            clearable
+          >
+            <el-option
+              v-for="item in options.endcustomerserviceworktype"
+              :key="item.value"
+              :label="$t(item.value)"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label">{{ $t("服务类型") }}:</label>
+          <el-select
+            class="inline-24"
+            v-model="where.servicetype"
+            :placeholder="$t(`请选择服务类型`)"
+            @focus="queryType('servicebookingtype')"
+            @change="selectChange"
+            size="small"
+            clearable
+          >
+            <el-option
+              v-for="item in options.servicebookingtype"
+              :key="item.value"
+              :label="$t(item.value)"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+        </div>
+        <div class="mt-10">
+          <label class="search__label">{{ $t("创建时间") }}:</label>
+          <el-date-picker
+            style="margin-right: 24px !important"
+            size="small"
+            @change="selectChange"
+            value-format="yyyy-MM-dd"
+            v-model="createDate"
+            type="daterange"
+            :range-separator="$t(`至`)"
+            :start-placeholder="$t(`开始日期`)"
+            :end-placeholder="$t(`结束日期`)"
+            clearable
+          >
+          </el-date-picker>
+        </div>
+        <div class="mt-10">
+          <label class="search__label">{{ $t("完成时间") }}:</label>
+          <el-date-picker
+            style="margin-right: 24px !important"
+            size="small"
+            @change="selectChange"
+            value-format="yyyy-MM-dd"
+            v-model="finishDate"
+            type="daterange"
+            :range-separator="$t(`至`)"
+            :start-placeholder="$t(`开始日期`)"
+            :end-placeholder="$t(`结束日期`)"
+            clearable
+          >
+          </el-date-picker>
+        </div>
+      </template>
+      <template v-slot:tbList="scope">
+        <div v-if="scope.data.column.columnname == 'status'">
+          <span
+            :style="
+              tool.getStatusColor(
+                scope.data.column.data[[scope.data.column.columnname]]
+              )
+            "
+            >{{
+              $t(scope.data.column.data[[scope.data.column.columnname]])
+            }}</span
+          >
+        </div>
+        <div v-else-if="scope.data.column.columnname == 'city'">
+          <span>
+            {{ $t(scope.data.column.data.province)
+            }}{{ $t(scope.data.column.data.city)
+            }}{{ $t(scope.data.column.data.county) }}
+          </span>
+        </div>
+        <div v-else-if="scope.data.column.columnname == 'progress'">
+          <div style="display: flex; align-items: center">
+            <el-progress
+              status="success"
+              :percentage="
+                Math.round(
+                  (scope.data.column.data.progress_now /
+                    scope.data.column.data.progress_total) *
+                    100
+                )
+              "
+              :show-text="false"
+              style="flex: 1"
+            >
+            </el-progress>
+            <span style="margin-left: 10px">
+              {{ scope.data.column.data.progress_now }}/{{
+                scope.data.column.data.progress_total
+              }}
+            </span>
+          </div>
+        </div>
+        <div v-else>
+          {{
+            scope.data.column.data[[scope.data.column.columnname]]
+              ? $t(scope.data.column.data[[scope.data.column.columnname]])
+              : "--"
+          }}
+        </div>
+      </template>
+      <template v-slot:tbOpreation="scope">
+        <el-button
+          v-if="
+            scope.data.data.status === '进行中' &&
+            tool.checkAuth($route.name, 'stop')
+          "
+          type="text"
+          @click="onStop(scope.data.data)"
+          size="mini"
+        >
+          {{ $t(`暂 停`) }}
+        </el-button>
+        <el-button
+          v-if="
+            scope.data.data.status === '暂停' &&
+            tool.checkAuth($route.name, 'turnOn')
+          "
+          type="text"
+          @click="onTurnOn(scope.data.data)"
+          size="mini"
+        >
+          {{ $t(`启 用`) }}
+        </el-button>
+        <Del
+          v-if="
+            scope.data.data.status !== '已完成' &&
+            scope.data.data.status !== '作废' &&
+            scope.data.data.status !== '质保卡审批' &&
+            tool.checkAuth($route.name, 'cancellation')
+          "
+          class="inline-16"
+          :id="scope.data.data.sc_workorderid"
+          :disabled="true"
+          @deleteSuccess="onSuccess"
+        />
+      </template>
+    </basicLayout>
+  </div>
+</template>
+
+<script>
+import Del from "./components/del";
+export default {
+  components: { Del },
+  data() {
+    return {
+      options: {
+        endcustomerserviceworktype: [],
+        servicebookingtype: [],
+      },
+      where: {
+        status: [], //工单状态,可多选
+        type: "", //工单类型
+        servicetype: "", //服务类型
+        begindate_createdate: "",
+        enddate_createdate: "",
+        begindate_finishdate: "",
+        enddate_finishdate: "",
+      },
+      status: "",
+      createDate: "",
+      finishDate: "",
+    };
+  },
+  methods: {
+    onStop(value) {
+      this.$confirm(
+        this.$t("是否确定将工单") +
+          this.$t(value.billno) +
+          this.$t("暂停") +
+          "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          type: "warning",
+          beforeClose: async (action, instance, done) => {
+            if (action === "confirm") {
+              instance.confirmButtonLoading = true;
+              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;
+                  return;
+                }
+                this.tool.showMessage(res, () => {
+                  setTimeout(() => {
+                    instance.confirmButtonLoading = false;
+                    done();
+                    this.onSuccess();
+                  }, 500);
+                });
+              } catch (error) {
+                instance.confirmButtonLoading = false;
+              }
+            } else {
+              done();
+            }
+          },
+        }
+      ).catch(() => {});
+    },
+    onTurnOn(value) {
+      this.$confirm(
+        this.$t("是否确定将工单") +
+          this.$t(value.billno) +
+          this.$t("启用") +
+          "?",
+        this.$t("提示"),
+        {
+          confirmButtonText: this.$t("确定"),
+          cancelButtonText: this.$t("取消"),
+          type: "warning",
+          beforeClose: async (action, instance, done) => {
+            if (action === "confirm") {
+              instance.confirmButtonLoading = true;
+              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;
+                  return;
+                }
+                this.tool.showMessage(res, () => {
+                  setTimeout(() => {
+                    instance.confirmButtonLoading = false;
+                    done();
+                    this.onSuccess();
+                  }, 500);
+                });
+              } catch (error) {
+                instance.confirmButtonLoading = false;
+              }
+            } else {
+              done();
+            }
+          },
+        }
+      ).catch(() => {});
+    },
+    async queryType(type) {
+      if (this.options[type].length == 0) {
+        const res = await this.$store.dispatch("optiontypeselect", type);
+        this.options[type] = res.data;
+      }
+    },
+    selectChange() {
+      if (this.status) {
+        this.where.status = [this.status];
+      } else {
+        this.where.status = [];
+      }
+      if (this.createDate) {
+        this.where.begindate_createdate = this.createDate[0];
+        this.where.enddate_createdate = this.createDate[1];
+      } else {
+        this.where.begindate_createdate = "";
+        this.where.enddate_createdate = "";
+      }
+      if (this.finishDate) {
+        this.where.begindate_finishdate = this.finishDate[0];
+        this.where.enddate_finishdate = this.finishDate[1];
+      } else {
+        this.where.begindate_finishdate = "";
+        this.where.enddate_finishdate = "";
+      }
+      this.$refs.list.param.content.where = this.where;
+      this.$refs.list.param.content.pageNumber = 1;
+      this.$refs.list.listData();
+    },
+    onSuccess() {
+      this.$refs.list.listData();
+    },
+  },
+};
+</script>
+<style></style>

+ 370 - 0
src/bgj/workOrderManage/modules/detail.vue

@@ -0,0 +1,370 @@
+<template>
+  <div>
+    <basicDetails
+      ref="details"
+      :titleText="mainData.billno"
+      :editData="mainData"
+      :mainAreaData="mainAreaData"
+      turnPageId="2026051510000003"
+      idname="sc_workorderid"
+      ownertable="sc_workorder"
+      tags=""
+      :tabs="['工单信息', '工序信息', '工单物料', '团队信息', '质保卡申请记录']"
+      :column="5"
+      @pageChange="pageChange"
+      @onEditSuccess="queryMainData($route.query.id)"
+    >
+      <div slot="tags"></div>
+      <template slot="customOperation">
+        <el-button
+          v-if="
+            mainData.status === '进行中' && tool.checkAuth($route.name, 'stop')
+          "
+          type="text"
+          @click="onStop(mainData)"
+          size="mini"
+        >
+          {{ $t(`暂 停`) }}
+        </el-button>
+        <el-button
+          v-if="
+            mainData.status === '暂停' && tool.checkAuth($route.name, 'turnOn')
+          "
+          type="text"
+          @click="onTurnOn(mainData)"
+          size="mini"
+        >
+          {{ $t(`启 用`) }}
+        </el-button>
+        <Del
+          v-if="
+            mainData.status !== '已完成' &&
+            mainData.status !== '作废' &&
+            mainData.status !== '质保卡审批' &&
+            tool.checkAuth($route.name, 'cancellation')
+          "
+          class="inline-16"
+          :id="mainData.sc_workorderid"
+          @deleteSuccess="queryMainData"
+        />
+      </template>
+      <div slot="slot0">
+        <base-info v-if="detailInfo" :detailInfo="detailInfo"></base-info>
+      </div>
+      <div slot="slot1"></div>
+    </basicDetails>
+  </div>
+</template>
+
+<script>
+import BaseInfo from "@/bgj/headquartersServiceMaterial/modules/baseInfo";
+import Del from "../components/del";
+export default {
+  name: "detail",
+  data() {
+    return {
+      mainData: {},
+      mainAreaData: {},
+      detailInfo: "",
+      btnLoading: false,
+    };
+  },
+  components: { BaseInfo, Del },
+  methods: {
+    async queryMainData() {
+      const res = await this.$api.requested({
+        id: 2026052113534102,
+        content: {
+          nocache: true,
+          sc_workorderid: this.$route.query.id,
+        },
+      });
+      this.mainData = res.data;
+      this.changeDataStructure();
+      console.log("this.mainData", this.mainData);
+    },
+    changeDataStructure() {
+      let that = this;
+      this.mainAreaData = [
+        {
+          label: "工单号",
+          value: this.mainData.billno,
+        },
+        {
+          label: "预约单号",
+          value: this.mainData.servicebillno,
+        },
+        {
+          label: "工单状态",
+          value: this.$t(this.mainData.status),
+          style: function () {
+            let style = that.tool.getStatusColor(that.mainData.status);
+            return style;
+          },
+        },
+        {
+          label: "客户姓名",
+          value: this.mainData.name,
+        },
+        {
+          label: "客户电话",
+          value: this.mainData.phonenumber,
+        },
+        {
+          label: "省市县",
+          value:
+            this.mainData.province + this.mainData.city + this.mainData.county,
+        },
+        {
+          label: "详细地址",
+          value: this.mainData.address,
+        },
+        {
+          label: "服务类型",
+          value: this.$t(this.mainData.servicetype),
+          style: function () {
+            let style = that.tool.getStatusColor(that.mainData.servicetype);
+            return style;
+          },
+        },
+        {
+          label: "工单类型",
+          value: this.$t(this.mainData.type),
+          style: function () {
+            let style = that.tool.getStatusColor(that.mainData.type);
+            return style;
+          },
+        },
+        {
+          label: "现场联系人",
+          value: this.mainData.scenecontact,
+        },
+        {
+          label: "现场联系人电话",
+          value: this.mainData.scenecontactphonenumber,
+        },
+        {
+          label: "负责人",
+          value: this.mainData.leadername,
+        },
+        {
+          label: "经销商",
+          value: this.mainData.enterprisename,
+        },
+        {
+          label: "创建时间",
+          value: this.mainData.createdate,
+        },
+        {
+          label: "完成时间",
+          value: this.mainData.finishdate,
+        },
+        {
+          label: "作废原因",
+          value: this.mainData.voidreason,
+        },
+        {
+          label: "备注",
+          value: this.mainData.remarks,
+        },
+      ];
+      this.detailInfo = {
+        baseInfo: [
+          {
+            label: "工单号",
+            value: this.mainData.billno,
+          },
+          {
+            label: "预约单号",
+            value: this.mainData.servicebillno,
+          },
+          {
+            label: "工单状态",
+            value: this.$t(this.mainData.status),
+            style: function () {
+              let style = that.tool.getStatusColor(that.mainData.status);
+              return style;
+            },
+          },
+          {
+            label: "服务类型",
+            value: this.$t(this.mainData.servicetype),
+            style: function () {
+              let style = that.tool.getStatusColor(that.mainData.servicetype);
+              return style;
+            },
+          },
+          {
+            label: "工单类型",
+            value: this.$t(this.mainData.type),
+            style: function () {
+              let style = that.tool.getStatusColor(that.mainData.type);
+              return style;
+            },
+          },
+          {
+            label: "客户姓名",
+            value: this.mainData.name,
+          },
+          {
+            label: "客户电话",
+            value: this.mainData.phonenumber,
+          },
+          {
+            label: "省市县",
+            value:
+              this.mainData.province +
+              this.mainData.city +
+              this.mainData.county,
+          },
+          {
+            label: "详细地址",
+            value: this.mainData.address,
+          },
+          {
+            label: "厨房数",
+            value: this.mainData.kitchen,
+          },
+          {
+            label: "卫生间数",
+            value: this.mainData.toilet,
+          },
+          {
+            label: "阳台数",
+            value: this.mainData.balcony,
+          },
+          {
+            label: "现场联系人",
+            value: this.mainData.scenecontact,
+          },
+          {
+            label: "现场联系人电话",
+            value: this.mainData.scenecontactphonenumber,
+          },
+          {
+            label: "负责人",
+            value: this.mainData.leadername,
+          },
+          {
+            label: "经销商",
+            value: this.mainData.enterprisename,
+          },
+          {
+            label: "备注",
+            value: this.mainData.remarks,
+          },
+        ],
+        systemInfo: [
+          {
+            label: "创建时间",
+            value: this.mainData.createdate,
+          },
+          {
+            label: "开始时间",
+            value: this.mainData.startdate,
+          },
+          {
+            label: "完成时间",
+            value: this.mainData.finishdate,
+          },
+          {
+            label: "作废时间",
+            value: this.mainData.voiddate,
+          },
+          {
+            label: "作废原因",
+            value: this.mainData.voidreason,
+          },
+        ],
+      };
+    },
+    onStop(value) {
+      this.$confirm(this.$t("是否确定暂停执行该工单") + "?", this.$t("提示"), {
+        confirmButtonText: this.$t("确定"),
+        cancelButtonText: this.$t("取消"),
+        type: "warning",
+        beforeClose: async (action, instance, done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            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;
+                return;
+              }
+              this.tool.showMessage(res, () => {
+                setTimeout(() => {
+                  instance.confirmButtonLoading = false;
+                  done();
+                  this.onSuccess();
+                }, 500);
+              });
+            } catch (error) {
+              instance.confirmButtonLoading = false;
+            }
+          } else {
+            done();
+          }
+        },
+      }).catch(() => {});
+    },
+    onTurnOn(value) {
+      this.$confirm(this.$t("是否启用继续执行该工单") + "?", this.$t("提示"), {
+        confirmButtonText: this.$t("确定"),
+        cancelButtonText: this.$t("取消"),
+        type: "warning",
+        beforeClose: async (action, instance, done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            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;
+                return;
+              }
+              this.tool.showMessage(res, () => {
+                setTimeout(() => {
+                  instance.confirmButtonLoading = false;
+                  done();
+                  this.onSuccess();
+                }, 500);
+              });
+            } catch (error) {
+              instance.confirmButtonLoading = false;
+            }
+          } else {
+            done();
+          }
+        },
+      }).catch(() => {});
+    },
+    // 监听切换数据,上一页,下一页
+    pageChange(id, rowindex, tabIndex) {
+      this.flag = false;
+      tabIndex = this.$route.query.tabIndex;
+      this.$router.replace({
+        path: "/ourServiceMaterialDetail",
+        query: { id: id, rowindex: rowindex, tabIndex: tabIndex },
+      });
+      this.queryMainData(id);
+    },
+  },
+  mounted() {
+    this.queryMainData(this.$route.query.id);
+  },
+};
+</script>
+
+<style scoped></style>

+ 23 - 0
src/router/bgj.js

@@ -173,6 +173,29 @@ const bgj = [
           import(/* webpackChunkName: "about" */ '@/bgj/pointsbasedorder/modules/detail'),
       },
     ],
+  },
+  {
+    path: '/workOrderManage',
+    name: 'workOrderManage',
+    meta: {
+      title: '工单管理',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/bgj/workOrderManage/index'),
+    children: [
+      {
+        path: '/workOrderManageDetail',
+        name: 'workOrderManage',
+        meta: {
+          title: '工单管理详情',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "about" */ '@/bgj/workOrderManage/modules/detail'),
+      },
+    ],
   }
 ];
 export default bgj;