Mr.Shi
2023-08-16 41580b1fbb6c7116b0058118baeed1bbc9cdbfb5
h5一键报工
已添加6个文件
已修改18个文件
3084 ■■■■■ 文件已修改
h5_standard/.env.development 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/.env.production 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/apis/ExWarehouse.ts 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/apis/PlanningAPI.ts 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/assets/icon/ic_ar@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/assets/icon/ic_close@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/common/Access.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/newCom/Material.vue 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/newCom/MaterialY.vue 417 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/newCom/location.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/newCom/productionProcess.vue 258 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/newCom/quality.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/components/newCom/user.vue 330 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/main.ts 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/router/module/workOrder/index.ts 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/LogInAgain.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/needToBeDealtWith/outbound.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/workOrder/afterWorkReport.vue 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/workOrder/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/workOrder/processPlan.vue 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/workOrder/reportingForWork.vue 1625 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/wxLogin.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
web_standard/.env.development 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/.env.development
@@ -13,9 +13,10 @@
# VUE_APP_API = 'http://192.168.0.12:10012/'
# ä»»åº·æœ¬åœ°
# VUE_APP_API = 'http://192.168.0.15:10021/'
VUE_APP_API = 'http://192.168.0.15:10021/'
# VUE_APP_API = 'http://192.168.0.127:10021/'
VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
# VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
# VUE_APP_API = 'http://192.168.0.13:10012/'
h5_standard/.env.production
@@ -18,7 +18,7 @@
# VUE_APP_API = 'https://hsky.doumee.com/doumeeplant_api/'
# æµ‹è¯•
# VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
VUE_APP_API = 'https://dmtest.ahapp.net/doumeeplant_api/'
# æ¼”示
VUE_APP_API = 'https://www.mes.red/doumeeplant/'
# VUE_APP_API = 'https://www.mes.red/doumeeplant/'
h5_standard/src/apis/ExWarehouse.ts
@@ -187,3 +187,12 @@
        data
    })
}
// æ ¹æ®ä¾›éœ€è®¡åˆ’查询可用库存
export function getStockByPlansForStandard(data: any): Promise<any> {
    return httpRequest({
        url:  '/ext/workorderRecordExt/getStockByPlansForStandard',
        method: 'post',
        data
    })
}
h5_standard/src/apis/PlanningAPI.ts
@@ -104,3 +104,47 @@
        method: 'get'
    })
}
// æ ¹æ®å¯¹è±¡ä¿¡æ¯æŸ¥è¯¢
export function queryOne (data: any): Promise<any> {
    return httpRequest({
        url: '/ext/salaryParam/queryOne',
        method: 'post',
        data
    })
}
// ä¸€é”®æŠ¥å·¥
export function autoWorkReport (data: any): Promise<any> {
    return httpRequest({
        url: '/ext/plansExt/autoWorkReport',
        method: 'post',
        data
    })
}
// æ ¹æ®id查询
export function getIdPlansExt(id: any): Promise<any> {
    return httpRequest({
        url: `/ext/plansExt/${id}`,
        method: 'get'
    })
}
// åˆ—表查询
export function categoryExtList (data: any): Promise<any> {
    return httpRequest({
        url: '/ext/categoryExt/list',
        method: 'post',
        data
    })
}
// æŸ¥è¯¢å…¨éƒ¨
export function allUser (data: any): Promise<any> {
    return httpRequest({
        url: '/ext/companyUserExt/allUser',
        method: 'post',
        data
    })
}
h5_standard/src/assets/icon/ic_ar@2x.png
h5_standard/src/assets/icon/ic_close@2x.png
h5_standard/src/components/common/Access.vue
@@ -53,7 +53,7 @@
    import { choiceStockPageByTransfer } from '@/apis/ExWarehouse'
    import { model } from '@/interface'
    import { Attribute } from '@/enum'
    import { judgmentPlatform } from "@/utils/utils"
    import { judgmentPlatform } from "@/utils"
    import vSearch from '@/components/common/Search.vue'
    import vLableSelection from '@/components/common/LabelSelection.vue'
h5_standard/src/components/newCom/Material.vue
@@ -1,13 +1,17 @@
<template>
    <van-popup
        v-model:show="props.show"
        :close-on-click-overlay="false"
        round
        position="bottom"
        :style="{ height: '80%' }">
        <div class="title">
            <div class="close" @click="close"><van-icon name="arrow-down" size="30" color="#ffffff" /></div>
        </div>
        <div class="content">
            <div class="content_search content_top">
                <div class="title">
                    <img class="close" src="@/assets/icon/ic_close@2x.png" alt="" style="opacity: 0;" />
                    <span>选择生产人员</span>
                    <img class="close" src="@/assets/icon/ic_close@2x.png" alt="" @click="close" />
                </div>
                <v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="搜索物料名称"></v-Search>
            </div>
            <div class="content_total">共{{form.total}}条数据</div>
@@ -163,21 +167,6 @@
</script>
<style lang="scss" scoped>
    .title {
        position: fixed;
        right: 50px;
        bottom: 100px;
        z-index: 9;
        .close {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #999999;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }
    .content {
        .content_code {
            position: fixed;
@@ -197,6 +186,24 @@
            position: sticky;
            top: 88px;
            z-index: 9;
            .title {
                width: 100%;
                padding: 0 0 30px 0;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                justify-content: space-between;
                span {
                    font-size: 30px;
                    font-family: PingFangSC-Medium, PingFang SC;
                    font-weight: 500;
                    color: #222222;
                }
                .close {
                    width: 28px;
                    height: 28px;
                }
            }
            .content_search_x {
                height: 24px;
            }
@@ -209,7 +216,7 @@
            color: #666666;
            position: sticky;
            z-index: 99;
            top: 127px;
            top: 195px;
        }
        .content_list {
            width: 100%;
h5_standard/src/components/newCom/MaterialY.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,417 @@
<template>
    <van-popup
        v-model:show="props.show"
        :close-on-click-overlay="false"
        round
        position="bottom"
        :style="{ height: '80%' }">
        <div class="title">
            <div class="close" @click="close"><van-icon name="arrow-down" size="30" color="#ffffff" /></div>
        </div>
        <div class="content">
            <div class="content_search content_top">
                <v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="搜索物料名称"></v-Search>
            </div>
            <div class="content_total">共{{form.total}}条数据</div>
            <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
                <van-list
                    v-model:loading="loading"
                    :finished="finished"
                    finished-text="没有更多了~"
                    @load="onLoad"
                >
                <div class="content_list">
                        <div class="page_content" v-for="(item1, idx) in list" :key="idx" @click="jump(item1)">
                            <div class="page_content_title">
                                <div class="page_content_title_top">
                                    <span v-if="item1.batch">{{ item1.materialName + ' | ' + item1.materialCode }}</span>
                                    <span v-else>{{ item1.materialName + ' | ' + item1.materialCode }}</span>
                                    <!-- <span>{{item1.num}}{{item1.unitName}}</span> -->
                                </div>
                                <div class="page_content_title_bottom">
                                    <span>{{ item1.locationName }}&nbsp;/&nbsp;</span>
                                    <span>{{ item1.num }}{{ item1.unitName }}</span>
                                </div>
                                <div class="page_content_title_bottom">
                                    <span class="green" v-if="item1.qualityType == 0">合格&nbsp;<span class="black">/</span>&nbsp;</span>
                                    <span class="warning" v-else-if="item1.qualityType == 1">不良&nbsp;<span class="black">/</span>&nbsp;</span>
                                    <span class="error" v-else-if="item1.qualityType == 2">报废&nbsp;<span class="black">/</span>&nbsp;</span>
                                    <span v-else>-&nbsp;/&nbsp;</span>
                                    <span>{{item1.procedureName ? item1.procedureName : '-'}}&nbsp;/&nbsp;</span>
                                    <span>{{item1.batch ? item1.batch : '-'}}</span>
                                </div>
                            </div>
                        </div>
                        <!-- <div class="content_list_item" v-for="(item, i) in props.list" :key="i" @click="jump(item)">
                            <div class="content_list_item_name">{{item.materialName}}</div>
                        </div> -->
                    </div>
                    <!-- <div class="content_list">
                        <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
                            <div class="content_list_item_name">{{item.mmodelUnionName}}</div>
                        </div>
                    </div> -->
                </van-list>
            </van-pull-refresh>
        </div>
    </van-popup>
</template>
<script setup lang="ts">
    import { defineProps, defineEmits, onMounted, ref, reactive, watch } from 'vue'
    import { getStockByPlansForStandard } from '@/apis/ExWarehouse'
    import { model } from '@/interface'
    import { judgmentPlatform } from "@/utils/utils"
    import vSearch from '@/components/common/Search.vue'
    // æœç´¢æ•°æ®æŽ¥å£
    interface form extends model {
        total: number,
        name: string
    }
    const form = reactive<form>({
        capacity: 50,
        page: 0,
        total: 0,
        name: '',
    })
    // åˆ—表数据
    const list: any = ref([]);
    const loading = ref(false);
    const finished = ref(false);
    const refreshing = ref(false);
    let isOne = ref(true)
    // æœç´¢æ¡†
    const searchInput = (data: any) => {
        form.page = 0
        finished.value = false
        list.value = []
        form.name = data
        onLoad()
    }
    // æœç´¢æäº¤
    const submit = (): void => {
        form.page = 0
        finished.value = false
        list.value = []
        onLoad()
    }
    // è¿”回上一页带参数
    const jump = (item: any) => {
        emit('value', item)
    }
    // èŽ·å–ç‰©æ–™åˆ—è¡¨æ•°æ®
    const onLoad = async () => {
        if (!finished.value) {
            loading.value = true;
            form.page = form.page + 1
            getStockByPlansForStandard({
                capacity: form.capacity,
                page: form.page,
                model: {
                    ids: props.ids,
                    materialName: form.name,
                    deviceId: props.deviceId,
                    plansId: props.plansId
                }
            }).then(res => {
                isOne.value = false
                if (refreshing.value) {
                    list.value = []
                    refreshing.value = false;
                }
                loading.value = false;
                if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
                    form.total = res.data.total
                    list.value.push(...res.data.records)
                } else {
                    finished.value = true;
                }
            }).catch((err: any) => {
                loading.value = false;
                finished.value = true;
                if (refreshing.value) {
                    list.value = []
                    refreshing.value = false;
                }
            })
        }
    }
    // ä¸‹æ‹‰åˆ·æ–°ä¼˜åŒ–页面
    const onRefresh = () => {
        finished.value = false;
        form.page = 0
        loading.value = true;
        onLoad()
    }
    let status = ref<boolean>(false)
    const props = defineProps({
        show: {
            type: Boolean,
            required: true
        },
        plansId: {
            type: String,
            required: true
        },
        deviceId: {
            type: String,
            required: true
        },
        ids: {
            type: String,
            required: false
        }
    })
    const emit = defineEmits(['close', 'value'])
    // å…³é—­å›žè°ƒ
    const close = () => {
        emit('close')
    }
    onMounted(() => {
        status.value = judgmentPlatform()
    })
    watch(() => props.show, (news) => {
        if (news && !isOne.value) {
            list.value = []
            finished.value = false;
            form.page = 0
            form.name = ''
            loading.value = true;
            onLoad()
        }
    })
</script>
<style lang="scss" scoped>
    .title {
        position: fixed;
        right: 50px;
        bottom: 100px;
        z-index: 9;
        .close {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #999999;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }
    .content {
        .content_code {
            position: fixed;
            right: 30px;
            bottom: 100px;
            img {
                width: 138px;
                height: 138px;
            }
        }
        .content_top {
            top: 0 !important;
        }
        .content_search {
            padding: 30px;
            background: white;
            position: sticky;
            top: 88px;
            z-index: 9;
            .content_search_x {
                height: 24px;
            }
        }
        .content_total {
            padding: 24px 30px;
            background: #F7F7F7;
            font-size: 24px;
            font-weight: 400;
            color: #666666;
            position: sticky;
            z-index: 99;
            top: 127px;
        }
        .content_list {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            .page_content {
                margin-top: 36px;
                padding: 0 30px;
                box-sizing: border-box;
                .page_content_title {
                    display: flex;
                    flex-direction: column;
                    margin-bottom: 10px;
                    .page_content_title_top {
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        span {
                            &:nth-child(1) {
                                font-size: 30px;
                                font-weight: 500;
                                color: #222222;
                            }
                            &:nth-child(2) {
                                flex-shrink: 0;
                                font-size: 24px;
                                font-weight: 400;
                                color: #333333;
                                span {
                                    font-size: 24px;
                                    color: $nav-color;
                                }
                            }
                        }
                    }
                    .page_content_title_loa {
                        font-size: 26px;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #333333;
                        margin-top: 10px;
                    }
                    .page_content_title_bottom {
                        margin-top: 10px;
                        .green {
                            color: $nav-stateColor7 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        .warning {
                            color: $nav-stateColor5 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        .error {
                            color: $nav-stateColor4 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        span {
                            font-size: 24px;
                            font-weight: 400;
                            color: #666666;
                        }
                    }
                }
                .lineBorder {
                    border: none !important;
                    padding-bottom: 0 !important;
                    margin-bottom: 24px;
                }
                .page_content_list {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    &:first-child {
                        margin: 0;
                    }
                    &:last-child {
                        border: none;
                    }
                    .page_content_list_nums {
                        width: 30%;
                        display: flex;
                        .page_content_list_num_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .page_content_list_num_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_num {
                        width: 70%;
                        display: flex;
                        .page_content_list_num_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .page_content_list_num_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_items {
                        width: 30%;
                        display: flex;
                        margin-top: 24px;
                        .page_content_list_item_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .page_content_list_item_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_item {
                        width: 70%;
                        display: flex;
                        .page_content_list_item_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .page_content_list_item_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                }
            }
            .content_list_item {
                padding: 30px;
                display: flex;
                border-bottom: 1px solid #ececec;
                .serious {
                    color: $nav-stateColor4 !important;
                }
                .success {
                    color: $nav-stateColor2 !important;
                }
                .warning {
                    color: $nav-stateColor5 !important;
                }
                .content_list_item_status {
                    font-size: 28px;
                    margin-right: 10px;
                }
                .content_list_item_name {
                    font-size: 28px;
                }
            }
        }
    }
</style>
h5_standard/src/components/newCom/location.vue
@@ -1,6 +1,8 @@
<template>
    <van-popup
        v-model:show="props.show"
        :close-on-click-overlay="false"
        round
        position="bottom"
        :style="{ height: '60%' }">
        <div class="title">
h5_standard/src/components/newCom/productionProcess.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,258 @@
<template>
    <van-popup
        v-model:show="props.show"
        :close-on-click-overlay="false"
        round
        position="bottom"
        :style="{ height: '60%' }">
        <div class="title">
            <div class="close" @click="close"><van-icon name="arrow-down" size="30" color="#ffffff" /></div>
        </div>
        <div class="content">
            <div class="content_list">
                <div class="content_list_item" v-for="(item, i) in props.list" :key="i" @click="jump(item)">
                    <div class="content_list_item_name">{{item.name}}</div>
                </div>
            </div>
        </div>
    </van-popup>
</template>
<script setup lang="ts">
    import { defineProps, defineEmits, ref } from 'vue'
    // è¿”回上一页带参数
    const jump = (item: any) => {
        emit('value', item)
    }
    const props: any = defineProps({
        show: {
            type: Boolean,
            required: true
        },
        list: {
            type: Array,
            required: true
        }
    })
    const emit = defineEmits(['close', 'value'])
    // å…³é—­å›žè°ƒ
    const close = () => {
        emit('close')
    }
</script>
<style lang="scss" scoped>
    .title {
        position: fixed;
        right: 50px;
        bottom: 100px;
        z-index: 9;
        .close {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background: #999999;
            display: flex;
            align-items: center;
            justify-content: center;
        }
    }
    .content {
        .content_code {
            position: fixed;
            right: 30px;
            bottom: 100px;
            img {
                width: 138px;
                height: 138px;
            }
        }
        .content_top {
            top: 0 !important;
        }
        .content_search {
            padding: 30px;
            background: white;
            position: sticky;
            top: 88px;
            z-index: 9;
            .content_search_x {
                height: 24px;
            }
        }
        .content_total {
            padding: 24px 30px;
            background: #F7F7F7;
            font-size: 24px;
            font-weight: 400;
            color: #666666;
            position: sticky;
            z-index: 99;
            top: 127px;
        }
        .content_list {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            .page_content {
                margin-top: 36px;
                padding: 0 30px;
                box-sizing: border-box;
                .page_content_title {
                    display: flex;
                    flex-direction: column;
                    margin-bottom: 10px;
                    .page_content_title_top {
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        span {
                            &:nth-child(1) {
                                font-size: 30px;
                                font-weight: 500;
                                color: #222222;
                            }
                            &:nth-child(2) {
                                flex-shrink: 0;
                                font-size: 24px;
                                font-weight: 400;
                                color: #333333;
                                span {
                                    font-size: 24px;
                                    color: $nav-color;
                                }
                            }
                        }
                    }
                    .page_content_title_bottom {
                        .green {
                            color: $nav-stateColor7 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        .warning {
                            color: $nav-stateColor5 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        .error {
                            color: $nav-stateColor4 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        span {
                            font-size: 24px;
                            font-weight: 400;
                            color: #666666;
                        }
                    }
                }
                .lineBorder {
                    border: none !important;
                    padding-bottom: 0 !important;
                    margin-bottom: 24px;
                }
                .page_content_list {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    &:first-child {
                        margin: 0;
                    }
                    &:last-child {
                        border: none;
                    }
                    .page_content_list_nums {
                        width: 30%;
                        display: flex;
                        .page_content_list_num_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .page_content_list_num_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_num {
                        width: 70%;
                        display: flex;
                        .page_content_list_num_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .page_content_list_num_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_items {
                        width: 30%;
                        display: flex;
                        margin-top: 24px;
                        .page_content_list_item_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .page_content_list_item_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_item {
                        width: 70%;
                        display: flex;
                        .page_content_list_item_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .page_content_list_item_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                }
            }
            .content_list_item {
                padding: 30px;
                display: flex;
                border-bottom: 1px solid #ececec;
                .serious {
                    color: $nav-stateColor4 !important;
                }
                .success {
                    color: $nav-stateColor2 !important;
                }
                .warning {
                    color: $nav-stateColor5 !important;
                }
                .content_list_item_status {
                    font-size: 28px;
                    margin-right: 10px;
                }
                .content_list_item_name {
                    font-size: 28px;
                }
            }
        }
    }
</style>
h5_standard/src/components/newCom/quality.vue
@@ -1,6 +1,7 @@
<template>
    <van-popup
        v-model:show="props.show"
        :close-on-click-overlay="false"
        position="bottom"
        :style="{ height: '60%' }">
        <div class="title">
h5_standard/src/components/newCom/user.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,330 @@
<template>
    <van-popup
        v-model:show="props.show"
        :close-on-click-overlay="false"
        position="bottom"
        round
        :style="{ height: '80%' }">
        <div class="content">
            <div class="content_search content_top">
                <div class="title">
                    <img class="close" src="@/assets/icon/ic_close@2x.png" alt="" style="opacity: 0;" />
                    <span>选择生产人员</span>
                    <img class="close" src="@/assets/icon/ic_close@2x.png" alt="" @click="close" />
                </div>
                <v-Search @searchInput="searchInput" @submit="submit" :isShow="false" placeholder="搜索姓名"></v-Search>
            </div>
            <div class="content_total">共{{form.total}}条数据</div>
            <div class="content_list">
                <div class="content_list_item" v-for="(item, i) in list" :key="i" @click="jump(item)">
                    <div class="content_list_item_name">{{item.name}}&nbsp;|&nbsp;{{item.dmodel.name}}</div>
                </div>
            </div>
        </div>
    </van-popup>
</template>
<script setup lang="ts">
    import { defineProps, defineEmits, onMounted, ref, reactive } from 'vue'
    import { materialDistributeExt } from '@/apis/ExWarehouse'
    import { getFindAll, allUser } from '@/apis/PlanningAPI'
    import { model } from '@/interface'
    import { judgmentPlatform } from "@/utils/utils"
    import vSearch from '@/components/common/Search.vue'
    // æœç´¢æ•°æ®æŽ¥å£
    interface form extends model {
        total: number,
        name: string
    }
    const form = reactive<form>({
        capacity: 50,
        page: 0,
        total: 0,
        name: '',
    })
    // åˆ—表数据
    const list: any = ref([]);
    const loading = ref(false);
    const finished = ref(false);
    const refreshing = ref(false)
    // æœç´¢æ¡†
    const searchInput = (data: any) => {
        form.page = 0
        finished.value = false
        list.value = []
        form.name = data
        onLoad()
    }
    // æœç´¢æäº¤
    const submit = (): void => {
        form.page = 0
        finished.value = false
        list.value = []
        onLoad()
    }
    // è¿”回上一页带参数
    const jump = (item: any) => {
        emit('value', item)
    }
    // èŽ·å–ç‰©æ–™åˆ—è¡¨æ•°æ®
    const onLoad = async () => {
        loading.value = true;
        allUser({ name: form.name })
            .then(res => {
                loading.value = false;
                if (res.code === 200 && res.data && res.data.length !== 0) {
                    form.total = res.data.length
                    list.value = res.data
                } else {
                    finished.value = true;
                }
            }).catch((err: any) => {
                loading.value = false;
                finished.value = true;
                if (refreshing.value) {
                    list.value = []
                    refreshing.value = false;
                }
            })
    }
    const props = defineProps({
        show: {
            type: Boolean,
            required: true
        }
    })
    const emit = defineEmits(['close', 'value'])
    // å…³é—­å›žè°ƒ
    const close = () => {
        emit('close')
    }
    onMounted(() => {
        onLoad()
    })
</script>
<style lang="scss" scoped>
    .content {
        .content_code {
            position: fixed;
            right: 30px;
            bottom: 100px;
            img {
                width: 138px;
                height: 138px;
            }
        }
        .content_top {
            top: 0 !important;
        }
        .content_search {
            padding: 30px;
            background: white;
            position: sticky;
            top: 88px;
            z-index: 9;
            .title {
                width: 100%;
                padding: 0 0 30px 0;
                box-sizing: border-box;
                display: flex;
                align-items: center;
                justify-content: space-between;
                span {
                    font-size: 30px;
                    font-family: PingFangSC-Medium, PingFang SC;
                    font-weight: 500;
                    color: #222222;
                }
                .close {
                    width: 28px;
                    height: 28px;
                }
            }
            .content_search_x {
                height: 24px;
            }
        }
        .content_total {
            padding: 24px 30px;
            background: #F7F7F7;
            font-size: 24px;
            font-weight: 400;
            color: #666666;
            position: sticky;
            z-index: 99;
            top: 195px;
        }
        .content_list {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            .page_content {
                margin-top: 36px;
                padding: 0 30px;
                box-sizing: border-box;
                .page_content_title {
                    display: flex;
                    flex-direction: column;
                    margin-bottom: 10px;
                    .page_content_title_top {
                        display: flex;
                        align-items: center;
                        justify-content: space-between;
                        span {
                            &:nth-child(1) {
                                font-size: 30px;
                                font-weight: 500;
                                color: #222222;
                            }
                            &:nth-child(2) {
                                flex-shrink: 0;
                                font-size: 24px;
                                font-weight: 400;
                                color: #333333;
                                span {
                                    font-size: 24px;
                                    color: $nav-color;
                                }
                            }
                        }
                    }
                    .page_content_title_bottom {
                        .green {
                            color: $nav-stateColor7 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        .warning {
                            color: $nav-stateColor5 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        .error {
                            color: $nav-stateColor4 !important;
                            .black {
                                color: black !important;
                            }
                        }
                        span {
                            font-size: 24px;
                            font-weight: 400;
                            color: #666666;
                        }
                    }
                }
                .lineBorder {
                    border: none !important;
                    padding-bottom: 0 !important;
                    margin-bottom: 24px;
                }
                .page_content_list {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    flex-wrap: wrap;
                    &:first-child {
                        margin: 0;
                    }
                    &:last-child {
                        border: none;
                    }
                    .page_content_list_nums {
                        width: 30%;
                        display: flex;
                        .page_content_list_num_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .page_content_list_num_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_num {
                        width: 70%;
                        display: flex;
                        .page_content_list_num_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .page_content_list_num_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_items {
                        width: 30%;
                        display: flex;
                        margin-top: 24px;
                        .page_content_list_item_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .page_content_list_item_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                    .page_content_list_item {
                        width: 70%;
                        display: flex;
                        .page_content_list_item_label {
                            font-size: 26px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .page_content_list_item_nr {
                            font-size: 26px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                }
            }
            .content_list_item {
                padding: 30px;
                display: flex;
                border-bottom: 1px solid #ececec;
                .serious {
                    color: $nav-stateColor4 !important;
                }
                .success {
                    color: $nav-stateColor2 !important;
                }
                .warning {
                    color: $nav-stateColor5 !important;
                }
                .content_list_item_status {
                    font-size: 28px;
                    margin-right: 10px;
                }
                .content_list_item_name {
                    font-size: 28px;
                }
            }
        }
    }
</style>
h5_standard/src/main.ts
@@ -1,4 +1,5 @@
import { createApp } from 'vue'
import mitt from 'mitt'
// import VConsole from 'vconsole'
import App from './App.vue'
import router from './router'
@@ -16,6 +17,8 @@
const app = createApp(App)
app.config.globalProperties.$Bus = mitt()
app.config.globalProperties.$onWait = new Promise((resolve) => {
    app.config.globalProperties.$reslove = resolve
})
h5_standard/src/router/module/workOrder/index.ts
@@ -192,9 +192,18 @@
                name: 'reportingForWork',
                meta: {
                    title: '一键报工',
                    keepAlive: false
                    keepAlive: true
                },
                component: () => import('@/views/workOrder/reportingForWork.vue')
            },
            {
                path: '/workOrder/processPlans',
                name: 'processPlans',
                meta: {
                    title: '选择工序计划',
                    keepAlive: false
                },
                component: () => import('@/views/workOrder/processPlan.vue')
            }
        ]
    }
h5_standard/src/views/LogInAgain.vue
@@ -80,7 +80,7 @@
      // let res = await testLogin({  // è‹±å­å§
      //   username: '18055151023',
      //   password: '123456',
      //   companyId: '1',
      //   companyId: '8',
      //   uuid: '0000',
      //   code: '0000'
      // })
h5_standard/src/views/needToBeDealtWith/addWarehousing.vue
@@ -29,7 +29,7 @@
            </div>
            <van-swipe-cell v-for="(item, index) in list" :key="index">
                <div class="rework_qd_list">
                    <div class="rework_qd_item" @click="openL(index)">
                    <div class="rework_qd_item" @click="openL(index)" v-if="location">
                        <span><b>*</b>入库货位</span>
                        <div class="rework_qd_item_right">
                            <span :class="item.locationName ? 'black' : ''">{{item.locationName ? item.locationName : '请选择'}}</span>
@@ -43,13 +43,13 @@
                            <van-icon name="arrow" size="20" color="#999999" />
                        </div>
                    </div>
                    <!-- <div class="rework_qd_item" v-if="form.type != 25">
                    <div class="rework_qd_item" v-if="form.type != 25" @click="openGX(index)">
                        <span>生产工序</span>
                        <div class="rework_qd_item_right">
                            <span :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '请选择'}}</span>
                            <van-icon name="arrow" size="20" color="#999999" />
                        </div>
                    </div> -->
                    </div>
                    <div class="rework_qd_item" @click="openQ(index)">
                        <span><b>*</b>质量属性</span>
                        <div class="rework_qd_item_right">
@@ -87,8 +87,10 @@
        <Quality :show="qualityShow" @close="close2" @value="getValue2" />
        <!-- é€‰æ‹©è´§ä½ -->
        <Location :show="locationShow" :list="locationList" @close="close3" @value="getValue3" />
        <!-- å·¥åº -->
        <ProductionProcess :show="productionShow" :list="productionList" @close="close4" @value="getValue4" />
        <!-- å•据类型 -->
        <van-popup v-model:show="typeShow" position="bottom" :style="{ height: '50%' }">
        <van-popup v-model:show="typeShow" round position="bottom" :style="{ height: '50%' }">
            <van-picker
                :columns="columns"
                @confirm="onConfirm1"
@@ -103,11 +105,13 @@
    import { onMounted, ref, reactive } from 'vue'
    import { useRouter } from 'vue-router'
    import { Toast } from 'vant'
    import { createForStandard, getListByWarehouseId, wOutBoundForStockUp } from '@/apis/WorkOrderAPI'
    import { getListByWarehouseId, wOutBoundForStockUp } from '@/apis/WorkOrderAPI'
    import { getListByMaterialId } from '@/apis/ExWarehouse'
    import Warehouse from '@/components/common/Warehouse.vue'
    import Material from '@/components/newCom/Material.vue'
    import Quality from '@/components/newCom/quality.vue'
    import Location from '@/components/newCom/location.vue'
    import ProductionProcess from '@/components/newCom/productionProcess.vue'
    const router = useRouter()
    // è¡¨å•数据
@@ -119,6 +123,8 @@
    })
    let locationList: any = ref([])
    let location: any = ref(true)
    let productionList: any = ref([])
    let i = ref(0)
@@ -150,6 +156,7 @@
    let qualityShow = ref<boolean>(false)
    let locationShow = ref<boolean>(false)
    let typeShow = ref<boolean>(false)
    let productionShow = ref<boolean>(false)
    // æ‰“开选择物料
    const openMaterial = (index: number) => {
@@ -160,6 +167,11 @@
    const openQ = (index: number) => {
        i.value = index
        qualityShow.value = true
    }
    // æ‰“开工序
    const openGX = (index: number) => {
        i.value = index
        productionShow.value = true
    }
    // æ‰“开选择货位
    const openL = (index: number) => {
@@ -188,6 +200,12 @@
    const onConfirm1 = (value: any) => {
        form.typeName = value.name
        form.type = value.id
        if (value.id == 25) {
            list.value.forEach(item => {
                item.procedureId = ''
                item.procedureName = ''
            })
        }
        typeShow.value = false
    };
    const onCancel = () => {
@@ -265,6 +283,10 @@
    const close3 = (): void => {
        locationShow.value = false
    }
    // å…³é—­è´§ä½é€‰æ‹©å¼¹æ¡†
    const close4 = (): void => {
        productionShow.value = false
    }
    // é€‰æ‹©ä»“库回调
    const getValue = (item: any): void => {
        form.warehouseName = item.name
@@ -273,21 +295,39 @@
            .then(res => {
                if (res.code === 200) {
                    locationList.value = res.data
                    if (res.data.length === 1) {
                        location.value = false
                        list.value.forEach(item => {
                            item.locationId = res.data[0].id
                            item.locationName = res.data[0].unionName
                        })
                    } else {
                        location.value = true
                    list.value.forEach(item => {
                        item.locationId = ''
                        item.locationName = ''
                    })
                    }
                }
            })
        warehouseShow.value = false
    }
    // é€‰æ‹©ç‰©æ–™
    const getValue1 = (item: any): void => {
        console.log(item)
        list.value[i.value].materialName = item.mmodelUnionName
        list.value[i.value].materialId = item.id
        list.value[i.value].unitId = item.unitId
        list.value[i.value].unitName = item.umodelName
        // èŽ·å–ç‰©æ–™ä¸‹å·¥åº
        getListByMaterialId({
            materialId: item.id
        }).then(res => {
            if (res.code === 200) {
                productionList.value = res.data
                list.value[i.value].procedureId = ''
                list.value[i.value].procedureName = ''
            }
        })
        materialsShow.value = false
    }
    // é€‰æ‹©è´¨é‡å±žæ€§
@@ -302,6 +342,12 @@
        list.value[i.value].locationName = item.unionName
        locationShow.value = false
    }
    // é€‰æ‹©å·¥åº
    const getValue4 = (item: any): void => {
        list.value[i.value].procedureId = item.id
        list.value[i.value].procedureName = item.name
        productionShow.value = false
    }
    onMounted(() => {
        // èŽ·å–å·¥è£…ä¿¡æ¯
        // getLKInfo(route.query.id as string)
h5_standard/src/views/needToBeDealtWith/outbound.vue
@@ -61,7 +61,7 @@
        <Warehouse :show="warehouseShow" @close="close" @value="getValue" />
        <Materials ref="Material" :show="materialsShow" :id="form.warehouseId.toString()" @close="close1" @value="getValue1" />
        <!-- å•据类型 -->
        <van-popup v-model:show="typeShow" position="bottom" :style="{ height: '50%' }">
        <van-popup v-model:show="typeShow" round position="bottom" :style="{ height: '50%' }">
            <van-picker
                :columns="columns"
                @confirm="onConfirm1"
@@ -124,6 +124,8 @@
    // æäº¤
    const onConfirm = () => {
        if (!form.type) return Toast('请选择单据类型')
        if (!form.warehouseId) return Toast('请选择出库仓库')
        if (list.value.length === 0) return Toast('至少选择一条出库物料')
        for (let i = 0; i < list.value.length; i++) {
            if (!list.value[i].num || list.value[i].num == '' || list.value[i].num == 0) {
                return Toast(`第${i + 1}个出库物料数量必须大于0`)
h5_standard/src/views/workOrder/afterWorkReport.vue
@@ -357,15 +357,17 @@
        }).then(res => {
            if (res.code === 200) {
                if (res.data.length > 0) {
                    res.data.forEach((item: any) => {
                        if (item.doneType === 1) {
                            produceFrom.undesirable = item.num
                            produceFrom.undesirableId = item.id
                        } else {
                            produceFrom.qualified = item.num
                            produceFrom.qualifiedId = item.id
                        }
                    })
                    produceFrom.qualified = res.data[0].qualifiedNum
                    produceFrom.undesirable = res.data[0].unqualifiedNum
                    // res.data.forEach((item: any) => {
                    //     if (item.doneType === 1) {
                    //         produceFrom.undesirable = item.num
                    //         produceFrom.undesirableId = item.id
                    //     } else {
                    //         produceFrom.qualified = item.num
                    //         produceFrom.qualifiedId = item.id
                    //     }
                    // })
                }
                // res.data.forEach((item: any) => {
                //     if (item.doneType === 0) { // åˆæ ¼
h5_standard/src/views/workOrder/index.vue
@@ -150,7 +150,7 @@
            num: '0'
        },
        {
            id: [2,3],
            id: [2,3,7],
            name: '生产中',
            num: '0'
        },
@@ -213,6 +213,7 @@
    // åˆ‡æ¢åˆ†ç±»
    const clickTag = (id: any): void => {
        console.log()
        form.total = 0
        form.statusList = id
        form.page = 0
h5_standard/src/views/workOrder/processPlan.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,232 @@
<template>
    <div class="content">
        <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
            <van-list
                v-model:loading="loading"
                :finished="finished"
                finished-text="没有更多了~"
                @load="onLoad">
                <div class="content_list">
                    <van-swipe-cell v-for="(item, i) in listData" :key="i">
                        <div class="content_list_item" @click="clickItem(item)">
                            <div class="content_list_item_title">
                                <span>{{item.materialName}}|{{item.produceName}}</span>
                                <div class="content_list_item_title_tips" v-if="item.urgent">优先{{ item.urgent }}</div>
                            </div>
                            <div class="content_list_item_nr">
                                <div class="content_list_item_nr_box">
                                    <div class="label">物料编码:</div>
                                    <div class="cr">{{item.materialName}}丨{{item.materialCode}}</div>
                                </div>
                                <div class="content_list_item_nr_box">
                                    <div class="label">计划数量:</div>
                                    <div class="cr">{{item.num}}{{item.umodel.name}}</div>
                                </div>
                                <div class="content_list_item_nr_box">
                                    <div class="label">计划日期:</div>
                                    <div class="cr">{{item.workPlanStartDate}} ~ {{item.workPlanEndDate}}</div>
                                </div>
                                <div class="content_list_item_nr_box">
                                    <div class="label">计划员:</div>
                                    <div class="cr">{{item.planUserName}}</div>
                                </div>
                                <div class="content_list_item_nr_box">
                                    <div class="label">生产批次:</div>
                                    <div class="cr">{{item.batch}}</div>
                                </div>
                                <div class="content_list_item_nr_box" v-if="item.salesOrder">
                                    <div class="label">销售订单:</div>
                                    <div class="cr">{{ item.salesOrder }}</div>
                                </div>
                            </div>
                        </div>
                    </van-swipe-cell>
                </div>
            </van-list>
        </van-pull-refresh>
    </div>
</template>
<script setup lang="ts">
    import { reactive, ref, onBeforeUnmount, getCurrentInstance } from "vue"
    import { useRouter, useRoute } from "vue-router"
    import { getList } from "@/apis/PlanningAPI"
    const route = useRoute()
    const router = useRouter()
    const { $Bus }  = getCurrentInstance().appContext.config.globalProperties
    // åˆ†é¡µæŸ¥è¯¢æ•°æ®
    const pageData = reactive({
        capacity: 10,
        page: 0,
        total: 0
    })
    // åˆ—表数据
    let listData: any = ref([])
    const loading = ref(false)
    const finished = ref(false)
    const refreshing = ref(false)
    const clickItem = (obj: any) => {
        $Bus.emit('callback', obj)
        router.go(-1)
    }
    // åˆ—表
    const onLoad = () => {
        if (!finished.value) {
            pageData.page = pageData.page + 1
            loading.value = true
            getList({
                capacity: pageData.capacity,
                page: pageData.page,
                model: {
                    statusList: [1, 4],
                    paused: 0
                },
                sorts: [
                    { direction: 'DESC', property: 'CREATE_TIME' }
                ]
            }).then(res => {
                if (refreshing.value) {
                    listData.value = []
                    refreshing.value = false;
                }
                loading.value = false
                if (res.code === 200 && res.data.records && res.data.records.length !== 0) {
                    pageData.total = res.data.total
                    listData.value.push(...res.data.records)
                } else {
                    finished.value = true
                }
            }).catch(err => {
                loading.value = false
                finished.value = true
                if (refreshing.value) {
                    listData.value = []
                    refreshing.value = false;
                }
            })
        }
    }
    // ä¸‹æ‹‰åˆ·æ–°ä¼˜åŒ–页面
    const onRefresh = () => {
        finished.value = false;
        pageData.page = 0
        loading.value = true;
        onLoad();
    }
    onBeforeUnmount(() => {
        $Bus.all.delete("changeOdr")
    })
</script>
<style lang="scss" scoped>
    .content {
        width: 100%;
        // height: 100%;
        position: absolute;
        background: #F7F7F7;
        .content_list {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            .content_list_item {
                padding: 30px;
                background: #ffffff;
                margin-bottom: 20px;
                .content_list_item_title {
                    display: flex;
                    align-items: center;
                    .content_list_item_title_tips {
                        padding: 4px 8px;
                        box-sizing: border-box;
                        background: #DE5243;
                        border-radius: 8px;
                        font-size: 22px;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #FFFFFF;
                        margin-left: 16px;
                    }
                    .warning {
                        color: $nav-stateColor1 !important;
                    }
                    .green {
                        color: $nav-stateColor6 !important;
                    }
                    span {
                        font-size: 32px;
                        font-family: PingFangSC-Medium, PingFang SC;
                        font-weight: 500;
                        color: #333333;
                    }
                }
                .content_list_item_nr {
                    padding: 24px 30px;
                    background: #F7F7F7;
                    border-radius: 16px;
                    margin-top: 30px;
                    display: flex;
                    justify-content: space-between;
                    flex-wrap: wrap;
                    .content_list_item_nr_boxs {
                        width: 45%;
                        display: flex;
                        margin-top: 24px;
                        &:nth-child(1) {
                            margin-top: 0;
                        }
                        &:nth-child(2) {
                            margin-top: 0;
                        }
                        .warning {
                            color: $nav-stateColor4 !important;
                        }
                        .label {
                            flex-shrink: 0;
                            font-size: 24px;
                            font-weight: 400;
                            color: #666666;
                        }
                        .cr {
                            flex: 1;
                            font-size: 24px;
                            font-weight: 400;
                            color: #222222;
                            overflow: hidden;
                            white-space: nowrap;
                            text-overflow: ellipsis;
                            -o-text-overflow:ellipsis;
                        }
                    }
                    .content_list_item_nr_box {
                        width: 100%;
                        display: flex;
                        margin-top: 24px;
                        &:nth-child(1) {
                            margin-top: 0;
                        }
                        .label {
                            font-size: 24px;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .cr {
                            font-size: 24px;
                            font-weight: 400;
                            color: #222222;
                        }
                    }
                }
            }
        }
    }
</style>
h5_standard/src/views/workOrder/reportingForWork.vue
@@ -1,42 +1,84 @@
<template>
    <div class="bg">
        <!--  æŠ•料明细/合格产出明细/不良产出明细  -->
        <div class="bg_plan" @click="selectPlan">
            <div class="bg_plan_label" v-if="!from.processPlan">
                <span><b>*</b>工序生产计划</span>
            </div>
            <div class="bg_plan_nr" v-else>
                <span>{{ from.processPlan.materialName }} | {{ from.processPlan.materialCode }} | {{ from.processPlan.produceName }}</span>
                <span>{{ from.processPlan.batch }}{{ from.processPlan.salesOrder ? ` / ${from.processPlan.salesOrder}` : '' }}</span>
                <span>计划时间:{{ from.processPlan.workPlanStartDate }} ~ {{ from.processPlan.workPlanEndDate }}</span>
                <span>计划进度:{{from.processPlan.num}}/{{from.processPlan.workorderDistributNum}}{{ from.processPlan.unitName }}</span>
            </div>
            <div class="bg_plan_label_val">
                <span v-if="!from.processPlan">请选择</span>
                <img src="@/assets/icon/ic_ar@2x.png" alt="" />
            </div>
        </div>
        <div class="bg_list">
            <div class="bg_list_item">
                <div class="bg_list_item_top">
                    <div class="bg_list_item_top_left">
                        <div class="bg_list_item_top_left_x"></div>
                        <span>投料明细</span>
                        <!-- <span class="blue left">{{tlTotal()}}</span> -->
                        <span>生产信息</span>
                    </div>
                    <div class="bg_list_item_top_right" @click="jumpTL" v-if="proxy.$auth('h5:workorderinput:create') && (info.bomType !== 1 || info.bomType == 0 || !info.bomType)">
                </div>
                <div class="bg_list_item_h">
                    <div class="bg_list_item_num" @click="openDev">
                        <div class="bg_list_item_num_item">
                            <span>生产设备</span>
                            <div class="bg_list_item_num_item_sr">
                                <span :style="{color: from.deviceName ? '#333' : ''}">{{from.deviceName ? from.deviceName : '请选择'}}</span>
                                <img src="@/assets/icon/ic_ar@2x.png" alt="" />
                            </div>
                        </div>
                    </div>
                    <div class="bg_list_item_num" @click="userShow = true">
                        <div class="bg_list_item_num_item">
                            <span>生产人员</span>
                            <div class="bg_list_item_num_item_sr">
                                <span :style="{color: from.userName ? '#333' : ''}">{{from.userName ? from.userName : '请选择'}}</span>
                                <img src="@/assets/icon/ic_ar@2x.png" alt="" />
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="bg_list_item">
                <div class="bg_list_item_top">
                    <div class="bg_list_item_top_left">
                        <div class="bg_list_item_top_left_x"></div>
                        <span>生产信息</span>
                    </div>
                    <div class="bg_list_item_top_right" @click="openMaterial" v-if="(hasBom == 1 && bomType != 1) || hasBom == 0">
                        <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" />
                        <span>手动录入</span>
                        <span>新增投料</span>
                    </div>
                </div>
                <template v-if="feedingData && feedingData.length > 0">
                    <van-swipe-cell v-for="(item, index) in feedingData" :key="index">
                <template v-if="wuList.length > 0">
                    <van-swipe-cell v-for="(item, index) in wuList" :key="index">
                        <div class="bg_list_item_h">
                        <div class="bg_list_item_num">
                            <div class="bg_list_item_num_item">
                                <!-- <span>{{item.code}}</span> -->
                                <div class="bg_list_item_num_item_wl">
                                    <span> {{ item.materialName }}{{ item.procedureName ? `&nbsp;|&nbsp;${item.procedureName}` : '' }}</span>
                                        <span>{{ item.materialName }}{{ item.procedureName ? ` | ${item.procedureName}` : '' }}</span>
                                    <div class="bg_list_item_num_item_wl_lx">
                                        <span class="green" v-if="item.qualityType == 0">合格&nbsp;/&nbsp;</span>
                                        <span class="yellow" v-if="item.qualityType == 1">不良&nbsp;/&nbsp;</span>
                                        <span class="red" v-if="item.qualityType == 2">报废&nbsp;/&nbsp;</span>
                                        <span>{{ item.locationName }}</span>
                                        <span>{{ item.batch ? `&nbsp;/&nbsp;${item.batch}` : '' }}</span>
                                            <span>{{ item.locationName }}&nbsp;/&nbsp;</span>
                                            <span>{{ item.batch }}</span>
                                    </div>
                                </div>
                                <div class="bg_list_item_num_item_sr">
                                    <input v-model="item.num" :disabled="!proxy.$auth('h5:workorderinput:update')" @blur="change(item.id, item.num, 'T', item.maxNum, item, item.unitAttribute)" type="number" />
                                        <input type="number" v-model="item.num" @input="inputwl(index)" />
                                    <span>{{item.unitName}}</span>
                                </div>
                            </div>
                        </div>
                        <template #right v-if="proxy.$auth('h5:workorderinput:delete')">
                            <van-button style="height: 100%;" square text="删除" @click="deleItem(item.id, 'T')" type="danger" />
                        </div>
                        <template #right>
                            <van-button style="height: 100%;" @click="deleItem(index)" square text="删除" type="danger" />
                        </template>
                    </van-swipe-cell>
                </template>
@@ -45,993 +87,538 @@
                        <span>暂无数据</span>
                    </div>
                </template>
                <div class="kong" v-if="hasBom == 1 && bomType == 1">
                    <span>当前工序无需投料</span>
            </div>
            <div class="bg_list_item">
            </div>
            <div class="bg_list_item bottomval">
                <div class="bg_list_item_top">
                    <div class="bg_list_item_top_left">
                        <div class="bg_list_item_top_left_x"></div>
                        <span>产出明细</span>
                    </div>
                </div>
                <!-- <template v-if="produceData && produceData.length > 0"> -->
                    <!-- v-for="(item, index) in produceData" :key="index" -->
                    <van-swipe-cell>
                <div class="bg_list_item_h">
                        <div class="bg_list_item_num">
                            <div class="bg_list_item_num_item">
                                <span>良品数</span>
                            <span><b>*</b>良品数</span>
                                <div class="bg_list_item_num_item_sr">
                                    <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" -->
                                    <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" -->
                                    <input type="number" v-model="produceFrom.qualified" @blur="changeCC('0', produceFrom.qualified, produceFrom.qualifiedId)" placeholder="请输入" />
                                    <span v-if="info.umodel">{{info.umodel.name}}</span>
                                <input type="number" v-model="from.qualified" @input="changeNum(1)" placeholder="请输入" />
                                <span>块</span>
                                </div>
                            </div>
                        </div>
                    </van-swipe-cell>
                    <van-swipe-cell>
                        <div class="bg_list_item_num">
                            <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" -->
                            <div class="bg_list_item_num_item">
                                <span>不良数</span>
                                <div class="bg_list_item_num_item_sr">
                                    <!-- :disabled="!proxy.$auth('h5:workorderoutput:update')" -->
                                    <!-- @blur="change(item.id, item.num, 'C', item.maxNum, item)" -->
                                    <input type="number" v-model="produceFrom.undesirable" @blur="changeCC('1', produceFrom.undesirable, produceFrom.undesirableId)" placeholder="请输入" />
                                    <span v-if="info.umodel">{{info.umodel.name}}</span>
                                <input type="number" v-model="from.undesirable" @input="changeNum(2)" placeholder="请输入" />
                                <span>块</span>
                                </div>
                            </div>
                        </div>
                    </van-swipe-cell>
                    <!-- <van-swipe-cell>
                        <div class="bg_list_item_num">
                    <div class="bg_list_item_num" v-if="from.undesirable > 0">
                            <div class="bg_list_item_num_item" @click="show = true">
                                <span>不良项</span>
                            <span><b>*</b>不良项</span>
                                <div class="bg_list_item_num_item_sr">
                                    <span>设置 ></span>
                                <span class="wulll" :style="{color: from.defectiveName ? '#305ED5' : ''}">{{from.defectiveName ? from.defectiveName : '设置'}}</span>
                                <img src="@/assets/icon/ic_ar@2x.png" alt="" />
                                </div>
                            </div>
                        </div>
                    </van-swipe-cell> -->
                <!-- </template>
                <template v-else>
                    <div class="kong">
                        <span>暂无数据</span>
                    </div>
                </template> -->
            </div>
            <!-- <div class="bg_list_item">
            <div class="bg_plan" @click="TimeShow = true">
                <div class="bg_plan_label">
                    <span><b>*</b>报工时长</span>
                </div>
                <div class="bg_plan_label_val">
                    <span :style="{color: from.durationName ? '#333' : ''}">{{from.durationName ? from.durationName : '请选择'}}</span>
                    <img src="@/assets/icon/ic_ar@2x.png" alt="" />
                </div>
            </div>
            <div class="bg_list_item" v-if="infoBox">
                <div class="bg_list_item_top">
                    <div class="bg_list_item_top_left">
                        <div class="bg_list_item_top_left_x"></div>
                        <span>合格产出明细</span>
                        <span class="blue left">{{ccTotal()}}</span>
                    </div>
                    <div class="bg_list_item_top_right" @click="jumpCC" v-if="proxy.$auth('h5:workorderoutput:create')">
                        <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" />
                        <span>手动录入</span>
                        <span>工资绩效</span>
                    </div>
                </div>
                <template v-if="produceData && produceData.length > 0">
                    <van-swipe-cell v-for="(item, index) in produceData" :key="index">
                <div class="bg_list_item_h">
                        <div class="bg_list_item_num">
                            <div class="bg_list_item_num_item">
                                <span>{{item.code}}</span>
                                <div class="bg_list_item_num_item_sr">
                                    <input v-model="item.num" :disabled="!proxy.$auth('h5:workorderoutput:update')" @blur="change(item.id, item.num, 'C', item.maxNum, item)" type="number" />
                                    <span>{{item.company}}</span>
                            <span>计件方式</span>
                            <div class="bg_list_item_num_item_list">
                                <div class="bg_list_item_num_item_list_item active" v-if="infoBox.type == 0">计件</div>
                                <div class="bg_list_item_num_item_list_item active" v-if="infoBox.type == 1">计时</div>
                                </div>
                            </div>
                        </div>
                        <template #right v-if="proxy.$auth('h5:workorderoutput:delete')">
                            <van-button style="height: 100%;" square text="删除" @click="deleItem(item.id, 'C')" type="danger" />
                        </template>
                    </van-swipe-cell>
                </template>
                <template v-else>
                    <div class="kong">
                        <span>暂无数据</span>
                    </div>
                </template>
            </div>
            <div class="bg_list_item">
                <div class="bg_list_item_top">
                    <div class="bg_list_item_top_left">
                        <div class="warning"></div>
                        <span>不良产出明细</span>
                        <span class="yellow left">{{blTotal()}}</span>
                    </div>
                </div>
                <template v-if="undesirable && undesirable.length > 0">
                    <van-swipe-cell v-for="(item, index) in undesirable" :key="index">
                        <div class="bg_list_item_num">
                            <div class="bg_list_item_num_item">
                                <span>{{item.code}}</span>
                            <span>工资单价</span>
                                <div class="bg_list_item_num_item_sr">
                                    <input v-model="item.num" :disabled="!proxy.$auth('h5:workorderoutput:update')" @blur="change(item.id, item.num, 'C', item.maxNum, item)" type="number" />
                                    <span>{{item.company}}</span>
                                <span class="color1">{{infoBox.salary}}元/{{infoBox.type == 0 ? 'ä»¶' : '时'}}</span>
                                </div>
                            </div>
                        </div>
                        <template #right v-if="proxy.$auth('h5:workorderoutput:delete')">
                            <van-button style="height: 100%;" square text="删除" @click="deleItem(item.id, 'C')" type="danger" />
                        </template>
                    </van-swipe-cell>
                </template>
                <template v-else>
                    <div class="kong">
                        <span>暂无数据</span>
                    </div>
                </template>
            </div>
            <div class="bg_list_item">
                <div class="bg_list_item_top">
                    <div class="bg_list_item_top_left">
                        <div class="error"></div>
                        <span>报废产出明细</span>
                        <span class="red left">{{bfTotal()}}</span>
                    </div>
                </div>
                <template v-if="scrap && scrap.length > 0">
                    <van-swipe-cell v-for="(item, index) in scrap" :key="index">
                        <div class="bg_list_item_num">
                            <div class="bg_list_item_num_item">
                                <span>{{item.code}}</span>
                            <span>预计工资</span>
                                <div class="bg_list_item_num_item_sr">
                                    <input v-model="item.num" :disabled="!proxy.$auth('h5:workorderoutput:update')" @blur="change(item.id, item.num, 'C', item.maxNum, item)" type="number" />
                                    <span>{{item.company}}</span>
                                <span class="color1">{{expectedSalary}}元</span>
                                </div>
                            </div>
                        </div>
                        <template #right v-if="proxy.$auth('h5:workorderoutput:delete')">
                            <van-button style="height: 100%;" square text="删除" @click="deleItem(item.id, 'C')" type="danger" />
                        </template>
                    </van-swipe-cell>
                </template>
                <template v-else>
                    <div class="kong">
                        <span>暂无数据</span>
                    </div>
                </template>
            </div> -->
        </div>
        <div class="details_dj">
            <div class="details_dj_title">
                <div class="details_dj_title_left">
                    <div class="details_x"></div>
                    <span>生产点检</span>
                </div>
                <div class="details_dj_title_right" @click="jumpdj" v-if="proxy.$auth('h5:workorder:processRecord')">
                    <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" />
                    <span>手动录入</span>
                    <div class="bg_list_item_num">
                        <div class="bg_list_item_num_item">
                            <span>达标率</span>
                            <div class="bg_list_item_num_item_sr">
                                <span class="color1">{{complianceRate}}%</span>
                </div>
            </div>
            <div class="details_dj_list">
                <van-list
                    v-model:loading="loading"
                    :finished="finished"
                    finished-text="没有更多了~"
                    @load="pageDJs">
                    <van-swipe-cell v-for="(item, index) in djData" :key="index">
                        <div class="details_dj_list_item">
                            <span>{{item.attrName}}:{{item.val}}</span>
                            <span>{{item.userName}} {{item.createTime}}</span>
                        </div>
                        <template #right>
                            <van-button square type="danger" style="height: 100%;" @click="dele(item.id)" text="删除" />
                        </template>
                    </van-swipe-cell>
                </van-list>
                </div>
            </div>
        </div>
        <!--  æŠ¥å·¥æŒ‰é’®  -->
        <template v-if="info.status === 2 || info.procedureNeedcheck === 1">
            <div class="bh_zw"></div>
            <div class="bg_footer">
                <div class="bg_footer_submit" @click="submit">确认报工</div>
            <div class="bg_footer_submit1">继续报工</div>
            <div class="bg_footer_submit" @click="submit">提交</div>
            </div>
        </template>
        <!--  æ‰«ç ç»„ä»¶  -->
        <v-ScanCode
            :openCode="openCode"
            :infos="['请扫描工装码']"
            @closePopup="closePopup"
            @onDecode="onDecode" />
        <!--  æŠ¥å·¥ç»Ÿè®¡æ•°æ®  -->
        <van-popup v-model:show="statistics" round :closeable="true" position="bottom" :style="{ height: '53%' }">
            <div class="tg">
                <div class="tg_header">请确认报工信息</div>
                <div class="tg_table">
                    <div class="tg_table_header">
                        <div class="tg_table_header_item">类型</div>
                        <div class="tg_table_header_item">物料名称</div>
                        <!-- <div class="tg_table_header_item">工装数量</div> -->
                        <div class="tg_table_header_item">物料数量</div>
                    </div>
                    <div class="nr" v-if="statisticsData.length > 0">
                        <div class="tg_table_nr" v-for="(item, index) in statisticsData" :key="index">
                            <div class="tg_table_nr_item">{{item.name}}</div>
                            <div class="tg_table_nr_item">{{item.materialName}}</div>
                            <!-- <div class="tg_table_nr_item">{{item.gznum}}</div> -->
                            <div class="tg_table_nr_item" :style="item.name === '工单未投料' ? 'color: #DE5243' : ''">{{item.num}}</div>
                        </div>
                    </div>
                    <div class="nr" v-else>
                        <div class="tg_table_nr">
                            <div class="tg_table_nr_item1">暂无数据</div>
                        </div>
                    </div>
                </div>
                <div class="tg_footer">
                    <button class="tg_footer_qr" @click="submitBG" v-if="proxy.$auth('h5:workorderoutput:confirm') && isSubmit">确认报工</button>
                    <div class="tg_footer_fh" @click="gofh" v-else-if="!isSubmit">返回修改</div>
                </div>
            </div>
        </van-popup>
        <!-- é€‰æ‹©ä¸è‰¯é¡¹ -->
        <van-popup v-model:show="show" round position="bottom" :style="{ height: '53%' }">
            <div class="bl">
                <div class="bl_head">
                    <span @click="show = false">取消</span>
                    <img src="@/assets/icon/ic_close@2x.png" style="opacity: 0;" alt="" />
                    <span>不良项</span>
                    <span>确认</span>
                    <!-- <span>确认</span> -->
                    <img src="@/assets/icon/ic_close@2x.png" @click="show = false" alt="" />
                </div>
                <div class="bl_list">
                    <div class="bl_list_item" v-for="(item, i) in 12" :key="i">
                    <div class="bl_list_item" v-for="(item, i) in cateList" :key="i" @click="changeChecked(i)">
                        <div class="bl_list_item_left">
                            <input type="checkbox" :checked="true" name="" id="" />
                            <span>有划痕</span>
                            <input type="checkbox" :checked="item.active" />
                            <span>{{ item.name }}</span>
                        </div>
                        <div class="bl_list_item_right">
                            <input type="number" placeholder="请输入" />
                            <input type="number" @click.stop v-model="item.num" placeholder="0" />
                        </div>
                    </div>
                </div>
                <div class="bl_footer" @click="onConfirm3">确认</div>
            </div>
        </van-popup>
        <!--  å…¥åº“物料  -->
        <MaterialY :show="show1" :plansId="String(plansId)" :ids="ids" :deviceId="String(deviceId)" @close="close" @value="getValue" />
        <!-- è®¾å¤‡ -->
        <van-popup v-model:show="deviceShow" round position="bottom" :style="{ height: '50%' }">
            <van-picker
                :columns="deviceList"
                @confirm="onConfirm"
                @cancel="onCancel"
                :columns-field-names="customFieldName"
            />
        </van-popup>
        <!-- äººå‘˜ -->
        <user :show="userShow" @close="onCancel1" @value="onConfirm1" />
        <!-- æ—¶é—´ -->
        <van-popup v-model:show="TimeShow" round position="bottom" :style="{ height: '50%' }">
            <van-datetime-picker
                v-model="from.time"
                type="time"
                title="选择时间"
                @confirm="onConfirm2"
                @cancel="onCancel2"
            />
        </van-popup>
    </div>
</template>
<script setup lang="ts">
    import { getCurrentInstance, nextTick, onMounted, ref, reactive } from 'vue'
    import { useRouter, useRoute } from "vue-router"
    import { Dialog, Toast } from 'vant'
    import { REGULAR } from '@/utils/utils'
    import {
        getBarcodeContent,
        queryById,
        getOrocessRecord,
        deleteCT,
        updateById,
        comfirmDone,
        comfirmDoneStandard,
        getListByCondition,
        allForStandard,
        pageDJ,
        deletedj,
        dealWorkorderRecordStandard,
        getWorkorderRecordListStandard
    } from '@/apis/WorkOrderAPI'
    import { QRCodeType } from '@/enum'
    const { proxy }: any = getCurrentInstance()
    import VWorkOrderInfo from '@/components/common/WorkOrderInfo.vue'
    import { onMounted, ref, reactive, getCurrentInstance, computed } from 'vue'
    import { useRouter } from 'vue-router'
    import { getDeviceByCondition, getFindAll, queryOne, autoWorkReport, getIdPlansExt, categoryExtList } from '@/apis/PlanningAPI'
    import MaterialY from '@/components/newCom/MaterialY.vue'
    import user from '@/components/newCom/user.vue'
    import { Toast } from 'vant'
    const {$Bus} = getCurrentInstance().appContext.config.globalProperties
    const router = useRouter()
    const route = useRoute()
    const loading = ref(false);
    const finished = ref(false);
    let show = ref(false)
    // ç‚¹æ£€æ•°æ®
    let djData: any = ref([])
    // åˆ†é¡µæŸ¥è¯¢æ•°æ®
    let page = reactive({
        capacity: 10,
        page: 0
    let show1 = ref(false)
    let TimeShow = ref(false)
    let deviceId = ref('')
    let plansId = ref('')
    let ids = ref('')
    let total: any = ref('')    // å¯æŠ•数量
    let from: any = reactive({
        processPlan: null,
        deviceId: '',
        deviceName: '',
        userId: '',
        userName: '',
        qualified: '',  // è‰¯å“æ•°
        undesirable: '', // ä¸è‰¯æ•°
        duration: '',
        durationName: '',
        time: '',
        defective: [],
        defectiveName: ''
    })
    // äº§å‡ºåˆæ ¼/不良
    let produceFrom = reactive({
        qualifiedId: '',
        qualified: '',  // åˆæ ¼
        undesirableId: '',
        undesirable: '' // ä¸è‰¯
    })
    let infoBox: any = ref(null)     // å·¥èµ„绩效
    // è¯¦æƒ…数据
    const info: any = ref({})
    let bomType: any = ref('')
    let hasBom: any = ref('')
    let deviceShow = ref(false)
    let deviceList = ref([])
    let cateList:any = ref([])
    const customFieldName = {
        text: 'name'
    };
    let userShow = ref(false)
    let userList = ref([])
    let wuList: any = ref([])
    // åˆ¤æ–­æ˜¯å¦èƒ½æäº¤
    let isSubmit: any = ref<boolean>(false)
    // ä¸è‰¯æ˜Žç»†
    let undesirable: any = ref([])
    // æŠ¥åºŸæ˜Žç»†
    let scrap: any = ref([])
    // æ‰«ç ç±»åž‹
    let type: any = ref('')
    // ç»Ÿè®¡æ•°æ®
    let statisticsData: any = ref([
        // {
        //     name: '工单投料',
        //     materialName: '黄沙',
        //     num: 0
        // },
        // {
        //     name: '工单合格产出',
        //     materialName: '黄沙',
        //     num: 0
        // },
        // {
        //     name: '工单不良产出',
        //     materialName: '黄沙',
        //     num: 0
        // },
        // {
        //     name: '工单未投料',
        //     materialName: '黄沙',
        //     num: 0
        // }
    ])
    // æŠ•料数据
    const feedingData: any = ref([])
    // äº§å‡ºæ•°æ®
    const produceData: any = ref([])
    // æŽ§åˆ¶æ‰«ç æ˜¾ç¤ºéšè—
    const openCode = ref<boolean>(false)
    // æŽ§åˆ¶æŠ¥å·¥ç»Ÿè®¡
    const statistics = ref<boolean>(false)
    // æŠ•料统计
    const tlTotal = (): string => {
        if (feedingData.value.length > 0) {
            let total: number = 0
            feedingData.value.forEach((element: any) => {
                total = total + element.num
            })
            return `${total}`
    // äº§å‡ºæ•°é‡éªŒè¯
    const changeNum = (type: number) => {
        let num = total.value - (Number(from.qualified) + Number(from.undesirable))
        if (type == 2) {
            from.defective = []
            from.defectiveName = ''
        }
        return ''
    }
    // ä¿®æ”¹äº§å‡º
    const changeCC = (downType: string, num: number, recordId: string) => {
        if (!num) return
        console.log(produceFrom.qualified + produceFrom.undesirable)
        if ((produceFrom.qualified + produceFrom.undesirable) > info.value.planNum) {
            return Toast.fail({ message: '产出数量不能大于计划数量', duration: 2000 })
        }
        if (num >= 0) {
            dealWorkorderRecordStandard({
                downType, num, recordId, workorderId: route.query.id
            }).then(res => {
                if (res.code === 200) {
                    getOrocessRecordCC()
                }
            })
        if (num < 0) {
            Toast('产出数量不能大于可产出数量!')
            if (type == 1) {
                from.qualified = ''
        } else {
            if (downType == 0) {
                produceFrom.qualified = 0
            } else {
                produceFrom.undesirable = 0
                from.undesirable = ''
            }
            Toast.fail({ message: '产出数量不能小于0', duration: 2000 })
        }
    }
    // è·³è½¬ç‚¹æ£€
    const jumpdj = () => {
        router.push({ name: 'spotCheck', query: { id: route.query.id } })
    // éªŒè¯ç‰©æ–™æ•°é‡
    const inputwl = (i: number) => {
        if (wuList.value[i].num > wuList.value[i].total) {
            wuList.value[i].num = ''
            Toast('投料数量不能大于库存数量')
        }
    }
    // åˆ é™¤ç‚¹æ£€
    const dele = (id: string | number): void => {
        deletedj(id)
            .then(res => {
                if (res.code === 200) {
                    djData.value = []
                    finished.value = false
                    page.page = 0
                    pageDJs()
    const changeChecked = (i: number) => {
        cateList.value[i].active = !cateList.value[i].active
    }
    const onConfirm3 = () => {
        let isOpen = false
        cateList.value.forEach((item: any, index: number) => {
            if (item.active) {
                isOpen = true
                }
            })
        if (!isOpen) return Toast('请选择不良项')
        let arr: any = []
        let total: any = 0
        let name: any = ''
        cateList.value.forEach((item: any, index: number) => {
            if (item.active) {
                if (item.num <= 0) {
                    return Toast('不良数量必须大于0')
    }
    // ç‚¹æ£€æ•°æ®
    const pageDJs = () => {
        if (!finished.value) {
            page.page = page.page + 1
            loading.value = true
            pageDJ({
                capacity: page.capacity,
                page: page.page,
                model: {
                    workorderId: route.query.id
                }
            }).then(res => {
                if (res.code === 200 && res.data && res.data.records.length !== 0) {
                    djData.value.push(...res.data.records)
                } else {
                    finished.value = true
                }
                loading.value = false
            }).catch(err => {
                loading.value = false
                finished.value = true
            })
        }
    }
    // ç»Ÿè®¡
    const ccTotal = (): string => {
        if (produceData.value.length > 0) {
            let total: number = 0
            produceData.value.forEach((element: any) => {
                total = total + element.num
            })
            return `${total}${produceData.value[0].company}`
        }
        return ''
    }
    // ç»Ÿè®¡
    const blTotal = (): string => {
        if (undesirable.value.length > 0) {
            let total: number = 0
            undesirable.value.forEach((element: any) => {
                total = total + element.num
            })
            return `${total}${undesirable.value[0].company}`
        }
        return ''
    }
    // ç»Ÿè®¡
    const bfTotal = (): string => {
        if (scrap.value.length > 0) {
            let total: number = 0
            scrap.value.forEach((element: any) => {
                total = total + element.num
            })
            return `${total}${scrap.value[0].company}`
        }
        return ''
    }
    // åˆ é™¤äº§å‡º/投料
    const deleItem = (id: any, type: string) => {
        Dialog.confirm({
            title: '提示',
            message: '确定删除此条记录吗?',
        }).then(() => {
            deleteCT(id)
                .then(res => {
                    if (res.code === 200 && type === 'C') {
                        getOrocessRecordCC()
                    } else if (res.code === 200 && type === 'T') {
                        getOrocessRecords()
                total = total += item.num
                arr.push(item)
                name += item.name + item.num + ';'
                    }
                })
        }).catch(() => {
            // on cancel
        })
        if (total !== from.undesirable) return Toast('不良数必须等于产出不良数')
        from.defective = arr
        from.defectiveName = name
        show.value = false
    }
    // è·³è½¬æ‰‹åŠ¨äº§å‡º
    const jumpCC = () => {
        router.push({ name: 'manualOutput', query: { id: route.query.id, num: produceData.value.length > 0 ? produceData.value[0].num : '' } })
    }
    // è·³è½¬æ‰‹åŠ¨æŠ•æ–™
    const jumpTL = () => {
        router.push({ name: 'manualFeeding', query: { id: route.query.id } })
    }
    // å…³é—­æ‰«ç ç»„ä»¶
    const closePopup = (): void => {
        openCode.value = false
    }
    // èŽ·å–æ‰«ç å€¼
    const onDecode = (data: string[]): void => {
        getBarcodeContent({
            barcode: data[0]
        }).then(res => {
            if (res.code === 200) {
                if (res.data.barcodeType === QRCodeType.GZ) {
                    if (type.value === 'tl') {    // æŠ•料操作
                        getListByCondition({ id: res.data.id })
                            .then(gz => {
                                if (gz.code === 200) {
                                    if (gz.data[0].status !== 1) {
                                        router.push({ name: 'codeScanningFeeding', query: { id: route.query.id, gzId: res.data.id } })
                                    } else {
                                        Toast.fail({ message: '扫描的工装状态不能为空', duration: 2000 })
                                    }
                                }
                            })
                    }
                    if (type.value === 'cc') {    // äº§å‡ºæ“ä½œ
                        router.push({ name: 'codeScanningOutput', query: { id: route.query.id, gzId: res.data.id } })
                    }
                } else {
                    Toast({ message: '请扫描正确的篮筐码', duration: 2000 })
                }
            }
        })
        nextTick(() => {
            openCode.value = false
        })
    }
    // è·³è½¬æ‰‹åŠ¨æŠ•æ–™
    const jump = () => {
        router.push({ name: 'manualFeeding', query: { id: route.query.id } })
    }
    // è·³è½¬æ‰«ç æŠ•æ–™
    const jump1 = (types: string) => {
        type.value = types
        openCode.value = true
    }
    // æŸ¥è¯¢å·¥å•详情
    const queryByIds = () => {
        queryById(route.query.id).then(res => {
            if (res.code === 200) {
                info.value = res.data
            }
        })
    }
    // æŸ¥è¯¢å·¥å•生产记录---投料
    const getOrocessRecords = () => {
        feedingData.value = []
        allForStandard({
            workorderId: route.query.id,
            type: 0
        }).then(res => {
            if (res.code === 200) {
                feedingData.value = res.data
                // res.data.forEach((item: any) => {
                //     feedingData.value.push({ id: item.id, company: item.umodel.name, gz: item.amodel.code, name: item.mmodel.name, code: item.amodel.code + ' - ' + item.mmodel.name, num: item.num, ynum: item.num, maxNum: item.amodel.num })
                // })
            }
        })
    }
    // æŸ¥è¯¢å·¥å•生产记录---产出
    const getOrocessRecordCC = () => {
        produceData.value = []
        undesirable.value = []
        scrap.value = []
        getWorkorderRecordListStandard({
            workorderId: route.query.id
        }).then(res => {
            if (res.code === 200) {
                if (res.data.length > 0) {
                    res.data.forEach((item: any) => {
                        if (item.doneType === 1) {
                            produceFrom.undesirable = item.num
                            produceFrom.undesirableId = item.id
                        } else {
                            produceFrom.qualified = item.num
                            produceFrom.qualifiedId = item.id
                        }
                    })
                }
                // res.data.forEach((item: any) => {
                //     if (item.doneType === 0 || !item.doneType) { // åˆæ ¼ | æ··åˆ
                //         produceData.value.push({ id: item.id, company: item.umodel.name, name: item.mmodel.name, code: item.amodel.code + ' - ' + item.mmodel.name, num: item.num, ynum: item.num, maxNum: item.amodel.num })
                //     } else if (item.doneType === 1) { // ä¸è‰¯
                //         undesirable.value.push({ id: item.id, company: item.umodel.name, name: item.mmodel.name, code: item.amodel.code + ' - ' + item.mmodel.name, num: item.num, ynum: item.num, maxNum: item.amodel.num })
                //     } else if (item.doneType === 2) { // æŠ¥åºŸ
                //         scrap.value.push({ id: item.id, company: item.umodel.name, name: item.mmodel.name, code: item.amodel.code + ' - ' + item.mmodel.name, num: item.num, ynum: item.num, maxNum: item.amodel.num })
                //     }
                // })
            }
        })
    }
    // ç¼–辑投料/产出
    const change = (id: any, num: any, type: any, maxNum: number, item: object, unitAttribute: number): void => {
        let obj: any = item
        if (type === 'T') {
            if (unitAttribute == 0 && num != '') {
                if(!REGULAR.positiveInteger.test(num)){
                    obj.num = obj.ynum
                    Toast({ message: '只能输入正整数' })
                    return
                }
            }
            if (unitAttribute == 1 && num != '') {
                if(!REGULAR.number.test(num)){
                    Toast({ message: '只能输入正整数或小数(最多四位)' })
                    obj.num = obj.ynum
                    return
                }
            }
            if (num > maxNum) {
                obj.num = obj.ynum
                Toast.fail({ message: '超出工装总数' })
                return
            }
        } else if (type === 'C' && num > info.value.planNum) {
            obj.num = obj.ynum
            Toast.fail({ message: '产出数量不能超过计划数量' })
            return
        }
        updateById({ id: id, num: num }).then(res => {
            if (res.code === 200 && type === 'T') {
                getOrocessRecords()
            } else if (res.code === 200 && type === 'C') {
                getOrocessRecordCC()
            }
        })
    }
    // ç¡®è®¤æŠ¥å·¥
    const submit = () => {
        if (info.value.bomType === 1) {  // æ‹‰å¼
            console.log('拉式')
            statisticsData.value = []
            if (info.value.hasBom === 0) {
                console.log('无bom')
                // let data: any = [
                //     { name: '工单投料', gznum: feedingData.value.length, wlmc: feedingData.value.length > 0 ? feedingData.value[0].name : '', wlnum: 0 },
                //     { name: '工单合格产出', gznum: produceData.value.length, wlmc: produceData.value.length > 0 ? produceData.value[0].name : '', wlnum: 0 },
                //     { name: '工单不良产出', gznum: 0, wlmc: '', wlnum: 0 },
                //     { name: '工单未投料', gznum: '', wlmc: feedingData.value.length > 0 ? feedingData.value[0].name : '', wlnum: 0 }
                // ]
                // if (undesirable.value.length > 0) {   // åˆ¤æ–­æœ‰æ²¡æœ‰ä¸è‰¯
                //     data[2].wlmc = undesirable.value[0].name
                //     data[2].gznum = data[2].gznum + undesirable.value.length
                // }
                // if (scrap.value.length > 0) {   // åˆ¤æ–­æœ‰æ²¡æœ‰ä¸è‰¯
                //     data[2].wlmc = scrap.value[0].name
                //     data[2].gznum = data[2].gznum + scrap.value.length
                // }
                // let tl: number = 0
                // let cc: number = 0
                // let bl: number = 0
                // undesirable.value.forEach((item: any) => {  // ä¸è‰¯
                //     bl = bl + item.num
                // })
                // scrap.value.forEach((item: any) => {  // æŠ¥åºŸ
                //     bl = bl + item.num
                // })
                // if (produceData.value.length > 0) {   // åˆ¤æ–­æœ‰æ²¡æœ‰åˆæ ¼äº§å‡º
                //     produceData.value.forEach((item: any) => {  // äº§å‡º
                //         cc = cc + item.num
                //     })
                // }
                // feedingData.value.forEach((item: any) => {  // æŠ•æ–™
                //     tl = tl + item.num
                // })
                // data[0].wlnum = tl.toString() + info.value.umodel.name
                // if (produceData.value.length > 0) {
                //     data[1].wlnum = cc.toString() + info.value.umodel.name
                // }
                // data[2].wlnum = bl.toString() + info.value.umodel.name
                // let total: number = info.value.planNum - (Number(cc) + Number(bl))
                // data[data.length - 1].wlnum = (info.value.planNum - Number(cc) - Number(bl)).toString() + info.value.umodel.name
                // if (total === 0) {
                //     isSubmit.value = true
                // } else {
                //     isSubmit.value = false
                // }
                let arr: any = []
                let tl = 0
                let res = getGroupNum(feedingData.value)
                for (let i in res) {
                    let num = 0
                    res[i].forEach((item: any) => {
                        num += item.num
                    })
                    arr.push({ name: '工单投料', materialName: i + res[i][0].procedureName, num: num })
                }
                feedingData.value.forEach((item: any) => {
                    tl += item.num
                })
                statisticsData.value = [...statisticsData.value, ...arr]
                statisticsData.value.push({ name: '工单合格产出', materialName:  info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.qualified })
                statisticsData.value.push({ name: '工单不良产出', materialName:  info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.undesirable })
                statisticsData.value.push({ name: '工单未投料', materialName: '', num: info.value.planNum - Number(produceFrom.qualified) - Number(produceFrom.undesirable) })
                let total: number = info.value.planNum - (Number(produceFrom.qualified) + Number(produceFrom.undesirable))
                if (total === 0) {
                    isSubmit.value = true
        if (!from.processPlan) return Toast('计划不能为空')
        if (!from.deviceId) return Toast('设备不能为空')
        if (!from.userId) return Toast('生产人员不能为空')
        if (hasBom.value == 1 && bomType.value == 1) {
            console.log('不需要投料')
                } else {
                    isSubmit.value = false
            if (!wuList.value.length === 0) return Toast('投料不能为空')
                }
                // if (Number(tl) <= info.value.planNum) {
                //   let total: number = Number(tl) - Number(cc) - Number(bl)  // æ˜¯å¦æœ‰ä½™
                //   data[data.length - 1].wlnum = (Number(tl) - Number(cc) - Number(bl)).toString() + info.value.umodel.name
                //   if (total === 0) {
                //     isSubmit.value = true
                //   } else {
                //     isSubmit.value = false
                //   }
                // } else {
                //   isSubmit.value = false
                // }
                // statisticsData.value = data
            } else if (info.value.hasBom === 1) {  // æœ‰bom情况
                console.log('有bom')
                // let cc: number = 0
                // let bl: number = 0
                // let newData: any = {}
                // if (feedingData.value.length > 0) {  // æŠ•æ–™
                //     feedingData.value.forEach((e: any) => {
                //         if (Object.keys(newData).indexOf('' + e.name) === -1) {
                //             newData[e.name] = []
                //         }
                //         newData[e.name].push(e)
                //     })
                //     for (let key in newData) {
                //         let obj = { name: '工单投料', gznum: newData[key].length, wlmc: key, wlnum: 0, num: 0 }
                //         newData[key].forEach((item: any) => {
                //             obj.wlnum = obj.wlnum + item.num
                //             obj.num = item.num
                //         })
                //         obj.wlnum = obj.wlnum.toString() + newData[key][0].company as never
                //         statisticsData.value.push(obj)
                //     }
                // }
                // if (produceData.value.length > 0) {  // äº§å‡º
                //     produceData.value.forEach((item: any) => {
                //         cc = cc + item.num
                //     })
                //     statisticsData.value.push({ name: '工单合格产出', gznum: produceData.value.length, wlmc: info.value.mmodel.name, wlnum: cc + info.value.umodel.name, num: cc })
                // }
                // if (undesirable.value.length > 0 || scrap.value.length > 0) {  // ä¸è‰¯/报废
                //     undesirable.value.forEach((item: any) => {
                //         bl = bl + item.num
                //     })
                //     scrap.value.forEach((item: any) => {
                //         bl = bl + item.num
                //     })
                //     statisticsData.value.push({ name: '工单不良产出', gznum: undesirable.value.length + scrap.value.length, wlmc: info.value.mmodel.name, wlnum: bl + info.value.umodel.name, num: bl })
                // }
                // let totaltl: number = 0
                // let totalcc: number = 0
                // let totalbl: number = 0
                // statisticsData.value.forEach((item: any) => {
                //     if (item.name === '工单投料') {
                //         totaltl = totaltl + item.num
                //     } else if (item.name === '工单合格产出') {
                //         totalcc = totalcc + item.num
                //     } else if (item.name === '工单不良产出') {
                //         totalbl = totalbl + item.num
                //     }
                // })
                // isSubmit.value = totalcc + totalbl <= info.value.planNum;
                let arr: any = []
                let tl = 0
                let res = getGroupNum(feedingData.value)
                for (let i in res) {
                    let num = 0
                    res[i].forEach((item: any) => {
                        num += item.num
        if (!from.qualified) return Toast('良品数不能为空')
        // æœ‰ä¸è‰¯æ•°
        if (from.undesirable > 0) {
            if (from.defective.length === 0) return Toast('不良项不能为空')
        }
        if (!from.duration) return Toast('报工时长不能为空')
        autoWorkReport({
            createWorkorderRecordDTO: {
                duration: from.duration,
                qualifiedNum: from.qualified,
                unQualifiedNum: from.undesirable
            },
            plansId: from.processPlan.id,
            proGroupId: deviceId.value,
            proUserList: [from.userId],
            recordList: wuList.value.map((item: any) => {
                return {
                    wstockId: item.id,
                    num: item.num
                }
            }),
            createUnqualifiedDTOList: from.defective.map((item: any) => {
                return {
                    categoryId: item.id,
                    unQualifiedNum: item.num
                }
                    })
                    arr.push({ name: '工单投料', materialName: i, num: num })
                }
                feedingData.value.forEach((item:any) => {
                    tl += item.num
                })
                statisticsData.value = [...statisticsData.value, ...arr]
                statisticsData.value.push({ name: '工单合格产出', materialName:  info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.qualified })
                statisticsData.value.push({ name: '工单不良产出', materialName:  info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.undesirable })
                isSubmit.value = produceFrom.qualified + produceFrom.undesirable <= info.value.planNum;
            }
        } else {
            console.log('推式')
            if (feedingData.value.length === 0) {
                Toast.fail({ message: '投料明细不能为空' })
                return
            }
            statisticsData.value = []
            if (info.value.hasBom === 0) {
                console.log('无bom')
                // let data: any = [
                //     { name: '工单投料', gznum: feedingData.value.length, wlmc: feedingData.value.length > 0 ? feedingData.value[0].name : '', wlnum: 0 },
                //     { name: '工单合格产出', gznum: produceData.value.length, wlmc: produceData.value.length > 0 ? produceData.value[0].name : '', wlnum: 0 },
                //     { name: '工单不良产出', gznum: 0, wlmc: '', wlnum: 0 },
                //     { name: '工单未投料', gznum: '', wlmc: feedingData.value.length > 0 ? feedingData.value[0].name : '', wlnum: 0 }
                // ]
                // if (undesirable.value.length > 0) {   // åˆ¤æ–­æœ‰æ²¡æœ‰ä¸è‰¯
                //     data[2].wlmc = undesirable.value[0].name
                //     data[2].gznum = data[2].gznum + undesirable.value.length
                // }
                // if (scrap.value.length > 0) {   // åˆ¤æ–­æœ‰æ²¡æœ‰ä¸è‰¯
                //     data[2].wlmc = scrap.value[0].name
                //     data[2].gznum = data[2].gznum + scrap.value.length
                // }
                // let tl = 0
                // let cc = 0
                // let bl = 0
                // undesirable.value.forEach((item: any) => {  // ä¸è‰¯
                //     bl = bl + item.num
                // })
                // scrap.value.forEach((item: any) => {  // æŠ¥åºŸ
                //     bl = bl + item.num
                // })
                // if (produceData.value.length > 0) {   // åˆ¤æ–­æœ‰æ²¡æœ‰åˆæ ¼äº§å‡º
                //     produceData.value.forEach((item: any) => {  // äº§å‡º
                //         cc = cc + item.num
                //     })
                // }
                // feedingData.value.forEach((item: any) => {  // æŠ•æ–™
                //     tl = tl + item.num
                // })
                // data[0].wlnum = tl.toString() + info.value.umodel.name
                // if (produceData.value.length > 0) {
                //     data[1].wlnum = cc.toString() + info.value.umodel.name
                // }
                // data[2].wlnum = bl.toString() + info.value.umodel.name
                // if (Number(tl) <= info.value.planNum) {
                //     let total: number = Number(tl) - Number(cc) - Number(bl)  // æ˜¯å¦æœ‰ä½™
                //     data[data.length - 1].wlnum = (Number(tl) - Number(cc) - Number(bl)).toString() + info.value.umodel.name
                //     if (total === 0) {
                //         isSubmit.value = true
                //     } else {
                //         isSubmit.value = false
                //     }
                // } else {
                //     isSubmit.value = false
                // }
                // statisticsData.value = data
                let arr: any = []
                let tl = 0
                let res = getGroupNum(feedingData.value)
                for (let i in res) {
                    let num = 0
                    res[i].forEach((item: any) => {
                        num += item.num
                    })
                    arr.push({ name: '工单投料', materialName: i + '-' + res[i][0].procedureName, num: num })
                }
                feedingData.value.forEach((item:any) => {
                    tl += item.num
                })
                statisticsData.value = [...statisticsData.value, ...arr]
                statisticsData.value.push({ name: '工单合格产出', materialName: info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.qualified })
                statisticsData.value.push({ name: '工单不良产出', materialName: info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.undesirable })
                if (Number(tl) <= info.value.planNum) {
                    let total: number = Number(tl) - Number(produceFrom.qualified) - Number(produceFrom.undesirable)  // æ˜¯å¦æœ‰ä½™
                    statisticsData.value.push({ name: '工单未投料', materialName: '', num: (Number(tl) - Number(produceFrom.qualified) - Number(produceFrom.undesirable)).toFixed(2) })
                    if (total === 0) {
                        isSubmit.value = true
                    } else {
                        isSubmit.value = false
                    }
                } else {
                    isSubmit.value = false
                }
            } else if (info.value.hasBom === 1) {  // æœ‰bom情况
                console.log('有bom')
                let arr: any = []
                let tl = 0
                let res = getGroupNum(feedingData.value)
                for (let i in res) {
                    let num = 0
                    res[i].forEach((item: any) => {
                        num += item.num
                    })
                    arr.push({ name: '工单投料', materialName: i, num: num })
                }
                feedingData.value.forEach((item:any) => {
                    tl += item.num
                })
                statisticsData.value = [...statisticsData.value, ...arr]
                statisticsData.value.push({ name: '工单合格产出', materialName: info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.qualified })
                statisticsData.value.push({ name: '工单不良产出', materialName: info.value.mmodel.name + '-' + info.value.procedureName, num: produceFrom.undesirable })
                // isSubmit.value = produceFrom.qualified + produceFrom.undesirable <= info.value.planNum;
                isSubmit.value = true
            }
        }
        statistics.value = true
    }
    // æ ¹æ®æŸä¸ªå­—段进行分组
    const getGroupNum = (arr: any) => {
        let newArry: any = {};
        for (let i = 0; i < arr.length; i++) {
            if (newArry[arr[i].materialName]) {
                newArry[arr[i].materialName].push(arr[i])
            } else {
                newArry[arr[i].materialName] = [arr[i]]
            }
        }
        return newArry;
    }
    // è¿”回修改
    const gofh = () => {
        statistics.value = false
    }
    // ç¡®è®¤æŠ¥å·¥
    const submitBG = () => {
        comfirmDoneStandard({
            id: route.query.id
        }).then(res => {
            if (res.code === 200) {
                Toast.success({ message: '报工成功', forbidClick: true, duration: 2000 })
                Toast.success({message: '报工成功!'})
                setTimeout(() => {
                    router.go(-2)
                }, 2000)
                    router.go(-1)
                }, 2000);
            }
        })
    }
    // é¢„计工资
    const expectedSalary = computed(() => {
        if (!infoBox.value) return 0
        // æŒ‰ä»¶è®¡ç®—
        if (infoBox.value.type == 0) {
            console.log('计件')
            if (!from.qualified) return 0
            if (infoBox.value.unqualified == 1) {   // æ˜¯å¦è®¡å…¥ä¸è‰¯å“
                let total = Number(from.qualified) + Number(from.undesirable)
                return total * infoBox.value.salary
            } else {
                return Number(from.qualified) * infoBox.value.salary
            }
        } else {
            console.log('计时')
            if (!from.duration) return 0;
            let h = (from.duration / 60 / 60).toFixed(2)
            return Number(h) * infoBox.value.salary
        }
    })
    // è¾¾æ ‡çއ
    const complianceRate = computed(() => {
        if (!infoBox.value) return 0;
        if (!from.qualified) return 0;
        if (!from.duration) return 0;
        // æŒ‰ä»¶è®¡ç®—
        // if (infoBox.value.type == 0) {
            // if (infoBox.value.unqualified == 1) {   // æ˜¯å¦è®¡å…¥ä¸è‰¯å“
                let a = ((Number(from.qualified) + Number(from.undesirable)) / (from.duration / 60 / 60)).toFixed(2)
                let b = (infoBox.value.num / (infoBox.value.times / 60 / 60)).toFixed(2)
                console.log(a)
                console.log(b)
                return (Number(a) / Number(b)).toFixed(2)
                // let total = (Number(from.qualified) + Number(from.undesirable)) / ((from.duration * 60 * 60) * infoBox.value.num / )
                // return total * infoBox.value.salary;
            // } else {
            //     return Number(from.qualified) * infoBox.value.salary;
            // }
        // } else {
        //     console.log('按时长')
        // }
    })
    const deleItem = (index: number) => {
        if (wuList.value.length === 1) return Toast('至少保留一项内容')
        wuList.value.splice(index, 1)
    }
    const openDev = () => {
        if (!from.processPlan) return Toast('请先选择工序生产计划')
        deviceShow.value = true
    }
    const openMaterial = () => {
        if (!plansId.value) return Toast('请先选择工序生产计划')
        if (!deviceId.value) return Toast('请先选择生产设备')
        show1.value = true
    }
    const onConfirm1 = (e: any) => {
        from.userId = e.userId
        from.userName = e.name
        userShow.value = false
    }
    const onConfirm2 = (e: string) => {
        let h = Number(e.substring(0, 2))
        let m = Number(e.substring(3, 5))
        let s = 0
        if (h > 0) {
            s += h * 60 * 60
        }
        if (m > 0) {
            s += m * 60
        }
        from.duration = s
        from.durationName = `${h}小时${m}分钟`
        TimeShow.value = false
    }
    const onCancel1 = () => {
        userShow.value = false
    }
    const onCancel2 = () => {
        TimeShow.value = false
    }
    const onConfirm = (e: any) => {
        from.deviceId = e.id
        from.deviceName = e.name
        deviceId.value = e.id
        from.userId = ''
        from.userName = ''
        // getFindAll({
        //     deviceId: e.id,
        //     planId: from.processPlan.id
        // }).then(res => {
        //     if (res.code === 200) {
        //         res.data.forEach((item: any) => {
        //             item.name = item.umodel.name + '-' + item.tmodel.name
        //         })
        //         userList.value = res.data
        //     }
        // })
        deviceShow.value = false
    }
    const onCancel = () => {
        deviceShow.value = false
    }
    const selectPlan = () => {
        router.push({ name: 'processPlans' })
    }
    const close = () => {
        show1.value = false
    }
    const getData = () => {
        categoryExtList({
            cateType: "3"
        }).then(res => {
            if (res.code === 200) {
                res.data.forEach((item: any) => {
                    item.active = false
                    item.num = ''
                })
                cateList.value = res.data
            }
        })
    }
    // é€‰æ‹©ç‰©æ–™
    const getValue = (val: any) => {
        let obj = JSON.parse(JSON.stringify(val))
        obj.total = val.num
        wuList.value.unshift(obj)
        let arr = wuList.value.map((item: any) => item.id)
        ids.value = arr.join(',')
        show1.value = false
    }
    onMounted(() => {
        pageDJs()
        queryByIds()
        getOrocessRecords()
        getOrocessRecordCC()
        getData()
        $Bus.on('callback', (res: any)=>{
            from.processPlan = res
            plansId.value = res.id
            from.deviceId = ''
            from.deviceName = ''
            deviceId.value = ''
            from.userId = ''
            from.userName = ''
            total.value = res.num - res.workorderDistributNum
            // èŽ·å–è®¾å¤‡
            getDeviceByCondition({ procedureId: res.procedureId })
                .then(res1 => {
                    if (res1.code === 200) {
                        deviceId.value = res1.data[0].id
                        from.deviceId = res1.data[0].id
                        from.deviceName = res1.data[0].name
                        deviceList.value = res1.data
                    }
                })
            // èŽ·å–ç±»åž‹
            getIdPlansExt(res.id)
                .then(res2 => {
                    if (res.code === 200) {
                        bomType.value = res2.data.bomType
                        hasBom.value = res2.data.hasBom
                    }
                })
            // èŽ·å–å·¥èµ„ç»©æ•ˆæ•°æ®
            queryOne({
                deleted: 0,
                departId: res.factoryId,
                materialId: res.materialId,
                procedureId: res.procedureId
            }).then(result => {
                if (result.code === 200) {
                    infoBox.value = result.data
                }
            })
        })
    })
</script>
<style lang="scss" scoped>
    .bg {
        width: 100%;
        /*height: 100%;*/
        position: absolute;
        background: #F7F7F7;
        .details_cz {
        .bg_plan {
            width: 100%;
            // height: 98px;
            padding: 30px;
            box-sizing: border-box;
            background: #FFFFFF;
            margin-bottom: 40px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            .details_cz_sdtl {
                width: 330px;
                height: 76px;
                background: #FFFFFF;
                border-radius: 36px;
                display: flex;
                align-items: center;
                justify-content: center;
                img {
                    width: 28px;
                    height: 28px;
                    margin-right: 14px;
                }
                span {
                    font-size: 26px;
                font-size: 30px;
                font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #222222;
                b {
                    color: red;
                }
            }
            .details_cz_smtl {
                /*width: 330px;*/
                flex: 1;
                height: 76px;
                background: $nav-color;
                border-radius: 36px;
            .bg_plan_nr {
                display: flex;
                flex-direction: column;
                span {
                    font-size: 24px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #666666;
                    margin-top: 20px;
                    &:first-child {
                        font-size: 32px;
                        font-family: PingFangSC-Medium, PingFang SC;
                        font-weight: 500;
                        color: #333333;
                        margin-top: 0 !important;
                    }
                }
            }
            .bg_plan_label_val {
                display: flex;
                align-items: center;
                justify-content: center;
                img {
                    width: 28px;
                    height: 28px;
                    margin-right: 14px;
                }
                span {
                    font-size: 26px;
                    font-size: 28px;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #ffffff;
                    color: #999999;
                }
                img {
                    width: 12px;
                    height: 24px;
                    margin-left: 20px;
                }
            }
        }
@@ -1039,7 +626,9 @@
            width: 100%;
            display: flex;
            flex-direction: column;
            margin-top: 30px;
            .bottomval {
                margin-bottom: 20px !important;
            }
            .bg_list_item {
                display: flex;
                flex-direction: column;
@@ -1111,11 +700,25 @@
                        }
                    }
                }
                .bg_list_item_num {
                .top {
                    margin-top: 20px !important;
                }
                .bg_list_item_h {
                    width: 100%;
                    background: white;
                    padding: 0 30px;
                    box-sizing: border-box;
                    background: white;
                    .bg_list_item_num {
                        width: 100%;
                        min-height: 98px;
                        background: white;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        border-bottom: 1PX solid #E5E5E5;
                        &:last-child {
                            border: none !important;
                        }
                    .kong {
                        text-align: center;
                        font-size: 25px;
@@ -1123,6 +726,8 @@
                        background: #ffffff;
                    }
                    .bg_list_item_num_item {
                            width: 100%;
                            height: 100%;
                        display: flex;
                        align-items: center;
                        // height: 118px;
@@ -1132,6 +737,30 @@
                        border-bottom: 1px solid #E5E5E5;
                        &:last-child {
                            border: none;
                            }
                            .bg_list_item_num_item_list {
                                display: flex;
                                align-items: center;
                                .active {
                                    background: #305ED5 !important;
                                    color: #FFFFFF !important;
                                }
                                .bg_list_item_num_item_list_item {
                                    width: 116px;
                                    height: 62px;
                                    line-height: 62px;
                                    text-align: center;
                                    background: #F2F2F2;
                                    border-radius: 8px;
                                    font-size: 26px;
                                    font-family: PingFangSC-Regular, PingFang SC;
                                    font-weight: 400;
                                    color: #333333;
                                    margin-right: 20px;
                                    &:last-child {
                                        margin: 0 !important;
                                    }
                                }
                        }
                        .bg_list_item_num_item_wl {
                            flex-shrink: 0;
@@ -1155,11 +784,21 @@
                        .err {
                            color: $nav-stateColor4 !important;
                        }
                            img {
                                width: 12px;
                                height: 24px;
                                margin-left: 20px;
                            }
                        span {
                            flex-shrink: 0;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                                b {
                                    font-size: 30px;
                                    color: red;
                                    margin-right: 5px;
                                }
                            .warning {
                                color: $nav-stateColor5 !important;
                                margin-right: 5px;
@@ -1185,6 +824,12 @@
                            display: flex;
                            align-items: center;
                            justify-content: flex-end;
                                .color1 {
                                    font-size: 28px;
                                    font-family: PingFangSC-Regular, PingFang SC;
                                    font-weight: 400;
                                    color: #333333;
                                }
                            input::-webkit-input-placeholder {
                                font-size: 28px;
                            }
@@ -1200,83 +845,20 @@
                                color: #333333;
                                padding: 0 30px
                            }
                            span {
                                font-size: 28px;
                                font-weight: 400;
                                color: #666666;
                            }
                        }
                    }
                }
            }
        }
        .details_dj {
            display: flex;
            flex-direction: column;
            .details_dj_title {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0 30px 30px 30px;
                box-sizing: border-box;
                .details_dj_title_left {
                    display: flex;
                    align-items: center;
                    .details_x {
                        width: 8px;
                        height: 30px;
                        background: $nav-color;
                        border-radius: 2px;
                        margin-right: 12px;
                    }
                    span {
                        font-size: 32px;
                        font-weight: 500;
                        color: #222222;
                    }
                }
                .details_dj_title_right {
                    display: flex;
                    align-items: center;
                    img {
                        width: 28px;
                        height: 28px;
                        margin-right: 12px;
                                .wulll {
                                    width: 400px;
                                    text-align: right;
                                    overflow: hidden;
                                    white-space: nowrap;
                                    text-overflow: ellipsis;
                    }
                    span {
                        font-size: 28px;
                        font-weight: 400;
                        color: $nav-color;
                    }
                }
            }
            .details_dj_list {
                width: 100%;
                /*padding: 30px;*/
                box-sizing: border-box;
                background: #ffffff;
                display: flex;
                flex-direction: column;
                .details_dj_list_item {
                    display: flex;
                    flex-direction: column;
                    border-bottom: 1px solid #E5E5E5;
                    padding: 30px;
                    /*margin: 30px;*/
                    /*padding-bottom: 30px;*/
                    /*margin-bottom: 30px !important;*/
                    span {
                        &:nth-child(1) {
                            font-size: 28px;
                            font-weight: 400;
                            color: #222222;
                        }
                        &:nth-child(2) {
                            font-size: 24px;
                                    font-family: PingFangSC-Regular, PingFang SC;
                            font-weight: 400;
                            color: #999999;
                            margin-top: 24px;
                                }
                            }
                        }
                    }
                }
@@ -1290,10 +872,27 @@
            bottom: 0;
            left: 0;
            width: 100%;
            z-index: 9;
            padding: 0 30px 60px 30px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: space-between;
            .bg_footer_submit1 {
                width: 334px;
                height: 88px;
                line-height: 88px;
                text-align: center;
                background: #FFFFFF;
                box-shadow: 0px 0px 12px 0px rgba(0,0,0,0.08);
                border-radius: 8px;
                font-size: 30px;
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #305ED5;
            }
            .bg_footer_submit {
                width: 690px;
                width: 334px;
                height: 88px;
                background: $nav-color;
                box-shadow: 0 0 12px 0 rgba(0, 0, 0, 0.08);
@@ -1304,108 +903,6 @@
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
        .tg {
            width: 100%;
            height: 100%;
            padding: 30px;
            box-sizing: border-box;
            .tg_header {
                width: 100%;
                height: 45px;
                text-align: center;
                line-height: 45px;
                font-size: 30px;
                font-weight: 500;
                color: #222222;
            }
            .tg_table {
                width: 100%;
                margin-top: 40px;
                .tg_table_header {
                    width: 100%;
                    height: 72px;
                    background: #EFF2FC;
                    display: flex;
                    align-items: center;
                    .tg_table_header_item {
                        flex: 1;
                        font-size: 26px;
                        font-weight: 500;
                        color: #333333;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }
                }
            }
            .nr {
                max-height: 400px;
                overflow-x: scroll;
                .tg_table_nr {
                    width: 100%;
                    padding: 24px 10px;
                    box-sizing: border-box;
                    display: flex;
                    align-items: center;
                    background: white;
                    box-shadow: inset 0px -2px 0px 0px #E5E5E5;
                    .tg_table_nr_item {
                        flex: 1;
                        font-size: 26px;
                        font-weight: 500;
                        color: #333333;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }
                    .tg_table_nr_item1 {
                        flex: 1;
                        font-size: 26px;
                        font-weight: 500;
                        color: #333333;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }
                }
            }
        }
        .tg_footer {
            width: calc(100% - 60px);
            position: fixed;
            bottom: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-sizing: border-box;
            padding-bottom: 40px;
            .tg_footer_fh {
                width: 100%;
                height: 88px;
                display: flex;
                align-items: center;
                justify-content: center;
                background: rgba(66, 117, 252, 0.05);
                border-radius: 8px;
                border: 1PX solid #4275FC;
                font-size: 32px;
                font-weight: 500;
                color: $nav-color;
            }
            .tg_footer_qr {
                width: 100%;
                height: 88px;
                border: none;
                display: flex;
                align-items: center;
                justify-content: center;
                background: $nav-color;
                border-radius: 8px;
                font-size: 32px;
                font-weight: 500;
                color: #FFFFFF;
            }
        }
        .bl {
@@ -1425,21 +922,38 @@
                        font-size: 32px !important;
                    }
                }
                img {
                    width: 28px;
                    height: 28px;
                }
            }
            .bl_footer {
                width: 100%;
                height: 88px;
                line-height: 88px;
                text-align: center;
                background: #305ED5;
                border-radius: 8px;
                font-size: 32px;
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #FFFFFF;
                margin-top: 30px;
            }
            .bl_list {
                width: 100%;
                height: 580px;
                height: 550px;
                overflow-y: scroll;
                margin-top: 30px;
                .bl_list_item {
                    width: 100%;
                    height: 60px;
                    height: 96px;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    margin-bottom: 20px;
                    border-bottom: 1PX solid #E5E5E5;
                    &:last-child {
                        margin-bottom: 0 !important;
                        border: none !important;
                    }
                    .bl_list_item_left {
                        flex: 1;
@@ -1448,6 +962,7 @@
                        input {
                            width: 30px;
                            height: 30px;
                            border: 1PX solid #CCCCCC;
                            margin: 0 !important;
                        }
                        span {
@@ -1464,9 +979,19 @@
                            padding-left: 5px;
                            width: 160px;
                            height: 100%;
                            padding: 0 30px;
                            box-sizing: border-box;
                            text-align: right;
                            font-size: 28px;
                            color: #333333;
                            border-radius: 10px;
                            border: 2px solid #999999
                            border: 1PX solid #CCCCCC;
                            &::-webkit-input-placeholder {
                                font-size: 28px;
                                font-family: PingFangSC-Regular, PingFang SC;
                                font-weight: 400;
                                color: #999999;
                            }
                        }
                    }
                }
h5_standard/src/views/wxLogin.vue
@@ -45,8 +45,8 @@
})
const login = async () => {
    if (!from.openid) return Toast('openid不能为空')
    if (!from.unionid) return Toast('unionid不能为空')
    // if (!from.openid) return Toast('openid不能为空')
    // if (!from.unionid) return Toast('unionid不能为空')
    if (!from.companyId) return Toast('企业代码不能为空')
    if (!from.username) return Toast('手机号不能为空')
    if (!from.password) return Toast('密码不能为空')
web_standard/.env.development
@@ -19,7 +19,10 @@
# VUE_APP_BASE_URL = 'https://106.14.220.133:10012/'
# ç„¦æ¾
VUE_APP_BASE_URL = 'http://192.168.0.36:10021/'
# VUE_APP_BASE_URL = 'http://192.168.0.36:10021/'
# ä»»åº·
VUE_APP_BASE_URL = 'http://192.168.0.15:10021/'
# VUE_APP_BASE_URL = 'https://dmtest.ahapp.net/doumeeplant_api/'