Mr.Shi
2023-08-29 d8d184a00d3581b3a77aa26864a153f0515524e0
小程序
已添加6个文件
已删除1个文件
已修改10个文件
1883 ■■■■■ 文件已修改
h5_standard/src/utils/request.ts 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/children.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/views/workOrder/workOrderReporting.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/components/LabelSelection.vue 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/components/Search.vue 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/components/Warehouse.vue 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages.json 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/login/login.vue 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/planDetails/planDetails.vue 546 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages/plannedProgress/plannedProgress.vue 632 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/components/Warehouse.vue 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/components/location.vue 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue 77 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/store/index.js 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/uni.scss 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
minipro_standard/util/api/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
h5_standard/src/utils/request.ts
@@ -29,9 +29,9 @@
// æ·»åŠ å“åº”æ‹¦æˆªå™¨
service.interceptors.response.use(
    (response) => {
        // if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) {
        if (response.config.url?.indexOf('/lingyang/login') == -1 && response.config.url?.indexOf('/edgp/loginDemo') == -1 && response.config.url?.indexOf('/lingyang/loginDemo') == -1 && response.config.url?.indexOf('/edgp/login') == -1) {
            loading.clear();
        // }
        }
        if (response.data.code === 401) {     // å¤„理登录过期
            Toast.fail({ message: '登录过期,准备自动重新登录', duration: 2000, forbidClick: true })
            setTimeout(() => {
h5_standard/src/views/children.vue
@@ -36,7 +36,7 @@
    const title = ref<string>('')
    alert(window.document.title)
    // alert(window.document.title)
    const pathLists = reactive<string[]>([
        '/index',
        '/workbench',
h5_standard/src/views/workOrder/workOrderReporting.vue
@@ -306,11 +306,11 @@
                </van-list>
            </div>
        </div>
        <!--  æŠ¥å·¥æŒ‰é’®  -->
        <template v-if="info.status === 2 || info.procedureNeedcheck === 1">
        <!--  æŠ¥å·¥æŒ‰é’®  v-if="info.status === 2 || info.procedureNeedcheck === 1"  -->
        <template>
            <div class="bh_zw"></div>
            <div class="bg_footer">
                <div class="bg_footer_submit" v-if="typeView == 0" @click="submit">确认报工</div>
                <div class="bg_footer_submit" v-if="typeView == 0 && (info.status === 2 || info.procedureNeedcheck === 1)" @click="submit">确认报工</div>
                <!-- proxy.$auth('h5:workorder:processRecord') &&  -->
                <div class="bg_footer_submit1" @click="jumpdj" v-if="typeView == 1">
                    <img src="@/assets/icon/gongdan_ic_shoudong@2x.png" alt="" />
minipro_standard/components/LabelSelection.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,88 @@
<template>
    <scroll-view class="tag" scroll-x>
        <view class="tag_list">
            <view v-for="item in TagList"
                :key="item.id"
                :class="{'tag_item': true, 'tagActive': item.id == activeId}"
                @click="change(item)">
                <text>{{item.name}}</text>
                <text v-if="isShow && item.num">({{item.num}})</text>
            </view>
        </view>
    </scroll-view>
</template>
<script>
    export default {
        name: "LabelSelection",
        props: {
            TagList: Array,
            isShow: Boolean
        },
        data() {
            return {
                activeId: ''
            };
        },
        methods: {
            change(item) {
                if (this.activeId !== item.id) {
                    this.activeId = item.id
                    this.$emit('change', item.id)
                }
            }
        },
        watch: {
            TagList: {
                immediate: true,
                handler(news, old) {
                    let list = news
                    if (list && list.length !== 0) {
                        this.activeId = list[0].id
                    }
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .tag::-webkit-scrollbar {
        width: 0 !important;
    }
    .tag::-webkit-scrollbar {
        width: 0 !important;
        height: 0;
    }
    .tag {
        width: 100%;
        padding: 5rpx 0;
        box-sizing: border-box;
        .tag_list {
            width: 100%;
            display: flex;
            align-items: center;
            flex-wrap: nowrap;
            .tagActive {
                background: $nav-color !important;
                text {
                    color: #FFFFFF !important;
                }
            }
            .tag_item {
                min-width: 120rpx;
                padding: 14rpx 24rpx;
                border-radius: 26rpx;
                text-align: center;
                flex-shrink: 0;
                margin-right: 20rpx;
                border: 1rpx solid #CCCCCC;
                text {
                    font-size: 26rpx;
                    font-weight: 400;
                    color: #555555;
                }
            }
        }
    }
</style>
minipro_standard/components/Search.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,178 @@
<template>
    <view class="search">
        <view class="search_box">
            <view class="search_input">
                <image src="@/static/ic_search@2x.png" alt="">
                <input v-model="text" @keyup.enter="searchInput()" type="text" :placeholder="placeholder" />
            </view>
            <view class="search_operation" v-if="isShow">
                <view class="search_operation_w"></view>
                <image @click="openCate()" src="@/static/filter@2x.png" mode="widthFix">
            </view>
        </view>
        <u-popup :show="open" :round="10" mode="bottom">
            <view class="content">
                <slot name="content"></slot>
            </view>
            <view class="zhanwei"></view>
            <view class="footer">
                <view class="footer_close" @click="closes">重置</view>
                <view class="footer_submit" @click="submit">确定</view>
            </view>
        </u-popup>
    </view>
</template>
<script>
    export default {
        data() {
            return {
                text: '',
                open: false
            };
        },
        props: {
            isShow: Boolean,
            placeholder: String
        },
        methods: {
            // æœç´¢æ¡†æœç´¢
            searchInput() {
                this.$emit('searchInput', this.text)
            },
            // æ‰“开弹窗
            openCate() {
                this.open = true
            },
            // é‡ç½®
            closes() {
                this.open = false
                this.text = ''
                this.$emit('reset', this.text)
            },
            // æœç´¢æäº¤
            submit() {
                this.open = false
                this.$emit('submit')
            }
        }
    }
</script>
<style lang="scss" scoped>
    .search {
        width: 100%;
        height: 68rpx;
        display: flex;
        align-items: center;
        .zhanwei {
            height: 180rpx;
            background: #ffffff;
        }
        .content {
            padding: 30rpx 30rpx 0 30rpx;
        }
        .footer {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-left: 40rpx;
            padding-right: 40rpx;
            padding-bottom: 64rpx;
            box-sizing: border-box;
            position: fixed;
            bottom: 0;
            left: 0;
            background: #ffffff;
            z-index: 99;
            .footer_close {
                flex: 1;
                padding: 28rpx 0;
                box-sizing: border-box;
                margin-right: 22rpx;
                font-size: 32rpx;
                font-weight: 500;
                color: #999999;
                background: #F7F7F7;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .footer_submit {
                flex: 1;
                padding: 28rpx 0;
                box-sizing: border-box;
                font-size: 32rpx;
                font-weight: 500;
                color: #ffffff;
                background: $nav-color;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
        .search_box {
            width: 100%;
            display: flex;
            align-items: center;
            .search_input {
                flex: 1;
                height: 100%;
                background: #F7F7F7;
                border-radius: 8rpx;
                display: flex;
                align-items: center;
                padding: 15rpx 30rpx;
                box-sizing: border-box;
                image {
                    width: 28rpx;
                    height: 28rpx;
                    margin-right: 10rpx;
                }
                input {
                    width: 100%;
                    border: none;
                    outline: none;
                    background: #F7F7F7;
                    font-size: 26rpx;
                }
                input::-webkit-input-placeholder { /* WebKit browsers */
                    font-size: 26rpx;
                    font-weight: 400;
                    color: #B2B2B2;
                }
                input:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
                    font-size: 26rpx;
                    font-weight: 400;
                    color: #B2B2B2;
                }
                input::-moz-placeholder { /* Mozilla Firefox 19+ */
                    font-size: 26rpx;
                    font-weight: 400;
                    color: #B2B2B2;
                }
                input:-ms-input-placeholder { /* Internet Explorer 10+ */
                    font-size: 26rpx;
                    font-weight: 400;
                    color: #B2B2B2;
                }
            }
            .search_operation {
                flex-shrink: 0;
                /*width: 150rpx;*/
                display: flex;
                justify-content: flex-end;
                align-items: center;
                /*margin-left: 30rpx;*/
                image {
                    width: 44rpx;
                    height: 44rpx;
                }
                .search_operation_w {
                    width: 30rpx;
                }
            }
        }
    }
</style>
minipro_standard/components/Warehouse.vue
ÎļþÒÑɾ³ý
minipro_standard/pages.json
@@ -54,7 +54,25 @@
            }
        }
    ],
        ,{
            "path" : "pages/plannedProgress/plannedProgress",
            "style" :
            {
                "navigationBarTitleText": "计划进度",
                "enablePullDownRefresh": false
            }
        }
        ,{
            "path" : "pages/planDetails/planDetails",
            "style" :
            {
                "navigationBarTitleText": "计划详情",
                "enablePullDownRefresh": false
            }
        }
    ],
    "subPackages": [
        {
            "root": "pages_adjust",
minipro_standard/pages/login/login.vue
@@ -11,7 +11,7 @@
        </view>
        <view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height">
            <image src="@/static/login_ic_phone@2x.png" mode="" class="img40 mr25"></image>
            <u--input placeholder="手机号" border="none" v-model="loginForm.account"></u--input>
            <u--input placeholder="手机号" border="none" v-model="loginForm.username"></u--input>
        </view>
        <view class="bg_w rd8 ptb30 pl40 bbox mt40 flex input-height">
            <image src="@/static/login_ic_password@2x.png" mode="" class="img40 mr25"></image>
@@ -22,21 +22,37 @@
</template>
<script>
    import { wxAccountLogin, getUserInfo } from '@/util/api/index.js'
    export default {
        data() {
            return {
                loginForm: {
                    companyId: '',
                    account: '',
                    username: '',
                    password: ''
                }
            };
        },
        methods: {
            loginAction() {
                uni.reLaunch({
                    url: '/pages/workbench/workbench'
            async loginAction() {
                if (!this.loginForm.companyId) return uni.showToast({ title: '企业代码不能为空', icon:"error", duration: 2000 });
                if (!this.loginForm.username) return uni.showToast({ title: '手机号不能为空', icon:"error", duration: 2000 });
                if (!this.loginForm.password) return uni.showToast({ title: '密码不能为空', icon:"error", duration: 2000 });
                let res = await wxAccountLogin({
                    companyId: this.loginForm.companyId,
                    username: this.loginForm.username,
                    password: this.loginForm.password
                })
                if (res.code === 200) {
                    let user = await getUserInfo({})
                    if (user.code === 200) {
                        await this.$store.commit('SETUSERINFO', user.data)
                        await this.$store.dispatch('getMenuList', 2)
                        uni.reLaunch({
                            url: '/pages/workbench/workbench'
                        })
                    }
                }
            }
        }
    }
@@ -56,7 +72,6 @@
            height: 100%;
        }
        .login-log {
            // margin-top: ;
            margin: 356rpx auto 0 auto ;
            left: 0;
            right: 0;
@@ -75,7 +90,7 @@
        }
    }
    .input-height {
        height: 100rpx;
        height: 100rpx;
    }
    .com-input {
        margin-top: -60px;
minipro_standard/pages/planDetails/planDetails.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,546 @@
<template>
    <view class="details">
        <view class="content_list">
            <view class="content_list_item">
                <view class="content_list_item_top">
                    <view class="content_list_item_top_left">
                        <text v-if="info.mmodel">{{info.mmodel.name}}</text>
                        <view class="content_list_item_top_left_tag" v-if="info.urgent">优先{{info.urgent}}</view>
                        <view class="content_list_item_top_left_type" v-if="info.type === 0">正常</view>
                        <view class="content_list_item_top_left_type dangerous" v-else-if="info.type === 1">异常</view>
                        <view class="content_list_item_top_left_type warning" v-else-if="info.type === 2">返工</view>
                    </view>
                    <view class="content_list_item_top_right">
                        <text v-if="info.status === 0">已生成</text>
                        <text v-if="info.status === 1">已发布</text>
                        <text v-if="info.status === 2">已撤回</text>
                        <text v-if="info.status === 3">已取消</text>
                        <text v-if="info.status === 4">已分配</text>
                        <text v-if="info.status === 5">已暂停</text>
                        <text v-if="info.status === 6">已完工</text>
                        <text v-if="info.status === 7">已入库</text>
                        <text v-if="info.status === 8">已关闭</text>
<!--                        <text class="warning" v-if="info.status === 0">待发布</text>-->
<!--                        <text class="green" v-else-if="info.status === 1 || info.status === 4">生产中</text>-->
<!--                        <text class="info" v-else-if="info.status === 6 || info.status === 7 || info.status === 3 || info.status === 8">已完成</text>-->
                    </view>
                </view>
                <view class="content_list_item_content">
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">工序名称:</view>
                        <view class="content_list_item_content_item_nr" v-if="info.pmodel">{{info.pmodel.name}}</view>
                    </view>
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">计划数量:</view>
                        <view class="content_list_item_content_item_nr" v-if="info.umodel">{{info.num}}{{info.umodel.name}}</view>
                    </view>
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">计划日期:</view>
                        <view class="content_list_item_content_item_nr">{{info.planDate}}</view>
                    </view>
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">生产批次:</view>
                        <view class="content_list_item_content_item_nr">{{info.batch}}</view>
                    </view>
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">发布日期:</view>
                        <view class="content_list_item_content_item_nr">{{info.createTime}}</view>
                    </view>
                    <view class="content_list_item_content_item" v-if="info.usermodel">
                        <view class="content_list_item_content_item_label">计划人员:</view>
                        <view class="content_list_item_content_item_nr">{{info.usermodel.realname}}</view>
                    </view>
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">分配数量:</view>
                        <view class="content_list_item_content_item_nr" v-if="info.umodel">{{info.distributNum}}{{info.umodel.name}}</view>
                    </view>
                    <view class="content_list_item_content_item">
                        <view class="content_list_item_content_item_label">完工数量:</view>
                        <view class="content_list_item_content_item_nr" v-if="info.umodel">{{info.doneNum}}{{info.umodel.name}}</view>
                    </view>
                </view>
            </view>
        </view>
        <NotFound info="暂未分配工单" v-if="info.workorderList && info.workorderList.length === 0" />
        <template v-else>
            <!-- <view class="details_list">
                <view class="details_list_item" v-for="(item, i) in info.workorderList" :key="i" @click="jump(item)">
                    <view class="details_list_item_top">
                        <text>{{ item.createUserName }}</text>
                        <text>{{ item.code }}</text>
                    </view>
                    <view class="details_list_item_center">
                        <text>良品数:{{ item.qualifiedNum }}</text>
                        <text>不良数:<text class="red">{{ item.unqualifiedNum }}</text></text>
                    </view>
                    <view class="details_list_item_bottom">
                        <text>{{ item.createTime }}</text>
                    </view>
                </view>
            </view> -->
            <view class="details_timeline" v-for="(item, i) in info.workorderList" :key="i">
                <view class="details_timeline_header">
                    <view class="details_timeline_header_code">
                        <text>工单编号:{{item.code}}</text>
                        <text>生产人员:{{proUserStr(item)}}</text>
                    </view>
                    <text v-if="item.status === 0" class="yellow">已创建</text>
                    <text v-if="item.status === 1" class="green">已备料</text>
                    <text v-if="item.status === 2">已完工</text>
                    <text v-if="item.status === 3" class="purple">已检验</text>
                    <text v-if="item.status === 4">已报工</text>
                    <text v-if="item.status === 5">已入库</text>
                    <text v-if="item.status === 6">已取消</text>
                    <!--                <text v-if="item.status === 7">已取消</text>-->
                    <!--                <text v-if="item.status === 8">已关闭</text>-->
                </view>
                <view class="details_timeline_item" v-if="item.produceDate">
                    <view class="activedian"></view>
                    <view class="dian active"></view>
                    <view class="x"></view>
                    <view class="details_timeline_item_zw"></view>
                    <view class="details_timeline_item_left">
                        <text class="active_font">产出</text>
                        <text>{{item.produceDate}}</text>
                    </view>
                    <view class="details_timeline_item_right">
                        <view class="item">
                            <view class="item_label">物料:</view>
                            <view class="item_nr">
                                <view class="item_nr_item" v-if="item.qualifiedNum !== 0">
                                    <text class="success">[合格品]</text>
                                    <text>{{item.qualifiedNum}}{{info.umodel.name}}</text>
                                </view>
                                <view class="item_nr_item" v-if="item.unqualifiedNum !== 0">
                                    <text class="warning">[不良品]</text>
                                    <text>{{item.unqualifiedNum}}{{info.umodel.name}}</text>
                                </view>
                            </view>
                        </view>
                    </view>
                </view>
                <view class="details_timeline_item" v-if="item.materialDate">
                    <view class="activedian" v-if="!item.produceDate"></view>
                    <view class="dian" :class="{ 'active': !item.produceDate }"></view>
                    <view class="x" :style="{ height: item.materialList.length === 1 ? '2.1rem' :  1.2 * item.materialList.length + 'rem' }"></view>
                    <view class="details_timeline_item_zw"></view>
                    <view class="details_timeline_item_left">
                        <text :class="{'active_font': !item.produceDate}">投料</text>
                        <text>{{item.materialDate}}</text>
                    </view>
                    <view class="details_timeline_item_right">
                        <view class="item">
                            <view class="item_label">物料:</view>
                            <view class="item_nr" v-if="item.materialList && item.materialList.length !== 0">
                                <view class="item_nr_item" v-for="(items, idx) in item.materialList" :key="idx">
                                    <text style="margin: 0;">{{items.name}}&nbsp;/&nbsp;{{items.num}}{{items.unitName}}</text>
                                </view>
                            </view>
                        </view>
                    </view>
                </view>
                <view class="details_timeline_item">
                    <view class="activedian" v-if="!item.materialDate && !item.produceDate"></view>
                    <view class="dian" :class="{ 'active': !item.materialDate && !item.produceDate }"></view>
                    <view class="details_timeline_item_zw"></view>
                    <view class="details_timeline_item_left">
                        <text :class="{'active_font': !item.materialDate && !item.produceDate}">分配</text>
                        <text>{{ item.distributeDate }}</text>
                    </view>
                    <view class="details_timeline_item_right">
                        <view class="item">
                            <view class="item_label">分配数量:</view>
                            <view class="item_nr">{{item.planNum}}{{info.umodel.name}}</view>
                        </view>
                    </view>
                </view>
            </view>
        </template>
        <!-- <view class="details_zw"></view> -->
        <!-- <view class="details_btn" @click="toJump">去报工</view> -->
    </view>
</template>
<script>
    export default {
        data() {
            return {
                info: {}
            };
        },
        methods: {
            // èŽ·å–è¯¦æƒ…
            queryByIDs() {
                queryByID(this.$route.query.id)
                    .then(res => {
                        if (res.code === 200) {
                            this.info = res.data
                        }
                    })
            },
            proUserStr(item) {
                if (!item.proUserList || item.proUserList.length<1) {
                    return '-'
                }
                return item.proUserList.map(user => { return user.proUserDepartName }).join(',')
            }
        }
    }
</script>
<style lang="scss" scoped>
.details {
    width: 100%;
    height: 100%;
    position: absolute;
    background: #F7F7F7;
    .details_zw {
        width: 100%;
        height: 148rpx;
    }
    .details_btn {
        position: fixed;
        bottom: 60rpx;
        left: 30rpx;
        width: calc(100% - 60rpx);
        height: 88rpx;
        line-height: 88rpx;
        text-align: center;
        background: #305ED5;
        box-shadow: 0rpx 0rpx 12rpx 0rpx rgba(0,0,0,0.08);
        border-radius: 8rpx;
        font-size: 30rpx;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #FFFFFF;
    }
    .van-skeleton {
        padding: 0 !important;
    }
    .content_list {
        width: 100%;
        padding: 30rpx;
        background: #ffffff;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        .content_list_item {
            display: flex;
            flex-direction: column;
            .content_list_item_top {
                display: flex;
                align-items: center;
                justify-content: space-between;
                .content_list_item_top_left {
                    display: flex;
                    align-items: center;
                    max-width: 83%;
                    text {
                        max-width: 400rpx;
                        font-size: 32rpx;
                        font-weight: 500;
                        color: #333333;
                        overflow: hidden;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                    }
                    .dangerous {
                        background: $nav-stateColor4 !important;
                    }
                    .warning {
                        background: $nav-stateColor5 !important;
                    }
                    .content_list_item_top_left_type {
                        flex-shrink: 0;
                        padding: 5rpx 10rpx;
                        background: $nav-stateColor2;
                        border-radius: 8rpx;
                        font-size: 22rpx;
                        font-weight: 400;
                        color: #FFFFFF;
                        margin-left: 16rpx;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }
                    .content_list_item_top_left_tag {
                        flex-shrink: 0;
                        padding: 5rpx 10rpx;
                        background: $nav-stateColor4;
                        border-radius: 8rpx;
                        font-size: 22rpx;
                        font-weight: 400;
                        color: #FFFFFF;
                        margin-left: 16rpx;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }
                }
                .content_list_item_top_right {
                    font-size: 26rpx;
                    font-weight: 400;
                    flex-shrink: 0;
                    .warning {
                        color: $nav-stateColor5 !important;
                    }
                    .green {
                        color: $nav-stateColor6 !important;
                    }
                    .info {
                        color: $nav-stateColor3 !important;
                    }
                }
            }
            .content_list_item_content {
                padding: 24rpx 30rpx;
                background: #F7F7F7;
                border-radius: 16rpx;
                display: flex;
                flex-wrap: wrap;
                justify-content: space-between;
                margin-top: 32rpx;
                .content_list_item_content_item {
                    width: 50%;
                    display: flex;
                    margin-top: 24rpx;
                    &:nth-child(1) {
                        margin-top: 0 !important;
                    }
                    &:nth-child(2) {
                        margin-top: 0 !important;
                    }
                    .content_list_item_content_item_label {
                        font-size: 24rpx;
                        font-weight: 400;
                        color: #666666;
                        flex-shrink: 0;
                    }
                    .content_list_item_content_item_nr {
                        font-size: 24rpx;
                        font-weight: 400;
                        color: #222222;
                        margin-right: 10rpx;
                    }
                }
            }
        }
    }
    .details_list {
        width: 100%;
        height: auto;
        background-color: #FFFFFF;
        margin-top: 20rpx;
        .details_list_item {
            width: 100%;
            padding: 24rpx 30rpx;
            box-sizing: border-box;
            background-color: #FFFFFF;
            border-bottom: 2rpx solid #F7F7F7;
            &:last-child {
                border: none !important;
            }
            .details_list_item_top {
                width: 100%;
                display: flex;
                align-items: center;
                text {
                    &:first-child {
                        font-size: 30rpx;
                        font-family: PingFangSC-Medium, PingFang SC;
                        font-weight: 500;
                        color: #222222;
                        margin-right: 16rpx;
                    }
                    &:last-child {
                        font-size: 24rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #666666;
                    }
                }
            }
            .details_list_item_center {
                width: 100%;
                margin: 16rpx 0 20rpx 0;
                .red {
                    color: #DE5243;
                }
                text {
                    &:first-child {
                        font-size: 26rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #333333;
                        margin-right: 100rpx;
                    }
                    &:last-child {
                        font-size: 26rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #333333;
                    }
                }
            }
            .details_list_item_bottom {
                text {
                    font-size: 24rpx;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #999999;
                }
            }
        }
    }
    .details_timeline {
        padding: 30rpx;
        background: #ffffff;
        margin-top: 20rpx;
        .details_timeline_header {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            .yellow {
                color: $nav-stateColor1 !important;
            }
            .green {
                color: $nav-stateColor6 !important;
            }
            .purple {
                color: $nav-color !important;
            }
            text {
                font-size: 26rpx;
                font-weight: 400;
                color: #666666;
            }
            .details_timeline_header_code {
                display: flex;
                flex-direction: column;
                text {
                    &:first-child {
                        font-size: 28rpx;
                        font-weight: 500;
                        color: #222222;
                    }
                    &:last-child {
                        font-size: 22rpx;
                        font-weight: 400;
                        color: #777777;
                        margin-top: 24rpx;
                    }
                }
            }
        }
        .details_timeline_item {
            display: flex;
            align-items: flex-start;
            position: relative;
            margin-top: 60rpx;
            &:nth-child(1) {
                margin-top: 0 !important;
            }
            .x {
                position: absolute;
                top: 30rpx;
                left: 29rpx;
                width: 1rpx;
                height: 165rpx;
                border-right: 1rpx dashed #CCCCCC;
            }
            .dian {
                position: absolute;
                top: 22rpx;
                left: 22rpx;
                width: 16rpx;
                height: 16rpx;
                background: #CCCCCC;
                border-radius: 50%;
            }
            .active {
                width: 16rpx;
                height: 16rpx;
                background: $nav-color;
                z-index: 8;
            }
            .activedian {
                position: absolute;
                top: 14rpx;
                left: 14rpx;
                width: 32rpx;
                height: 32rpx;
                background: #E4EBFE;
                border-radius: 50%;
            }
            .details_timeline_item_zw {
                width: 100rpx;
            }
            .details_timeline_item_left {
                display: flex;
                flex-direction: column;
                width: 150rpx;
                .active_font {
                    color: $nav-color !important;
                }
                text {
                    &:nth-child(1) {
                        font-size: 30rpx;
                        font-weight: 500;
                        color: #333333;
                    }
                    &:nth-child(2) {
                        font-size: 22rpx;
                        font-weight: 400;
                        color: #999999;
                        margin-top: 16rpx;
                    }
                }
            }
            .details_timeline_item_right {
                display: flex;
                flex-direction: column;
                flex: 1;
                margin-left: 30rpx;
                .item {
                    display: flex;
                    align-items: flex-start;
                    margin-top: 24rpx;
                    &:nth-child(1) {
                        margin-top: 0 !important;
                    }
                    .item_label {
                        font-size: 26rpx;
                        font-weight: 400;
                        color: #666666;
                        flex-shrink: 0;
                    }
                    .item_nr {
                        font-size: 26rpx;
                        font-weight: 400;
                        color: #333333;
                        .item_nr_item {
                            display: flex;
                            align-items: center;
                            margin-bottom: 24rpx;
                            .success {
                                color: $nav-stateColor2;
                            }
                            .warning {
                                color: $nav-stateColor5;
                            }
                            text {
                                font-size: 26rpx;
                                font-weight: 400;
                                &:last-child {
                                    color: #333333;
                                    margin-left: 12rpx;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
</style>
minipro_standard/pages/plannedProgress/plannedProgress.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,632 @@
<template>
    <view class="content">
        <view class="content_search">
            <Search @searchInput="searchInput" @submit="submit" @reset="reset" :isShow="true" placeholder="搜索物料名称/编码/工序名称">
                <template v-slot:content>
                    <view class="Search_item">
                        <view class="Search_item_label">计划日期</view>
                        <view class="Search_item_content" @click="openDate">
                            <view class="Search_item_content_a" :style="listData.startDate ? 'color: #000' : ''">{{ listData.startDate ? listData.startDate : '开始日期'}}</view>
                            <text>-</text>
                            <view class="Search_item_content_a" :style="listData.endDate ? 'color: #000' : ''">{{ listData.endDate ? listData.endDate : '结束日期'}}</view>
                        </view>
                    </view>
                    <view class="Search_item">
                        <view class="Search_item_label">生产工厂</view>
                        <view class="Search_item_content">
                            <view class="tag">
                                <view class="tag_item" :class="{'tag_active': item.isActive}" v-for="(item, i) in factoryList" :key="item.id" @click="changeTags(i, item.id)">{{item.name}}</view>
                            </view>
                        </view>
                    </view>
                    <view class="Search_item">
                        <view class="Search_item_label">工序</view>
                        <view class="Search_item_content">
                            <view class="tag">
                                <view class="tag_item" :class="{'tag_active': item.isActive}" v-for="(item, i) in data" :key="item.id" @click="changeTag(i)">{{item.name}}</view>
                            </view>
                        </view>
                    </view>
                </template>
            </Search>
            <view class="content_search_x"></view>
            <LabelSelection :TagList="tagList" :isShow="true" @change="clickTag" />
        </view>
        <view class="content_total" :style="{top: top}">共{{listData.total}}条数据</view>
        <view class="content_list">
            <scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
                <view class="content_list_item" v-for="item in lists" :key="item.id" @click="jump(item)">
                    <view class="content_list_item_top">
                        <view class="content_list_item_top_left">
                            <text v-if="item.mmodel">{{item.mmodel.name}}</text>
                            <view class="content_list_item_top_left_tag" v-if="item.urgent">优先{{item.urgent}}</view>
                            <view class="content_list_item_top_left_tag warning" v-if="item.paused === 1">停</view>
                        </view>
                        <view class="content_list_item_top_right">
                            <text v-if="item.status === 0">已生成</text>
                            <text v-if="item.status === 1">已发布</text>
                            <text v-if="item.status === 2">已撤回</text>
                            <text v-if="item.status === 3">已取消</text>
                            <text v-if="item.status === 4">已分配</text>
                            <text v-if="item.status === 5">已暂停</text>
                            <text v-if="item.status === 6">已完工</text>
                            <text v-if="item.status === 7">已入库</text>
                            <text v-if="item.status === 8">已关闭</text>
<!--                            <text class="warning" v-if="item.status === 0">待发布</text>-->
<!--                            <text class="green" v-else-if="item.status === 1 || item.status === 4">生产中</text>-->
<!--                            <text class="info" v-else-if="item.status === 6 || item.status === 7 || item.status === 3 || item.status === 8">已完成</text>-->
                        </view>
                    </view>
                    <view class="content_list_item_content">
                        <view class="content_list_item_content_item" v-if="item.pmodel">
                            <view class="content_list_item_content_item_label">工序名称:</view>
                            <view class="content_list_item_content_item_nr">{{item.pmodel.name}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">计划日期:</view>
                            <view class="content_list_item_content_item_nr">{{item.planDate}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">物料编码:</view>
                            <view class="content_list_item_content_item_nr" v-if="item.mmodel">{{item.mmodel.code}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">计划数量:</view>
                            <view class="content_list_item_content_item_nr" v-if="item.umodel">{{item.num}}{{item.umodel.name}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">生产批次:</view>
                            <view class="content_list_item_content_item_nr">{{item.batch}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">发布日期:</view>
                            <view class="content_list_item_content_item_nr">{{item.publishDate ? item.publishDate : '-'}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">计划人员:</view>
                            <view class="content_list_item_content_item_nr">{{item.usermodel.realname}}</view>
                        </view>
                        <view class="content_list_item_content_item">
                            <view class="content_list_item_content_item_label">生产工厂:</view>
                            <view class="content_list_item_content_item_nr">{{item.fmodel.name}}</view>
                        </view>
                    </view>
                </view>
            </scroll-view>
        </view>
        <!-- é€‰æ‹©æ—¥æœŸ -->
        <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm"></u-calendar>
    </view>
</template>
<script>
    import Search from '@/components/Search.vue'
    import LabelSelection from '@/components/LabelSelection.vue'
    export default {
        components: { Search, LabelSelection },
        data() {
            return {
                height: '',
                top: '',
                listData: {
                    capacity: 10,
                    page: 0,
                    total: 0,
                    startDate: '',
                    endDate: '',
                    procedureIds: [],
                    departIds: '',
                    mixParam: '',
                    cateIds: []
                },
                tagList: [
                    {
                        id: '',
                        name: '全部',
                        num: '0'
                    },
                    {
                        id: '0',
                        name: '待发布',
                        num: '0'
                    },
                    {
                        id: '1,4',
                        name: '生产中',
                        num: '0'
                    },
                    {
                        id: '6, 7, 3, 8',
                        name: '已完成',
                        num: '0'
                    }
                ],
                data: [],    // å·¥åºæ•°æ®
                factoryList: [],
                finished: true,
                loading: false,
                refreshing: false,
                timeShow: false,
                lists: [
                    {
                        id: 1,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 2,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 3,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 4,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    },
                    {
                        id: 5,
                        status: 0,
                        urgent: 1,
                        num: 100,
                        batch: '11111',
                        planDate: '2023-08-29',
                        mmodel: {
                            name: '工序计划',
                            code: 'fbdseasafghb'
                        },
                        usermodel: {
                            realname: '计划人员'
                        },
                        pmodel: {
                            name: '工序计划'
                        },
                        fmodel: {
                            name: '工厂'
                        }
                    }
                ]
            };
        },
        onReady() {
            var that = this
            this.$nextTick(() => {
                uni.createSelectorQuery().in(this).select('.content_search').boundingClientRect((rect) => {
                    that.height = `calc(100vh - ${rect.height + 80}px)`
                    that.top = `${rect.height}px`
                }).exec()
            })
        },
        methods: {
            // è·³è½¬
            jump(item) {
                uni.navigateTo({
                    url: `/pages/planDetails/planDetails?id=${item.id}`
                })
            },
            // èŽ·å–å¤´éƒ¨ç»„ä»¶é«˜åº¦
            getHeight(height) {
                this.height = height
            },
            // é‡ç½®
            reset() {
                this.listData.page = 0
                this.finished = false
                this.lists = []
                this.listData.mixParam = ''
                this.listData.startDate = ''
                this.listData.endDate = ''
                this.listData.procedureIds = []
                if (this.factoryList.length > 0) {
                    this.listData.departIds = this.factoryList[0].id
                }
                if (this.data.length > 0) {
                    this.data.forEach(item => { item.isActive = false })
                }
                // this.getLists()
                // this.pageCounts()
            },
            // æ—¥æœŸç¡®å®š
            timeConfirm(val) {
                this.listData.startDate = val[0]
                this.listData.endDate = val[val.length - 1]
                this.timeShow = false
            },
            // åˆ‡æ¢å·¥åŽ‚
            changeTags(i, id) {
                this.listData.departIds = id
                this.getWorkingProcedures(id)
                this.factoryList.forEach((item, index) => {
                    if (index === i) {
                        item.isActive = true
                    } else {
                        item.isActive = false
                    }
                })
            },
            // æ‰“开日期插件
            openDate() {
                this.timeShow = true
            },
            // æœç´¢
            searchInput(val) {
                this.listData.mixParam = val
                this.listData.page = 0
                this.finished = false
                this.lists = []
                this.getLists()
            },
            // ç‚¹å‡»æ ‡ç­¾æœç´¢
            clickTag(ids) {
                this.listData.cateIds = ids
                this.listData.page = 0
                this.finished = false
                this.lists = []
                // this.getLists()
            },
            // èŽ·å–åˆ—è¡¨ç»Ÿè®¡
            pageCounts() {
                pageCount({
                    factoryId: this.listData.departIds,
                    procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
                    startDate: this.listData.startDate,
                    endDate: this.listData.endDate,
                    statusList: this.listData.cateIds
                }).then(res => {
                    if (res.code === 200 && res.data) {
                        this.tagList[0].num = res.data.allNum.toString()
                        this.tagList[1].num = res.data.startNum.toString()
                        this.tagList[2].num = res.data.ingNum.toString()
                        this.tagList[3].num = res.data.endNum.toString()
                    }
                })
            },
            // èŽ·å–å·¥åŽ‚æ•°æ®
            getOrganizations() {
                getOrganization({
                    type: 1
                }).then(res => {
                    if (res.code === 200 && res.data && res.data.length !== 0) {
                        res.data.forEach((item, i) => {
                            item.isActive = i === 0;
                        })
                        if (res.data.length > 0) {
                            this.factoryList = res.data
                            this.listData.departIds = this.factoryList[0].id
                            this.listData.procedureIds = ''
                            this.finished = false
                            this.getWorkingProcedures(this.factoryList[0].id)
                            this.getLists()
                            this.pageCounts()
                        }
                    }
                })
            },
            // èŽ·å–å·¥åºæ•°æ®
            getWorkingProcedures(orgId) {
                this.data = []
                getWorkingProcedure({ orgId })
                    .then(res => {
                        if (res.code === 200 && res.data && res.data.length !== 0) {
                            res.data.forEach((item, i) => {
                                item.isActive = false;
                            })
                            this.data = res.data
                        }
                    })
            },
            // æœç´¢å¼¹æ¡†æäº¤
            submit()  {
                let pmodelOrgId = []
                this.data.forEach((item) => {
                    if (item.isActive) {
                        pmodelOrgId.push(item.id)
                    }
                })
                this.listData.procedureIds = pmodelOrgId
                this.listData.page = 0
                this.finished = false
                this.lists = []
                // this.getLists()
                // this.pageCounts()
            },
            // èŽ·å–è®¡åˆ’åˆ—è¡¨æ•°æ®
            getLists() {
                console.log('getLists')
                if (!this.finished) {
                    this.loading = true
                    this.listData.page = this.listData.page++
                    getList({
                        capacity: this.listData.capacity,
                        model: {
                            mixParam: this.listData.mixParam,
                            startDate: this.listData.startDate,
                            endDate: this.listData.endDate,
                            procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
                            factoryId: this.listData.departIds,
                            statusList: this.listData.cateIds
                        },
                        page: this.listData.page,
                        sorts: [
                            {
                                direction: 'ASC',
                                property: 'publishDate'
                            }
                        ]
                    }).then(res => {
                        this.loading = false
                        this.listData.total = res.data.total
                        if (this.refreshing) {
                            this.lists = []
                            this.refreshing = false;
                        }
                        if (res.code === 200 && res.data.records.length !== 0) {
                            if (this.lists.length === 0) {
                                this.lists = res.data.records
                            } else {
                                this.lists.push(...res.data.records)
                            }
                        } else {
                            this.finished = true
                        }
                    }).catch(err => {
                        this.loading = false
                        this.finished = true
                        if (this.refreshing) {
                            this.lists = []
                            this.refreshing = false;
                        }
                    })
                }
            }
        }
    }
</script>
<style lang="scss" scoped>
    .content {
        .content_search {
            width: 100%;
            padding: 30rpx;
            background: white;
            position: sticky;
            top: 0;
            z-index: 999;
            box-sizing: border-box;
            .Search_item {
                margin-bottom: 40rpx;
                .Search_item_label {
                    font-size: 30rpx;
                    font-weight: 500;
                    color: #222222;
                }
                .Search_item_content {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    margin-top: 30rpx;
                    .tag {
                        display: flex;
                        flex-wrap: wrap;
                        align-items: center;
                        .tag_active {
                            background: $nav-color !important;
                            color: #ffffff !important;
                        }
                        .tag_item {
                            padding: 22rpx 26rpx;
                            box-sizing: border-box;
                            background: #F2F2F2;
                            border-radius: 8rpx;
                            font-size: 26rpx;
                            font-weight: 400;
                            color: #333333;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            margin-right: 22rpx;
                            margin-bottom: 22rpx;
                        }
                    }
                    text {
                        font-size: 26rpx;
                        font-weight: 400;
                        color: #333333;
                        margin: 0 30rpx;
                    }
                    .Search_item_content_a {
                        padding: 20rpx 0;
                        flex: 1;
                        background: #F7F7F7;
                        border-radius: 8rpx;
                        border: 1rpx solid #EEEEEE;
                        font-size: 26rpx;
                        font-weight: 400;
                        color: #B2B2B2;
                        display: flex;
                        align-items: center;
                        justify-content: center;
                    }
                }
            }
            .content_search_x {
                height: 24rpx;
            }
        }
        .content_list {
            width: 100%;
            display: flex;
            flex-direction: column;
            .content_list_item {
                width: 100%;
                background: white;
                padding: 30rpx;
                box-sizing: border-box;
                display: flex;
                flex-direction: column;
                border-bottom: 1rpx solid #ececec;
                .content_list_item_top {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    .content_list_item_top_left {
                        display: flex;
                        align-items: center;
                        width: 80%;
                        text {
                            font-size: 32rpx;
                            font-weight: 500;
                            color: #333333;
                            overflow: hidden;
                            text-overflow: ellipsis;
                            white-space: nowrap;
                        }
                        .warning {
                            background: $nav-stateColor5 !important;
                        }
                        .content_list_item_top_left_tag {
                            flex-shrink: 0;
                            padding: 5rpx 10rpx;
                            background: $nav-stateColor4;
                            border-radius: 8rpx;
                            font-size: 22rpx;
                            font-weight: 400;
                            color: #FFFFFF;
                            margin-left: 16rpx;
                            display: flex;
                            align-items: center;
                            justify-content: center;
                        }
                    }
                    .content_list_item_top_right {
                        font-size: 26rpx;
                        font-weight: 400;
                        flex-shrink: 0;
                        margin-left: 10rpx;
                        .warning {
                            color: $nav-stateColor5 !important;
                        }
                        .green {
                            color: $nav-stateColor6 !important;
                        }
                        .info {
                            color: $nav-stateColor3 !important;
                        }
                    }
                }
                .content_list_item_content {
                    padding: 24rpx 30rpx;
                    background: #F7F7F7;
                    border-radius: 16rpx;
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: space-between;
                    margin-top: 32rpx;
                    .content_list_item_content_item {
                        width: 50%;
                        display: flex;
                        margin-top: 24rpx;
                        &:nth-child(1) {
                            margin-top: 0 !important;
                        }
                        &:nth-child(2) {
                            margin-top: 0 !important;
                        }
                        .content_list_item_content_item_label {
                            font-size: 24rpx;
                            font-weight: 400;
                            color: #666666;
                            flex-shrink: 0;
                        }
                        .content_list_item_content_item_nr {
                            font-size: 24rpx;
                            font-weight: 400;
                            color: #222222;
                            margin-right: 10rpx;
                        }
                    }
                }
            }
        }
        .content_total {
            width: 100%;
            height: 80rpx;
            padding: 24rpx 30rpx;
            background: #F7F7F7;
            font-size: 24rpx;
            font-weight: 400;
            box-sizing: border-box;
            color: #666666;
            position: sticky;
            z-index: 99;
        }
    }
</style>
minipro_standard/pages_adjust/components/Warehouse.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,136 @@
<template>
    <u-popup :show="show" mode="bottom" :closeable="true" :round="10" @open="open" @close="close">
        <view class="title">
            <text>选择仓库</text>
        </view>
        <view class="content">
            <view class="content_search">
                <u-search :showAction="false" placeholder="请输入仓库名称" v-model="keyword"></u-search>
            </view>
            <div class="content_total">共{{total}}条数据</div>
            <view class="content_list">
                <u-list @scrolltolower="scrolltolower">
                    <u-list-item v-for="(item, index) in indexList" :key="index">
                        <div class="content_list_item" @click="getVal(item)">
                            <div class="content_list_item_name">
                                <span style="color: #03AF76;">[DTFHNE]</span>
                                <!-- <span style="color: #03AF76;" v-if="item.tmodel.label == 'APPLIANCE_ONTEST'">[{{ item.tmodel.code }}]</span>
                                <span style="color: #305ED5;" v-if="item.tmodel.label == 'APPLIANCE_MIX'">[{{ item.tmodel.code }}]</span>
                                <span style="color: #F5A400;" v-if="item.tmodel.label == 'APPLIANCE_OFFTEST'">[{{ item.tmodel.code }}]</span> -->
                                <!-- <span style="color: red;" v-if="item.tmodel.label == 'APPLIANCE_USELESS'">[{{ item.tmodel.code }}]</span> -->
                                <span>{{item.name}}</span>
                            </div>
                        </div>
                    </u-list-item>
                </u-list>
            </view>
        </view>
    </u-popup>
</template>
<script>
    export default {
        props: {
            show: Boolean
        },
        data() {
            return {
                keyword: '',
                total: 0,
                indexList: []
            };
        },
        methods: {
            getVal(item) {
                this.$emit('value', item)
            },
            open() {
                this.indexList = []
                this.loadmore()
            },
            scrolltolower() {
                this.loadmore()
            },
            loadmore() {
                for (let i = 0; i < 20; i++) {
                    this.indexList.push({
                        id: i,
                        name: `仓库${i}`
                    })
                }
            },
            close() {
                this.$emit('close')
            }
        }
    }
</script>
<style lang="scss" scoped>
    .title {
        width: 100%;
        height: 85rpx;
        line-height: 85rpx;
        text-align: center;
        text {
            font-size: 30rpx;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #222222;
        }
    }
    .content {
        width: 100%;
        .content_search {
            width: 100%;
            padding: 0 30rpx 30rpx 30rpx;
            background: white;
            position: sticky;
            top: 85rpx;
            z-index: 9;
            box-sizing: border-box;
        }
        .content_total {
            padding: 24rpx 30rpx;
            background: #F7F7F7;
            font-size: 24rpx;
            font-weight: 400;
            color: #666666;
        }
        .content_list {
            width: 100%;
            height: 800rpx;
            display: flex;
            flex-direction: column;
            .content_list_item {
                padding: 30rpx;
                display: flex;
                border-bottom: 1rpx solid #ececec;
                .serious {
                    color: $nav-stateColor4 !important;
                }
                .success {
                    color: $nav-stateColor2 !important;
                }
                .warning {
                    color: $nav-stateColor5 !important;
                }
                .content_list_item_status {
                    font-size: 28rpx;
                    margin-right: 10rpx;
                }
                .content_list_item_name {
                    width: 100%;
                    display: flex;
                    align-items: center;
                    span {
                        font-size: 30rpx;
                        font-family: PingFangSC-Regular, PingFang SC;
                        font-weight: 400;
                        color: #222222;
                    }
                }
            }
        }
    }
</style>
minipro_standard/pages_adjust/components/location.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
<template>
    <u-popup :show="show" mode="bottom" :closeable="true" :round="10" @open="open" @close="close">
        <view class="title">
            <text>选择货位</text>
        </view>
        <view class="content">
            <view class="content_list">
                <u-list @scrolltolower="scrolltolower">
                    <u-list-item v-for="(item, index) in indexList" :key="index">
                        <div class="content_list_item">
                            <div class="content_list_item_name">
                                è´§ä½{{index}}
                            </div>
                        </div>
                    </u-list-item>
                </u-list>
            </view>
        </view>
    </u-popup>
</template>
<script>
    export default {
        props: {
            show: Boolean
        },
        data() {
            return {
                indexList: [1,2,3,4,5,6,7,8,9]
            };
        },
    }
</script>
<style lang="scss" scoped>
    .title {
        width: 100%;
        height: 85rpx;
        line-height: 85rpx;
        text-align: center;
        text {
            font-size: 30rpx;
            font-family: PingFangSC-Medium, PingFang SC;
            font-weight: 500;
            color: #222222;
        }
    }
    .content {
        width: 100%;
        .content_search {
            width: 100%;
            padding: 0 30rpx 30rpx 30rpx;
            background: white;
            position: sticky;
            top: 85rpx;
            z-index: 9;
            box-sizing: border-box;
        }
        .content_total {
            padding: 24rpx 30rpx;
            background: #F7F7F7;
            font-size: 24rpx;
            font-weight: 400;
            color: #666666;
        }
        .content_list {
            width: 100%;
            height: 800rpx;
            display: flex;
            flex-direction: column;
            .content_list_item {
                padding: 30rpx;
                display: flex;
                border-bottom: 1rpx solid #ececec;
                .serious {
                    color: $nav-stateColor4 !important;
                }
                .success {
                    color: $nav-stateColor2 !important;
                }
                .warning {
                    color: $nav-stateColor5 !important;
                }
                .content_list_item_status {
                    font-size: 28rpx;
                    margin-right: 10rpx;
                }
                .content_list_item_name {
                    font-size: 30rpx;
                    font-family: PingFangSC-Regular, PingFang SC;
                    font-weight: 400;
                    color: #222222;
                }
            }
        }
    }
</style>
minipro_standard/pages_adjust/pages/addReceipt/addReceipt.vue
@@ -3,16 +3,16 @@
        <view class="rework_list">
            <view class="rework_list_item">
                <text><b>*</b>单据类型</text>
                <view class="rework_list_item_right">
                <view class="rework_list_item_right" @click="typeShow = true">
                    <text :class="form.typeName ? 'black' : ''">{{form.typeName ? form.typeName : '请选择'}}</text>
                    <van-icon name="arrow" size="20" color="#999999" />
                    <u-icon name="arrow-right"></u-icon>
                </view>
            </view>
            <view class="rework_list_item">
                <text><b>*</b>入库仓库</text>
                <view class="rework_list_item_right">
                <view class="rework_list_item_right" @click="warehouseShow = true">
                    <text :class="form.warehouseName ? 'black' : ''">{{form.warehouseName ? form.warehouseName : '请选择'}}</text>
                    <van-icon name="arrow" size="20" color="#999999" />
                    <u-icon name="arrow-right"></u-icon>
                </view>
            </view>
        </view>
@@ -33,14 +33,14 @@
                        <text><b>*</b>入库货位</text>
                        <view class="rework_qd_item_right">
                            <text :class="item.locationName ? 'black' : ''">{{item.locationName ? item.locationName : '请选择'}}</text>
                            <van-icon name="arrow" size="20" color="#999999" />
                            <u-icon name="arrow-right"></u-icon>
                        </view>
                    </view>
                    <view class="rework_qd_item">
                        <text><b>*</b>入库物料</text>
                        <view class="rework_qd_item_right">
                            <text :class="item.materialName ? 'black' : ''">{{item.materialName ? item.materialName : '请选择'}}</text>
                            <van-icon name="arrow" size="20" color="#999999" />
                            <u-icon name="arrow-right"></u-icon>
                        </view>
                    </view>
                    <template v-if="form.type !== 25">
@@ -48,7 +48,7 @@
                            <text>生产工序</text>
                            <view class="rework_qd_item_right">
                                <text :class="item.procedureName ? 'black' : ''">{{item.procedureName ? item.procedureName : '请选择'}}</text>
                                <van-icon name="arrow" size="20" color="#999999" />
                                <u-icon name="arrow-right"></u-icon>
                            </view>
                        </view>
                    </template>
@@ -56,19 +56,19 @@
                        <text><b>*</b>质量属性</text>
                        <view class="rework_qd_item_right">
                            <text :class="item.qualityTypeName ? 'black' : ''">{{item.qualityTypeName ? item.qualityTypeName : '请选择'}}</text>
                            <van-icon name="arrow" size="20" color="#999999" />
                            <u-icon name="arrow-right"></u-icon>
                        </view>
                    </view>
                    <view class="rework_qd_item">
                        <text>批次号</text>
                        <view class="rework_qd_item_right">
                            <input type="text" v-model="item.batch" placeholder="请输入" />
                            <u--input placeholder="请输入" style="width: 230rpx;" border="surround" v-model="item.batch"></u--input>
                        </view>
                    </view>
                    <view class="rework_qd_item">
                        <text><b>*</b>入库数量<template v-if="item.unitName">({{ item.unitName }})</template></text>
                        <view class="rework_qd_item_right">
                            <input type="text" v-model="item.num" placeholder="0" />
                            <u--input placeholder="0" border="surround" v-model="item.num"></u--input>
                        </view>
                    </view>
                </view>
@@ -82,11 +82,20 @@
            <button class="rework_footer_submit">提交</button>
        </view>
        <u-toast ref="uToast"></u-toast>
        <!-- ä»“库 -->
        <Warehouse :show="warehouseShow" @close="close" @value="getValue" />
        <!-- è´§ä½ -->
        <location :show="locationShow" @close="close1" @value="getValue1" />
        <!-- å•据类型 -->
        <u-picker :show="typeShow" keyName="name" :columns="typeList" @confirm="confirm" @cancel="typeClose"></u-picker>
    </view>
</template>
<script>
    import Warehouse from '../../components/Warehouse.vue'
    import location from '../../components/location.vue'
    export default {
        components: { Warehouse, location },
        data() {
            return {
                form: {
@@ -95,10 +104,50 @@
                    type: '',
                    typeName: ''
                },
                list: []
                list: [
                    {
                        batch: '',
                        locationId: '',
                        locationIdLabel: '',
                        locationName: '',
                        materialId: '',
                        materialName: '',
                        num: '',
                        hasBom: '',
                        procedureId: '',
                        procedureName: '',
                        qualityType: '',
                        qualityTypeName: '',
                        unitId: '',
                        unitName: ''
                    }
                ],
                typeList: [[{name: '采购入库', id: 25}, {name: '库存调整', id: 28}]],
                warehouseShow: false,
                typeShow: false,
                locationShow: false
            };
        },
        methods: {
            // ç¡®è®¤å•据类型
            confirm(val) {
                this.form.type = val.value[0].id
                this.form.typeName = val.value[0].name
                this.typeShow = false
            },
            // ä»“库确认
            getValue(val) {
                this.form.warehouseName = val.name
                this.form.warehouseId = val.id
                this.warehouseShow = false
            },
            typeClose() {
                this.typeShow = false
            },
            close() {
                this.warehouseShow = false
            },
            // æ·»åŠ æ˜Žç»†
            addItem() {
                if (!this.form.warehouseId) return this.$refs.uToast.show({ type: 'default', message: "请选择入库仓库" })
                this.list.push({
@@ -133,12 +182,12 @@
<style lang="scss" scoped>
    .rework {
        width: 100%;
        height: 100%;
        position: absolute;
        min-height: 100vh;
        background-color: #F7F7F7;
        .rework_list {
            display: flex;
            flex-direction: column;
            background: white;
            background: #ffffff;
            padding: 0 30rpx;
            box-sizing: border-box;
            .rework_list_item {
minipro_standard/store/index.js
@@ -1,6 +1,6 @@
import Vue from 'vue'
import Vuex from 'vuex'
import { pageCount } from '@/util/api/index.js'
import { pageCount, getTreeList } from '@/util/api/index.js'
Vue.use(Vuex) // vue的插件机制
@@ -8,7 +8,8 @@
const statusbarHeight = uni.getStorageSync('statusbarHeight');
const menuButtonWidth = uni.getStorageSync('menuButtonWidth');
const token = uni.getStorageSync('token');
const userInfo = uni.getStorageSync('userInfo');
const userInfo = uni.getStorageSync('userInfo');
const Menu = uni.getStorageSync('MenuList');
// Vuex.Store æž„造器选项
@@ -20,7 +21,9 @@
        token: token || null,
        menuButtonWidth: menuButtonWidth || '0',
        statusbarHeight: statusbarHeight || '0',
        navHeight: navHeight || '0',
        navHeight: navHeight || '0',
        // èœå•权限
        Menu: Menu ? Menu : [],
        // å¾…办数量
        upcomingNum: {
            d: 0,
@@ -47,12 +50,22 @@
        SETNUM(state, val) {
            state.upcomingNum.d = val.d
            state.upcomingNum.y = val.y
        },
        SETMENU (state, data) {
            state.Menu = data
            uni.setStorageSync('MenuList', JSON.stringify(data));
        }
    },
    actions: {
        // å‘后端获取菜单栏权限
        async getMenuList (content, type) {
            let res = await getTreeList({ type: type })
            if (res.code === 200) {
                content.commit('SETMENU', res.data)
            }
        },
        // èŽ·å–çŠ¶æ€é«˜åº¦
        getHeight(context) {
        getHeight(context) {
            let res = uni.getMenuButtonBoundingClientRect()
            let status = uni.getSystemInfoSync()
            let menuButtonWidth = res.width
minipro_standard/uni.scss
@@ -17,6 +17,15 @@
$nav-color: #4275FC;
// å…¨å±€çŠ¶æ€è‰²
$nav-stateColor1: #305ED5;
$nav-stateColor2: #03AF76;
$nav-stateColor3: #999999;
$nav-stateColor4: #de5243;
$nav-stateColor5: #F5A400;
$nav-stateColor6: #666666;
$nav-stateColor7: #03AF76;
/* è¡Œä¸ºç›¸å…³é¢œè‰² */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
minipro_standard/uni_modules/uview-ui/components/u-list-item/u-list-item.vue
@@ -49,9 +49,9 @@
                const preLoadScreen = this.uList.preLoadScreen
                const windowHeight = this.sys.windowHeight
                if(n <= windowHeight * preLoadScreen) {
                    this.parent.updateOffsetFromChild(0)
                    // this.parent.updateOffsetFromChild(0)
                } else if (this.rect.top <= n - windowHeight * preLoadScreen) {
                    this.parent.updateOffsetFromChild(this.rect.top)
                    // this.parent.updateOffsetFromChild(this.rect.top)
                }
            }
            // #endif
minipro_standard/util/api/index.js
@@ -17,7 +17,6 @@
// èœå•数据
export function getTreeList(params) {
    return http.get('/system/menu/treeNodes', {params})
}
// é€€å‡ºç™»å½•
@@ -25,3 +24,12 @@
    return http.get(`/wechat/logout`)
}
// ç™»å½•
export function wxAccountLogin(data) {
    return http.post('/system/wxAccountLogin', data)
}
// èŽ·å–å½“å‰ç™»å½•ç”¨æˆ·ä¿¡æ¯
export function getUserInfo(params) {
    return http.get('/system/getUserInfo', {params})
}