Ver Fonte

终端工单模板 应用开发

NULL1222 há 1 mês atrás
pai
commit
17cac930e3

+ 3 - 14
src/Form/serviceWorkItem/add.vue

@@ -1,10 +1,10 @@
 <template>
     <div>
-        <el-button size="small" type="primary" @click="show">
+        <el-button size="mini" type="primary" @click="show">
             {{ title_btn ? $t(title_btn) : $t('新 建') }}
         </el-button>
         <el-drawer
-            :title="title_drawer ? $t(title_drawer) : $t(`新服务工作项`)"
+            :title="title_drawer ? $t(title_drawer) : $t(`新服务工作项`)"
             :visible.sync="dialogFormVisible"
             direction="rtl"
             append-to-body
@@ -143,18 +143,7 @@ export default {
         show() {
             this.dialogFormVisible = true;
             if (this.title_btn == '编辑') {
-                this.form = {
-                    sc_workpresetid: this.data.sc_workpresetid,
-                    workname: this.data.workname,
-                    remarks: this.data.remarks,
-                    fileupload: this.data.fileupload,
-                    signature: this.data.signature,
-                    additem: this.data.additem,
-                    passcheck: this.data.passcheck,
-                    formcheck: this.data.formcheck,
-                    panorama: this.data.panorama,
-                    servicenode: this.data.servicenode,
-                };
+                this.form = Object.assign({}, this.form, this.data);
             }
         },
         onSubmit() {

+ 152 - 0
src/Form/terminalWorkBillModule/add.vue

@@ -0,0 +1,152 @@
+<template>
+    <div>
+        <el-button size="mini" type="primary" @click="show">
+            {{ title_btn ? $t(title_btn) : $t('新 建') }}
+        </el-button>
+        <el-dialog
+            :title="title_drawer ? $t(title_drawer) : $t(`新建工单模板`)"
+            append-to-body
+            :visible.sync="dialogFormVisible"
+            width="30%"
+        >
+            <el-row :gutter="20">
+                <el-form
+                    :model="form"
+                    :rules="rules"
+                    ref="form"
+                    :label-width="tool.onlyZh('120px')"
+                    label-position="right"
+                    size="mini"
+                >
+                    <el-col :span="24">
+                        <el-form-item :label="$t('模板名称:')" prop="name">
+                            <el-input v-model="form.name" :placeholder="$t('请填写')"></el-input>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item :label="$t('工单类型:')" prop="type">
+                            <el-cascader
+                                v-model="form.type"
+                                :options="typeOptions"
+                                :props="typeProps"
+                                clearable
+                                :placeholder="$t('请选择')"
+                                style="width: 100%"
+                            />
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="24">
+                        <el-form-item>
+                            <el-checkbox v-model="form.isworkorder" :true-label="1" :false-label="0">
+                                {{ $t('是否有后续工单') }}
+                            </el-checkbox>
+
+                            <el-checkbox v-model="form.ispoints" :true-label="1" :false-label="0">
+                                {{ $t('是否积分计算') }}
+                            </el-checkbox>
+                        </el-form-item>
+                    </el-col>
+                </el-form>
+            </el-row>
+            <div class="dialog-footer">
+                <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-dialog>
+    </div>
+</template>
+<script>
+export default {
+    name: 'add',
+    props: { title_btn: String, title_drawer: String, data: Object },
+    data() {
+        return {
+            typeOptions: [], //工单类型
+            typeProps: {
+                value: 'value',
+                label: 'label',
+                children: 'children',
+                checkStrictly: true, //允许只选一级
+            },
+            loading: false,
+            dialogFormVisible: false,
+            currentData: {},
+            form: {
+                sc_workorder_templateid: 0,
+                name: '', //模板名称
+                type: '', //工单类型
+                isused: 0, //是否启用
+                isworkorder: 0, //是否有后续工单 否0,是1 默认否
+                ispoints: 0, //是否积分计算 否0,是1 默认否
+            },
+            rules: {
+                name: [{ required: true, message: this.$t('请填写模板名称'), trigger: 'blur' }],
+                type: [{ required: true, message: this.$t('请选择工单类型'), trigger: 'change' }],
+            },
+        };
+    },
+    methods: {
+        async getWorktype() {
+            const res = await this.$store.dispatch('optiontypeselect', 'endcustomerserviceworktype');
+            console.log('工单类型', res.data);
+            this.typeOptions = res.data.map((item) => {
+                return {
+                    value: item.value,
+                    label: item.value,
+                    children:
+                        item.subvalues && item.subvalues.length
+                            ? item.subvalues.map((sub) => ({
+                                  value: sub,
+                                  label: sub,
+                              }))
+                            : undefined,
+                };
+            });
+        },
+        //初始化
+        show() {
+            this.getWorktype();
+            this.dialogFormVisible = true;
+            if (this.title_btn == '编辑') {
+                this.form = Object.assign({}, this.form, this.data);
+                this.form.type = this.data.type ? this.data.type.split('/') : [];
+            }
+        },
+        onSubmit() {
+            console.log(this.form);
+            this.$refs['form'].validate(async (valid) => {
+                if (!valid) return false;
+                this.loading = true;
+                this.form.type = this.form.type.join('/');
+                const res = await this.$api.requested({
+                    id: '2026051511251702',
+                    content: this.form,
+                });
+                this.tool.showMessage(res, () => {
+                    this.$emit('onSuccess');
+                    this.loading = false;
+                    this.$refs['form'].resetFields();
+                    this.dialogFormVisible = false;
+                });
+            });
+        },
+        onCancel() {
+            this.dialogFormVisible = false;
+            this.$refs['form'].resetFields();
+        },
+        async queryType(type) {
+            if (this.options[type].length == 0) {
+                const res = await this.$store.dispatch('optiontypeselect', type);
+                this.options[type] = res.data;
+            }
+        },
+    },
+};
+</script>

+ 0 - 1
src/HDrpManagement/serviceWorkItem/modules/detail.vue

@@ -3,7 +3,6 @@
         <basicDetails
             ref="details"
             :titleText="mainData.workname"
-            :oldFormPath="{ edit: 'HManagement/serviceWorkItem/modules' }"
             :editData="mainData"
             :mainAreaData="mainAreaData"
             turnPageId="2026051416481302"

+ 73 - 0
src/HDrpManagement/terminalWorkBillModule/index.vue

@@ -0,0 +1,73 @@
+<template>
+    <div>
+        <basicLayout
+            ref="list"
+            formPath="terminalWorkBillModule"
+            tableName="terminalWorkBillModuleTable"
+            idName="sc_workorder_templateid"
+            :apiId="{ query: 2026051511261302, del: 2026051513132402 }"
+            :detailPath="{
+                path: '/terminalWorkBillModuleDetail',
+            }"
+        >
+            <template v-slot:tbList="scope">
+                <div v-if="scope.data.column.columnname == 'isworkorder'">
+                    {{ scope.data.column.data.isworkorder == 1 ? $t('是') : $t('否') }}
+                </div>
+                <div v-else-if="scope.data.column.columnname == 'ispoints'">
+                    {{ scope.data.column.data.ispoints == 1 ? $t('是') : $t('否') }}
+                </div>
+                <div v-else-if="scope.data.column.columnname == 'isused'">
+                    <!-- <el-switch
+                        v-model="scope.data.column.data.isused"
+                        active-color="#67C23A"
+                        inactive-color="#999999"
+                        @change="switchChnage(scope.data.column.data.isused)"
+                    >
+                    </el-switch> -->
+                    <el-switch
+                        disabled
+                        :active-value="1"
+                        :inactive-value="0"
+                        v-model="scope.data.column.data.isused"
+                        size="small"
+                    ></el-switch>
+                </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"> </template>
+        </basicLayout>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {};
+    },
+    methods: {
+        // switchChnage(val) {},
+        detailGo(row) {
+            let route = this.$route;
+            if (route.path !== '/terminalWorkBillModuleDetail') {
+                this.oldRoute = { path: route.path, query: route.query };
+                this.$store.dispatch('setHistoryRouter', this.oldRoute);
+            }
+            this.$router.push({
+                path: '/terminalWorkBillModuleDetail',
+                query: {
+                    id: row.sc_workorder_templateid,
+                    rowindex: row.rowindex,
+                },
+            });
+        },
+    },
+};
+</script>
+<style></style>

+ 279 - 0
src/HDrpManagement/terminalWorkBillModule/modules/detail.vue

@@ -0,0 +1,279 @@
+<template>
+    <div>
+        <basicDetails
+            ref="details"
+            :titleText="mainData.name"
+            :editData="mainData"
+            :mainAreaData="mainAreaData"
+            turnPageId="2026051513132402"
+            idname="sc_workorder_templateid"
+            ownertable="sc_workorder_template"
+            tags=""
+            :tabs="['工序明细', '详细信息']"
+            :column="4"
+            @pageChange="pageChange"
+            @onEditSuccess="queryMainData($route.query.id)"
+        >
+            <div slot="tags"></div>
+            <template slot="customOperation">
+                <Edit
+                    class="inline-16"
+                    title_btn="编辑"
+                    title_drawer="编辑工单模板"
+                    :data="mainData"
+                    @onSuccess="queryMainData"
+                ></Edit>
+                <customBtn
+                    :btnName="$t('启 用')"
+                    :message="$t('确认启用当前工单模板吗') + '?'"
+                    idName="2026051513140102"
+                    keyName="sc_workorder_templateid"
+                    :id="$route.query.id"
+                    @onSuccess="queryMainData"
+                    class="inline-16"
+                    :paramData="[{ key: 'isused', value: 1 }]"
+                    v-if="mainData.isused == 0"
+                />
+                <customBtn
+                    :btnName="$t('禁 用')"
+                    :message="$t('确认禁用当前工单模板吗') + '?'"
+                    idName="2026051513140102"
+                    keyName="sc_workorder_templateid"
+                    :id="$route.query.id"
+                    @onSuccess="queryMainData"
+                    class="inline-16"
+                    :paramData="[{ key: 'isused', value: 0 }]"
+                    v-if="mainData.isused == 1"
+                />
+                <el-button type="primary" @click="onDelete" size="mini">{{ $t(`删 除`) }}</el-button>
+            </template>
+            <div slot="slot0">
+                <taskDetail> </taskDetail>
+            </div>
+            <div slot="slot1">
+                <base-info v-if="detailInfo" :detailInfo="detailInfo"></base-info>
+            </div>
+        </basicDetails>
+    </div>
+</template>
+
+<script>
+import Edit from '@/Form/terminalWorkBillModule/add';
+import BaseInfo from '@/HDrpManagement/projectChange/modules/modules/baseInfo/baseInfo';
+import taskDetail from './taskDetail/index';
+export default {
+    name: 'detail',
+    data() {
+        return {
+            mainData: {},
+            mainAreaData: [],
+            detailInfo: '',
+            processDetailList: [],
+        };
+    },
+    components: { Edit, BaseInfo, taskDetail },
+    provide() {
+        return {
+            isEdit: () => this.mainData.isused == 1,
+        };
+    },
+    methods: {
+        onDelete() {
+            this.$confirm(this.$t('是否确认删除此工单模板') + '?', this.$t('提示'), {
+                confirmButtonText: this.$t('确定'),
+                cancelButtonText: this.$t('取消'),
+                type: 'warning',
+            })
+                .then(async () => {
+                    const res = await this.$api.requested({
+                        id: '2026051513141202',
+                        content: {
+                            sc_workorder_templateids: [this.$route.query.id],
+                        },
+                    });
+                    if (res.code === 0) {
+                        this.$message.error(res.data[0].errmsg);
+                    } else {
+                        this.$message({
+                            message: this.$t('删除成功'),
+                            type: 'success',
+                        });
+                        this.$store.dispatch('changeDetailDrawer', false);
+                    }
+                })
+                .catch(() => {
+                    this.$message({
+                        type: 'info',
+                        message: this.$t('已取消删除'),
+                    });
+                });
+        },
+        async queryMainData() {
+            const res = await this.$api.requested({
+                id: 2026051513132402,
+                content: {
+                    sc_workorder_templateid: 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.name,
+                },
+                {
+                    label: '工单类型',
+                    value: this.mainData.type,
+                },
+                {
+                    label: '是否启用',
+                    value: this.mainData.isused ? '是' : '否',
+                    style: function () {
+                        let style = {};
+                        switch (that.mainData.isused) {
+                            case 1:
+                                style = { color: '#ff0000' };
+                                break;
+                            case 0:
+                                style = { color: '#666666' };
+                                break;
+                            default:
+                                break;
+                        }
+                        return style;
+                    },
+                },
+                {
+                    label: '是否后续工单',
+                    value: this.mainData.isworkorder ? '是' : '否',
+                    style: function () {
+                        let style = {};
+                        switch (that.mainData.isworkorder) {
+                            case 1:
+                                style = { color: '#ff0000' };
+                                break;
+                            case 0:
+                                style = { color: '#666666' };
+                                break;
+                            default:
+                                break;
+                        }
+                        return style;
+                    },
+                },
+                {
+                    label: '是否积分计算',
+                    value: this.mainData.ispoints ? '是' : '否',
+                    style: function () {
+                        let style = {};
+                        switch (that.mainData.ispoints) {
+                            case 1:
+                                style = { color: '#ff0000' };
+                                break;
+                            case 0:
+                                style = { color: '#666666' };
+                                break;
+                            default:
+                                break;
+                        }
+                        return style;
+                    },
+                },
+            ];
+            this.detailInfo = {
+                baseInfo: [
+                    {
+                        label: '模板名称',
+                        value: this.mainData.name,
+                    },
+                    {
+                        label: '工单类型',
+                        value: this.mainData.type,
+                    },
+                    {
+                        label: '是否启用',
+                        value: this.mainData.isused ? '是' : '否',
+                        style: function () {
+                            let style = {};
+                            switch (that.mainData.isused) {
+                                case 1:
+                                    style = { color: '#ff0000' };
+                                    break;
+                                case 0:
+                                    style = { color: '#666666' };
+                                    break;
+                                default:
+                                    break;
+                            }
+                            return style;
+                        },
+                    },
+                    {
+                        label: '是否后续工单',
+                        value: this.mainData.isworkorder ? '是' : '否',
+                        style: function () {
+                            let style = {};
+                            switch (that.mainData.isworkorder) {
+                                case 1:
+                                    style = { color: '#ff0000' };
+                                    break;
+                                case 0:
+                                    style = { color: '#666666' };
+                                    break;
+                                default:
+                                    break;
+                            }
+                            return style;
+                        },
+                    },
+                    {
+                        label: '是否积分计算',
+                        value: this.mainData.ispoints ? '是' : '否',
+                        style: function () {
+                            let style = {};
+                            switch (that.mainData.ispoints) {
+                                case 1:
+                                    style = { color: '#ff0000' };
+                                    break;
+                                case 0:
+                                    style = { color: '#666666' };
+                                    break;
+                                default:
+                                    break;
+                            }
+                            return style;
+                        },
+                    },
+                ],
+                systemInfo: [
+                    { label: '创建人', value: this.mainData.createby },
+                    { label: '创建时间', value: this.mainData.createdate },
+                    { label: '最近编辑人', value: this.mainData.changeby },
+                    { label: '最近编辑时间', value: this.mainData.changedate },
+                ],
+            };
+        },
+        // 监听切换数据,上一页,下一页
+        pageChange(id, rowindex, tabIndex) {
+            this.flag = false;
+            tabIndex = this.$route.query.tabIndex;
+            this.$router.replace({
+                path: '/serveWorkTaskDetail',
+                query: { id: id, rowindex: rowindex, tabIndex: tabIndex },
+            });
+            this.queryMainData(id);
+        },
+    },
+    mounted() {
+        this.queryMainData(this.$route.query.id);
+    },
+    created() {},
+};
+</script>
+
+<style scoped></style>

+ 277 - 0
src/HDrpManagement/terminalWorkBillModule/modules/taskDetail/components/addTop.vue

@@ -0,0 +1,277 @@
+<template>
+    <div>
+        <el-button size="mini" type="text" @click="addBtn" v-if="data" :disabled="disabled">{{
+            $t('添 加 子 级 工 序')
+        }}</el-button>
+        <el-button size="mini" type="primary" @click="addBtn" :disabled="disabled" v-else>{{ $t('添 加') }}</el-button>
+        <el-drawer append-to-body :visible.sync="dialogFormVisible" size="70%">
+            <div slot="title" style="font-size: 15px">{{ $t('添加工序') }}</div>
+            <div class="drawer__panel">
+                <el-input
+                    style="width: 250px; margin-bottom: 10px"
+                    size="small"
+                    :placeholder="$t('请输入搜索内容')"
+                    clearable
+                    @clear="getOrderList((params.content.pageNumber = 1))"
+                    v-model="params.content.where.condition"
+                    @keyup.enter.native="getOrderList((params.content.pageNumber = 1))"
+                ></el-input>
+                <selectTable
+                    @selectChange="selectChange"
+                    v-if="dialogFormVisible"
+                    idName="sc_workpresetid"
+                    ref="table"
+                    v-model="result"
+                    :layout="tablecols"
+                    :data="orderList"
+                    :custom="true"
+                    height="500px"
+                    @upDateData="upDateData"
+                >
+                    <template v-slot:customcol="scope">
+                        <div
+                            v-if="scope.column.columnname == 'fileupload'"
+                            :style="
+                                scope.column.data.fileupload
+                                    ? scope.column.data.fileupload == 1
+                                        ? 'color:green'
+                                        : 'color:red'
+                                    : 'color:#333333'
+                            "
+                        >
+                            {{
+                                scope.column.data.fileupload
+                                    ? scope.column.data.fileupload == 1
+                                        ? $t('非必填')
+                                        : $t('必填')
+                                    : $t('无')
+                            }}
+                        </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'additem'"
+                            :style="
+                                scope.column.data.additem
+                                    ? scope.column.data.additem == 1
+                                        ? 'color:green'
+                                        : 'color:red'
+                                    : 'color:#333333'
+                            "
+                        >
+                            {{
+                                scope.column.data.additem
+                                    ? scope.column.data.additem == 1
+                                        ? $t('非必填')
+                                        : $t('必填')
+                                    : $t('无')
+                            }}
+                        </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'formcheck'"
+                            :style="scope.column.data.formcheck == 1 ? 'color:green' : 'color:red'"
+                        >
+                            {{ scope.column.data.formcheck == 1 ? $t('是') : $t('否') }}
+                        </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'panorama'"
+                            :style="
+                                scope.column.data.panorama
+                                    ? scope.column.data.panorama == 1
+                                        ? 'color:green'
+                                        : 'color:red'
+                                    : 'color:#333333'
+                            "
+                        >
+                            {{
+                                scope.column.data.panorama
+                                    ? scope.column.data.panorama == 1
+                                        ? $t('非必填')
+                                        : $t('必填')
+                                    : $t('无')
+                            }}
+                        </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'passcheck'"
+                            :style="
+                                scope.column.data.passcheck
+                                    ? scope.column.data.passcheck == 1
+                                        ? 'color:green'
+                                        : 'color:red'
+                                    : 'color:#333333'
+                            "
+                        >
+                            {{
+                                scope.column.data.passcheck
+                                    ? scope.column.data.passcheck == 1
+                                        ? $t('非必填')
+                                        : $t('必填')
+                                    : $t('无')
+                            }}
+                        </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'signature'"
+                            :style="
+                                scope.column.data.signature
+                                    ? scope.column.data.signature == 1
+                                        ? 'color:green'
+                                        : 'color:red'
+                                    : 'color:#333333'
+                            "
+                        >
+                            {{
+                                scope.column.data.signature
+                                    ? scope.column.data.signature == 1
+                                        ? $t('非必填')
+                                        : $t('必填')
+                                    : $t('无')
+                            }}
+                        </div>
+                        <div
+                            v-else-if="scope.column.columnname == 'servicenode'"
+                            :style="scope.column.data.servicenode == 1 ? 'color:green' : 'color:red'"
+                        >
+                            {{ scope.column.data.servicenode == 1 ? $t('是') : $t('否') }}
+                        </div>
+                        <div v-else>
+                            {{
+                                scope.column.data[[scope.column.columnname]]
+                                    ? scope.column.data[[scope.column.columnname]]
+                                    : '--'
+                            }}
+                        </div>
+                    </template>
+                </selectTable>
+                <div class="container normal-panel" style="text-align: right">
+                    <el-pagination
+                        style="text-align: right"
+                        background
+                        small
+                        @size-change="handleSizeChange"
+                        @current-change="handleCurrentChange"
+                        :current-page="params.content.pageNumber"
+                        :page-size="params.content.pageSize"
+                        layout="total, prev, pager, next, jumper"
+                        :total="total"
+                    >
+                    </el-pagination>
+                </div>
+            </div>
+            <div class="fixed__btn__panel">
+                <el-button size="small" @click="dialogFormVisible = false" class="normal-btn-width">{{
+                    $t('取 消')
+                }}</el-button>
+                <el-button
+                    size="small"
+                    type="primary"
+                    @click="onSubmit"
+                    :disabled="isLength"
+                    class="normal-btn-width"
+                    >{{ $t('确 定') }}</el-button
+                >
+            </div>
+        </el-drawer>
+    </div>
+</template>
+
+<script>
+import selectTable from '@/components/selectTable/index';
+export default {
+    name: 'add',
+    props: ['data', 'disabled'],
+    components: { selectTable },
+    data() {
+        return {
+            result: [],
+            selectArr: [],
+            isLength: true,
+            dialogFormVisible: false,
+            orderList: [],
+            tablecols: [],
+            total: 0,
+            params: {
+                id: 2026051416494002,
+                content: {
+                    pageNumber: 1,
+                    pageSize: 20,
+                    where: {
+                        condition: '',
+                    },
+                },
+            },
+        };
+    },
+    created() {},
+    watch: {
+        dialogFormVisible(val) {
+            if (!val) {
+                this.$refs.table.allArr = [];
+            }
+        },
+    },
+    methods: {
+        addBtn() {
+            this.dialogFormVisible = true;
+            this.getOrderList();
+            this.tablecols = this.tool.tabelCol(this.$route.name).serviceWorkItemTable.tablecols;
+        },
+        async onSubmit() {
+            let data = this.$refs.table.allArr.map((item) => {
+                console.log('this.data', this.data);
+                return {
+                    sc_workorder_template_worksid: 0,
+                    parentid: this.data ? this.data.sc_workorder_template_worksid : 0,
+                    sc_workpresetid: item.sc_workpresetid,
+                    sequence: '1',
+                };
+            });
+            let res = await this.$api.requested({
+                id: '2026051514394802',
+                content: {
+                    sc_workorder_templateid: this.$route.query.id,
+                    workinfos: data,
+                },
+            });
+            this.tool.showMessage(res, () => {
+                this.$emit('onSuccess');
+                this.dialogFormVisible = false;
+            });
+        },
+        async getOrderList() {
+            let res = await this.$api.requested(this.params);
+            console.log(res.data);
+
+            this.orderList = res.data;
+            this.total = res.total;
+            console.log(res);
+        },
+        selectChange(data) {
+            console.log(data);
+
+            this.selectArr = data;
+            this.isLength = data.length < 1;
+        },
+        upDateData(data) {
+            this.selectArr = data;
+            this.isLength = data.length < 1;
+        },
+        handleSizeChange(val) {
+            // console.log(`每页 ${val} 条`);
+            this.params.content.pageSize = val;
+            this.getOrderList();
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+            this.params.content.pageNumber = val;
+            this.getOrderList();
+        },
+    },
+};
+</script>
+
+<style scoped>
+.dialog-footer {
+    margin-top: 0;
+}
+.el-select {
+    width: 100%;
+}
+</style>

+ 199 - 0
src/HDrpManagement/terminalWorkBillModule/modules/taskDetail/index.vue

@@ -0,0 +1,199 @@
+<template>
+    <div class="brand">
+        <div style="display: flex; align-items: center; margin-bottom: 16px">
+            <el-input
+                :placeholder="$t('请输入搜索内容')"
+                suffix-icon="el-icon-search"
+                v-model="params.content.where.condition"
+                style="width: 200px"
+                size="mini"
+                class="input-with-select inline-16"
+                @keyup.native.enter="department((params.content.pageNumber = 1))"
+                @clear="department((params.content.pageNumber = 1))"
+                clearable
+            >
+            </el-input>
+            <addTop :disabled="isEdit()" @onSuccess="department"></addTop>
+            <!-- v-if="tool.checkAuth($route.name, 'terminalWorkBillModuleDetail')" -->
+        </div>
+        <el-table
+            :data="tableData"
+            stripe
+            border
+            row-key="sc_workorder_template_worksid"
+            size="small"
+            :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+        >
+            <el-table-column width="120"> </el-table-column>
+            <el-table-column prop="workname" :label="$t(`工序内容`)" show-overflow-tooltip width="160">
+            </el-table-column>
+            <el-table-column prop="remarks" show-overflow-tooltip :label="$t(`操作说明`)" width="160">
+                <template slot-scope="scope">
+                    {{ scope.row.remarks ? scope.row.remarks : '--' }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="fileupload" :label="$t(`上传附件`)" width="100">
+                <template slot-scope="scope">
+                    {{ scope.row.fileupload ? (scope.row.fileupload == 1 ? $t('非必填') : $t('必填')) : $t('无') }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="additem" :label="$t(`是否添加物料`)" width="100">
+                <template slot-scope="scope">
+                    {{ scope.row.additem ? (scope.row.additem == 1 ? $t('非必填') : $t('必填')) : $t('无') }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="formcheck" :label="$t(`内容是否需验证表单`)" width="160">
+                <template slot-scope="scope">
+                    {{ scope.row.formcheck == 1 ? $t('是') : $t('否') }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="panorama" :label="$t(`上传全景影像`)" width="120">
+                <template slot-scope="scope">
+                    {{ scope.row.panorama ? (scope.row.panorama == 1 ? $t('非必填') : $t('必填')) : $t('无') }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="passcheck" :label="$t(`是否确认合格`)" width="120">
+                <template slot-scope="scope">
+                    {{ scope.row.passcheck ? (scope.row.passcheck == 1 ? $t('非必填') : $t('必填')) : $t('无') }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="signature" :label="$t(`是否客户签名`)" width="120">
+                <template slot-scope="scope">
+                    {{ scope.row.signature ? (scope.row.signature == 1 ? $t('非必填') : $t('必填')) : $t('无') }}
+                </template>
+            </el-table-column>
+            <el-table-column prop="servicenode" :label="$t(`是否必填服务节点`)" width="160">
+                <template slot-scope="scope">
+                    {{ scope.row.servicenode ? (scope.row.servicenode == 1 ? $t('非必填') : $t('必填')) : $t('无') }}
+                </template>
+            </el-table-column>
+            <el-table-column :label="$t('操作')" width="200" fixed="right">
+                <template slot-scope="scope">
+                    <addTop :disabled="isEdit()" class="inline-16" @onSuccess="department" :data="scope.row"></addTop>
+                    <customBtn
+                        type="text"
+                        btnName="删 除"
+                        message="确定删除该工序吗?"
+                        idName="2026051514430402"
+                        keyName="sc_workorder_template_worksids"
+                        :id="scope.row.sc_workorder_template_worksid"
+                        class="inline-16"
+                        :idIsArr="true"
+                        @onSuccess="department"
+                        :disabled="isEdit()"
+                    />
+                </template>
+            </el-table-column>
+        </el-table>
+        <div style="margin-top: 16px; text-align: right">
+            <el-pagination
+                background
+                small
+                @size-change="handleSizeChange"
+                @current-change="handleCurrentChange"
+                :current-page="params.content.pageNumber"
+                :page-size="params.content.pageSize"
+                layout="total, prev, pager, next, jumper"
+                :total="total"
+            >
+            </el-pagination>
+        </div>
+    </div>
+</template>
+
+<script>
+import addTop from './components/addTop';
+export default {
+    props: ['data'],
+    components: {
+        addTop,
+    },
+    inject: ['isEdit'],
+    data() {
+        return {
+            tableData: [],
+            params: {
+                id: 2026051514422702,
+                version: 1,
+                content: {
+                    sc_workorder_templateid: this.$route.query.id,
+                    parentid: 0,
+                    pageNumber: 1,
+                    pageSize: 20,
+                    where: {
+                        condition: '',
+                    },
+                },
+            },
+            total: 0,
+        };
+    },
+    created() {},
+    methods: {
+        async department(callback) {
+            this.params.content.sc_workorder_templateid = this.$route.query.id;
+            const res = await this.$api.requested(this.params);
+            this.tableData = this.createTreeData(res.data);
+            this.total = res.total;
+            console.log('this.tableData', this.tableData);
+        },
+        createTreeData(array) {
+            var that = this;
+            let arr = [];
+            function convertToElementTree(node) {
+                // 新节点
+                var elNode = {
+                    addperson: node['addperson'],
+                    textedit: node['textedit'],
+                    workname: node['workname'],
+                    additem: node['additem'],
+                    contractupload: node['contractupload'],
+                    confirm_options: node['confirm_options'],
+                    // sc_workorder_templateid:this.data.sc_workorder_templateid,
+                    parentid: node['parentid'],
+                    required: node['required'],
+                    confirm: node['confirm'],
+                    sequence: node['sequence'],
+                    sa_workpresetid: node['sa_workpresetid'],
+                    fileupload: node['fileupload'],
+                    itemtype: node['itemtype'],
+                    sc_workorder_template_worksid: node['sc_workorder_template_worksid'],
+                    siteid: node['siteid'],
+                    rowindex: node['rowindex'],
+                    amountpay: node['amountpay'],
+                    remarks: node['remarks'],
+                    children: [],
+                };
+
+                if (node.subdep && node.subdep.length > 0) {
+                    // 如果存在子节点
+                    for (var index = 0; index < node.subdep.length; index++) {
+                        // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+                        elNode.children.push(convertToElementTree(node.subdep[index]));
+                    }
+                }
+                return elNode;
+            }
+            array.forEach((element) => {
+                arr.push(convertToElementTree(element));
+            });
+            return arr;
+        },
+        handleSizeChange(val) {
+            // console.log(`每页 ${val} 条`);
+            this.params.content.pageSize = val;
+            this.department();
+        },
+        handleCurrentChange(val) {
+            // console.log(`当前页: ${val}`);
+            this.params.content.pageNumber = val;
+            this.department();
+        },
+    },
+    mounted() {
+        this.department();
+    },
+};
+</script>
+
+<style scoped></style>

+ 46 - 0
src/router/HDrpManagement.js

@@ -1364,5 +1364,51 @@ const HDrpManagement = [
       },
     ],
   },
+  {
+    path: '/terminalWorkBillModule',
+    name: 'terminalWorkBillModule',
+    meta: {
+      title: '终端工单模板',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/terminalWorkBillModule/index'),
+    children: [
+      {
+        path: '/terminalWorkBillModuleDetail',
+        name: 'terminalWorkBillModule',
+        meta: {
+          title: '终端工单模板详情',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "about" */ '@/HDrpManagement/terminalWorkBillModule/modules/detail'),
+      },
+    ],
+  },
+  {
+    path: '/headquartersServiceMaterial',
+    name: 'headquartersServiceMaterial',
+    meta: {
+      title: '总部服务物料',
+      ast_nav: true,
+      keeproute: true,
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HDrpManagement/headquartersServiceMaterial/index'),
+    children: [
+      {
+        path: '/headquartersServiceMaterialDetail',
+        name: 'headquartersServiceMaterial',
+        meta: {
+          title: '总部服务物料详情',
+          ast_nav: true,
+          keeproute: true,
+        },
+        component: () =>
+          import(/* webpackChunkName: "about" */ '@/HDrpManagement/headquartersServiceMaterial/modules/detail'),
+      },
+    ],
+  },
 ];
 export default HDrpManagement;